diff --git a/generators/csharp/base/src/asIs/test/RawClientTests/MultipartFormTests.Template.cs b/generators/csharp/base/src/asIs/test/RawClientTests/MultipartFormTests.Template.cs index e75302c9641d..6c37ac4babf6 100644 --- a/generators/csharp/base/src/asIs/test/RawClientTests/MultipartFormTests.Template.cs +++ b/generators/csharp/base/src/asIs/test/RawClientTests/MultipartFormTests.Template.cs @@ -1055,9 +1055,9 @@ private static string GetBoundary(MultipartFormDataContent content) .Value?.Trim('"') ?? throw new global::System.Exception("Boundary not found"); } - private static <%= namespaces.core %>.MultipartFormRequest CreateMultipartFormRequest() + private static <%= namespaces.qualifiedCore %>.MultipartFormRequest CreateMultipartFormRequest() { - return new <%= namespaces.core %>.MultipartFormRequest + return new <%= namespaces.qualifiedCore %>.MultipartFormRequest { BaseUrl = "https://localhost", Method = HttpMethod.Post, diff --git a/generators/csharp/base/src/asIs/test/RawClientTests/RetriesTests.Template.cs b/generators/csharp/base/src/asIs/test/RawClientTests/RetriesTests.Template.cs index cd5eb0289889..c5ff126b47ad 100644 --- a/generators/csharp/base/src/asIs/test/RawClientTests/RetriesTests.Template.cs +++ b/generators/csharp/base/src/asIs/test/RawClientTests/RetriesTests.Template.cs @@ -145,7 +145,7 @@ public async SystemTask SendRequestAsync_ShouldNotRetry_WithMultiPartFormRequest .WillSetStateTo("Server Error") .RespondWith(WireMockResponse.Create().WithStatusCode(429).WithBody("Failure")); - var request = new <%= namespaces.core %>.MultipartFormRequest{ + var request = new <%= namespaces.qualifiedCore %>.MultipartFormRequest{ BaseUrl = _baseUrl, Method = HttpMethod.Post, Path = "/test", @@ -185,12 +185,12 @@ public async SystemTask SendRequestAsync_ShouldRetry_WithMultiPartFormRequest_Wi .WhenStateIs("Success") .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - var request = new <%= context.namespaces.core %>.MultipartFormRequest{ - BaseUrl = _baseUrl, - Method = HttpMethod.Post, - Path = "/test", - }; - request.AddJsonPart("object", new {}); + var request = new <%= context.namespaces.qualifiedCore %>.MultipartFormRequest{ + BaseUrl = _baseUrl, + Method = HttpMethod.Post, + Path = "/test", + }; + request.AddJsonPart("object", new {}); var response = await _rawClient.SendRequestAsync(request); Assert.That(response.StatusCode, Is.EqualTo(200)); @@ -373,8 +373,8 @@ public async SystemTask SendRequestAsync_ShouldPreserveMultipartBody_OnRetry() .WhenStateIs("Success") .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - var request = new <%= context.namespaces.core %>.MultipartFormRequest - { + var request = new <%= context.namespaces.qualifiedCore %>.MultipartFormRequest + { BaseUrl = _baseUrl, Method = HttpMethod.Post, Path = "/test", diff --git a/generators/csharp/base/src/asIs/test/Utils/AdditionalPropertiesComparer.Template.cs b/generators/csharp/base/src/asIs/test/Utils/AdditionalPropertiesComparer.Template.cs index 07179d968c3b..190f5eb085cd 100644 --- a/generators/csharp/base/src/asIs/test/Utils/AdditionalPropertiesComparer.Template.cs +++ b/generators/csharp/base/src/asIs/test/Utils/AdditionalPropertiesComparer.Template.cs @@ -1,7 +1,7 @@ using System.Text.Json; using NUnit.Framework.Constraints; -using <%= namespaces.root %>; -using <%= namespaces.root %>.Core; +using <%= namespaces.qualifiedRoot %>; +using <%= namespaces.qualifiedRoot %>.Core; namespace NUnit.Framework; diff --git a/generators/csharp/base/src/asIs/test/Utils/JsonAssert.Template.cs b/generators/csharp/base/src/asIs/test/Utils/JsonAssert.Template.cs index 5874af4c5e2a..b38905514b21 100644 --- a/generators/csharp/base/src/asIs/test/Utils/JsonAssert.Template.cs +++ b/generators/csharp/base/src/asIs/test/Utils/JsonAssert.Template.cs @@ -1,6 +1,6 @@ using global::System.Text.Json; using NUnit.Framework; -using <%= namespaces.core%>; +using <%= namespaces.qualifiedCore%>; namespace <%= namespace%>; diff --git a/generators/csharp/base/src/asIs/test/Utils/OptionalComparer.Template.cs b/generators/csharp/base/src/asIs/test/Utils/OptionalComparer.Template.cs index 01e8347b6608..5cc26a39e527 100644 --- a/generators/csharp/base/src/asIs/test/Utils/OptionalComparer.Template.cs +++ b/generators/csharp/base/src/asIs/test/Utils/OptionalComparer.Template.cs @@ -1,5 +1,5 @@ using NUnit.Framework.Constraints; -using <%= namespaces.root %>.Core;<% if (!context.generation.settings.shouldGenerateUndiscriminatedUnions) { %> +using <%= namespaces.qualifiedRoot %>.Core;<% if (!context.generation.settings.shouldGenerateUndiscriminatedUnions) { %> using OneOf;<% } %> namespace NUnit.Framework; diff --git a/generators/csharp/base/src/proto/CsharpProtobufTypeMapper.ts b/generators/csharp/base/src/proto/CsharpProtobufTypeMapper.ts index 859fdb44bf11..a092f9c6f1aa 100644 --- a/generators/csharp/base/src/proto/CsharpProtobufTypeMapper.ts +++ b/generators/csharp/base/src/proto/CsharpProtobufTypeMapper.ts @@ -1040,10 +1040,10 @@ class FromProtoPropertyMapper extends WithGeneration { }): ast.CodeBlock { switch (primitive.v1) { case "DATE_TIME": - return this.csharp.codeblock(`${propertyName}.ToDateTime()`); + return this.csharp.codeblock(`${propertyName}?.ToDateTime()`); case "BASE_64": // Proto bytes fields are ByteString; SDK exposes byte[]. - return this.csharp.codeblock(`${propertyName}.ToByteArray()`); + return this.csharp.codeblock(`${propertyName}?.ToByteArray()`); case "DATE": case "INTEGER": case "LONG": diff --git a/generators/csharp/codegen/src/ast/core/Writer.ts b/generators/csharp/codegen/src/ast/core/Writer.ts index c560581164f3..fb166ac1a4e8 100644 --- a/generators/csharp/codegen/src/ast/core/Writer.ts +++ b/generators/csharp/codegen/src/ast/core/Writer.ts @@ -130,10 +130,17 @@ ${this.buffer}`; !this.isCurrentNamespace(ns) && // filter out the current namespace. !this.generation.registry.isNamespaceImplicit(ns) // filter out implicitly imported namespaces. ) - .map( - ([ns, refs]) => - `using ${refs.some((ref) => ref?.global) ? "global::" : ""}${refs.length > 0 ? (refs[0] as ClassReference).resolveNamespace() : ns};` - ) + .map(([ns, refs]) => { + const resolvedNs = refs.length > 0 ? (refs[0] as ClassReference).resolveNamespace() : ns; + const firstSegment = resolvedNs.split(".")[0]; + // Add global:: prefix when: + // 1. Any ref explicitly requires global qualification, OR + // 2. The first segment of the namespace is both a type name and a namespace root, + // which would cause CS0426 in C# (e.g., class "Candid" shadowing namespace "Candid.Net") + const needsGlobal = + refs.some((ref) => ref?.global) || this.generation.registry.hasTypeNamespaceConflict(firstSegment); + return `using ${needsGlobal ? "global::" : ""}${resolvedNs};`; + }) .join("\n"); if (result.length > 0) { diff --git a/generators/csharp/codegen/src/ast/types/ClassReference.ts b/generators/csharp/codegen/src/ast/types/ClassReference.ts index 7786642fffac..b44739d0257e 100644 --- a/generators/csharp/codegen/src/ast/types/ClassReference.ts +++ b/generators/csharp/codegen/src/ast/types/ClassReference.ts @@ -167,6 +167,9 @@ export class ClassReference extends Node implements Type { // if the first segment in a FQN is ambiguous, then we need to globally qualify the type if it gets expanded this.registry.isAmbiguousTypeName(this.namespaceSegments[0]) || this.registry.isAmbiguousNamespaceName(this.namespaceSegments[0]) || + // if the first namespace segment is both a type name and a namespace root, + // the C# compiler will resolve it to the type instead of the namespace (CS0426) + this.registry.hasTypeNamespaceConflict(this.namespaceSegments[0]) || // or we always are going to be using fully qualified namespaces writer.generation.settings.useFullyQualifiedNamespaces; @@ -214,7 +217,8 @@ export class ClassReference extends Node implements Type { const segments = typeQualification.split("."); if ( this.registry.isAmbiguousTypeName(segments[0]) || - this.registry.isAmbiguousNamespaceName(segments[0]) + this.registry.isAmbiguousNamespaceName(segments[0]) || + this.registry.hasTypeNamespaceConflict(segments[0]) ) { writer.write(fqName); } else { @@ -225,6 +229,11 @@ export class ClassReference extends Node implements Type { // we must to fully qualify the type // writer.addReference(this); writer.write(fqName); + } else if (this.registry.hasTypeNamespaceConflict(this.name)) { + // If the class name itself matches a root namespace segment, + // the C# compiler resolves it as the namespace instead of the type (CS0118). + // Use the fully qualified name to disambiguate. + writer.write(fqName); } else { // If the class is not ambiguous and is in this specific namespace, // we can use the short name diff --git a/generators/csharp/codegen/src/context/generation-info.ts b/generators/csharp/codegen/src/context/generation-info.ts index 68f7c367a2e1..bbb96bd88f0b 100644 --- a/generators/csharp/codegen/src/context/generation-info.ts +++ b/generators/csharp/codegen/src/context/generation-info.ts @@ -328,6 +328,10 @@ export class Generation { root: (): string => this.settings.namespace, /** Internal Core namespace for SDK implementation details and utilities ({root}.Core). */ core: (): string => `${this.namespaces.root}.Core`, + /** Pre-qualified root namespace with global:: prefix when the root segment has a type-namespace conflict. */ + qualifiedRoot: (): string => this.qualifyNamespace(this.namespaces.root), + /** Pre-qualified Core namespace with global:: prefix when the root segment has a type-namespace conflict. */ + qualifiedCore: (): string => this.qualifyNamespace(this.namespaces.core), /** Test namespace for all test-related code, canonicalized to avoid conflicts ({root}.Test). */ test: (): string => this.registry.canonicalizeNamespace(`${this.namespaces.root}.Test`), /** Test utilities namespace for helper methods and fixtures ({root}.Test.Utils). */ @@ -1201,4 +1205,17 @@ export class Generation { public get WireMock() { return this.extern.WireMock; } + + /** + * Returns a namespace string with a `global::` prefix if the first segment + * has a type-namespace conflict (e.g., class "Candid" shadowing namespace "Candid.Net"). + * Use this when writing raw namespace strings in string interpolations to avoid CS0426. + */ + public qualifyNamespace(ns: string): string { + const firstSegment = ns.split(".")[0]; + if (firstSegment && this.registry.hasTypeNamespaceConflict(firstSegment)) { + return `global::${ns}`; + } + return ns; + } } diff --git a/generators/csharp/codegen/src/context/name-registry.ts b/generators/csharp/codegen/src/context/name-registry.ts index 8082ecec13d7..6ab1793601b1 100644 --- a/generators/csharp/codegen/src/context/name-registry.ts +++ b/generators/csharp/codegen/src/context/name-registry.ts @@ -735,6 +735,10 @@ export class NameRegistry { this.typeNames.set("System", new Set(["System"])); this.typeNames.set("NUnit", new Set(["NUnit"])); this.typeNames.set("OneOf", new Set(["OneOf"])); + // Also track NUnit and OneOf as known built-in identifiers so they + // are excluded from type-namespace conflict detection (just like System) + this.knownBuiltInIdentifiers.add("NUnit"); + this.knownBuiltInIdentifiers.add("OneOf"); } /** @@ -855,6 +859,34 @@ export class NameRegistry { return name ? (this.namespaceNames.get(name)?.size ?? 0) > 1 : false; } + /** + * Checks if a name is both a registered type name and a root-level namespace segment. + * This detects cases where a class name shadows a namespace root, causing CS0426 errors. + * + * For example, if there's a class `Candid` in namespace `Candid.Net`, then any reference + * to `Candid.Net.Something` from within the `Candid.Net` namespace tree will fail because + * the C# compiler resolves `Candid` to the class instead of the namespace. + * + * @param name - The name to check (optional) + * @returns `true` if the name is both a type name and a root namespace segment, `false` otherwise + */ + public hasTypeNamespaceConflict(name?: string): boolean { + if (!name) { + return false; + } + // Exclude known built-in identifiers (System, NUnit, OneOf, etc.) since these + // are framework names that don't create shadowing conflicts in user code. + // The conflict we're detecting is when a USER-DEFINED type name (like a client + // class "Candid") matches a root namespace segment (like "Candid" in "Candid.Net"). + if (this.knownBuiltInIdentifiers.has(name)) { + return false; + } + // Check if this name is a tracked type name AND a root-level namespace segment + // (i.e., it appears as the first segment of some namespace, indicated by having + // an empty string "" as a parent in the namespaceNames registry) + return this.typeNames.has(name) && (this.namespaceNames.get(name)?.has("") ?? false); + } + /** * Generates a fully qualified name string from a class reference identity. * For nested types, includes the enclosing type in the qualified name. diff --git a/generators/csharp/sdk/src/endpoint/grpc/GrpcEndpointGenerator.ts b/generators/csharp/sdk/src/endpoint/grpc/GrpcEndpointGenerator.ts index 5decad8049f3..12104b5e364e 100644 --- a/generators/csharp/sdk/src/endpoint/grpc/GrpcEndpointGenerator.ts +++ b/generators/csharp/sdk/src/endpoint/grpc/GrpcEndpointGenerator.ts @@ -211,7 +211,9 @@ export class GrpcEndpointGenerator extends AbstractEndpointGenerator { grpcClientInfo: GrpcClientInfo; }): ast.CodeBlock { const mapToProtoRequest = - request != null ? this.getToProtoMethodInvocation({ request }) : this.csharp.codeblock("null"); + request != null + ? this.getToProtoMethodInvocation({ request }) + : this.csharp.codeblock("new Google.Protobuf.WellKnownTypes.Empty()"); return this.csharp.codeblock((writer) => { writer.write("var call = "); writer.writeNode( diff --git a/generators/csharp/sdk/src/endpoint/http/HttpEndpointGenerator.ts b/generators/csharp/sdk/src/endpoint/http/HttpEndpointGenerator.ts index 4b3277efb0b9..f8c6e14fbfea 100644 --- a/generators/csharp/sdk/src/endpoint/http/HttpEndpointGenerator.ts +++ b/generators/csharp/sdk/src/endpoint/http/HttpEndpointGenerator.ts @@ -1830,7 +1830,7 @@ export class HttpEndpointGenerator extends AbstractEndpointGenerator { return { code: this.csharp.codeblock((writer) => { writer.write( - `var ${this.names.variables.headers} = await new ${this.namespaces.core}.HeadersBuilder.Builder()` + `var ${this.names.variables.headers} = await new ${this.namespaces.qualifiedCore}.HeadersBuilder.Builder()` ); writer.indent(); writer.writeLine(".Add(_client.Options.Headers)"); diff --git a/generators/csharp/sdk/src/endpoint/request/BytesOnlyEndpointRequest.ts b/generators/csharp/sdk/src/endpoint/request/BytesOnlyEndpointRequest.ts index 79c9092f957e..270e0dddb5be 100644 --- a/generators/csharp/sdk/src/endpoint/request/BytesOnlyEndpointRequest.ts +++ b/generators/csharp/sdk/src/endpoint/request/BytesOnlyEndpointRequest.ts @@ -36,7 +36,7 @@ export class BytesOnlyEndpointRequest extends EndpointRequest { code: this.csharp.codeblock((writer) => { // Start with HeadersBuilder.Builder instance writer.write( - `var ${this.names.variables.headers} = await new ${this.namespaces.core}.HeadersBuilder.Builder()` + `var ${this.names.variables.headers} = await new ${this.namespaces.qualifiedCore}.HeadersBuilder.Builder()` ); writer.indent(); diff --git a/generators/csharp/sdk/src/endpoint/request/ReferencedEndpointRequest.ts b/generators/csharp/sdk/src/endpoint/request/ReferencedEndpointRequest.ts index 6ceda565e5a4..505de43eea49 100644 --- a/generators/csharp/sdk/src/endpoint/request/ReferencedEndpointRequest.ts +++ b/generators/csharp/sdk/src/endpoint/request/ReferencedEndpointRequest.ts @@ -46,7 +46,7 @@ export class ReferencedEndpointRequest extends EndpointRequest { code: this.csharp.codeblock((writer) => { // Start with HeadersBuilder.Builder instance writer.write( - `var ${this.names.variables.headers} = await new ${this.namespaces.core}.HeadersBuilder.Builder()` + `var ${this.names.variables.headers} = await new ${this.namespaces.qualifiedCore}.HeadersBuilder.Builder()` ); writer.indent(); diff --git a/generators/csharp/sdk/src/endpoint/request/WrappedEndpointRequest.ts b/generators/csharp/sdk/src/endpoint/request/WrappedEndpointRequest.ts index c65efb924e86..82b3923ae6fb 100644 --- a/generators/csharp/sdk/src/endpoint/request/WrappedEndpointRequest.ts +++ b/generators/csharp/sdk/src/endpoint/request/WrappedEndpointRequest.ts @@ -59,7 +59,7 @@ export class WrappedEndpointRequest extends EndpointRequest { return { code: this.csharp.codeblock((writer) => { writer.write( - `var ${queryStringVar} = new ${this.namespaces.core}.QueryStringBuilder.Builder(capacity: ${this.endpoint.queryParameters.length})` + `var ${queryStringVar} = new ${this.namespaces.qualifiedCore}.QueryStringBuilder.Builder(capacity: ${this.endpoint.queryParameters.length})` ); writer.indent(); for (const query of this.endpoint.queryParameters) { @@ -185,7 +185,7 @@ export class WrappedEndpointRequest extends EndpointRequest { code: this.csharp.codeblock((writer) => { // Start with HeadersBuilder.Builder instance writer.write( - `var ${this.names.variables.headers} = await new ${this.namespaces.core}.HeadersBuilder.Builder()` + `var ${this.names.variables.headers} = await new ${this.namespaces.qualifiedCore}.HeadersBuilder.Builder()` ); writer.indent(); diff --git a/generators/csharp/sdk/src/websocket/WebsocketClientGenerator.ts b/generators/csharp/sdk/src/websocket/WebsocketClientGenerator.ts index 52662ec98c15..14a9d3ba024d 100644 --- a/generators/csharp/sdk/src/websocket/WebsocketClientGenerator.ts +++ b/generators/csharp/sdk/src/websocket/WebsocketClientGenerator.ts @@ -486,7 +486,7 @@ export class WebSocketClientGenerator extends WithGeneration { if (hasQueryParameters) { writer.write( - `\n{\n Query = new ${this.namespaces.core}.QueryStringBuilder.Builder(capacity: ${this.websocketChannel.queryParameters.length})` + `\n{\n Query = new ${this.namespaces.qualifiedCore}.QueryStringBuilder.Builder(capacity: ${this.websocketChannel.queryParameters.length})` ); for (const queryParameter of this.websocketChannel.queryParameters) { const isComplexType = this.isComplexType(queryParameter.valueType); diff --git a/generators/csharp/sdk/versions.yml b/generators/csharp/sdk/versions.yml index 3f3d82fb1822..8680a8e4faf7 100644 --- a/generators/csharp/sdk/versions.yml +++ b/generators/csharp/sdk/versions.yml @@ -1,4 +1,27 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 2.32.0 + changelogEntry: + - summary: | + Add support for the `google.protobuf.Empty` well-known type for gRPC endpoints. + type: feat + - summary: | + Add more permissive handling for optional `google.protobuf.Timestamp` response properties. + type: fix + createdAt: "2026-03-17" + irVersion: 65 + +- version: 2.31.1 + changelogEntry: + - summary: | + Fix CS0426 compilation error when the client class name matches a namespace + root segment (e.g., class `Candid` in namespace `Candid.Net`). The C# compiler + previously resolved `Candid.Net` as looking for a `Net` member on the `Candid` + type instead of the `Candid.Net` namespace. The generator now uses `global::` + prefixes in both inline references and `using` directives to disambiguate. + type: fix + createdAt: "2026-03-16" + irVersion: 65 + - version: 2.31.0 changelogEntry: - summary: | diff --git a/generators/python-v2/sdk/src/wire-tests/WireTestSetupGenerator.ts b/generators/python-v2/sdk/src/wire-tests/WireTestSetupGenerator.ts index 2353d26fa07e..ca29f7afc103 100644 --- a/generators/python-v2/sdk/src/wire-tests/WireTestSetupGenerator.ts +++ b/generators/python-v2/sdk/src/wire-tests/WireTestSetupGenerator.ts @@ -384,6 +384,7 @@ import subprocess import pytest _STARTED: bool = False +_EXTERNAL: bool = False # True when using an external WireMock instance (skip container lifecycle) _WIREMOCK_URL: str = "http://localhost:8080" # Default, will be updated after container starts _PROJECT_NAME: str = "${projectName}" @@ -410,10 +411,19 @@ def _get_wiremock_port() -> str: def _start_wiremock() -> None: """Starts the WireMock container using docker-compose.""" - global _STARTED, _WIREMOCK_URL + global _STARTED, _EXTERNAL, _WIREMOCK_URL if _STARTED: return + # If WIREMOCK_URL is already set (e.g., by CI/CD pipeline), skip container management + existing_url = os.environ.get("WIREMOCK_URL") + if existing_url: + _WIREMOCK_URL = existing_url + _EXTERNAL = True + _STARTED = True + print(f"\\nUsing external WireMock at {_WIREMOCK_URL} (container management skipped)") + return + print(f"\\nStarting WireMock container (project: {_PROJECT_NAME})...") try: subprocess.run( @@ -434,6 +444,10 @@ def _start_wiremock() -> None: def _stop_wiremock() -> None: """Stops and removes the WireMock container.""" + if _EXTERNAL: + # Container is managed externally; nothing to tear down. + return + print("\\nStopping WireMock container...") subprocess.run( ["docker", "compose", "-f", _COMPOSE_FILE, "-p", _PROJECT_NAME, "down", "-v"], diff --git a/generators/python/sdk/versions.yml b/generators/python/sdk/versions.yml index e8afe6f2de90..d97dfcefecd0 100644 --- a/generators/python/sdk/versions.yml +++ b/generators/python/sdk/versions.yml @@ -1,5 +1,16 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json # For unreleased changes, use unreleased.yml +- version: 5.0.3 + changelogEntry: + - summary: | + Skip Docker container management in generated `tests/conftest.py` when the + `WIREMOCK_URL` environment variable is already set. This allows wire tests to + run in CI/CD pipelines that provide an external WireMock sidecar container + without requiring Docker-in-Docker support. + type: fix + createdAt: "2026-03-17" + irVersion: 65 + - version: 5.0.2 changelogEntry: - summary: | diff --git a/generators/ruby-v2/sdk/src/wire-tests/WireTestSetupGenerator.ts b/generators/ruby-v2/sdk/src/wire-tests/WireTestSetupGenerator.ts index f91bc2d0d6e8..3240ff97a159 100644 --- a/generators/ruby-v2/sdk/src/wire-tests/WireTestSetupGenerator.ts +++ b/generators/ruby-v2/sdk/src/wire-tests/WireTestSetupGenerator.ts @@ -1,6 +1,6 @@ import { File } from "@fern-api/base-generator"; import { RelativeFilePath } from "@fern-api/fs-utils"; -import { WireMock } from "@fern-api/mock-utils"; +import { WireMock, WireMockStubMapping } from "@fern-api/mock-utils"; import { FernIr } from "@fern-fern/ir-sdk"; import { SdkGeneratorContext } from "../SdkGeneratorContext.js"; @@ -32,9 +32,47 @@ export class WireTestSetupGenerator { return new WireMock().convertToWireMock(ir); } + /** + * ISO 8601 datetime pattern that matches values with `.000` milliseconds. + * Example: "2008-01-02T00:00:00.000Z" or "2008-01-02T00:00:00.000+05:00" + */ + private static readonly DATETIME_WITH_ZERO_MILLIS_REGEX = + /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.000(Z|[+-]\d{2}:\d{2})$/; + + /** + * Strips ".000" milliseconds from all datetime query parameter values in WireMock stub mappings. + * Ruby's DateTime/Time ISO 8601 serialization omits zero fractional seconds, so the SDK + * sends e.g. "2024-09-08T12:00:00Z" while mock-utils generates "2024-09-08T12:00:00.000Z" + * (via Date.toISOString()). Since WireMock's equalTo matcher is exact-match, the stubs + * never fire unless we strip the zero milliseconds. + * + * Mutates the input in-place for efficiency. + */ + private static stripDatetimeMilliseconds(stubMapping: WireMockStubMapping): void { + for (const mapping of stubMapping.mappings) { + if (mapping.request.queryParameters) { + for (const [, value] of Object.entries(mapping.request.queryParameters)) { + const paramValue = value as { equalTo: string }; + if ( + paramValue.equalTo != null && + WireTestSetupGenerator.DATETIME_WITH_ZERO_MILLIS_REGEX.test(paramValue.equalTo) + ) { + paramValue.equalTo = paramValue.equalTo.replace(".000", ""); + } + } + } + } + } + private generateWireMockConfigFile(): void { const wireMockConfigContent = WireTestSetupGenerator.getWiremockConfigContent(this.ir); + // mock-utils generates datetime values using Date.toISOString() which always includes + // ".000Z" milliseconds. Ruby's DateTime/Time ISO 8601 serialization omits fractional + // seconds, so the SDK sends e.g. "2024-09-08T12:00:00Z". Strip the zero milliseconds + // from WireMock stubs so that equalTo exact-matching works correctly. + WireTestSetupGenerator.stripDatetimeMilliseconds(wireMockConfigContent); + // Add OAuth token endpoint mapping if inferred auth is present const inferredAuth = this.context.getInferredAuth(); if (inferredAuth != null) { diff --git a/generators/ruby-v2/sdk/versions.yml b/generators/ruby-v2/sdk/versions.yml index 9b97d8875d74..d237fbf801c6 100644 --- a/generators/ruby-v2/sdk/versions.yml +++ b/generators/ruby-v2/sdk/versions.yml @@ -1,5 +1,18 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 1.1.1 + changelogEntry: + - summary: | + Strip zero-millisecond datetime values from WireMock stub query parameters. + Ruby's DateTime/Time ISO 8601 serialization omits zero fractional seconds + (e.g., `2024-09-08T12:00:00Z`), but mock-utils generates values with `.000Z` + (e.g., `2024-09-08T12:00:00.000Z`). WireMock's `equalTo` matcher is exact-match, + so the stubs never fired for datetime query parameters. This follows the same + pattern used by the Python and PHP generators. + type: fix + createdAt: "2026-03-17" + irVersion: 61 + - version: 1.1.0 changelogEntry: - summary: | diff --git a/generators/typescript/sdk/client-class-generator/src/GeneratedWebsocketSocketClassImpl.ts b/generators/typescript/sdk/client-class-generator/src/GeneratedWebsocketSocketClassImpl.ts index 6ab3088db98f..132fb84af6a1 100644 --- a/generators/typescript/sdk/client-class-generator/src/GeneratedWebsocketSocketClassImpl.ts +++ b/generators/typescript/sdk/client-class-generator/src/GeneratedWebsocketSocketClassImpl.ts @@ -120,7 +120,7 @@ export class GeneratedWebsocketSocketClassImpl implements GeneratedWebsocketSock description: "The current state of the connection; this is one of the readyState constants." } ], - returnType: "number", + returnType: `${getTextOfTsNode(context.coreUtilities.websocket.ReconnectingWebSocket._getReferenceToType())}.ReadyState`, statements: [`return this.${GeneratedWebsocketSocketClassImpl.SOCKET_PROPERTY_NAME}.readyState;`] } ], @@ -429,7 +429,7 @@ export class GeneratedWebsocketSocketClassImpl implements GeneratedWebsocketSock isAsync: true, returnType: `Promise<${getTextOfTsNode(context.coreUtilities.websocket.ReconnectingWebSocket._getReferenceToType())}>`, statements: [ - `if (this.${GeneratedWebsocketSocketClassImpl.SOCKET_PROPERTY_NAME}.readyState === ${getTextOfTsNode(context.coreUtilities.websocket.ReconnectingWebSocket._getReferenceToType())}.OPEN) {`, + `if (this.${GeneratedWebsocketSocketClassImpl.SOCKET_PROPERTY_NAME}.readyState === ${getTextOfTsNode(context.coreUtilities.websocket.ReconnectingWebSocket._getReferenceToType())}.ReadyState.OPEN) {`, ` return this.${GeneratedWebsocketSocketClassImpl.SOCKET_PROPERTY_NAME};`, "}", "return new Promise((resolve, reject) => {", @@ -461,7 +461,7 @@ export class GeneratedWebsocketSocketClassImpl implements GeneratedWebsocketSock ' throw new Error("Socket is not connected.");', "}", "", - `if (this.${GeneratedWebsocketSocketClassImpl.SOCKET_PROPERTY_NAME}.readyState !== ${getTextOfTsNode(context.coreUtilities.websocket.ReconnectingWebSocket._getReferenceToType())}.OPEN) {`, + `if (this.${GeneratedWebsocketSocketClassImpl.SOCKET_PROPERTY_NAME}.readyState !== ${getTextOfTsNode(context.coreUtilities.websocket.ReconnectingWebSocket._getReferenceToType())}.ReadyState.OPEN) {`, ' throw new Error("Socket is not open.");', "}" ], diff --git a/generators/typescript/sdk/versions.yml b/generators/typescript/sdk/versions.yml index cb4854438bf3..57c6ba59a081 100644 --- a/generators/typescript/sdk/versions.yml +++ b/generators/typescript/sdk/versions.yml @@ -1,4 +1,14 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 3.59.0 + changelogEntry: + - summary: | + Make `readyState` on generated WebSocket socket classes return a `ReadyState` + enum (`CONNECTING`, `OPEN`, `CLOSING`, `CLOSED`) instead of a raw `number`, + improving developer experience with IDE autocompletion and self-documenting code. + type: feat + createdAt: "2026-03-17" + irVersion: 65 + - version: 3.58.1 changelogEntry: - summary: | @@ -102,11 +112,42 @@ - version: 3.56.0 changelogEntry: - summary: | - Add a `naming` configuration object that allows users to independently control the - namespace export and PascalCase class/type names (client, error, timeout error, - environment, environment URLs, version). When individual overrides are not provided, - they are derived from the namespace value using the existing `${PascalCase(namespace)}Suffix` - pattern. The existing `namespaceExport` config continues to work for backwards compatibility. + Add a `naming` configuration object that gives you fine-grained control over the + exported namespace and generated class names (client, error, timeout error, + environment, environment URLs, version). + + You can use it as a simple string shorthand to set the namespace: + ```yaml + # generators.yml + groups: + ts-sdk: + generators: + - name: fernapi/fern-typescript-node-sdk + config: + naming: acme + ``` + + Or as a full object to override individual names: + ```yaml + # generators.yml + groups: + ts-sdk: + generators: + - name: fernapi/fern-typescript-node-sdk + config: + naming: + namespace: acme + client: AcmeApiClient + error: AcmeApiError + environment: AcmeRegion + ``` + + When individual overrides are not provided, they are derived from the namespace + using the `PascalCase(namespace) + Suffix` pattern (e.g. `namespace: acme` produces + `AcmeClient`, `AcmeError`, `AcmeTimeoutError`, `AcmeEnvironment`, `AcmeEnvironmentUrls`, + and `AcmeVersion` by default). + + The existing `namespaceExport` config continues to work for backwards compatibility. type: feat createdAt: "2026-03-13" irVersion: 65 diff --git a/generators/typescript/utils/core-utilities/src/core/websocket/ws.ts b/generators/typescript/utils/core-utilities/src/core/websocket/ws.ts index c5f96f8e5539..96c4c1080892 100644 --- a/generators/typescript/utils/core-utilities/src/core/websocket/ws.ts +++ b/generators/typescript/utils/core-utilities/src/core/websocket/ws.ts @@ -178,11 +178,11 @@ export class ReconnectingWebSocket { /** * The current state of the connection; this is one of the Ready state constants */ - get readyState(): number { + get readyState(): ReconnectingWebSocket.ReadyState { if (this._ws) { - return this._ws.readyState; + return this._ws.readyState as ReconnectingWebSocket.ReadyState; } - return this._options.startClosed ? ReconnectingWebSocket.CLOSED : ReconnectingWebSocket.CONNECTING; + return this._options.startClosed ? ReconnectingWebSocket.ReadyState.CLOSED : ReconnectingWebSocket.ReadyState.CONNECTING; } /** @@ -550,3 +550,13 @@ export class ReconnectingWebSocket { clearTimeout(this._uptimeTimeout); } } + +export namespace ReconnectingWebSocket { + export const ReadyState = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3, + } as const; + export type ReadyState = (typeof ReadyState)[keyof typeof ReadyState]; +} diff --git a/packages/cli/api-importers/asyncapi-to-ir/src/2.x/channel/ChannelConverter2_X.ts b/packages/cli/api-importers/asyncapi-to-ir/src/2.x/channel/ChannelConverter2_X.ts index 3cb6ef47fec3..2d14739265e4 100644 --- a/packages/cli/api-importers/asyncapi-to-ir/src/2.x/channel/ChannelConverter2_X.ts +++ b/packages/cli/api-importers/asyncapi-to-ir/src/2.x/channel/ChannelConverter2_X.ts @@ -16,6 +16,7 @@ import { AbstractServerConverter } from "../../converters/AbstractServerConverte import { ParameterConverter } from "../../converters/ParameterConverter.js"; import { ChannelAddressExtension } from "../../extensions/x-fern-channel-address.js"; import { DisplayNameExtension } from "../../extensions/x-fern-display-name.js"; +import { SdkMethodNameExtension } from "../../extensions/x-fern-sdk-method-name.js"; import { AsyncAPIV2 } from "../index.js"; export declare namespace ChannelConverter2_X { @@ -104,6 +105,8 @@ export class ChannelConverter2_X extends AbstractChannelConverter 0) { + for (const serverName of this.channel.servers) { + const server = (servers as Record)[serverName]; + if (server?.security && server.security.length > 0) { + return true; + } + } + return false; + } + + for (const server of Object.values(servers)) { + const serverV2 = server as AsyncAPIV2.ServerV2; + if (serverV2.security && serverV2.security.length > 0) { + return true; + } + } + return false; + } + private convertMessage({ context, operation, @@ -225,7 +250,7 @@ export class ChannelConverter2_X extends AbstractChannelConverter; messages?: Record; + securitySchemes?: Record; }; tags?: Tag[]; } @@ -17,6 +18,7 @@ export interface ServerV2 { name: string; url: string; protocol: string; + security?: Array>; } export interface ChannelV2 { diff --git a/packages/cli/api-importers/asyncapi-to-ir/src/3.0/channel/ChannelConverter3_0.ts b/packages/cli/api-importers/asyncapi-to-ir/src/3.0/channel/ChannelConverter3_0.ts index ea879f6368b8..dc48e1a14b55 100644 --- a/packages/cli/api-importers/asyncapi-to-ir/src/3.0/channel/ChannelConverter3_0.ts +++ b/packages/cli/api-importers/asyncapi-to-ir/src/3.0/channel/ChannelConverter3_0.ts @@ -105,6 +105,8 @@ export class ChannelConverter3_0 extends AbstractChannelConverter 0) { + for (const serverRef of this.channel.servers) { + const serverName = serverRef.$ref.replace(SERVER_REFERENCE_PREFIX, ""); + const server = servers[serverName]; + if (server?.security && server.security.length > 0) { + return true; + } + } + return false; + } + + for (const server of Object.values(servers)) { + if (server.security && server.security.length > 0) { + return true; + } + } + return false; + } + private convertChannelParameters({ pathParameters, queryParameters, diff --git a/packages/cli/api-importers/asyncapi-to-ir/src/3.0/types.ts b/packages/cli/api-importers/asyncapi-to-ir/src/3.0/types.ts index e16483c508e9..b2a471fefc4f 100644 --- a/packages/cli/api-importers/asyncapi-to-ir/src/3.0/types.ts +++ b/packages/cli/api-importers/asyncapi-to-ir/src/3.0/types.ts @@ -11,6 +11,7 @@ export interface DocumentV3 { components?: { schemas?: Record; messages?: Record; + securitySchemes?: Record; }; } @@ -23,6 +24,7 @@ export interface ServerV3 { name: string; host: string; protocol: string; + security?: Array>; } export interface ChannelV3 { diff --git a/packages/cli/api-importers/asyncapi-to-ir/src/AsyncAPIConverter.ts b/packages/cli/api-importers/asyncapi-to-ir/src/AsyncAPIConverter.ts index fbfd47b7e44f..8f9cc60a431a 100644 --- a/packages/cli/api-importers/asyncapi-to-ir/src/AsyncAPIConverter.ts +++ b/packages/cli/api-importers/asyncapi-to-ir/src/AsyncAPIConverter.ts @@ -1,6 +1,7 @@ -import { FernIr, IntermediateRepresentation } from "@fern-api/ir-sdk"; +import { AuthScheme, FernIr, IntermediateRepresentation } from "@fern-api/ir-sdk"; +import { convertApiAuth } from "@fern-api/ir-utils"; import { AbstractConverter, AbstractSpecConverter, Converters, Extensions } from "@fern-api/v3-importer-commons"; -import { OpenAPIV3 } from "openapi-types"; +import { OpenAPIV3, OpenAPIV3_1 } from "openapi-types"; import { ChannelConverter2_X } from "./2.x/channel/ChannelConverter2_X.js"; import { AsyncAPIV2 } from "./2.x/index.js"; import { ServersConverter2_X } from "./2.x/servers/ServersConverter2_X.js"; @@ -42,6 +43,8 @@ export class AsyncAPIConverter extends AbstractSpecConverter 0) { + this.addAuthToIR({ + requirement: asyncApiSchemes.length === 1 ? "ALL" : "ANY", + schemes: asyncApiSchemes, + docs: undefined + }); + } + } + + private convertAsyncApiSecuritySchemes(): AuthScheme[] { + const securitySchemes: AuthScheme[] = []; + + for (const [id, securityScheme] of Object.entries(this.context.spec.components?.securitySchemes ?? {})) { + const resolvedSecurityScheme = this.context.resolveMaybeReference({ + schemaOrReference: securityScheme, + breadcrumbs: ["components", "securitySchemes", id] + }); + if (resolvedSecurityScheme == null) { + continue; + } + + const convertedScheme = this.convertSecurityScheme({ + securityScheme: resolvedSecurityScheme, + schemeId: id + }); + if (convertedScheme != null) { + securitySchemes.push(convertedScheme); + } + } + + return securitySchemes; + } + + private convertSecurityScheme({ + securityScheme, + schemeId + }: { + securityScheme: OpenAPIV3_1.SecuritySchemeObject; + schemeId: string; + }): AuthScheme | undefined { + switch (securityScheme.type) { + case "http": { + if (securityScheme.scheme?.toLowerCase() === "bearer") { + return AuthScheme.bearer({ + key: schemeId, + token: this.context.casingsGenerator.generateName("token"), + tokenEnvVar: undefined, + docs: securityScheme.description + }); + } + if (securityScheme.scheme?.toLowerCase() === "basic") { + return AuthScheme.basic({ + key: schemeId, + username: this.context.casingsGenerator.generateName("username"), + password: this.context.casingsGenerator.generateName("password"), + usernameEnvVar: undefined, + passwordEnvVar: undefined, + usernameOmit: false, + passwordOmit: false, + docs: securityScheme.description + }); + } + break; + } + case "apiKey": { + if (securityScheme.in === "header") { + return AuthScheme.header({ + key: schemeId, + name: { + name: this.context.casingsGenerator.generateName("apiKey"), + wireValue: securityScheme.name + }, + valueType: AbstractConverter.OPTIONAL_STRING, + prefix: undefined, + headerEnvVar: undefined, + docs: securityScheme.description + }); + } + break; + } + case "oauth2": { + return AuthScheme.bearer({ + key: schemeId, + token: this.context.casingsGenerator.generateName("token"), + tokenEnvVar: undefined, + docs: securityScheme.description + }); + } + } + return undefined; + } + private convertChannels(): void { for (const [channelPath, channel] of Object.entries(this.context.spec.channels ?? {})) { const groupNameExtension = new Extensions.SdkGroupNameExtension({ diff --git a/packages/cli/api-importers/asyncapi-to-ir/src/extensions/x-fern-sdk-method-name.ts b/packages/cli/api-importers/asyncapi-to-ir/src/extensions/x-fern-sdk-method-name.ts new file mode 100644 index 000000000000..0aa444dcf8ba --- /dev/null +++ b/packages/cli/api-importers/asyncapi-to-ir/src/extensions/x-fern-sdk-method-name.ts @@ -0,0 +1,29 @@ +import { AbstractExtension } from "@fern-api/v3-importer-commons"; + +import { AsyncAPIV2 } from "../2.x/index.js"; +import { AsyncAPIV3 } from "../3.0/index.js"; + +export declare namespace SdkMethodNameExtension { + export interface Args extends AbstractExtension.Args { + operation: AsyncAPIV2.PublishEvent | AsyncAPIV2.SubscribeEvent | AsyncAPIV3.Operation; + } +} + +export class SdkMethodNameExtension extends AbstractExtension { + private readonly operation: AsyncAPIV2.PublishEvent | AsyncAPIV2.SubscribeEvent | AsyncAPIV3.Operation; + public readonly key = "x-fern-sdk-method-name"; + + constructor({ breadcrumbs, operation, context }: SdkMethodNameExtension.Args) { + super({ breadcrumbs, context }); + this.operation = operation; + } + + public convert(): string | undefined { + const extensionValue = this.getExtensionValue(this.operation); + if (extensionValue == null || typeof extensionValue !== "string") { + return undefined; + } + + return extensionValue; + } +} diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/asyncapi/fernExtensions.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/asyncapi/fernExtensions.ts index 75dae8dc2be7..be44ddd268a8 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/asyncapi/fernExtensions.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/asyncapi/fernExtensions.ts @@ -34,7 +34,25 @@ export const FernAsyncAPIExtension = { /** * The x-fern-sdk-method-name allows you to specify the SDK method name for an AsyncAPI operation. - * This extension is applied to AsyncAPI v3 operations to customize the generated method names. + * This extension is applied to AsyncAPI v2 publish/subscribe operations and AsyncAPI v3 operations + * to customize the generated method names. + * + * AsyncAPI v2 example: + * + * channels: + * /v1/realtime: + * publish: + * x-fern-sdk-method-name: send + * message: + * oneOf: + * - $ref: "#/components/messages/SessionUpdate" + * subscribe: + * x-fern-sdk-method-name: receive + * message: + * oneOf: + * - $ref: "#/components/messages/ServerEvent" + * + * AsyncAPI v3 example: * * operations: * SendMessage: diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/asyncapi/v2/parseAsyncAPIV2.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/asyncapi/v2/parseAsyncAPIV2.ts index 45678974233a..06b1c4c5f18f 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/asyncapi/v2/parseAsyncAPIV2.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/asyncapi/v2/parseAsyncAPIV2.ts @@ -322,7 +322,10 @@ export function parseAsyncAPIV2({ origin: "client", name: "publish", body: convertSchemaWithExampleToSchema(publishSchema), - methodName: undefined // AsyncAPI v2 doesn't support operations with custom method names + methodName: + channel.publish != null + ? getExtension(channel.publish, FernAsyncAPIExtension.FERN_SDK_METHOD_NAME) + : undefined }); } if (subscribeSchema != null) { @@ -330,7 +333,10 @@ export function parseAsyncAPIV2({ origin: "server", name: "subscribe", body: convertSchemaWithExampleToSchema(subscribeSchema), - methodName: undefined // AsyncAPI v2 doesn't support operations with custom method names + methodName: + channel.subscribe != null + ? getExtension(channel.subscribe, FernAsyncAPIExtension.FERN_SDK_METHOD_NAME) + : undefined }); } parsedChannels[channelPath] = { diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/asyncapi-v2-x-fern-sdk-method-name.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/asyncapi-v2-x-fern-sdk-method-name.json new file mode 100644 index 000000000000..83afbdbaf3fb --- /dev/null +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/asyncapi-v2-x-fern-sdk-method-name.json @@ -0,0 +1,168 @@ +{ + "servers": [], + "websocketServers": [ + { + "name": "production", + "url": "wss://api.example.com" + } + ], + "tags": { + "tagsById": {} + }, + "hasEndpointsMarkedInternal": false, + "endpoints": [], + "webhooks": [], + "channels": { + "/v1/realtime": { + "audiences": [], + "handshake": { + "headers": [], + "queryParameters": [], + "pathParameters": [] + }, + "groupName": [ + "/v1/realtime" + ], + "messages": [ + { + "origin": "client", + "name": "publish", + "body": { + "allOf": [], + "properties": [ + { + "conflict": {}, + "generatedName": "v1RealtimePublishContent", + "key": "content", + "schema": { + "generatedName": "V1RealtimePublishContent", + "value": { + "schema": { + "type": "string" + }, + "generatedName": "V1RealtimePublishContent", + "groupName": [], + "type": "primitive" + }, + "groupName": [], + "type": "optional" + }, + "audiences": [] + } + ], + "allOfPropertyConflicts": [], + "generatedName": "V1RealtimePublish", + "groupName": [], + "additionalProperties": false, + "source": { + "file": "../asyncapi.yml", + "type": "openapi" + }, + "type": "object" + }, + "methodName": "send" + }, + { + "origin": "server", + "name": "subscribe", + "body": { + "allOf": [], + "properties": [ + { + "conflict": {}, + "generatedName": "v1RealtimeSubscribeContent", + "key": "content", + "schema": { + "generatedName": "V1RealtimeSubscribeContent", + "value": { + "schema": { + "type": "string" + }, + "generatedName": "V1RealtimeSubscribeContent", + "groupName": [], + "type": "primitive" + }, + "groupName": [], + "type": "optional" + }, + "audiences": [] + }, + { + "conflict": {}, + "generatedName": "v1RealtimeSubscribeTimestamp", + "key": "timestamp", + "schema": { + "generatedName": "V1RealtimeSubscribeTimestamp", + "value": { + "schema": { + "type": "string" + }, + "generatedName": "V1RealtimeSubscribeTimestamp", + "groupName": [], + "type": "primitive" + }, + "groupName": [], + "type": "optional" + }, + "audiences": [] + } + ], + "allOfPropertyConflicts": [], + "generatedName": "V1RealtimeSubscribe", + "groupName": [], + "additionalProperties": false, + "source": { + "file": "../asyncapi.yml", + "type": "openapi" + }, + "type": "object" + }, + "methodName": "receive" + } + ], + "servers": [ + { + "name": "production", + "url": "wss://api.example.com" + } + ], + "path": "/v1/realtime", + "examples": [ + { + "queryParameters": [], + "headers": [], + "messages": [ + { + "messageType": "publish", + "payload": { + "properties": {}, + "type": "object" + } + }, + { + "messageType": "subscribe", + "payload": { + "properties": {}, + "type": "object" + } + } + ] + } + ], + "source": { + "file": "../asyncapi.yml", + "type": "openapi" + } + } + }, + "groupedSchemas": { + "rootSchemas": {}, + "namespacedSchemas": {} + }, + "variables": {}, + "nonRequestReferencedSchemas": {}, + "securitySchemes": {}, + "globalHeaders": [], + "idempotencyHeaders": [], + "groups": {} +} \ No newline at end of file diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/asyncapi-v2-x-fern-sdk-method-name.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/asyncapi-v2-x-fern-sdk-method-name.json new file mode 100644 index 000000000000..f744da199e75 --- /dev/null +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/asyncapi-v2-x-fern-sdk-method-name.json @@ -0,0 +1,125 @@ +{ + "absoluteFilePath": "/DUMMY_PATH", + "importedDefinitions": {}, + "namedDefinitionFiles": { + "__package__.yml": { + "absoluteFilepath": "/DUMMY_PATH", + "contents": {}, + "rawContents": "{} +", + }, + "v1Realtime.yml": { + "absoluteFilepath": "/DUMMY_PATH", + "contents": { + "channel": { + "auth": false, + "examples": [ + { + "messages": [ + { + "body": {}, + "type": "publish", + }, + { + "body": {}, + "type": "subscribe", + }, + ], + }, + ], + "messages": { + "publish": { + "body": "V1RealtimePublish", + "method-name": "send", + "origin": "client", + }, + "subscribe": { + "body": "V1RealtimeSubscribe", + "method-name": "receive", + "origin": "server", + }, + }, + "path": "/v1/realtime", + "url": undefined, + }, + "types": { + "V1RealtimePublish": { + "docs": undefined, + "inline": undefined, + "properties": { + "content": "optional", + }, + "source": { + "openapi": "../asyncapi.yml", + }, + }, + "V1RealtimeSubscribe": { + "docs": undefined, + "inline": undefined, + "properties": { + "content": "optional", + "timestamp": "optional", + }, + "source": { + "openapi": "../asyncapi.yml", + }, + }, + }, + }, + "rawContents": "channel: + path: /v1/realtime + auth: false + messages: + publish: + origin: client + body: V1RealtimePublish + method-name: send + subscribe: + origin: server + body: V1RealtimeSubscribe + method-name: receive + examples: + - messages: + - type: publish + body: {} + - type: subscribe + body: {} +types: + V1RealtimePublish: + properties: + content: optional + source: + openapi: ../asyncapi.yml + V1RealtimeSubscribe: + properties: + content: optional + timestamp: optional + source: + openapi: ../asyncapi.yml +", + }, + }, + "packageMarkers": {}, + "rootApiFile": { + "contents": { + "default-environment": "production", + "default-url": "Base", + "environments": { + "production": "wss://api.example.com", + }, + "error-discrimination": { + "strategy": "status-code", + }, + "name": "api", + }, + "defaultUrl": "Base", + "rawContents": "name: api +error-discrimination: + strategy: status-code +environments: + production: wss://api.example.com +default-environment: production +default-url: Base +", + }, +} \ No newline at end of file diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/asyncapi.yml b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/asyncapi.yml new file mode 100644 index 000000000000..d26d40883e10 --- /dev/null +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/asyncapi.yml @@ -0,0 +1,32 @@ +asyncapi: 2.6.0 +info: + title: Test x-fern-sdk-method-name extension for AsyncAPI v2 + version: 1.0.0 + +servers: + production: + url: wss://api.example.com + protocol: wss + +channels: + /v1/realtime: + publish: + x-fern-sdk-method-name: send + operationId: sendEvent + message: + payload: + type: object + properties: + content: + type: string + subscribe: + x-fern-sdk-method-name: receive + operationId: receiveEvent + message: + payload: + type: object + properties: + content: + type: string + timestamp: + type: string diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/fern.config.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/fern.config.json new file mode 100644 index 000000000000..2d882fc1f7cb --- /dev/null +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/fern.config.json @@ -0,0 +1,4 @@ +{ + "organization": "fern", + "version": "0.0.0" +} diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/generators.yml b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/generators.yml new file mode 100644 index 000000000000..c8442b7d1eb1 --- /dev/null +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/generators.yml @@ -0,0 +1,4 @@ +# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json +api: + specs: + - asyncapi: ../asyncapi.yml diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildChannel.ts b/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildChannel.ts index abc347a2bdeb..5bda8afd2123 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildChannel.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildChannel.ts @@ -52,10 +52,12 @@ export function buildChannel({ } } + const hasAuth = context.authOverrides?.auth != null; + const convertedChannel: RawSchemas.WebSocketChannelSchema = { path: convertedPath, url: urlId, - auth: false + auth: hasAuth }; if (channel.audiences != null && channel.audiences.length > 0) { diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/baseline-sdks/asyncapi-v2-x-fern-sdk-method-name.json b/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/baseline-sdks/asyncapi-v2-x-fern-sdk-method-name.json new file mode 100644 index 000000000000..3d812343acd1 --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/baseline-sdks/asyncapi-v2-x-fern-sdk-method-name.json @@ -0,0 +1,1114 @@ +{ + "selfHosted": false, + "apiName": { + "originalName": "api", + "camelCase": { + "unsafeName": "api", + "safeName": "api" + }, + "snakeCase": { + "unsafeName": "api", + "safeName": "api" + }, + "screamingSnakeCase": { + "unsafeName": "API", + "safeName": "API" + }, + "pascalCase": { + "unsafeName": "API", + "safeName": "API" + } + }, + "auth": { + "requirement": "ALL", + "schemes": [] + }, + "headers": [], + "idempotencyHeaders": [], + "types": { + "type_v1Realtime:V1RealtimePublish": { + "name": { + "name": { + "originalName": "V1RealtimePublish", + "camelCase": { + "unsafeName": "v1RealtimePublish", + "safeName": "v1RealtimePublish" + }, + "snakeCase": { + "unsafeName": "v1realtime_publish", + "safeName": "v1realtime_publish" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME_PUBLISH", + "safeName": "V1REALTIME_PUBLISH" + }, + "pascalCase": { + "unsafeName": "V1RealtimePublish", + "safeName": "V1RealtimePublish" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + ], + "packagePath": [], + "file": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + }, + "typeId": "type_v1Realtime:V1RealtimePublish" + }, + "shape": { + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "content", + "camelCase": { + "unsafeName": "content", + "safeName": "content" + }, + "snakeCase": { + "unsafeName": "content", + "safeName": "content" + }, + "screamingSnakeCase": { + "unsafeName": "CONTENT", + "safeName": "CONTENT" + }, + "pascalCase": { + "unsafeName": "Content", + "safeName": "Content" + } + }, + "wireValue": "content" + }, + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + } + ], + "extraProperties": false, + "extendedProperties": [], + "type": "object" + }, + "referencedTypes": {}, + "encoding": { + "json": {} + }, + "userProvidedExamples": [], + "autogeneratedExamples": [] + }, + "type_v1Realtime:V1RealtimeSubscribe": { + "name": { + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v1realtime_subscribe", + "safeName": "v1realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME_SUBSCRIBE", + "safeName": "V1REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + ], + "packagePath": [], + "file": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + }, + "typeId": "type_v1Realtime:V1RealtimeSubscribe" + }, + "shape": { + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "content", + "camelCase": { + "unsafeName": "content", + "safeName": "content" + }, + "snakeCase": { + "unsafeName": "content", + "safeName": "content" + }, + "screamingSnakeCase": { + "unsafeName": "CONTENT", + "safeName": "CONTENT" + }, + "pascalCase": { + "unsafeName": "Content", + "safeName": "Content" + } + }, + "wireValue": "content" + }, + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": { + "name": { + "originalName": "timestamp", + "camelCase": { + "unsafeName": "timestamp", + "safeName": "timestamp" + }, + "snakeCase": { + "unsafeName": "timestamp", + "safeName": "timestamp" + }, + "screamingSnakeCase": { + "unsafeName": "TIMESTAMP", + "safeName": "TIMESTAMP" + }, + "pascalCase": { + "unsafeName": "Timestamp", + "safeName": "Timestamp" + } + }, + "wireValue": "timestamp" + }, + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + } + ], + "extraProperties": false, + "extendedProperties": [], + "type": "object" + }, + "referencedTypes": {}, + "encoding": { + "json": {} + }, + "userProvidedExamples": [], + "autogeneratedExamples": [] + } + }, + "errors": {}, + "services": {}, + "constants": { + "errorInstanceIdKey": { + "name": { + "originalName": "errorInstanceId", + "camelCase": { + "unsafeName": "errorInstanceID", + "safeName": "errorInstanceID" + }, + "snakeCase": { + "unsafeName": "error_instance_id", + "safeName": "error_instance_id" + }, + "screamingSnakeCase": { + "unsafeName": "ERROR_INSTANCE_ID", + "safeName": "ERROR_INSTANCE_ID" + }, + "pascalCase": { + "unsafeName": "ErrorInstanceID", + "safeName": "ErrorInstanceID" + } + }, + "wireValue": "errorInstanceId" + } + }, + "environments": { + "defaultEnvironment": "production", + "environments": { + "environments": [ + { + "id": "production", + "name": { + "originalName": "production", + "camelCase": { + "unsafeName": "production", + "safeName": "production" + }, + "snakeCase": { + "unsafeName": "production", + "safeName": "production" + }, + "screamingSnakeCase": { + "unsafeName": "PRODUCTION", + "safeName": "PRODUCTION" + }, + "pascalCase": { + "unsafeName": "Production", + "safeName": "Production" + } + }, + "url": "wss://api.example.com" + } + ], + "type": "singleBaseUrl" + } + }, + "errorDiscriminationStrategy": { + "type": "statusCode" + }, + "pathParameters": [], + "variables": [], + "serviceTypeReferenceInfo": { + "typesReferencedOnlyByService": {}, + "sharedTypes": [ + "type_v1Realtime:V1RealtimePublish", + "type_v1Realtime:V1RealtimeSubscribe" + ] + }, + "webhookGroups": {}, + "websocketChannels": { + "channel_v1Realtime": { + "path": { + "head": "/v1/realtime", + "parts": [] + }, + "auth": false, + "name": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + }, + "headers": [], + "pathParameters": [], + "queryParameters": [], + "messages": [ + { + "type": "publish", + "origin": "client", + "body": { + "bodyType": { + "name": { + "originalName": "V1RealtimePublish", + "camelCase": { + "unsafeName": "v1RealtimePublish", + "safeName": "v1RealtimePublish" + }, + "snakeCase": { + "unsafeName": "v1realtime_publish", + "safeName": "v1realtime_publish" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME_PUBLISH", + "safeName": "V1REALTIME_PUBLISH" + }, + "pascalCase": { + "unsafeName": "V1RealtimePublish", + "safeName": "V1RealtimePublish" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + ], + "packagePath": [], + "file": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + }, + "typeId": "type_v1Realtime:V1RealtimePublish", + "type": "named" + }, + "type": "reference" + }, + "methodName": "send" + }, + { + "type": "subscribe", + "origin": "server", + "body": { + "bodyType": { + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v1realtime_subscribe", + "safeName": "v1realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME_SUBSCRIBE", + "safeName": "V1REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + ], + "packagePath": [], + "file": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + }, + "typeId": "type_v1Realtime:V1RealtimeSubscribe", + "type": "named" + }, + "type": "reference" + }, + "methodName": "receive" + } + ], + "examples": [ + { + "url": "/v1/realtime", + "pathParameters": [], + "headers": [], + "queryParameters": [], + "messages": [ + { + "type": "publish", + "body": { + "shape": { + "typeName": { + "typeId": "type_v1Realtime:V1RealtimePublish", + "fernFilepath": { + "allParts": [ + { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + ], + "packagePath": [], + "file": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + }, + "name": { + "originalName": "V1RealtimePublish", + "camelCase": { + "unsafeName": "v1RealtimePublish", + "safeName": "v1RealtimePublish" + }, + "snakeCase": { + "unsafeName": "v1realtime_publish", + "safeName": "v1realtime_publish" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME_PUBLISH", + "safeName": "V1REALTIME_PUBLISH" + }, + "pascalCase": { + "unsafeName": "V1RealtimePublish", + "safeName": "V1RealtimePublish" + } + } + }, + "shape": { + "properties": [], + "type": "object" + }, + "type": "named" + }, + "jsonExample": {}, + "type": "reference" + } + }, + { + "type": "subscribe", + "body": { + "shape": { + "typeName": { + "typeId": "type_v1Realtime:V1RealtimeSubscribe", + "fernFilepath": { + "allParts": [ + { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + ], + "packagePath": [], + "file": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + }, + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v1realtime_subscribe", + "safeName": "v1realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME_SUBSCRIBE", + "safeName": "V1REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + } + }, + "shape": { + "properties": [], + "type": "object" + }, + "type": "named" + }, + "jsonExample": {}, + "type": "reference" + } + } + ] + } + ], + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + } + }, + "dynamic": { + "version": "1.0.0", + "types": { + "type_v1Realtime:V1RealtimePublish": { + "declaration": { + "name": { + "originalName": "V1RealtimePublish", + "camelCase": { + "unsafeName": "v1RealtimePublish", + "safeName": "v1RealtimePublish" + }, + "snakeCase": { + "unsafeName": "v1realtime_publish", + "safeName": "v1realtime_publish" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME_PUBLISH", + "safeName": "V1REALTIME_PUBLISH" + }, + "pascalCase": { + "unsafeName": "V1RealtimePublish", + "safeName": "V1RealtimePublish" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + ], + "packagePath": [], + "file": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "content", + "camelCase": { + "unsafeName": "content", + "safeName": "content" + }, + "snakeCase": { + "unsafeName": "content", + "safeName": "content" + }, + "screamingSnakeCase": { + "unsafeName": "CONTENT", + "safeName": "CONTENT" + }, + "pascalCase": { + "unsafeName": "Content", + "safeName": "Content" + } + }, + "wireValue": "content" + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + } + ], + "additionalProperties": false, + "type": "object" + }, + "type_v1Realtime:V1RealtimeSubscribe": { + "declaration": { + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v1realtime_subscribe", + "safeName": "v1realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME_SUBSCRIBE", + "safeName": "V1REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + ], + "packagePath": [], + "file": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "content", + "camelCase": { + "unsafeName": "content", + "safeName": "content" + }, + "snakeCase": { + "unsafeName": "content", + "safeName": "content" + }, + "screamingSnakeCase": { + "unsafeName": "CONTENT", + "safeName": "CONTENT" + }, + "pascalCase": { + "unsafeName": "Content", + "safeName": "Content" + } + }, + "wireValue": "content" + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "name": { + "originalName": "timestamp", + "camelCase": { + "unsafeName": "timestamp", + "safeName": "timestamp" + }, + "snakeCase": { + "unsafeName": "timestamp", + "safeName": "timestamp" + }, + "screamingSnakeCase": { + "unsafeName": "TIMESTAMP", + "safeName": "TIMESTAMP" + }, + "pascalCase": { + "unsafeName": "Timestamp", + "safeName": "Timestamp" + } + }, + "wireValue": "timestamp" + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + } + ], + "additionalProperties": false, + "type": "object" + } + }, + "headers": [], + "endpoints": {}, + "pathParameters": [], + "environments": { + "defaultEnvironment": "production", + "environments": { + "environments": [ + { + "id": "production", + "name": { + "originalName": "production", + "camelCase": { + "unsafeName": "production", + "safeName": "production" + }, + "snakeCase": { + "unsafeName": "production", + "safeName": "production" + }, + "screamingSnakeCase": { + "unsafeName": "PRODUCTION", + "safeName": "PRODUCTION" + }, + "pascalCase": { + "unsafeName": "Production", + "safeName": "Production" + } + }, + "url": "wss://api.example.com" + } + ], + "type": "singleBaseUrl" + } + } + }, + "apiPlayground": true, + "subpackages": { + "subpackage_v1Realtime": { + "fernFilepath": { + "allParts": [ + { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + ], + "packagePath": [], + "file": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + }, + "name": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v1realtime", + "safeName": "v1realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V1REALTIME", + "safeName": "V1REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + }, + "types": [ + "type_v1Realtime:V1RealtimePublish", + "type_v1Realtime:V1RealtimeSubscribe" + ], + "errors": [], + "subpackages": [], + "websocket": "channel_v1Realtime", + "hasEndpointsInTree": false + } + }, + "rootPackage": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "types": [], + "errors": [], + "subpackages": [ + "subpackage_v1Realtime" + ], + "hasEndpointsInTree": false + }, + "sdkConfig": { + "isAuthMandatory": false, + "hasStreamingEndpoints": false, + "hasPaginatedEndpoints": false, + "hasFileDownloadEndpoints": false, + "platformHeaders": { + "language": "X-Fern-Language", + "sdkName": "X-Fern-SDK-Name", + "sdkVersion": "X-Fern-SDK-Version" + } + } +} \ No newline at end of file diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/v3-sdks/asyncapi-v2-x-fern-sdk-method-name.json b/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/v3-sdks/asyncapi-v2-x-fern-sdk-method-name.json new file mode 100644 index 000000000000..c6c46d161ab6 --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/v3-sdks/asyncapi-v2-x-fern-sdk-method-name.json @@ -0,0 +1,1123 @@ +{ + "auth": { + "requirement": "ALL", + "schemes": [] + }, + "selfHosted": false, + "types": { + "V1RealtimeSubscribe": { + "name": { + "typeId": "V1RealtimeSubscribe", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_subscribe", + "safeName": "v_1_realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_SUBSCRIBE", + "safeName": "V_1_REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + } + }, + "shape": { + "properties": [ + { + "name": { + "name": { + "originalName": "content", + "camelCase": { + "unsafeName": "content", + "safeName": "content" + }, + "snakeCase": { + "unsafeName": "content", + "safeName": "content" + }, + "screamingSnakeCase": { + "unsafeName": "CONTENT", + "safeName": "CONTENT" + }, + "pascalCase": { + "unsafeName": "Content", + "safeName": "Content" + } + }, + "wireValue": "content" + }, + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "ChannelsV1RealtimeSubscribeContent_example_autogenerated": "string" + } + } + }, + { + "name": { + "name": { + "originalName": "timestamp", + "camelCase": { + "unsafeName": "timestamp", + "safeName": "timestamp" + }, + "snakeCase": { + "unsafeName": "timestamp", + "safeName": "timestamp" + }, + "screamingSnakeCase": { + "unsafeName": "TIMESTAMP", + "safeName": "TIMESTAMP" + }, + "pascalCase": { + "unsafeName": "Timestamp", + "safeName": "Timestamp" + } + }, + "wireValue": "timestamp" + }, + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "ChannelsV1RealtimeSubscribeTimestamp_example_autogenerated": "string" + } + } + } + ], + "extends": [], + "extendedProperties": [], + "extraProperties": false, + "type": "object" + }, + "autogeneratedExamples": [], + "userProvidedExamples": [], + "referencedTypes": {}, + "inline": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "V1RealtimeSubscribe_example_autogenerated": {} + } + } + }, + "V1RealtimePublish": { + "name": { + "typeId": "V1RealtimePublish", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimePublish", + "camelCase": { + "unsafeName": "v1RealtimePublish", + "safeName": "v1RealtimePublish" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_publish", + "safeName": "v_1_realtime_publish" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_PUBLISH", + "safeName": "V_1_REALTIME_PUBLISH" + }, + "pascalCase": { + "unsafeName": "V1RealtimePublish", + "safeName": "V1RealtimePublish" + } + } + }, + "shape": { + "properties": [ + { + "name": { + "name": { + "originalName": "content", + "camelCase": { + "unsafeName": "content", + "safeName": "content" + }, + "snakeCase": { + "unsafeName": "content", + "safeName": "content" + }, + "screamingSnakeCase": { + "unsafeName": "CONTENT", + "safeName": "CONTENT" + }, + "pascalCase": { + "unsafeName": "Content", + "safeName": "Content" + } + }, + "wireValue": "content" + }, + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "ChannelsV1RealtimePublishContent_example_autogenerated": "string" + } + } + } + ], + "extends": [], + "extendedProperties": [], + "extraProperties": false, + "type": "object" + }, + "autogeneratedExamples": [], + "userProvidedExamples": [], + "referencedTypes": {}, + "inline": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "V1RealtimePublish_example_autogenerated": {} + } + } + } + }, + "services": {}, + "errors": {}, + "webhookGroups": {}, + "websocketChannels": { + "channel_v1Realtime": { + "name": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v_1_realtime", + "safeName": "v_1_realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME", + "safeName": "V_1_REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + }, + "baseUrl": "production", + "path": { + "head": "/v1/realtime", + "parts": [] + }, + "auth": false, + "headers": [], + "queryParameters": [], + "pathParameters": [], + "messages": [ + { + "type": "subscribe", + "displayName": "subscribe", + "origin": "server", + "body": { + "bodyType": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_subscribe", + "safeName": "v_1_realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_SUBSCRIBE", + "safeName": "V_1_REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + }, + "typeId": "V1RealtimeSubscribe", + "inline": false, + "type": "named" + }, + "type": "reference" + }, + "methodName": "receive" + }, + { + "type": "publish", + "displayName": "publish", + "origin": "client", + "body": { + "bodyType": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimePublish", + "camelCase": { + "unsafeName": "v1RealtimePublish", + "safeName": "v1RealtimePublish" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_publish", + "safeName": "v_1_realtime_publish" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_PUBLISH", + "safeName": "V_1_REALTIME_PUBLISH" + }, + "pascalCase": { + "unsafeName": "V1RealtimePublish", + "safeName": "V1RealtimePublish" + } + }, + "typeId": "V1RealtimePublish", + "inline": false, + "type": "named" + }, + "type": "reference" + }, + "methodName": "send" + } + ], + "examples": [ + { + "pathParameters": [], + "headers": [], + "queryParameters": [], + "messages": [ + { + "type": "publish", + "body": { + "jsonExample": {}, + "shape": { + "shape": { + "properties": [ + { + "name": { + "name": { + "originalName": "content", + "camelCase": { + "unsafeName": "content", + "safeName": "content" + }, + "snakeCase": { + "unsafeName": "content", + "safeName": "content" + }, + "screamingSnakeCase": { + "unsafeName": "CONTENT", + "safeName": "CONTENT" + }, + "pascalCase": { + "unsafeName": "Content", + "safeName": "Content" + } + }, + "wireValue": "content" + }, + "originalTypeDeclaration": { + "typeId": "V1RealtimePublish", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimePublish", + "camelCase": { + "unsafeName": "v1RealtimePublish", + "safeName": "v1RealtimePublish" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_publish", + "safeName": "v_1_realtime_publish" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_PUBLISH", + "safeName": "V_1_REALTIME_PUBLISH" + }, + "pascalCase": { + "unsafeName": "V1RealtimePublish", + "safeName": "V1RealtimePublish" + } + } + }, + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + } + ], + "type": "object" + }, + "typeName": { + "typeId": "V1RealtimePublish", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimePublish", + "camelCase": { + "unsafeName": "v1RealtimePublish", + "safeName": "v1RealtimePublish" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_publish", + "safeName": "v_1_realtime_publish" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_PUBLISH", + "safeName": "V_1_REALTIME_PUBLISH" + }, + "pascalCase": { + "unsafeName": "V1RealtimePublish", + "safeName": "V1RealtimePublish" + } + } + }, + "type": "named" + }, + "type": "reference" + } + }, + { + "type": "subscribe", + "body": { + "jsonExample": {}, + "shape": { + "shape": { + "properties": [ + { + "name": { + "name": { + "originalName": "content", + "camelCase": { + "unsafeName": "content", + "safeName": "content" + }, + "snakeCase": { + "unsafeName": "content", + "safeName": "content" + }, + "screamingSnakeCase": { + "unsafeName": "CONTENT", + "safeName": "CONTENT" + }, + "pascalCase": { + "unsafeName": "Content", + "safeName": "Content" + } + }, + "wireValue": "content" + }, + "originalTypeDeclaration": { + "typeId": "V1RealtimeSubscribe", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_subscribe", + "safeName": "v_1_realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_SUBSCRIBE", + "safeName": "V_1_REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + } + }, + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + }, + { + "name": { + "name": { + "originalName": "timestamp", + "camelCase": { + "unsafeName": "timestamp", + "safeName": "timestamp" + }, + "snakeCase": { + "unsafeName": "timestamp", + "safeName": "timestamp" + }, + "screamingSnakeCase": { + "unsafeName": "TIMESTAMP", + "safeName": "TIMESTAMP" + }, + "pascalCase": { + "unsafeName": "Timestamp", + "safeName": "Timestamp" + } + }, + "wireValue": "timestamp" + }, + "originalTypeDeclaration": { + "typeId": "V1RealtimeSubscribe", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_subscribe", + "safeName": "v_1_realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_SUBSCRIBE", + "safeName": "V_1_REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + } + }, + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + } + ], + "type": "object" + }, + "typeName": { + "typeId": "V1RealtimeSubscribe", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_subscribe", + "safeName": "v_1_realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_SUBSCRIBE", + "safeName": "V_1_REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + } + }, + "type": "named" + }, + "type": "reference" + } + } + ], + "url": "/v1/realtime" + }, + { + "pathParameters": [], + "headers": [], + "queryParameters": [], + "messages": [ + { + "type": "publish", + "body": { + "jsonExample": {}, + "shape": { + "shape": { + "properties": [ + { + "name": { + "name": { + "originalName": "content", + "camelCase": { + "unsafeName": "content", + "safeName": "content" + }, + "snakeCase": { + "unsafeName": "content", + "safeName": "content" + }, + "screamingSnakeCase": { + "unsafeName": "CONTENT", + "safeName": "CONTENT" + }, + "pascalCase": { + "unsafeName": "Content", + "safeName": "Content" + } + }, + "wireValue": "content" + }, + "originalTypeDeclaration": { + "typeId": "V1RealtimePublish", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimePublish", + "camelCase": { + "unsafeName": "v1RealtimePublish", + "safeName": "v1RealtimePublish" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_publish", + "safeName": "v_1_realtime_publish" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_PUBLISH", + "safeName": "V_1_REALTIME_PUBLISH" + }, + "pascalCase": { + "unsafeName": "V1RealtimePublish", + "safeName": "V1RealtimePublish" + } + } + }, + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + } + ], + "type": "object" + }, + "typeName": { + "typeId": "V1RealtimePublish", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimePublish", + "camelCase": { + "unsafeName": "v1RealtimePublish", + "safeName": "v1RealtimePublish" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_publish", + "safeName": "v_1_realtime_publish" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_PUBLISH", + "safeName": "V_1_REALTIME_PUBLISH" + }, + "pascalCase": { + "unsafeName": "V1RealtimePublish", + "safeName": "V1RealtimePublish" + } + } + }, + "type": "named" + }, + "type": "reference" + } + }, + { + "type": "subscribe", + "body": { + "jsonExample": {}, + "shape": { + "shape": { + "properties": [ + { + "name": { + "name": { + "originalName": "content", + "camelCase": { + "unsafeName": "content", + "safeName": "content" + }, + "snakeCase": { + "unsafeName": "content", + "safeName": "content" + }, + "screamingSnakeCase": { + "unsafeName": "CONTENT", + "safeName": "CONTENT" + }, + "pascalCase": { + "unsafeName": "Content", + "safeName": "Content" + } + }, + "wireValue": "content" + }, + "originalTypeDeclaration": { + "typeId": "V1RealtimeSubscribe", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_subscribe", + "safeName": "v_1_realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_SUBSCRIBE", + "safeName": "V_1_REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + } + }, + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + }, + { + "name": { + "name": { + "originalName": "timestamp", + "camelCase": { + "unsafeName": "timestamp", + "safeName": "timestamp" + }, + "snakeCase": { + "unsafeName": "timestamp", + "safeName": "timestamp" + }, + "screamingSnakeCase": { + "unsafeName": "TIMESTAMP", + "safeName": "TIMESTAMP" + }, + "pascalCase": { + "unsafeName": "Timestamp", + "safeName": "Timestamp" + } + }, + "wireValue": "timestamp" + }, + "originalTypeDeclaration": { + "typeId": "V1RealtimeSubscribe", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_subscribe", + "safeName": "v_1_realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_SUBSCRIBE", + "safeName": "V_1_REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + } + }, + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + } + ], + "type": "object" + }, + "typeName": { + "typeId": "V1RealtimeSubscribe", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "V1RealtimeSubscribe", + "camelCase": { + "unsafeName": "v1RealtimeSubscribe", + "safeName": "v1RealtimeSubscribe" + }, + "snakeCase": { + "unsafeName": "v_1_realtime_subscribe", + "safeName": "v_1_realtime_subscribe" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME_SUBSCRIBE", + "safeName": "V_1_REALTIME_SUBSCRIBE" + }, + "pascalCase": { + "unsafeName": "V1RealtimeSubscribe", + "safeName": "V1RealtimeSubscribe" + } + } + }, + "type": "named" + }, + "type": "reference" + } + } + ], + "url": "/v1/realtime" + } + ], + "v2Examples": { + "autogeneratedExamples": {}, + "userSpecifiedExamples": {} + } + } + }, + "headers": [], + "idempotencyHeaders": [], + "pathParameters": [], + "errorDiscriminationStrategy": { + "type": "statusCode" + }, + "variables": [], + "serviceTypeReferenceInfo": { + "sharedTypes": [], + "typesReferencedOnlyByService": {} + }, + "environments": { + "defaultEnvironment": "production", + "environments": { + "environments": [ + { + "id": "production", + "name": { + "originalName": "production", + "camelCase": { + "unsafeName": "production", + "safeName": "production" + }, + "snakeCase": { + "unsafeName": "production", + "safeName": "production" + }, + "screamingSnakeCase": { + "unsafeName": "PRODUCTION", + "safeName": "PRODUCTION" + }, + "pascalCase": { + "unsafeName": "Production", + "safeName": "Production" + } + }, + "url": "wss://api.example.com" + } + ], + "type": "singleBaseUrl" + } + }, + "rootPackage": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "types": [], + "errors": [], + "subpackages": [ + "subpackage_v1Realtime" + ], + "hasEndpointsInTree": false + }, + "subpackages": { + "subpackage_v1Realtime": { + "name": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v_1_realtime", + "safeName": "v_1_realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME", + "safeName": "V_1_REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v_1_realtime", + "safeName": "v_1_realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME", + "safeName": "V_1_REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + ], + "packagePath": [], + "file": { + "originalName": "v1Realtime", + "camelCase": { + "unsafeName": "v1Realtime", + "safeName": "v1Realtime" + }, + "snakeCase": { + "unsafeName": "v_1_realtime", + "safeName": "v_1_realtime" + }, + "screamingSnakeCase": { + "unsafeName": "V_1_REALTIME", + "safeName": "V_1_REALTIME" + }, + "pascalCase": { + "unsafeName": "V1Realtime", + "safeName": "V1Realtime" + } + } + }, + "types": [], + "errors": [], + "subpackages": [], + "websocket": "channel_v1Realtime", + "hasEndpointsInTree": false + } + }, + "sdkConfig": { + "hasFileDownloadEndpoints": false, + "hasPaginatedEndpoints": false, + "hasStreamingEndpoints": false, + "isAuthMandatory": true, + "platformHeaders": { + "language": "", + "sdkName": "", + "sdkVersion": "" + } + }, + "apiName": { + "originalName": "", + "camelCase": { + "unsafeName": "", + "safeName": "" + }, + "snakeCase": { + "unsafeName": "", + "safeName": "" + }, + "screamingSnakeCase": { + "unsafeName": "", + "safeName": "" + }, + "pascalCase": { + "unsafeName": "", + "safeName": "" + } + }, + "constants": { + "errorInstanceIdKey": { + "name": { + "originalName": "errorInstanceId", + "camelCase": { + "unsafeName": "errorInstanceId", + "safeName": "errorInstanceId" + }, + "snakeCase": { + "unsafeName": "error_instance_id", + "safeName": "error_instance_id" + }, + "screamingSnakeCase": { + "unsafeName": "ERROR_INSTANCE_ID", + "safeName": "ERROR_INSTANCE_ID" + }, + "pascalCase": { + "unsafeName": "ErrorInstanceId", + "safeName": "ErrorInstanceId" + } + }, + "wireValue": "errorInstanceId" + } + } +} \ No newline at end of file diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/asyncapi.yml b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/asyncapi.yml new file mode 100644 index 000000000000..d26d40883e10 --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/asyncapi.yml @@ -0,0 +1,32 @@ +asyncapi: 2.6.0 +info: + title: Test x-fern-sdk-method-name extension for AsyncAPI v2 + version: 1.0.0 + +servers: + production: + url: wss://api.example.com + protocol: wss + +channels: + /v1/realtime: + publish: + x-fern-sdk-method-name: send + operationId: sendEvent + message: + payload: + type: object + properties: + content: + type: string + subscribe: + x-fern-sdk-method-name: receive + operationId: receiveEvent + message: + payload: + type: object + properties: + content: + type: string + timestamp: + type: string diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/fern.config.json b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/fern.config.json new file mode 100644 index 000000000000..ecb7133e2645 --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/fern.config.json @@ -0,0 +1,4 @@ +{ + "organization": "fern", + "version": "*" +} diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/generators.yml b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/generators.yml new file mode 100644 index 000000000000..c8442b7d1eb1 --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/asyncapi-v2-x-fern-sdk-method-name/fern/generators.yml @@ -0,0 +1,4 @@ +# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json +api: + specs: + - asyncapi: ../asyncapi.yml diff --git a/packages/cli/cli/versions.yml b/packages/cli/cli/versions.yml index bb35fe754bdb..1cf448524478 100644 --- a/packages/cli/cli/versions.yml +++ b/packages/cli/cli/versions.yml @@ -1,4 +1,47 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 4.32.2 + changelogEntry: + - summary: | + Fix custom LICENSE files not being included in SDK output when using + `fern generate --local`. The license path (e.g. `../../LICENSE`) was + resolved relative to `fern.config.json` instead of `generators.yml`, + causing the file to not be found in multi-API workspace layouts where + these files are in different directories. + type: fix + createdAt: "2026-03-17" + irVersion: 65 + +- version: 4.32.1 + changelogEntry: + - summary: | + Downgrade the `no-openapi-v2-in-docs` validation rule from an error to a + warning. Fern supports OpenAPI 2.0 (Swagger) specs in docs generation, so + `fern check` no longer fails when Swagger 2.0 specs are present. + type: fix + createdAt: "2026-03-17" + irVersion: 65 + +- version: 4.32.0 + changelogEntry: + - summary: | + Add support for the `x-fern-sdk-method-name` extension on AsyncAPI v2 + `publish` and `subscribe` operations. Users can now customize the + generated SDK method name (e.g., changing `sendPublish` to `send`) + without migrating to AsyncAPI v3. + type: feat + createdAt: "2026-03-17" + irVersion: 65 + +- version: 4.31.3 + changelogEntry: + - summary: | + Enable WebSocket auth in AsyncAPI by populating IR auth schemes. The AsyncAPI + converter now converts security schemes from both generators.yml auth overrides + and native AsyncAPI spec securitySchemes into IR AuthScheme objects, so the docs + explorer correctly renders auth forms for WebSocket endpoints. + type: fix + createdAt: "2026-03-17" + irVersion: 65 - version: 4.31.2 changelogEntry: - summary: | @@ -12,7 +55,6 @@ type: fix createdAt: "2026-03-16" irVersion: 65 - - version: 4.31.1 changelogEntry: - summary: | @@ -1492,6 +1534,7 @@ type: fix createdAt: "2026-02-24" irVersion: 65 + - version: 3.85.2 changelogEntry: - summary: | diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__CheckResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__CheckResponse.json new file mode 100644 index 000000000000..c6044e39d692 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-grpc-proto-exhaustive/type__CheckResponse.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "properties": { + "created_at": { + "oneOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "updated_at": { + "oneOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-grpc-proto-exhaustive.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-grpc-proto-exhaustive.json index 032a4a55749c..bd49d4c870fe 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-grpc-proto-exhaustive.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-grpc-proto-exhaustive.json @@ -142,6 +142,105 @@ } ] }, + "type_:CheckResponse": { + "type": "object", + "declaration": { + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "created_at", + "camelCase": { + "unsafeName": "createdAt", + "safeName": "createdAt" + }, + "snakeCase": { + "unsafeName": "created_at", + "safeName": "created_at" + }, + "screamingSnakeCase": { + "unsafeName": "CREATED_AT", + "safeName": "CREATED_AT" + }, + "pascalCase": { + "unsafeName": "CreatedAt", + "safeName": "CreatedAt" + } + }, + "wireValue": "created_at" + }, + "typeReference": { + "type": "optional", + "value": { + "type": "primitive", + "value": "DATE_TIME" + } + }, + "propertyAccess": null, + "variable": null + }, + { + "name": { + "name": { + "originalName": "updated_at", + "camelCase": { + "unsafeName": "updatedAt", + "safeName": "updatedAt" + }, + "snakeCase": { + "unsafeName": "updated_at", + "safeName": "updated_at" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATED_AT", + "safeName": "UPDATED_AT" + }, + "pascalCase": { + "unsafeName": "UpdatedAt", + "safeName": "UpdatedAt" + } + }, + "wireValue": "updated_at" + }, + "typeReference": { + "type": "optional", + "value": { + "type": "primitive", + "value": "DATE_TIME" + } + }, + "propertyAccess": null, + "variable": null + } + ], + "extends": null, + "additionalProperties": false + }, "type_:Column": { "type": "object", "declaration": { @@ -3208,6 +3307,86 @@ }, "headers": [], "endpoints": { + "endpoint_dataService.Check": { + "auth": null, + "declaration": { + "name": { + "originalName": "Check", + "camelCase": { + "unsafeName": "check", + "safeName": "check" + }, + "snakeCase": { + "unsafeName": "check", + "safeName": "check" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK", + "safeName": "CHECK" + }, + "pascalCase": { + "unsafeName": "Check", + "safeName": "Check" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataService", + "camelCase": { + "unsafeName": "dataService", + "safeName": "dataService" + }, + "snakeCase": { + "unsafeName": "data_service", + "safeName": "data_service" + }, + "screamingSnakeCase": { + "unsafeName": "DATA_SERVICE", + "safeName": "DATA_SERVICE" + }, + "pascalCase": { + "unsafeName": "DataService", + "safeName": "DataService" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataService", + "camelCase": { + "unsafeName": "dataService", + "safeName": "dataService" + }, + "snakeCase": { + "unsafeName": "data_service", + "safeName": "data_service" + }, + "screamingSnakeCase": { + "unsafeName": "DATA_SERVICE", + "safeName": "DATA_SERVICE" + }, + "pascalCase": { + "unsafeName": "DataService", + "safeName": "DataService" + } + } + } + }, + "location": { + "method": "POST", + "path": "/data.v1.DataService/Check" + }, + "request": { + "type": "body", + "pathParameters": [], + "body": null + }, + "response": { + "type": "json" + }, + "examples": null + }, "endpoint_dataService.Create": { "auth": null, "declaration": { diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/exhaustive.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/exhaustive.json index 70067745dd68..d1d567b4a1a4 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/exhaustive.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/exhaustive.json @@ -3526,6 +3526,123 @@ "type": "unknown" } }, + "type_types/object:MapOfDocumentedUnknownType": { + "type": "alias", + "declaration": { + "name": { + "originalName": "MapOfDocumentedUnknownType", + "camelCase": { + "unsafeName": "mapOfDocumentedUnknownType", + "safeName": "mapOfDocumentedUnknownType" + }, + "snakeCase": { + "unsafeName": "map_of_documented_unknown_type", + "safeName": "map_of_documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "MapOfDocumentedUnknownType", + "safeName": "MapOfDocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + } + }, + "typeReference": { + "type": "map", + "key": { + "type": "primitive", + "value": "STRING" + }, + "value": { + "type": "named", + "value": "type_types/object:DocumentedUnknownType" + } + } + }, "type_types/union:Animal": { "type": "discriminatedUnion", "declaration": { @@ -7866,6 +7983,152 @@ }, "examples": null }, + "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType": { + "auth": { + "type": "bearer", + "token": { + "originalName": "token", + "camelCase": { + "unsafeName": "token", + "safeName": "token" + }, + "snakeCase": { + "unsafeName": "token", + "safeName": "token" + }, + "screamingSnakeCase": { + "unsafeName": "TOKEN", + "safeName": "TOKEN" + }, + "pascalCase": { + "unsafeName": "Token", + "safeName": "Token" + } + } + }, + "declaration": { + "name": { + "originalName": "getAndReturnMapOfDocumentedUnknownType", + "camelCase": { + "unsafeName": "getAndReturnMapOfDocumentedUnknownType", + "safeName": "getAndReturnMapOfDocumentedUnknownType" + }, + "snakeCase": { + "unsafeName": "get_and_return_map_of_documented_unknown_type", + "safeName": "get_and_return_map_of_documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "GET_AND_RETURN_MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "GET_AND_RETURN_MAP_OF_DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "GetAndReturnMapOfDocumentedUnknownType", + "safeName": "GetAndReturnMapOfDocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "endpoints", + "camelCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "snakeCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "screamingSnakeCase": { + "unsafeName": "ENDPOINTS", + "safeName": "ENDPOINTS" + }, + "pascalCase": { + "unsafeName": "Endpoints", + "safeName": "Endpoints" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "endpoints", + "camelCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "snakeCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "screamingSnakeCase": { + "unsafeName": "ENDPOINTS", + "safeName": "ENDPOINTS" + }, + "pascalCase": { + "unsafeName": "Endpoints", + "safeName": "Endpoints" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + } + }, + "location": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type" + }, + "request": { + "type": "body", + "pathParameters": [], + "body": { + "type": "typeReference", + "value": { + "type": "named", + "value": "type_types/object:MapOfDocumentedUnknownType" + } + } + }, + "response": { + "type": "json" + }, + "examples": null + }, "endpoint_endpoints/object.getAndReturnWithDatetimeLikeString": { "auth": { "type": "bearer", diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/csharp-grpc-proto-exhaustive.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/csharp-grpc-proto-exhaustive.json index dd90d5ce3c49..a8ad939fca57 100644 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/csharp-grpc-proto-exhaustive.json +++ b/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/csharp-grpc-proto-exhaustive.json @@ -243,6 +243,177 @@ "availability": null, "docs": null }, + "type_:CheckResponse": { + "inline": null, + "name": { + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "displayName": null, + "typeId": "type_:CheckResponse" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "created_at", + "camelCase": { + "unsafeName": "createdAt", + "safeName": "createdAt" + }, + "snakeCase": { + "unsafeName": "created_at", + "safeName": "created_at" + }, + "screamingSnakeCase": { + "unsafeName": "CREATED_AT", + "safeName": "CREATED_AT" + }, + "pascalCase": { + "unsafeName": "CreatedAt", + "safeName": "CreatedAt" + } + }, + "wireValue": "created_at" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "DATE_TIME", + "v2": null + } + } + } + }, + "propertyAccess": null, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "updated_at", + "camelCase": { + "unsafeName": "updatedAt", + "safeName": "updatedAt" + }, + "snakeCase": { + "unsafeName": "updated_at", + "safeName": "updated_at" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATED_AT", + "safeName": "UPDATED_AT" + }, + "pascalCase": { + "unsafeName": "UpdatedAt", + "safeName": "UpdatedAt" + } + }, + "wireValue": "updated_at" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": { + "v1": "DATE_TIME", + "v2": null + } + } + } + }, + "propertyAccess": null, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + }, + "availability": null, + "docs": null + } + ], + "extra-properties": false, + "extendedProperties": [] + }, + "referencedTypes": [], + "encoding": { + "json": null, + "proto": {} + }, + "source": { + "type": "proto", + "value": { + "type": "userDefined", + "file": { + "filepath": "proto/data/v1/data.proto", + "packageName": "data.v1", + "options": { + "csharp": { + "namespace": "Data.V1.Grpc" + } + } + }, + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + } + } + }, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "v2Examples": null, + "availability": null, + "docs": null + }, "type_:Column": { "inline": null, "name": { @@ -6055,6 +6226,560 @@ } }, "endpoints": [ + { + "id": "endpoint_dataService.Check", + "name": { + "originalName": "Check", + "camelCase": { + "unsafeName": "check", + "safeName": "check" + }, + "snakeCase": { + "unsafeName": "check", + "safeName": "check" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK", + "safeName": "CHECK" + }, + "pascalCase": { + "unsafeName": "Check", + "safeName": "Check" + } + }, + "displayName": null, + "auth": false, + "security": null, + "idempotent": false, + "baseUrl": null, + "v2BaseUrls": null, + "method": "POST", + "basePath": null, + "path": { + "head": "/data.v1.DataService/Check", + "parts": [] + }, + "fullPath": { + "head": "data.v1.DataService/Check", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": null, + "v2RequestBodies": null, + "sdkRequest": null, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "displayName": null, + "typeId": "type_:CheckResponse", + "default": null, + "inline": null + }, + "docs": "OK", + "v2Examples": null + } + }, + "status-code": 200, + "isWildcardStatusCode": null, + "docs": "OK" + }, + "v2Responses": null, + "errors": [], + "userSpecifiedExamples": [ + { + "example": { + "id": "fdd31271", + "name": null, + "url": "/data.v1.DataService/Check", + "rootPathParameters": [], + "endpointPathParameters": [], + "servicePathParameters": [], + "endpointHeaders": [], + "serviceHeaders": [], + "queryParameters": [], + "request": null, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "typeName": { + "typeId": "type_:CheckResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + }, + "displayName": null + }, + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "created_at", + "camelCase": { + "unsafeName": "createdAt", + "safeName": "createdAt" + }, + "snakeCase": { + "unsafeName": "created_at", + "safeName": "created_at" + }, + "screamingSnakeCase": { + "unsafeName": "CREATED_AT", + "safeName": "CREATED_AT" + }, + "pascalCase": { + "unsafeName": "CreatedAt", + "safeName": "CreatedAt" + } + }, + "wireValue": "created_at" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "datetime", + "datetime": "2024-01-15T09:30:00.000Z", + "raw": "2024-01-15T09:30:00Z" + } + }, + "jsonExample": "2024-01-15T09:30:00Z" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "DATE_TIME", + "v2": null + } + } + } + }, + "jsonExample": "2024-01-15T09:30:00Z" + }, + "originalTypeDeclaration": { + "typeId": "type_:CheckResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + }, + "displayName": null + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "updated_at", + "camelCase": { + "unsafeName": "updatedAt", + "safeName": "updatedAt" + }, + "snakeCase": { + "unsafeName": "updated_at", + "safeName": "updated_at" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATED_AT", + "safeName": "UPDATED_AT" + }, + "pascalCase": { + "unsafeName": "UpdatedAt", + "safeName": "UpdatedAt" + } + }, + "wireValue": "updated_at" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "datetime", + "datetime": "2024-01-15T09:30:00.000Z", + "raw": "2024-01-15T09:30:00Z" + } + }, + "jsonExample": "2024-01-15T09:30:00Z" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "DATE_TIME", + "v2": null + } + } + } + }, + "jsonExample": "2024-01-15T09:30:00Z" + }, + "originalTypeDeclaration": { + "typeId": "type_:CheckResponse", + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + }, + "displayName": null + }, + "propertyAccess": null + } + ], + "extraProperties": null + } + }, + "jsonExample": { + "created_at": "2024-01-15T09:30:00Z", + "updated_at": "2024-01-15T09:30:00Z" + } + } + } + }, + "docs": null + }, + "codeSamples": null + } + ], + "autogeneratedExamples": [ + { + "example": { + "id": "f0c4b214", + "url": "/data.v1.DataService/Check", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": null, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "created_at", + "camelCase": { + "unsafeName": "createdAt", + "safeName": "createdAt" + }, + "snakeCase": { + "unsafeName": "created_at", + "safeName": "created_at" + }, + "screamingSnakeCase": { + "unsafeName": "CREATED_AT", + "safeName": "CREATED_AT" + }, + "pascalCase": { + "unsafeName": "CreatedAt", + "safeName": "CreatedAt" + } + }, + "wireValue": "created_at" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "displayName": null, + "typeId": "type_:CheckResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "datetime", + "datetime": "2024-01-15T09:30:00.000Z", + "raw": "2024-01-15T09:30:00Z" + } + }, + "jsonExample": "2024-01-15T09:30:00Z" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "DATE_TIME", + "v2": null + } + } + } + }, + "jsonExample": "2024-01-15T09:30:00Z" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "updated_at", + "camelCase": { + "unsafeName": "updatedAt", + "safeName": "updatedAt" + }, + "snakeCase": { + "unsafeName": "updated_at", + "safeName": "updated_at" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATED_AT", + "safeName": "UPDATED_AT" + }, + "pascalCase": { + "unsafeName": "UpdatedAt", + "safeName": "UpdatedAt" + } + }, + "wireValue": "updated_at" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "displayName": null, + "typeId": "type_:CheckResponse" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "datetime", + "datetime": "2024-01-15T09:30:00.000Z", + "raw": "2024-01-15T09:30:00Z" + } + }, + "jsonExample": "2024-01-15T09:30:00Z" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "DATE_TIME", + "v2": null + } + } + } + }, + "jsonExample": "2024-01-15T09:30:00Z" + }, + "propertyAccess": null + } + ], + "extraProperties": null + }, + "typeName": { + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + }, + "displayName": null, + "typeId": "type_:CheckResponse" + } + }, + "jsonExample": { + "created_at": "2024-01-15T09:30:00Z", + "updated_at": "2024-01-15T09:30:00Z" + } + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "v2Examples": null, + "source": null, + "audiences": null, + "retries": null, + "apiPlayground": null, + "responseHeaders": [], + "availability": null, + "docs": null + }, { "id": "endpoint_dataService.Create", "name": { @@ -32668,6 +33393,7 @@ "typesReferencedOnlyByService": { "service_dataService": [ "type_:AspectRatio", + "type_:CheckResponse", "type_:Column", "type_:CreateResponse", "type_:DeleteResponse", @@ -32848,6 +33574,105 @@ } ] }, + "type_:CheckResponse": { + "type": "object", + "declaration": { + "name": { + "originalName": "CheckResponse", + "camelCase": { + "unsafeName": "checkResponse", + "safeName": "checkResponse" + }, + "snakeCase": { + "unsafeName": "check_response", + "safeName": "check_response" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK_RESPONSE", + "safeName": "CHECK_RESPONSE" + }, + "pascalCase": { + "unsafeName": "CheckResponse", + "safeName": "CheckResponse" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "created_at", + "camelCase": { + "unsafeName": "createdAt", + "safeName": "createdAt" + }, + "snakeCase": { + "unsafeName": "created_at", + "safeName": "created_at" + }, + "screamingSnakeCase": { + "unsafeName": "CREATED_AT", + "safeName": "CREATED_AT" + }, + "pascalCase": { + "unsafeName": "CreatedAt", + "safeName": "CreatedAt" + } + }, + "wireValue": "created_at" + }, + "typeReference": { + "type": "optional", + "value": { + "type": "primitive", + "value": "DATE_TIME" + } + }, + "propertyAccess": null, + "variable": null + }, + { + "name": { + "name": { + "originalName": "updated_at", + "camelCase": { + "unsafeName": "updatedAt", + "safeName": "updatedAt" + }, + "snakeCase": { + "unsafeName": "updated_at", + "safeName": "updated_at" + }, + "screamingSnakeCase": { + "unsafeName": "UPDATED_AT", + "safeName": "UPDATED_AT" + }, + "pascalCase": { + "unsafeName": "UpdatedAt", + "safeName": "UpdatedAt" + } + }, + "wireValue": "updated_at" + }, + "typeReference": { + "type": "optional", + "value": { + "type": "primitive", + "value": "DATE_TIME" + } + }, + "propertyAccess": null, + "variable": null + } + ], + "extends": null, + "additionalProperties": false + }, "type_:Column": { "type": "object", "declaration": { @@ -35914,6 +36739,86 @@ }, "headers": [], "endpoints": { + "endpoint_dataService.Check": { + "auth": null, + "declaration": { + "name": { + "originalName": "Check", + "camelCase": { + "unsafeName": "check", + "safeName": "check" + }, + "snakeCase": { + "unsafeName": "check", + "safeName": "check" + }, + "screamingSnakeCase": { + "unsafeName": "CHECK", + "safeName": "CHECK" + }, + "pascalCase": { + "unsafeName": "Check", + "safeName": "Check" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "dataService", + "camelCase": { + "unsafeName": "dataService", + "safeName": "dataService" + }, + "snakeCase": { + "unsafeName": "data_service", + "safeName": "data_service" + }, + "screamingSnakeCase": { + "unsafeName": "DATA_SERVICE", + "safeName": "DATA_SERVICE" + }, + "pascalCase": { + "unsafeName": "DataService", + "safeName": "DataService" + } + } + ], + "packagePath": [], + "file": { + "originalName": "dataService", + "camelCase": { + "unsafeName": "dataService", + "safeName": "dataService" + }, + "snakeCase": { + "unsafeName": "data_service", + "safeName": "data_service" + }, + "screamingSnakeCase": { + "unsafeName": "DATA_SERVICE", + "safeName": "DATA_SERVICE" + }, + "pascalCase": { + "unsafeName": "DataService", + "safeName": "DataService" + } + } + } + }, + "location": { + "method": "POST", + "path": "/data.v1.DataService/Check" + }, + "request": { + "type": "body", + "pathParameters": [], + "body": null + }, + "response": { + "type": "json" + }, + "examples": null + }, "endpoint_dataService.Create": { "auth": null, "declaration": { @@ -38637,6 +39542,7 @@ "service": "service_", "types": [ "type_:AspectRatio", + "type_:CheckResponse", "type_:Column", "type_:CreateResponse", "type_:DeleteResponse", diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/exhaustive.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/exhaustive.json index 5b6b2ce96a92..446d97908a6a 100644 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/exhaustive.json +++ b/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/exhaustive.json @@ -5270,6 +5270,275 @@ "availability": null, "docs": "Tests that unknown types are able to preserve their docstrings." }, + "type_types/object:MapOfDocumentedUnknownType": { + "inline": null, + "name": { + "name": { + "originalName": "MapOfDocumentedUnknownType", + "camelCase": { + "unsafeName": "mapOfDocumentedUnknownType", + "safeName": "mapOfDocumentedUnknownType" + }, + "snakeCase": { + "unsafeName": "map_of_documented_unknown_type", + "safeName": "map_of_documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "MapOfDocumentedUnknownType", + "safeName": "MapOfDocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:MapOfDocumentedUnknownType" + }, + "shape": { + "_type": "alias", + "aliasOf": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "DocumentedUnknownType", + "camelCase": { + "unsafeName": "documentedUnknownType", + "safeName": "documentedUnknownType" + }, + "snakeCase": { + "unsafeName": "documented_unknown_type", + "safeName": "documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "DOCUMENTED_UNKNOWN_TYPE", + "safeName": "DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "DocumentedUnknownType", + "safeName": "DocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:DocumentedUnknownType", + "default": null, + "inline": null + } + } + }, + "resolvedType": { + "_type": "container", + "container": { + "_type": "map", + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "unknown" + } + } + } + }, + "referencedTypes": [ + "type_types/object:DocumentedUnknownType" + ], + "encoding": { + "json": {}, + "proto": null + }, + "source": null, + "userProvidedExamples": [], + "autogeneratedExamples": [], + "v2Examples": null, + "availability": null, + "docs": "Tests that map value types with unknown types don't get spurious | undefined." + }, "type_types/union:Animal": { "inline": null, "name": { @@ -60897,24 +61166,24 @@ "docs": null }, { - "id": "endpoint_endpoints/object.getAndReturnWithDatetimeLikeString", + "id": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType", "name": { - "originalName": "getAndReturnWithDatetimeLikeString", + "originalName": "getAndReturnMapOfDocumentedUnknownType", "camelCase": { - "unsafeName": "getAndReturnWithDatetimeLikeString", - "safeName": "getAndReturnWithDatetimeLikeString" + "unsafeName": "getAndReturnMapOfDocumentedUnknownType", + "safeName": "getAndReturnMapOfDocumentedUnknownType" }, "snakeCase": { - "unsafeName": "get_and_return_with_datetime_like_string", - "safeName": "get_and_return_with_datetime_like_string" + "unsafeName": "get_and_return_map_of_documented_unknown_type", + "safeName": "get_and_return_map_of_documented_unknown_type" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_WITH_DATETIME_LIKE_STRING", - "safeName": "GET_AND_RETURN_WITH_DATETIME_LIKE_STRING" + "unsafeName": "GET_AND_RETURN_MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "GET_AND_RETURN_MAP_OF_DOCUMENTED_UNKNOWN_TYPE" }, "pascalCase": { - "unsafeName": "GetAndReturnWithDatetimeLikeString", - "safeName": "GetAndReturnWithDatetimeLikeString" + "unsafeName": "GetAndReturnMapOfDocumentedUnknownType", + "safeName": "GetAndReturnMapOfDocumentedUnknownType" } }, "displayName": null, @@ -60930,11 +61199,11 @@ "method": "POST", "basePath": null, "path": { - "head": "/get-and-return-with-datetime-like-string", + "head": "/get-and-return-map-of-documented-unknown-type", "parts": [] }, "fullPath": { - "head": "/object/get-and-return-with-datetime-like-string", + "head": "/object/get-and-return-map-of-documented-unknown-type", "parts": [] }, "pathParameters": [], @@ -60946,22 +61215,1265 @@ "requestBodyType": { "_type": "named", "name": { - "originalName": "ObjectWithDatetimeLikeString", + "originalName": "MapOfDocumentedUnknownType", "camelCase": { - "unsafeName": "objectWithDatetimeLikeString", - "safeName": "objectWithDatetimeLikeString" + "unsafeName": "mapOfDocumentedUnknownType", + "safeName": "mapOfDocumentedUnknownType" }, "snakeCase": { - "unsafeName": "object_with_datetime_like_string", - "safeName": "object_with_datetime_like_string" + "unsafeName": "map_of_documented_unknown_type", + "safeName": "map_of_documented_unknown_type" }, "screamingSnakeCase": { - "unsafeName": "OBJECT_WITH_DATETIME_LIKE_STRING", - "safeName": "OBJECT_WITH_DATETIME_LIKE_STRING" + "unsafeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE" }, "pascalCase": { - "unsafeName": "ObjectWithDatetimeLikeString", - "safeName": "ObjectWithDatetimeLikeString" + "unsafeName": "MapOfDocumentedUnknownType", + "safeName": "MapOfDocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:MapOfDocumentedUnknownType", + "default": null, + "inline": null + }, + "docs": null, + "contentType": null, + "v2Examples": null + }, + "v2RequestBodies": null, + "sdkRequest": { + "shape": { + "type": "justRequestBody", + "value": { + "type": "typeReference", + "requestBodyType": { + "_type": "named", + "name": { + "originalName": "MapOfDocumentedUnknownType", + "camelCase": { + "unsafeName": "mapOfDocumentedUnknownType", + "safeName": "mapOfDocumentedUnknownType" + }, + "snakeCase": { + "unsafeName": "map_of_documented_unknown_type", + "safeName": "map_of_documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "MapOfDocumentedUnknownType", + "safeName": "MapOfDocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:MapOfDocumentedUnknownType", + "default": null, + "inline": null + }, + "docs": null, + "contentType": null, + "v2Examples": null + } + }, + "requestParameterName": { + "originalName": "request", + "camelCase": { + "unsafeName": "request", + "safeName": "request" + }, + "snakeCase": { + "unsafeName": "request", + "safeName": "request" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST", + "safeName": "REQUEST" + }, + "pascalCase": { + "unsafeName": "Request", + "safeName": "Request" + } + }, + "streamParameter": null + }, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "name": { + "originalName": "MapOfDocumentedUnknownType", + "camelCase": { + "unsafeName": "mapOfDocumentedUnknownType", + "safeName": "mapOfDocumentedUnknownType" + }, + "snakeCase": { + "unsafeName": "map_of_documented_unknown_type", + "safeName": "map_of_documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "MapOfDocumentedUnknownType", + "safeName": "MapOfDocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:MapOfDocumentedUnknownType", + "default": null, + "inline": null + }, + "docs": null, + "v2Examples": null + } + }, + "status-code": null, + "isWildcardStatusCode": null, + "docs": null + }, + "v2Responses": null, + "errors": [], + "userSpecifiedExamples": [], + "autogeneratedExamples": [ + { + "example": { + "id": "9123ea79", + "url": "/object/get-and-return-map-of-documented-unknown-type", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": { + "type": "reference", + "shape": { + "type": "named", + "shape": { + "type": "alias", + "value": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "string" + } + } + }, + "jsonExample": "string" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "alias", + "value": { + "shape": { + "type": "unknown", + "unknown": { + "key": "value" + } + }, + "jsonExample": { + "key": "value" + } + } + }, + "typeName": { + "name": { + "originalName": "DocumentedUnknownType", + "camelCase": { + "unsafeName": "documentedUnknownType", + "safeName": "documentedUnknownType" + }, + "snakeCase": { + "unsafeName": "documented_unknown_type", + "safeName": "documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "DOCUMENTED_UNKNOWN_TYPE", + "safeName": "DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "DocumentedUnknownType", + "safeName": "DocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:DocumentedUnknownType" + } + }, + "jsonExample": { + "key": "value" + } + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "DocumentedUnknownType", + "camelCase": { + "unsafeName": "documentedUnknownType", + "safeName": "documentedUnknownType" + }, + "snakeCase": { + "unsafeName": "documented_unknown_type", + "safeName": "documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "DOCUMENTED_UNKNOWN_TYPE", + "safeName": "DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "DocumentedUnknownType", + "safeName": "DocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:DocumentedUnknownType", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "string": { + "key": "value" + } + } + } + }, + "typeName": { + "name": { + "originalName": "MapOfDocumentedUnknownType", + "camelCase": { + "unsafeName": "mapOfDocumentedUnknownType", + "safeName": "mapOfDocumentedUnknownType" + }, + "snakeCase": { + "unsafeName": "map_of_documented_unknown_type", + "safeName": "map_of_documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "MapOfDocumentedUnknownType", + "safeName": "MapOfDocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:MapOfDocumentedUnknownType" + } + }, + "jsonExample": { + "string": { + "key": "value" + } + } + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "alias", + "value": { + "shape": { + "type": "container", + "container": { + "type": "map", + "map": [ + { + "key": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "string" + } + } + }, + "jsonExample": "string" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "alias", + "value": { + "shape": { + "type": "unknown", + "unknown": { + "key": "value" + } + }, + "jsonExample": { + "key": "value" + } + } + }, + "typeName": { + "name": { + "originalName": "DocumentedUnknownType", + "camelCase": { + "unsafeName": "documentedUnknownType", + "safeName": "documentedUnknownType" + }, + "snakeCase": { + "unsafeName": "documented_unknown_type", + "safeName": "documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "DOCUMENTED_UNKNOWN_TYPE", + "safeName": "DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "DocumentedUnknownType", + "safeName": "DocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:DocumentedUnknownType" + } + }, + "jsonExample": { + "key": "value" + } + } + } + ], + "keyType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "DocumentedUnknownType", + "camelCase": { + "unsafeName": "documentedUnknownType", + "safeName": "documentedUnknownType" + }, + "snakeCase": { + "unsafeName": "documented_unknown_type", + "safeName": "documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "DOCUMENTED_UNKNOWN_TYPE", + "safeName": "DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "DocumentedUnknownType", + "safeName": "DocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:DocumentedUnknownType", + "default": null, + "inline": null + } + } + }, + "jsonExample": { + "string": { + "key": "value" + } + } + } + }, + "typeName": { + "name": { + "originalName": "MapOfDocumentedUnknownType", + "camelCase": { + "unsafeName": "mapOfDocumentedUnknownType", + "safeName": "mapOfDocumentedUnknownType" + }, + "snakeCase": { + "unsafeName": "map_of_documented_unknown_type", + "safeName": "map_of_documented_unknown_type" + }, + "screamingSnakeCase": { + "unsafeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE" + }, + "pascalCase": { + "unsafeName": "MapOfDocumentedUnknownType", + "safeName": "MapOfDocumentedUnknownType" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + }, + "displayName": null, + "typeId": "type_types/object:MapOfDocumentedUnknownType" + } + }, + "jsonExample": { + "string": { + "key": "value" + } + } + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "v2Examples": null, + "source": null, + "audiences": null, + "retries": null, + "apiPlayground": null, + "responseHeaders": [], + "availability": null, + "docs": null + }, + { + "id": "endpoint_endpoints/object.getAndReturnWithDatetimeLikeString", + "name": { + "originalName": "getAndReturnWithDatetimeLikeString", + "camelCase": { + "unsafeName": "getAndReturnWithDatetimeLikeString", + "safeName": "getAndReturnWithDatetimeLikeString" + }, + "snakeCase": { + "unsafeName": "get_and_return_with_datetime_like_string", + "safeName": "get_and_return_with_datetime_like_string" + }, + "screamingSnakeCase": { + "unsafeName": "GET_AND_RETURN_WITH_DATETIME_LIKE_STRING", + "safeName": "GET_AND_RETURN_WITH_DATETIME_LIKE_STRING" + }, + "pascalCase": { + "unsafeName": "GetAndReturnWithDatetimeLikeString", + "safeName": "GetAndReturnWithDatetimeLikeString" + } + }, + "displayName": null, + "auth": true, + "security": [ + { + "bearer": [] + } + ], + "idempotent": false, + "baseUrl": null, + "v2BaseUrls": null, + "method": "POST", + "basePath": null, + "path": { + "head": "/get-and-return-with-datetime-like-string", + "parts": [] + }, + "fullPath": { + "head": "/object/get-and-return-with-datetime-like-string", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "requestBody": { + "type": "reference", + "requestBodyType": { + "_type": "named", + "name": { + "originalName": "ObjectWithDatetimeLikeString", + "camelCase": { + "unsafeName": "objectWithDatetimeLikeString", + "safeName": "objectWithDatetimeLikeString" + }, + "snakeCase": { + "unsafeName": "object_with_datetime_like_string", + "safeName": "object_with_datetime_like_string" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT_WITH_DATETIME_LIKE_STRING", + "safeName": "OBJECT_WITH_DATETIME_LIKE_STRING" + }, + "pascalCase": { + "unsafeName": "ObjectWithDatetimeLikeString", + "safeName": "ObjectWithDatetimeLikeString" } }, "fernFilepath": { @@ -86330,7 +87842,8 @@ "type_types/object:ObjectWithDatetimeLikeString", "type_types/object:ObjectWithUnknownField", "type_types/object:ObjectWithDocumentedUnknownType", - "type_types/object:DocumentedUnknownType" + "type_types/object:DocumentedUnknownType", + "type_types/object:MapOfDocumentedUnknownType" ], "service_endpoints/union": [ "type_types/union:Animal", @@ -89178,32 +90691,315 @@ { "name": { "name": { - "originalName": "optionalAlias", + "originalName": "optionalAlias", + "camelCase": { + "unsafeName": "optionalAlias", + "safeName": "optionalAlias" + }, + "snakeCase": { + "unsafeName": "optional_alias", + "safeName": "optional_alias" + }, + "screamingSnakeCase": { + "unsafeName": "OPTIONAL_ALIAS", + "safeName": "OPTIONAL_ALIAS" + }, + "pascalCase": { + "unsafeName": "OptionalAlias", + "safeName": "OptionalAlias" + } + }, + "wireValue": "optionalAlias" + }, + "typeReference": { + "type": "optional", + "value": { + "type": "named", + "value": "type_types/object:OptionalAlias" + } + }, + "propertyAccess": null, + "variable": null + } + ], + "extends": null, + "additionalProperties": false + }, + "type_types/object:OptionalAlias": { + "type": "alias", + "declaration": { + "name": { + "originalName": "OptionalAlias", + "camelCase": { + "unsafeName": "optionalAlias", + "safeName": "optionalAlias" + }, + "snakeCase": { + "unsafeName": "optional_alias", + "safeName": "optional_alias" + }, + "screamingSnakeCase": { + "unsafeName": "OPTIONAL_ALIAS", + "safeName": "OPTIONAL_ALIAS" + }, + "pascalCase": { + "unsafeName": "OptionalAlias", + "safeName": "OptionalAlias" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + } + }, + "typeReference": { + "type": "optional", + "value": { + "type": "primitive", + "value": "STRING" + } + } + }, + "type_types/object:ObjectWithDatetimeLikeString": { + "type": "object", + "declaration": { + "name": { + "originalName": "ObjectWithDatetimeLikeString", + "camelCase": { + "unsafeName": "objectWithDatetimeLikeString", + "safeName": "objectWithDatetimeLikeString" + }, + "snakeCase": { + "unsafeName": "object_with_datetime_like_string", + "safeName": "object_with_datetime_like_string" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT_WITH_DATETIME_LIKE_STRING", + "safeName": "OBJECT_WITH_DATETIME_LIKE_STRING" + }, + "pascalCase": { + "unsafeName": "ObjectWithDatetimeLikeString", + "safeName": "ObjectWithDatetimeLikeString" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + }, + { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + ], + "packagePath": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "file": { + "originalName": "object", + "camelCase": { + "unsafeName": "object", + "safeName": "object" + }, + "snakeCase": { + "unsafeName": "object", + "safeName": "object" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT", + "safeName": "OBJECT" + }, + "pascalCase": { + "unsafeName": "Object", + "safeName": "Object" + } + } + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "datetimeLikeString", "camelCase": { - "unsafeName": "optionalAlias", - "safeName": "optionalAlias" + "unsafeName": "datetimeLikeString", + "safeName": "datetimeLikeString" }, "snakeCase": { - "unsafeName": "optional_alias", - "safeName": "optional_alias" + "unsafeName": "datetime_like_string", + "safeName": "datetime_like_string" }, "screamingSnakeCase": { - "unsafeName": "OPTIONAL_ALIAS", - "safeName": "OPTIONAL_ALIAS" + "unsafeName": "DATETIME_LIKE_STRING", + "safeName": "DATETIME_LIKE_STRING" }, "pascalCase": { - "unsafeName": "OptionalAlias", - "safeName": "OptionalAlias" + "unsafeName": "DatetimeLikeString", + "safeName": "DatetimeLikeString" } }, - "wireValue": "optionalAlias" + "wireValue": "datetimeLikeString" }, "typeReference": { - "type": "optional", - "value": { - "type": "named", - "value": "type_types/object:OptionalAlias" - } + "type": "primitive", + "value": "STRING" + }, + "propertyAccess": null, + "variable": null + }, + { + "name": { + "name": { + "originalName": "actualDatetime", + "camelCase": { + "unsafeName": "actualDatetime", + "safeName": "actualDatetime" + }, + "snakeCase": { + "unsafeName": "actual_datetime", + "safeName": "actual_datetime" + }, + "screamingSnakeCase": { + "unsafeName": "ACTUAL_DATETIME", + "safeName": "ACTUAL_DATETIME" + }, + "pascalCase": { + "unsafeName": "ActualDatetime", + "safeName": "ActualDatetime" + } + }, + "wireValue": "actualDatetime" + }, + "typeReference": { + "type": "primitive", + "value": "DATE_TIME" }, "propertyAccess": null, "variable": null @@ -89212,26 +91008,26 @@ "extends": null, "additionalProperties": false }, - "type_types/object:OptionalAlias": { - "type": "alias", + "type_types/object:ObjectWithUnknownField": { + "type": "object", "declaration": { "name": { - "originalName": "OptionalAlias", + "originalName": "ObjectWithUnknownField", "camelCase": { - "unsafeName": "optionalAlias", - "safeName": "optionalAlias" + "unsafeName": "objectWithUnknownField", + "safeName": "objectWithUnknownField" }, "snakeCase": { - "unsafeName": "optional_alias", - "safeName": "optional_alias" + "unsafeName": "object_with_unknown_field", + "safeName": "object_with_unknown_field" }, "screamingSnakeCase": { - "unsafeName": "OPTIONAL_ALIAS", - "safeName": "OPTIONAL_ALIAS" + "unsafeName": "OBJECT_WITH_UNKNOWN_FIELD", + "safeName": "OBJECT_WITH_UNKNOWN_FIELD" }, "pascalCase": { - "unsafeName": "OptionalAlias", - "safeName": "OptionalAlias" + "unsafeName": "ObjectWithUnknownField", + "safeName": "ObjectWithUnknownField" } }, "fernFilepath": { @@ -89317,34 +91113,60 @@ } } }, - "typeReference": { - "type": "optional", - "value": { - "type": "primitive", - "value": "STRING" + "properties": [ + { + "name": { + "name": { + "originalName": "unknown", + "camelCase": { + "unsafeName": "unknown", + "safeName": "unknown" + }, + "snakeCase": { + "unsafeName": "unknown", + "safeName": "unknown" + }, + "screamingSnakeCase": { + "unsafeName": "UNKNOWN", + "safeName": "UNKNOWN" + }, + "pascalCase": { + "unsafeName": "Unknown", + "safeName": "Unknown" + } + }, + "wireValue": "unknown" + }, + "typeReference": { + "type": "unknown" + }, + "propertyAccess": null, + "variable": null } - } + ], + "extends": null, + "additionalProperties": false }, - "type_types/object:ObjectWithDatetimeLikeString": { + "type_types/object:ObjectWithDocumentedUnknownType": { "type": "object", "declaration": { "name": { - "originalName": "ObjectWithDatetimeLikeString", + "originalName": "ObjectWithDocumentedUnknownType", "camelCase": { - "unsafeName": "objectWithDatetimeLikeString", - "safeName": "objectWithDatetimeLikeString" + "unsafeName": "objectWithDocumentedUnknownType", + "safeName": "objectWithDocumentedUnknownType" }, "snakeCase": { - "unsafeName": "object_with_datetime_like_string", - "safeName": "object_with_datetime_like_string" + "unsafeName": "object_with_documented_unknown_type", + "safeName": "object_with_documented_unknown_type" }, "screamingSnakeCase": { - "unsafeName": "OBJECT_WITH_DATETIME_LIKE_STRING", - "safeName": "OBJECT_WITH_DATETIME_LIKE_STRING" + "unsafeName": "OBJECT_WITH_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "OBJECT_WITH_DOCUMENTED_UNKNOWN_TYPE" }, "pascalCase": { - "unsafeName": "ObjectWithDatetimeLikeString", - "safeName": "ObjectWithDatetimeLikeString" + "unsafeName": "ObjectWithDocumentedUnknownType", + "safeName": "ObjectWithDocumentedUnknownType" } }, "fernFilepath": { @@ -89434,59 +91256,29 @@ { "name": { "name": { - "originalName": "datetimeLikeString", - "camelCase": { - "unsafeName": "datetimeLikeString", - "safeName": "datetimeLikeString" - }, - "snakeCase": { - "unsafeName": "datetime_like_string", - "safeName": "datetime_like_string" - }, - "screamingSnakeCase": { - "unsafeName": "DATETIME_LIKE_STRING", - "safeName": "DATETIME_LIKE_STRING" - }, - "pascalCase": { - "unsafeName": "DatetimeLikeString", - "safeName": "DatetimeLikeString" - } - }, - "wireValue": "datetimeLikeString" - }, - "typeReference": { - "type": "primitive", - "value": "STRING" - }, - "propertyAccess": null, - "variable": null - }, - { - "name": { - "name": { - "originalName": "actualDatetime", + "originalName": "documentedUnknownType", "camelCase": { - "unsafeName": "actualDatetime", - "safeName": "actualDatetime" + "unsafeName": "documentedUnknownType", + "safeName": "documentedUnknownType" }, "snakeCase": { - "unsafeName": "actual_datetime", - "safeName": "actual_datetime" + "unsafeName": "documented_unknown_type", + "safeName": "documented_unknown_type" }, "screamingSnakeCase": { - "unsafeName": "ACTUAL_DATETIME", - "safeName": "ACTUAL_DATETIME" + "unsafeName": "DOCUMENTED_UNKNOWN_TYPE", + "safeName": "DOCUMENTED_UNKNOWN_TYPE" }, "pascalCase": { - "unsafeName": "ActualDatetime", - "safeName": "ActualDatetime" + "unsafeName": "DocumentedUnknownType", + "safeName": "DocumentedUnknownType" } }, - "wireValue": "actualDatetime" + "wireValue": "documentedUnknownType" }, "typeReference": { - "type": "primitive", - "value": "DATE_TIME" + "type": "named", + "value": "type_types/object:DocumentedUnknownType" }, "propertyAccess": null, "variable": null @@ -89495,26 +91287,26 @@ "extends": null, "additionalProperties": false }, - "type_types/object:ObjectWithUnknownField": { - "type": "object", + "type_types/object:DocumentedUnknownType": { + "type": "alias", "declaration": { "name": { - "originalName": "ObjectWithUnknownField", + "originalName": "DocumentedUnknownType", "camelCase": { - "unsafeName": "objectWithUnknownField", - "safeName": "objectWithUnknownField" + "unsafeName": "documentedUnknownType", + "safeName": "documentedUnknownType" }, "snakeCase": { - "unsafeName": "object_with_unknown_field", - "safeName": "object_with_unknown_field" + "unsafeName": "documented_unknown_type", + "safeName": "documented_unknown_type" }, "screamingSnakeCase": { - "unsafeName": "OBJECT_WITH_UNKNOWN_FIELD", - "safeName": "OBJECT_WITH_UNKNOWN_FIELD" + "unsafeName": "DOCUMENTED_UNKNOWN_TYPE", + "safeName": "DOCUMENTED_UNKNOWN_TYPE" }, "pascalCase": { - "unsafeName": "ObjectWithUnknownField", - "safeName": "ObjectWithUnknownField" + "unsafeName": "DocumentedUnknownType", + "safeName": "DocumentedUnknownType" } }, "fernFilepath": { @@ -89600,60 +91392,30 @@ } } }, - "properties": [ - { - "name": { - "name": { - "originalName": "unknown", - "camelCase": { - "unsafeName": "unknown", - "safeName": "unknown" - }, - "snakeCase": { - "unsafeName": "unknown", - "safeName": "unknown" - }, - "screamingSnakeCase": { - "unsafeName": "UNKNOWN", - "safeName": "UNKNOWN" - }, - "pascalCase": { - "unsafeName": "Unknown", - "safeName": "Unknown" - } - }, - "wireValue": "unknown" - }, - "typeReference": { - "type": "unknown" - }, - "propertyAccess": null, - "variable": null - } - ], - "extends": null, - "additionalProperties": false + "typeReference": { + "type": "unknown" + } }, - "type_types/object:ObjectWithDocumentedUnknownType": { - "type": "object", + "type_types/object:MapOfDocumentedUnknownType": { + "type": "alias", "declaration": { "name": { - "originalName": "ObjectWithDocumentedUnknownType", + "originalName": "MapOfDocumentedUnknownType", "camelCase": { - "unsafeName": "objectWithDocumentedUnknownType", - "safeName": "objectWithDocumentedUnknownType" + "unsafeName": "mapOfDocumentedUnknownType", + "safeName": "mapOfDocumentedUnknownType" }, "snakeCase": { - "unsafeName": "object_with_documented_unknown_type", - "safeName": "object_with_documented_unknown_type" + "unsafeName": "map_of_documented_unknown_type", + "safeName": "map_of_documented_unknown_type" }, "screamingSnakeCase": { - "unsafeName": "OBJECT_WITH_DOCUMENTED_UNKNOWN_TYPE", - "safeName": "OBJECT_WITH_DOCUMENTED_UNKNOWN_TYPE" + "unsafeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "MAP_OF_DOCUMENTED_UNKNOWN_TYPE" }, "pascalCase": { - "unsafeName": "ObjectWithDocumentedUnknownType", - "safeName": "ObjectWithDocumentedUnknownType" + "unsafeName": "MapOfDocumentedUnknownType", + "safeName": "MapOfDocumentedUnknownType" } }, "fernFilepath": { @@ -89739,148 +91501,16 @@ } } }, - "properties": [ - { - "name": { - "name": { - "originalName": "documentedUnknownType", - "camelCase": { - "unsafeName": "documentedUnknownType", - "safeName": "documentedUnknownType" - }, - "snakeCase": { - "unsafeName": "documented_unknown_type", - "safeName": "documented_unknown_type" - }, - "screamingSnakeCase": { - "unsafeName": "DOCUMENTED_UNKNOWN_TYPE", - "safeName": "DOCUMENTED_UNKNOWN_TYPE" - }, - "pascalCase": { - "unsafeName": "DocumentedUnknownType", - "safeName": "DocumentedUnknownType" - } - }, - "wireValue": "documentedUnknownType" - }, - "typeReference": { - "type": "named", - "value": "type_types/object:DocumentedUnknownType" - }, - "propertyAccess": null, - "variable": null - } - ], - "extends": null, - "additionalProperties": false - }, - "type_types/object:DocumentedUnknownType": { - "type": "alias", - "declaration": { - "name": { - "originalName": "DocumentedUnknownType", - "camelCase": { - "unsafeName": "documentedUnknownType", - "safeName": "documentedUnknownType" - }, - "snakeCase": { - "unsafeName": "documented_unknown_type", - "safeName": "documented_unknown_type" - }, - "screamingSnakeCase": { - "unsafeName": "DOCUMENTED_UNKNOWN_TYPE", - "safeName": "DOCUMENTED_UNKNOWN_TYPE" - }, - "pascalCase": { - "unsafeName": "DocumentedUnknownType", - "safeName": "DocumentedUnknownType" - } + "typeReference": { + "type": "map", + "key": { + "type": "primitive", + "value": "STRING" }, - "fernFilepath": { - "allParts": [ - { - "originalName": "types", - "camelCase": { - "unsafeName": "types", - "safeName": "types" - }, - "snakeCase": { - "unsafeName": "types", - "safeName": "types" - }, - "screamingSnakeCase": { - "unsafeName": "TYPES", - "safeName": "TYPES" - }, - "pascalCase": { - "unsafeName": "Types", - "safeName": "Types" - } - }, - { - "originalName": "object", - "camelCase": { - "unsafeName": "object", - "safeName": "object" - }, - "snakeCase": { - "unsafeName": "object", - "safeName": "object" - }, - "screamingSnakeCase": { - "unsafeName": "OBJECT", - "safeName": "OBJECT" - }, - "pascalCase": { - "unsafeName": "Object", - "safeName": "Object" - } - } - ], - "packagePath": [ - { - "originalName": "types", - "camelCase": { - "unsafeName": "types", - "safeName": "types" - }, - "snakeCase": { - "unsafeName": "types", - "safeName": "types" - }, - "screamingSnakeCase": { - "unsafeName": "TYPES", - "safeName": "TYPES" - }, - "pascalCase": { - "unsafeName": "Types", - "safeName": "Types" - } - } - ], - "file": { - "originalName": "object", - "camelCase": { - "unsafeName": "object", - "safeName": "object" - }, - "snakeCase": { - "unsafeName": "object", - "safeName": "object" - }, - "screamingSnakeCase": { - "unsafeName": "OBJECT", - "safeName": "OBJECT" - }, - "pascalCase": { - "unsafeName": "Object", - "safeName": "Object" - } - } + "value": { + "type": "named", + "value": "type_types/object:DocumentedUnknownType" } - }, - "typeReference": { - "type": "unknown" } }, "type_types/union:Animal": { @@ -90665,7 +92295,156 @@ }, "location": { "method": "POST", - "path": "/container/list-of-primitives" + "path": "/container/list-of-primitives" + }, + "request": { + "type": "body", + "pathParameters": [], + "body": { + "type": "typeReference", + "value": { + "type": "list", + "value": { + "type": "primitive", + "value": "STRING" + } + } + } + }, + "response": { + "type": "json" + }, + "examples": null + }, + "endpoint_endpoints/container.getAndReturnListOfObjects": { + "auth": { + "type": "bearer", + "token": { + "originalName": "token", + "camelCase": { + "unsafeName": "token", + "safeName": "token" + }, + "snakeCase": { + "unsafeName": "token", + "safeName": "token" + }, + "screamingSnakeCase": { + "unsafeName": "TOKEN", + "safeName": "TOKEN" + }, + "pascalCase": { + "unsafeName": "Token", + "safeName": "Token" + } + } + }, + "declaration": { + "name": { + "originalName": "getAndReturnListOfObjects", + "camelCase": { + "unsafeName": "getAndReturnListOfObjects", + "safeName": "getAndReturnListOfObjects" + }, + "snakeCase": { + "unsafeName": "get_and_return_list_of_objects", + "safeName": "get_and_return_list_of_objects" + }, + "screamingSnakeCase": { + "unsafeName": "GET_AND_RETURN_LIST_OF_OBJECTS", + "safeName": "GET_AND_RETURN_LIST_OF_OBJECTS" + }, + "pascalCase": { + "unsafeName": "GetAndReturnListOfObjects", + "safeName": "GetAndReturnListOfObjects" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "endpoints", + "camelCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "snakeCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "screamingSnakeCase": { + "unsafeName": "ENDPOINTS", + "safeName": "ENDPOINTS" + }, + "pascalCase": { + "unsafeName": "Endpoints", + "safeName": "Endpoints" + } + }, + { + "originalName": "container", + "camelCase": { + "unsafeName": "container", + "safeName": "container" + }, + "snakeCase": { + "unsafeName": "container", + "safeName": "container" + }, + "screamingSnakeCase": { + "unsafeName": "CONTAINER", + "safeName": "CONTAINER" + }, + "pascalCase": { + "unsafeName": "Container", + "safeName": "Container" + } + } + ], + "packagePath": [ + { + "originalName": "endpoints", + "camelCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "snakeCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "screamingSnakeCase": { + "unsafeName": "ENDPOINTS", + "safeName": "ENDPOINTS" + }, + "pascalCase": { + "unsafeName": "Endpoints", + "safeName": "Endpoints" + } + } + ], + "file": { + "originalName": "container", + "camelCase": { + "unsafeName": "container", + "safeName": "container" + }, + "snakeCase": { + "unsafeName": "container", + "safeName": "container" + }, + "screamingSnakeCase": { + "unsafeName": "CONTAINER", + "safeName": "CONTAINER" + }, + "pascalCase": { + "unsafeName": "Container", + "safeName": "Container" + } + } + } + }, + "location": { + "method": "POST", + "path": "/container/list-of-objects" }, "request": { "type": "body", @@ -90674,6 +92453,155 @@ "type": "typeReference", "value": { "type": "list", + "value": { + "type": "named", + "value": "type_types/object:ObjectWithRequiredField" + } + } + } + }, + "response": { + "type": "json" + }, + "examples": null + }, + "endpoint_endpoints/container.getAndReturnSetOfPrimitives": { + "auth": { + "type": "bearer", + "token": { + "originalName": "token", + "camelCase": { + "unsafeName": "token", + "safeName": "token" + }, + "snakeCase": { + "unsafeName": "token", + "safeName": "token" + }, + "screamingSnakeCase": { + "unsafeName": "TOKEN", + "safeName": "TOKEN" + }, + "pascalCase": { + "unsafeName": "Token", + "safeName": "Token" + } + } + }, + "declaration": { + "name": { + "originalName": "getAndReturnSetOfPrimitives", + "camelCase": { + "unsafeName": "getAndReturnSetOfPrimitives", + "safeName": "getAndReturnSetOfPrimitives" + }, + "snakeCase": { + "unsafeName": "get_and_return_set_of_primitives", + "safeName": "get_and_return_set_of_primitives" + }, + "screamingSnakeCase": { + "unsafeName": "GET_AND_RETURN_SET_OF_PRIMITIVES", + "safeName": "GET_AND_RETURN_SET_OF_PRIMITIVES" + }, + "pascalCase": { + "unsafeName": "GetAndReturnSetOfPrimitives", + "safeName": "GetAndReturnSetOfPrimitives" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "endpoints", + "camelCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "snakeCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "screamingSnakeCase": { + "unsafeName": "ENDPOINTS", + "safeName": "ENDPOINTS" + }, + "pascalCase": { + "unsafeName": "Endpoints", + "safeName": "Endpoints" + } + }, + { + "originalName": "container", + "camelCase": { + "unsafeName": "container", + "safeName": "container" + }, + "snakeCase": { + "unsafeName": "container", + "safeName": "container" + }, + "screamingSnakeCase": { + "unsafeName": "CONTAINER", + "safeName": "CONTAINER" + }, + "pascalCase": { + "unsafeName": "Container", + "safeName": "Container" + } + } + ], + "packagePath": [ + { + "originalName": "endpoints", + "camelCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "snakeCase": { + "unsafeName": "endpoints", + "safeName": "endpoints" + }, + "screamingSnakeCase": { + "unsafeName": "ENDPOINTS", + "safeName": "ENDPOINTS" + }, + "pascalCase": { + "unsafeName": "Endpoints", + "safeName": "Endpoints" + } + } + ], + "file": { + "originalName": "container", + "camelCase": { + "unsafeName": "container", + "safeName": "container" + }, + "snakeCase": { + "unsafeName": "container", + "safeName": "container" + }, + "screamingSnakeCase": { + "unsafeName": "CONTAINER", + "safeName": "CONTAINER" + }, + "pascalCase": { + "unsafeName": "Container", + "safeName": "Container" + } + } + } + }, + "location": { + "method": "POST", + "path": "/container/set-of-primitives" + }, + "request": { + "type": "body", + "pathParameters": [], + "body": { + "type": "typeReference", + "value": { + "type": "set", "value": { "type": "primitive", "value": "STRING" @@ -90686,7 +92614,7 @@ }, "examples": null }, - "endpoint_endpoints/container.getAndReturnListOfObjects": { + "endpoint_endpoints/container.getAndReturnSetOfObjects": { "auth": { "type": "bearer", "token": { @@ -90711,22 +92639,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnListOfObjects", + "originalName": "getAndReturnSetOfObjects", "camelCase": { - "unsafeName": "getAndReturnListOfObjects", - "safeName": "getAndReturnListOfObjects" + "unsafeName": "getAndReturnSetOfObjects", + "safeName": "getAndReturnSetOfObjects" }, "snakeCase": { - "unsafeName": "get_and_return_list_of_objects", - "safeName": "get_and_return_list_of_objects" + "unsafeName": "get_and_return_set_of_objects", + "safeName": "get_and_return_set_of_objects" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_LIST_OF_OBJECTS", - "safeName": "GET_AND_RETURN_LIST_OF_OBJECTS" + "unsafeName": "GET_AND_RETURN_SET_OF_OBJECTS", + "safeName": "GET_AND_RETURN_SET_OF_OBJECTS" }, "pascalCase": { - "unsafeName": "GetAndReturnListOfObjects", - "safeName": "GetAndReturnListOfObjects" + "unsafeName": "GetAndReturnSetOfObjects", + "safeName": "GetAndReturnSetOfObjects" } }, "fernFilepath": { @@ -90814,7 +92742,7 @@ }, "location": { "method": "POST", - "path": "/container/list-of-objects" + "path": "/container/set-of-objects" }, "request": { "type": "body", @@ -90822,7 +92750,7 @@ "body": { "type": "typeReference", "value": { - "type": "list", + "type": "set", "value": { "type": "named", "value": "type_types/object:ObjectWithRequiredField" @@ -90835,7 +92763,7 @@ }, "examples": null }, - "endpoint_endpoints/container.getAndReturnSetOfPrimitives": { + "endpoint_endpoints/container.getAndReturnMapPrimToPrim": { "auth": { "type": "bearer", "token": { @@ -90860,22 +92788,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnSetOfPrimitives", + "originalName": "getAndReturnMapPrimToPrim", "camelCase": { - "unsafeName": "getAndReturnSetOfPrimitives", - "safeName": "getAndReturnSetOfPrimitives" + "unsafeName": "getAndReturnMapPrimToPrim", + "safeName": "getAndReturnMapPrimToPrim" }, "snakeCase": { - "unsafeName": "get_and_return_set_of_primitives", - "safeName": "get_and_return_set_of_primitives" + "unsafeName": "get_and_return_map_prim_to_prim", + "safeName": "get_and_return_map_prim_to_prim" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_SET_OF_PRIMITIVES", - "safeName": "GET_AND_RETURN_SET_OF_PRIMITIVES" + "unsafeName": "GET_AND_RETURN_MAP_PRIM_TO_PRIM", + "safeName": "GET_AND_RETURN_MAP_PRIM_TO_PRIM" }, "pascalCase": { - "unsafeName": "GetAndReturnSetOfPrimitives", - "safeName": "GetAndReturnSetOfPrimitives" + "unsafeName": "GetAndReturnMapPrimToPrim", + "safeName": "GetAndReturnMapPrimToPrim" } }, "fernFilepath": { @@ -90963,7 +92891,7 @@ }, "location": { "method": "POST", - "path": "/container/set-of-primitives" + "path": "/container/map-prim-to-prim" }, "request": { "type": "body", @@ -90971,7 +92899,11 @@ "body": { "type": "typeReference", "value": { - "type": "set", + "type": "map", + "key": { + "type": "primitive", + "value": "STRING" + }, "value": { "type": "primitive", "value": "STRING" @@ -90984,7 +92916,7 @@ }, "examples": null }, - "endpoint_endpoints/container.getAndReturnSetOfObjects": { + "endpoint_endpoints/container.getAndReturnMapOfPrimToObject": { "auth": { "type": "bearer", "token": { @@ -91009,22 +92941,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnSetOfObjects", + "originalName": "getAndReturnMapOfPrimToObject", "camelCase": { - "unsafeName": "getAndReturnSetOfObjects", - "safeName": "getAndReturnSetOfObjects" + "unsafeName": "getAndReturnMapOfPrimToObject", + "safeName": "getAndReturnMapOfPrimToObject" }, "snakeCase": { - "unsafeName": "get_and_return_set_of_objects", - "safeName": "get_and_return_set_of_objects" + "unsafeName": "get_and_return_map_of_prim_to_object", + "safeName": "get_and_return_map_of_prim_to_object" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_SET_OF_OBJECTS", - "safeName": "GET_AND_RETURN_SET_OF_OBJECTS" + "unsafeName": "GET_AND_RETURN_MAP_OF_PRIM_TO_OBJECT", + "safeName": "GET_AND_RETURN_MAP_OF_PRIM_TO_OBJECT" }, "pascalCase": { - "unsafeName": "GetAndReturnSetOfObjects", - "safeName": "GetAndReturnSetOfObjects" + "unsafeName": "GetAndReturnMapOfPrimToObject", + "safeName": "GetAndReturnMapOfPrimToObject" } }, "fernFilepath": { @@ -91112,7 +93044,7 @@ }, "location": { "method": "POST", - "path": "/container/set-of-objects" + "path": "/container/map-prim-to-object" }, "request": { "type": "body", @@ -91120,7 +93052,11 @@ "body": { "type": "typeReference", "value": { - "type": "set", + "type": "map", + "key": { + "type": "primitive", + "value": "STRING" + }, "value": { "type": "named", "value": "type_types/object:ObjectWithRequiredField" @@ -91133,7 +93069,7 @@ }, "examples": null }, - "endpoint_endpoints/container.getAndReturnMapPrimToPrim": { + "endpoint_endpoints/container.getAndReturnMapOfPrimToUndiscriminatedUnion": { "auth": { "type": "bearer", "token": { @@ -91158,22 +93094,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnMapPrimToPrim", + "originalName": "getAndReturnMapOfPrimToUndiscriminatedUnion", "camelCase": { - "unsafeName": "getAndReturnMapPrimToPrim", - "safeName": "getAndReturnMapPrimToPrim" + "unsafeName": "getAndReturnMapOfPrimToUndiscriminatedUnion", + "safeName": "getAndReturnMapOfPrimToUndiscriminatedUnion" }, "snakeCase": { - "unsafeName": "get_and_return_map_prim_to_prim", - "safeName": "get_and_return_map_prim_to_prim" + "unsafeName": "get_and_return_map_of_prim_to_undiscriminated_union", + "safeName": "get_and_return_map_of_prim_to_undiscriminated_union" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_MAP_PRIM_TO_PRIM", - "safeName": "GET_AND_RETURN_MAP_PRIM_TO_PRIM" + "unsafeName": "GET_AND_RETURN_MAP_OF_PRIM_TO_UNDISCRIMINATED_UNION", + "safeName": "GET_AND_RETURN_MAP_OF_PRIM_TO_UNDISCRIMINATED_UNION" }, "pascalCase": { - "unsafeName": "GetAndReturnMapPrimToPrim", - "safeName": "GetAndReturnMapPrimToPrim" + "unsafeName": "GetAndReturnMapOfPrimToUndiscriminatedUnion", + "safeName": "GetAndReturnMapOfPrimToUndiscriminatedUnion" } }, "fernFilepath": { @@ -91261,7 +93197,7 @@ }, "location": { "method": "POST", - "path": "/container/map-prim-to-prim" + "path": "/container/map-prim-to-union" }, "request": { "type": "body", @@ -91275,8 +93211,8 @@ "value": "STRING" }, "value": { - "type": "primitive", - "value": "STRING" + "type": "named", + "value": "type_types/union:MixedType" } } } @@ -91286,7 +93222,7 @@ }, "examples": null }, - "endpoint_endpoints/container.getAndReturnMapOfPrimToObject": { + "endpoint_endpoints/container.getAndReturnOptional": { "auth": { "type": "bearer", "token": { @@ -91311,22 +93247,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnMapOfPrimToObject", + "originalName": "getAndReturnOptional", "camelCase": { - "unsafeName": "getAndReturnMapOfPrimToObject", - "safeName": "getAndReturnMapOfPrimToObject" + "unsafeName": "getAndReturnOptional", + "safeName": "getAndReturnOptional" }, "snakeCase": { - "unsafeName": "get_and_return_map_of_prim_to_object", - "safeName": "get_and_return_map_of_prim_to_object" + "unsafeName": "get_and_return_optional", + "safeName": "get_and_return_optional" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_MAP_OF_PRIM_TO_OBJECT", - "safeName": "GET_AND_RETURN_MAP_OF_PRIM_TO_OBJECT" + "unsafeName": "GET_AND_RETURN_OPTIONAL", + "safeName": "GET_AND_RETURN_OPTIONAL" }, "pascalCase": { - "unsafeName": "GetAndReturnMapOfPrimToObject", - "safeName": "GetAndReturnMapOfPrimToObject" + "unsafeName": "GetAndReturnOptional", + "safeName": "GetAndReturnOptional" } }, "fernFilepath": { @@ -91414,7 +93350,7 @@ }, "location": { "method": "POST", - "path": "/container/map-prim-to-object" + "path": "/container/opt-objects" }, "request": { "type": "body", @@ -91422,11 +93358,7 @@ "body": { "type": "typeReference", "value": { - "type": "map", - "key": { - "type": "primitive", - "value": "STRING" - }, + "type": "optional", "value": { "type": "named", "value": "type_types/object:ObjectWithRequiredField" @@ -91439,7 +93371,7 @@ }, "examples": null }, - "endpoint_endpoints/container.getAndReturnMapOfPrimToUndiscriminatedUnion": { + "endpoint_endpoints/content-type.postJsonPatchContentType": { "auth": { "type": "bearer", "token": { @@ -91464,22 +93396,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnMapOfPrimToUndiscriminatedUnion", + "originalName": "postJsonPatchContentType", "camelCase": { - "unsafeName": "getAndReturnMapOfPrimToUndiscriminatedUnion", - "safeName": "getAndReturnMapOfPrimToUndiscriminatedUnion" + "unsafeName": "postJSONPatchContentType", + "safeName": "postJSONPatchContentType" }, "snakeCase": { - "unsafeName": "get_and_return_map_of_prim_to_undiscriminated_union", - "safeName": "get_and_return_map_of_prim_to_undiscriminated_union" + "unsafeName": "post_json_patch_content_type", + "safeName": "post_json_patch_content_type" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_MAP_OF_PRIM_TO_UNDISCRIMINATED_UNION", - "safeName": "GET_AND_RETURN_MAP_OF_PRIM_TO_UNDISCRIMINATED_UNION" + "unsafeName": "POST_JSON_PATCH_CONTENT_TYPE", + "safeName": "POST_JSON_PATCH_CONTENT_TYPE" }, "pascalCase": { - "unsafeName": "GetAndReturnMapOfPrimToUndiscriminatedUnion", - "safeName": "GetAndReturnMapOfPrimToUndiscriminatedUnion" + "unsafeName": "PostJSONPatchContentType", + "safeName": "PostJSONPatchContentType" } }, "fernFilepath": { @@ -91504,22 +93436,22 @@ } }, { - "originalName": "container", + "originalName": "content-type", "camelCase": { - "unsafeName": "container", - "safeName": "container" + "unsafeName": "contentType", + "safeName": "contentType" }, "snakeCase": { - "unsafeName": "container", - "safeName": "container" + "unsafeName": "content_type", + "safeName": "content_type" }, "screamingSnakeCase": { - "unsafeName": "CONTAINER", - "safeName": "CONTAINER" + "unsafeName": "CONTENT_TYPE", + "safeName": "CONTENT_TYPE" }, "pascalCase": { - "unsafeName": "Container", - "safeName": "Container" + "unsafeName": "ContentType", + "safeName": "ContentType" } } ], @@ -91545,29 +93477,29 @@ } ], "file": { - "originalName": "container", + "originalName": "content-type", "camelCase": { - "unsafeName": "container", - "safeName": "container" + "unsafeName": "contentType", + "safeName": "contentType" }, "snakeCase": { - "unsafeName": "container", - "safeName": "container" + "unsafeName": "content_type", + "safeName": "content_type" }, "screamingSnakeCase": { - "unsafeName": "CONTAINER", - "safeName": "CONTAINER" + "unsafeName": "CONTENT_TYPE", + "safeName": "CONTENT_TYPE" }, "pascalCase": { - "unsafeName": "Container", - "safeName": "Container" + "unsafeName": "ContentType", + "safeName": "ContentType" } } } }, "location": { "method": "POST", - "path": "/container/map-prim-to-union" + "path": "/foo/bar" }, "request": { "type": "body", @@ -91575,15 +93507,8 @@ "body": { "type": "typeReference", "value": { - "type": "map", - "key": { - "type": "primitive", - "value": "STRING" - }, - "value": { - "type": "named", - "value": "type_types/union:MixedType" - } + "type": "named", + "value": "type_types/object:ObjectWithOptionalField" } } }, @@ -91592,7 +93517,7 @@ }, "examples": null }, - "endpoint_endpoints/container.getAndReturnOptional": { + "endpoint_endpoints/content-type.postJsonPatchContentWithCharsetType": { "auth": { "type": "bearer", "token": { @@ -91617,22 +93542,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnOptional", + "originalName": "postJsonPatchContentWithCharsetType", "camelCase": { - "unsafeName": "getAndReturnOptional", - "safeName": "getAndReturnOptional" + "unsafeName": "postJSONPatchContentWithCharsetType", + "safeName": "postJSONPatchContentWithCharsetType" }, "snakeCase": { - "unsafeName": "get_and_return_optional", - "safeName": "get_and_return_optional" + "unsafeName": "post_json_patch_content_with_charset_type", + "safeName": "post_json_patch_content_with_charset_type" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_OPTIONAL", - "safeName": "GET_AND_RETURN_OPTIONAL" + "unsafeName": "POST_JSON_PATCH_CONTENT_WITH_CHARSET_TYPE", + "safeName": "POST_JSON_PATCH_CONTENT_WITH_CHARSET_TYPE" }, "pascalCase": { - "unsafeName": "GetAndReturnOptional", - "safeName": "GetAndReturnOptional" + "unsafeName": "PostJSONPatchContentWithCharsetType", + "safeName": "PostJSONPatchContentWithCharsetType" } }, "fernFilepath": { @@ -91657,22 +93582,22 @@ } }, { - "originalName": "container", + "originalName": "content-type", "camelCase": { - "unsafeName": "container", - "safeName": "container" + "unsafeName": "contentType", + "safeName": "contentType" }, "snakeCase": { - "unsafeName": "container", - "safeName": "container" + "unsafeName": "content_type", + "safeName": "content_type" }, "screamingSnakeCase": { - "unsafeName": "CONTAINER", - "safeName": "CONTAINER" + "unsafeName": "CONTENT_TYPE", + "safeName": "CONTENT_TYPE" }, "pascalCase": { - "unsafeName": "Container", - "safeName": "Container" + "unsafeName": "ContentType", + "safeName": "ContentType" } } ], @@ -91698,29 +93623,29 @@ } ], "file": { - "originalName": "container", + "originalName": "content-type", "camelCase": { - "unsafeName": "container", - "safeName": "container" + "unsafeName": "contentType", + "safeName": "contentType" }, "snakeCase": { - "unsafeName": "container", - "safeName": "container" + "unsafeName": "content_type", + "safeName": "content_type" }, "screamingSnakeCase": { - "unsafeName": "CONTAINER", - "safeName": "CONTAINER" + "unsafeName": "CONTENT_TYPE", + "safeName": "CONTENT_TYPE" }, "pascalCase": { - "unsafeName": "Container", - "safeName": "Container" + "unsafeName": "ContentType", + "safeName": "ContentType" } } } }, "location": { "method": "POST", - "path": "/container/opt-objects" + "path": "/foo/baz" }, "request": { "type": "body", @@ -91728,11 +93653,8 @@ "body": { "type": "typeReference", "value": { - "type": "optional", - "value": { - "type": "named", - "value": "type_types/object:ObjectWithRequiredField" - } + "type": "named", + "value": "type_types/object:ObjectWithOptionalField" } } }, @@ -91741,7 +93663,7 @@ }, "examples": null }, - "endpoint_endpoints/content-type.postJsonPatchContentType": { + "endpoint_endpoints/enum.getAndReturnEnum": { "auth": { "type": "bearer", "token": { @@ -91766,22 +93688,22 @@ }, "declaration": { "name": { - "originalName": "postJsonPatchContentType", + "originalName": "getAndReturnEnum", "camelCase": { - "unsafeName": "postJSONPatchContentType", - "safeName": "postJSONPatchContentType" + "unsafeName": "getAndReturnEnum", + "safeName": "getAndReturnEnum" }, "snakeCase": { - "unsafeName": "post_json_patch_content_type", - "safeName": "post_json_patch_content_type" + "unsafeName": "get_and_return_enum", + "safeName": "get_and_return_enum" }, "screamingSnakeCase": { - "unsafeName": "POST_JSON_PATCH_CONTENT_TYPE", - "safeName": "POST_JSON_PATCH_CONTENT_TYPE" + "unsafeName": "GET_AND_RETURN_ENUM", + "safeName": "GET_AND_RETURN_ENUM" }, "pascalCase": { - "unsafeName": "PostJSONPatchContentType", - "safeName": "PostJSONPatchContentType" + "unsafeName": "GetAndReturnEnum", + "safeName": "GetAndReturnEnum" } }, "fernFilepath": { @@ -91806,22 +93728,22 @@ } }, { - "originalName": "content-type", + "originalName": "enum", "camelCase": { - "unsafeName": "contentType", - "safeName": "contentType" + "unsafeName": "enum", + "safeName": "enum" }, "snakeCase": { - "unsafeName": "content_type", - "safeName": "content_type" + "unsafeName": "enum", + "safeName": "enum" }, "screamingSnakeCase": { - "unsafeName": "CONTENT_TYPE", - "safeName": "CONTENT_TYPE" + "unsafeName": "ENUM", + "safeName": "ENUM" }, "pascalCase": { - "unsafeName": "ContentType", - "safeName": "ContentType" + "unsafeName": "Enum", + "safeName": "Enum" } } ], @@ -91847,29 +93769,29 @@ } ], "file": { - "originalName": "content-type", + "originalName": "enum", "camelCase": { - "unsafeName": "contentType", - "safeName": "contentType" + "unsafeName": "enum", + "safeName": "enum" }, "snakeCase": { - "unsafeName": "content_type", - "safeName": "content_type" + "unsafeName": "enum", + "safeName": "enum" }, "screamingSnakeCase": { - "unsafeName": "CONTENT_TYPE", - "safeName": "CONTENT_TYPE" + "unsafeName": "ENUM", + "safeName": "ENUM" }, "pascalCase": { - "unsafeName": "ContentType", - "safeName": "ContentType" + "unsafeName": "Enum", + "safeName": "Enum" } } } }, "location": { "method": "POST", - "path": "/foo/bar" + "path": "/enum" }, "request": { "type": "body", @@ -91878,7 +93800,7 @@ "type": "typeReference", "value": { "type": "named", - "value": "type_types/object:ObjectWithOptionalField" + "value": "type_types/enum:WeatherReport" } } }, @@ -91887,7 +93809,7 @@ }, "examples": null }, - "endpoint_endpoints/content-type.postJsonPatchContentWithCharsetType": { + "endpoint_endpoints/http-methods.testGet": { "auth": { "type": "bearer", "token": { @@ -91912,22 +93834,22 @@ }, "declaration": { "name": { - "originalName": "postJsonPatchContentWithCharsetType", + "originalName": "testGet", "camelCase": { - "unsafeName": "postJSONPatchContentWithCharsetType", - "safeName": "postJSONPatchContentWithCharsetType" + "unsafeName": "testGet", + "safeName": "testGet" }, "snakeCase": { - "unsafeName": "post_json_patch_content_with_charset_type", - "safeName": "post_json_patch_content_with_charset_type" + "unsafeName": "test_get", + "safeName": "test_get" }, "screamingSnakeCase": { - "unsafeName": "POST_JSON_PATCH_CONTENT_WITH_CHARSET_TYPE", - "safeName": "POST_JSON_PATCH_CONTENT_WITH_CHARSET_TYPE" + "unsafeName": "TEST_GET", + "safeName": "TEST_GET" }, "pascalCase": { - "unsafeName": "PostJSONPatchContentWithCharsetType", - "safeName": "PostJSONPatchContentWithCharsetType" + "unsafeName": "TestGet", + "safeName": "TestGet" } }, "fernFilepath": { @@ -91952,22 +93874,22 @@ } }, { - "originalName": "content-type", + "originalName": "http-methods", "camelCase": { - "unsafeName": "contentType", - "safeName": "contentType" + "unsafeName": "httpMethods", + "safeName": "httpMethods" }, "snakeCase": { - "unsafeName": "content_type", - "safeName": "content_type" + "unsafeName": "http_methods", + "safeName": "http_methods" }, "screamingSnakeCase": { - "unsafeName": "CONTENT_TYPE", - "safeName": "CONTENT_TYPE" + "unsafeName": "HTTP_METHODS", + "safeName": "HTTP_METHODS" }, "pascalCase": { - "unsafeName": "ContentType", - "safeName": "ContentType" + "unsafeName": "HTTPMethods", + "safeName": "HTTPMethods" } } ], @@ -91993,47 +93915,72 @@ } ], "file": { - "originalName": "content-type", + "originalName": "http-methods", "camelCase": { - "unsafeName": "contentType", - "safeName": "contentType" + "unsafeName": "httpMethods", + "safeName": "httpMethods" }, "snakeCase": { - "unsafeName": "content_type", - "safeName": "content_type" + "unsafeName": "http_methods", + "safeName": "http_methods" }, "screamingSnakeCase": { - "unsafeName": "CONTENT_TYPE", - "safeName": "CONTENT_TYPE" + "unsafeName": "HTTP_METHODS", + "safeName": "HTTP_METHODS" }, "pascalCase": { - "unsafeName": "ContentType", - "safeName": "ContentType" + "unsafeName": "HTTPMethods", + "safeName": "HTTPMethods" } } } }, "location": { - "method": "POST", - "path": "/foo/baz" + "method": "GET", + "path": "/http-methods/{id}" }, "request": { "type": "body", - "pathParameters": [], - "body": { - "type": "typeReference", - "value": { - "type": "named", - "value": "type_types/object:ObjectWithOptionalField" + "pathParameters": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + }, + "propertyAccess": null, + "variable": null } - } + ], + "body": null }, "response": { "type": "json" }, "examples": null }, - "endpoint_endpoints/enum.getAndReturnEnum": { + "endpoint_endpoints/http-methods.testPost": { "auth": { "type": "bearer", "token": { @@ -92058,22 +94005,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnEnum", + "originalName": "testPost", "camelCase": { - "unsafeName": "getAndReturnEnum", - "safeName": "getAndReturnEnum" + "unsafeName": "testPost", + "safeName": "testPost" }, "snakeCase": { - "unsafeName": "get_and_return_enum", - "safeName": "get_and_return_enum" + "unsafeName": "test_post", + "safeName": "test_post" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_ENUM", - "safeName": "GET_AND_RETURN_ENUM" + "unsafeName": "TEST_POST", + "safeName": "TEST_POST" }, "pascalCase": { - "unsafeName": "GetAndReturnEnum", - "safeName": "GetAndReturnEnum" + "unsafeName": "TestPost", + "safeName": "TestPost" } }, "fernFilepath": { @@ -92098,22 +94045,22 @@ } }, { - "originalName": "enum", + "originalName": "http-methods", "camelCase": { - "unsafeName": "enum", - "safeName": "enum" + "unsafeName": "httpMethods", + "safeName": "httpMethods" }, "snakeCase": { - "unsafeName": "enum", - "safeName": "enum" + "unsafeName": "http_methods", + "safeName": "http_methods" }, "screamingSnakeCase": { - "unsafeName": "ENUM", - "safeName": "ENUM" + "unsafeName": "HTTP_METHODS", + "safeName": "HTTP_METHODS" }, "pascalCase": { - "unsafeName": "Enum", - "safeName": "Enum" + "unsafeName": "HTTPMethods", + "safeName": "HTTPMethods" } } ], @@ -92139,29 +94086,29 @@ } ], "file": { - "originalName": "enum", + "originalName": "http-methods", "camelCase": { - "unsafeName": "enum", - "safeName": "enum" + "unsafeName": "httpMethods", + "safeName": "httpMethods" }, "snakeCase": { - "unsafeName": "enum", - "safeName": "enum" + "unsafeName": "http_methods", + "safeName": "http_methods" }, "screamingSnakeCase": { - "unsafeName": "ENUM", - "safeName": "ENUM" + "unsafeName": "HTTP_METHODS", + "safeName": "HTTP_METHODS" }, "pascalCase": { - "unsafeName": "Enum", - "safeName": "Enum" + "unsafeName": "HTTPMethods", + "safeName": "HTTPMethods" } } } }, "location": { "method": "POST", - "path": "/enum" + "path": "/http-methods" }, "request": { "type": "body", @@ -92170,7 +94117,7 @@ "type": "typeReference", "value": { "type": "named", - "value": "type_types/enum:WeatherReport" + "value": "type_types/object:ObjectWithRequiredField" } } }, @@ -92179,7 +94126,7 @@ }, "examples": null }, - "endpoint_endpoints/http-methods.testGet": { + "endpoint_endpoints/http-methods.testPut": { "auth": { "type": "bearer", "token": { @@ -92204,22 +94151,22 @@ }, "declaration": { "name": { - "originalName": "testGet", + "originalName": "testPut", "camelCase": { - "unsafeName": "testGet", - "safeName": "testGet" + "unsafeName": "testPut", + "safeName": "testPut" }, "snakeCase": { - "unsafeName": "test_get", - "safeName": "test_get" + "unsafeName": "test_put", + "safeName": "test_put" }, "screamingSnakeCase": { - "unsafeName": "TEST_GET", - "safeName": "TEST_GET" + "unsafeName": "TEST_PUT", + "safeName": "TEST_PUT" }, "pascalCase": { - "unsafeName": "TestGet", - "safeName": "TestGet" + "unsafeName": "TestPut", + "safeName": "TestPut" } }, "fernFilepath": { @@ -92306,7 +94253,7 @@ } }, "location": { - "method": "GET", + "method": "PUT", "path": "/http-methods/{id}" }, "request": { @@ -92343,14 +94290,20 @@ "variable": null } ], - "body": null + "body": { + "type": "typeReference", + "value": { + "type": "named", + "value": "type_types/object:ObjectWithRequiredField" + } + } }, "response": { "type": "json" }, "examples": null }, - "endpoint_endpoints/http-methods.testPost": { + "endpoint_endpoints/http-methods.testPatch": { "auth": { "type": "bearer", "token": { @@ -92375,22 +94328,22 @@ }, "declaration": { "name": { - "originalName": "testPost", + "originalName": "testPatch", "camelCase": { - "unsafeName": "testPost", - "safeName": "testPost" + "unsafeName": "testPatch", + "safeName": "testPatch" }, "snakeCase": { - "unsafeName": "test_post", - "safeName": "test_post" + "unsafeName": "test_patch", + "safeName": "test_patch" }, "screamingSnakeCase": { - "unsafeName": "TEST_POST", - "safeName": "TEST_POST" + "unsafeName": "TEST_PATCH", + "safeName": "TEST_PATCH" }, "pascalCase": { - "unsafeName": "TestPost", - "safeName": "TestPost" + "unsafeName": "TestPatch", + "safeName": "TestPatch" } }, "fernFilepath": { @@ -92477,17 +94430,48 @@ } }, "location": { - "method": "POST", - "path": "/http-methods" + "method": "PATCH", + "path": "/http-methods/{id}" }, "request": { "type": "body", - "pathParameters": [], + "pathParameters": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + }, + "propertyAccess": null, + "variable": null + } + ], "body": { "type": "typeReference", "value": { "type": "named", - "value": "type_types/object:ObjectWithRequiredField" + "value": "type_types/object:ObjectWithOptionalField" } } }, @@ -92496,7 +94480,7 @@ }, "examples": null }, - "endpoint_endpoints/http-methods.testPut": { + "endpoint_endpoints/http-methods.testDelete": { "auth": { "type": "bearer", "token": { @@ -92521,22 +94505,22 @@ }, "declaration": { "name": { - "originalName": "testPut", + "originalName": "testDelete", "camelCase": { - "unsafeName": "testPut", - "safeName": "testPut" + "unsafeName": "testDelete", + "safeName": "testDelete" }, "snakeCase": { - "unsafeName": "test_put", - "safeName": "test_put" + "unsafeName": "test_delete", + "safeName": "test_delete" }, "screamingSnakeCase": { - "unsafeName": "TEST_PUT", - "safeName": "TEST_PUT" + "unsafeName": "TEST_DELETE", + "safeName": "TEST_DELETE" }, "pascalCase": { - "unsafeName": "TestPut", - "safeName": "TestPut" + "unsafeName": "TestDelete", + "safeName": "TestDelete" } }, "fernFilepath": { @@ -92623,7 +94607,7 @@ } }, "location": { - "method": "PUT", + "method": "DELETE", "path": "/http-methods/{id}" }, "request": { @@ -92660,20 +94644,14 @@ "variable": null } ], - "body": { - "type": "typeReference", - "value": { - "type": "named", - "value": "type_types/object:ObjectWithRequiredField" - } - } + "body": null }, "response": { "type": "json" }, "examples": null }, - "endpoint_endpoints/http-methods.testPatch": { + "endpoint_endpoints/object.getAndReturnWithOptionalField": { "auth": { "type": "bearer", "token": { @@ -92698,22 +94676,22 @@ }, "declaration": { "name": { - "originalName": "testPatch", + "originalName": "getAndReturnWithOptionalField", "camelCase": { - "unsafeName": "testPatch", - "safeName": "testPatch" + "unsafeName": "getAndReturnWithOptionalField", + "safeName": "getAndReturnWithOptionalField" }, "snakeCase": { - "unsafeName": "test_patch", - "safeName": "test_patch" + "unsafeName": "get_and_return_with_optional_field", + "safeName": "get_and_return_with_optional_field" }, "screamingSnakeCase": { - "unsafeName": "TEST_PATCH", - "safeName": "TEST_PATCH" + "unsafeName": "GET_AND_RETURN_WITH_OPTIONAL_FIELD", + "safeName": "GET_AND_RETURN_WITH_OPTIONAL_FIELD" }, "pascalCase": { - "unsafeName": "TestPatch", - "safeName": "TestPatch" + "unsafeName": "GetAndReturnWithOptionalField", + "safeName": "GetAndReturnWithOptionalField" } }, "fernFilepath": { @@ -92738,22 +94716,22 @@ } }, { - "originalName": "http-methods", + "originalName": "object", "camelCase": { - "unsafeName": "httpMethods", - "safeName": "httpMethods" + "unsafeName": "object", + "safeName": "object" }, "snakeCase": { - "unsafeName": "http_methods", - "safeName": "http_methods" + "unsafeName": "object", + "safeName": "object" }, "screamingSnakeCase": { - "unsafeName": "HTTP_METHODS", - "safeName": "HTTP_METHODS" + "unsafeName": "OBJECT", + "safeName": "OBJECT" }, "pascalCase": { - "unsafeName": "HTTPMethods", - "safeName": "HTTPMethods" + "unsafeName": "Object", + "safeName": "Object" } } ], @@ -92779,64 +94757,33 @@ } ], "file": { - "originalName": "http-methods", + "originalName": "object", "camelCase": { - "unsafeName": "httpMethods", - "safeName": "httpMethods" + "unsafeName": "object", + "safeName": "object" }, "snakeCase": { - "unsafeName": "http_methods", - "safeName": "http_methods" + "unsafeName": "object", + "safeName": "object" }, "screamingSnakeCase": { - "unsafeName": "HTTP_METHODS", - "safeName": "HTTP_METHODS" + "unsafeName": "OBJECT", + "safeName": "OBJECT" }, "pascalCase": { - "unsafeName": "HTTPMethods", - "safeName": "HTTPMethods" + "unsafeName": "Object", + "safeName": "Object" } } } }, "location": { - "method": "PATCH", - "path": "/http-methods/{id}" + "method": "POST", + "path": "/object/get-and-return-with-optional-field" }, "request": { "type": "body", - "pathParameters": [ - { - "name": { - "name": { - "originalName": "id", - "camelCase": { - "unsafeName": "id", - "safeName": "id" - }, - "snakeCase": { - "unsafeName": "id", - "safeName": "id" - }, - "screamingSnakeCase": { - "unsafeName": "ID", - "safeName": "ID" - }, - "pascalCase": { - "unsafeName": "ID", - "safeName": "ID" - } - }, - "wireValue": "id" - }, - "typeReference": { - "type": "primitive", - "value": "STRING" - }, - "propertyAccess": null, - "variable": null - } - ], + "pathParameters": [], "body": { "type": "typeReference", "value": { @@ -92850,7 +94797,7 @@ }, "examples": null }, - "endpoint_endpoints/http-methods.testDelete": { + "endpoint_endpoints/object.getAndReturnWithRequiredField": { "auth": { "type": "bearer", "token": { @@ -92875,22 +94822,22 @@ }, "declaration": { "name": { - "originalName": "testDelete", + "originalName": "getAndReturnWithRequiredField", "camelCase": { - "unsafeName": "testDelete", - "safeName": "testDelete" + "unsafeName": "getAndReturnWithRequiredField", + "safeName": "getAndReturnWithRequiredField" }, "snakeCase": { - "unsafeName": "test_delete", - "safeName": "test_delete" + "unsafeName": "get_and_return_with_required_field", + "safeName": "get_and_return_with_required_field" }, "screamingSnakeCase": { - "unsafeName": "TEST_DELETE", - "safeName": "TEST_DELETE" + "unsafeName": "GET_AND_RETURN_WITH_REQUIRED_FIELD", + "safeName": "GET_AND_RETURN_WITH_REQUIRED_FIELD" }, "pascalCase": { - "unsafeName": "TestDelete", - "safeName": "TestDelete" + "unsafeName": "GetAndReturnWithRequiredField", + "safeName": "GetAndReturnWithRequiredField" } }, "fernFilepath": { @@ -92915,22 +94862,22 @@ } }, { - "originalName": "http-methods", + "originalName": "object", "camelCase": { - "unsafeName": "httpMethods", - "safeName": "httpMethods" + "unsafeName": "object", + "safeName": "object" }, "snakeCase": { - "unsafeName": "http_methods", - "safeName": "http_methods" + "unsafeName": "object", + "safeName": "object" }, "screamingSnakeCase": { - "unsafeName": "HTTP_METHODS", - "safeName": "HTTP_METHODS" + "unsafeName": "OBJECT", + "safeName": "OBJECT" }, "pascalCase": { - "unsafeName": "HTTPMethods", - "safeName": "HTTPMethods" + "unsafeName": "Object", + "safeName": "Object" } } ], @@ -92956,72 +94903,47 @@ } ], "file": { - "originalName": "http-methods", + "originalName": "object", "camelCase": { - "unsafeName": "httpMethods", - "safeName": "httpMethods" + "unsafeName": "object", + "safeName": "object" }, "snakeCase": { - "unsafeName": "http_methods", - "safeName": "http_methods" + "unsafeName": "object", + "safeName": "object" }, "screamingSnakeCase": { - "unsafeName": "HTTP_METHODS", - "safeName": "HTTP_METHODS" + "unsafeName": "OBJECT", + "safeName": "OBJECT" }, "pascalCase": { - "unsafeName": "HTTPMethods", - "safeName": "HTTPMethods" + "unsafeName": "Object", + "safeName": "Object" } } } }, "location": { - "method": "DELETE", - "path": "/http-methods/{id}" + "method": "POST", + "path": "/object/get-and-return-with-required-field" }, "request": { "type": "body", - "pathParameters": [ - { - "name": { - "name": { - "originalName": "id", - "camelCase": { - "unsafeName": "id", - "safeName": "id" - }, - "snakeCase": { - "unsafeName": "id", - "safeName": "id" - }, - "screamingSnakeCase": { - "unsafeName": "ID", - "safeName": "ID" - }, - "pascalCase": { - "unsafeName": "ID", - "safeName": "ID" - } - }, - "wireValue": "id" - }, - "typeReference": { - "type": "primitive", - "value": "STRING" - }, - "propertyAccess": null, - "variable": null + "pathParameters": [], + "body": { + "type": "typeReference", + "value": { + "type": "named", + "value": "type_types/object:ObjectWithRequiredField" } - ], - "body": null + } }, "response": { "type": "json" }, "examples": null }, - "endpoint_endpoints/object.getAndReturnWithOptionalField": { + "endpoint_endpoints/object.getAndReturnWithMapOfMap": { "auth": { "type": "bearer", "token": { @@ -93046,22 +94968,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnWithOptionalField", + "originalName": "getAndReturnWithMapOfMap", "camelCase": { - "unsafeName": "getAndReturnWithOptionalField", - "safeName": "getAndReturnWithOptionalField" + "unsafeName": "getAndReturnWithMapOfMap", + "safeName": "getAndReturnWithMapOfMap" }, "snakeCase": { - "unsafeName": "get_and_return_with_optional_field", - "safeName": "get_and_return_with_optional_field" + "unsafeName": "get_and_return_with_map_of_map", + "safeName": "get_and_return_with_map_of_map" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_WITH_OPTIONAL_FIELD", - "safeName": "GET_AND_RETURN_WITH_OPTIONAL_FIELD" + "unsafeName": "GET_AND_RETURN_WITH_MAP_OF_MAP", + "safeName": "GET_AND_RETURN_WITH_MAP_OF_MAP" }, "pascalCase": { - "unsafeName": "GetAndReturnWithOptionalField", - "safeName": "GetAndReturnWithOptionalField" + "unsafeName": "GetAndReturnWithMapOfMap", + "safeName": "GetAndReturnWithMapOfMap" } }, "fernFilepath": { @@ -93149,7 +95071,7 @@ }, "location": { "method": "POST", - "path": "/object/get-and-return-with-optional-field" + "path": "/object/get-and-return-with-map-of-map" }, "request": { "type": "body", @@ -93158,7 +95080,7 @@ "type": "typeReference", "value": { "type": "named", - "value": "type_types/object:ObjectWithOptionalField" + "value": "type_types/object:ObjectWithMapOfMap" } } }, @@ -93167,7 +95089,7 @@ }, "examples": null }, - "endpoint_endpoints/object.getAndReturnWithRequiredField": { + "endpoint_endpoints/object.getAndReturnNestedWithOptionalField": { "auth": { "type": "bearer", "token": { @@ -93192,22 +95114,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnWithRequiredField", + "originalName": "getAndReturnNestedWithOptionalField", "camelCase": { - "unsafeName": "getAndReturnWithRequiredField", - "safeName": "getAndReturnWithRequiredField" + "unsafeName": "getAndReturnNestedWithOptionalField", + "safeName": "getAndReturnNestedWithOptionalField" }, "snakeCase": { - "unsafeName": "get_and_return_with_required_field", - "safeName": "get_and_return_with_required_field" + "unsafeName": "get_and_return_nested_with_optional_field", + "safeName": "get_and_return_nested_with_optional_field" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_WITH_REQUIRED_FIELD", - "safeName": "GET_AND_RETURN_WITH_REQUIRED_FIELD" + "unsafeName": "GET_AND_RETURN_NESTED_WITH_OPTIONAL_FIELD", + "safeName": "GET_AND_RETURN_NESTED_WITH_OPTIONAL_FIELD" }, "pascalCase": { - "unsafeName": "GetAndReturnWithRequiredField", - "safeName": "GetAndReturnWithRequiredField" + "unsafeName": "GetAndReturnNestedWithOptionalField", + "safeName": "GetAndReturnNestedWithOptionalField" } }, "fernFilepath": { @@ -93295,7 +95217,7 @@ }, "location": { "method": "POST", - "path": "/object/get-and-return-with-required-field" + "path": "/object/get-and-return-nested-with-optional-field" }, "request": { "type": "body", @@ -93304,7 +95226,7 @@ "type": "typeReference", "value": { "type": "named", - "value": "type_types/object:ObjectWithRequiredField" + "value": "type_types/object:NestedObjectWithOptionalField" } } }, @@ -93313,7 +95235,7 @@ }, "examples": null }, - "endpoint_endpoints/object.getAndReturnWithMapOfMap": { + "endpoint_endpoints/object.getAndReturnNestedWithRequiredField": { "auth": { "type": "bearer", "token": { @@ -93338,22 +95260,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnWithMapOfMap", + "originalName": "getAndReturnNestedWithRequiredField", "camelCase": { - "unsafeName": "getAndReturnWithMapOfMap", - "safeName": "getAndReturnWithMapOfMap" + "unsafeName": "getAndReturnNestedWithRequiredField", + "safeName": "getAndReturnNestedWithRequiredField" }, "snakeCase": { - "unsafeName": "get_and_return_with_map_of_map", - "safeName": "get_and_return_with_map_of_map" + "unsafeName": "get_and_return_nested_with_required_field", + "safeName": "get_and_return_nested_with_required_field" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_WITH_MAP_OF_MAP", - "safeName": "GET_AND_RETURN_WITH_MAP_OF_MAP" + "unsafeName": "GET_AND_RETURN_NESTED_WITH_REQUIRED_FIELD", + "safeName": "GET_AND_RETURN_NESTED_WITH_REQUIRED_FIELD" }, "pascalCase": { - "unsafeName": "GetAndReturnWithMapOfMap", - "safeName": "GetAndReturnWithMapOfMap" + "unsafeName": "GetAndReturnNestedWithRequiredField", + "safeName": "GetAndReturnNestedWithRequiredField" } }, "fernFilepath": { @@ -93441,16 +95363,47 @@ }, "location": { "method": "POST", - "path": "/object/get-and-return-with-map-of-map" + "path": "/object/get-and-return-nested-with-required-field/{string}" }, "request": { "type": "body", - "pathParameters": [], + "pathParameters": [ + { + "name": { + "name": { + "originalName": "string", + "camelCase": { + "unsafeName": "string", + "safeName": "string" + }, + "snakeCase": { + "unsafeName": "string", + "safeName": "string" + }, + "screamingSnakeCase": { + "unsafeName": "STRING", + "safeName": "STRING" + }, + "pascalCase": { + "unsafeName": "String", + "safeName": "String" + } + }, + "wireValue": "string" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + }, + "propertyAccess": null, + "variable": null + } + ], "body": { "type": "typeReference", "value": { "type": "named", - "value": "type_types/object:ObjectWithMapOfMap" + "value": "type_types/object:NestedObjectWithRequiredField" } } }, @@ -93459,7 +95412,7 @@ }, "examples": null }, - "endpoint_endpoints/object.getAndReturnNestedWithOptionalField": { + "endpoint_endpoints/object.getAndReturnNestedWithRequiredFieldAsList": { "auth": { "type": "bearer", "token": { @@ -93484,22 +95437,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnNestedWithOptionalField", + "originalName": "getAndReturnNestedWithRequiredFieldAsList", "camelCase": { - "unsafeName": "getAndReturnNestedWithOptionalField", - "safeName": "getAndReturnNestedWithOptionalField" + "unsafeName": "getAndReturnNestedWithRequiredFieldAsList", + "safeName": "getAndReturnNestedWithRequiredFieldAsList" }, "snakeCase": { - "unsafeName": "get_and_return_nested_with_optional_field", - "safeName": "get_and_return_nested_with_optional_field" + "unsafeName": "get_and_return_nested_with_required_field_as_list", + "safeName": "get_and_return_nested_with_required_field_as_list" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_NESTED_WITH_OPTIONAL_FIELD", - "safeName": "GET_AND_RETURN_NESTED_WITH_OPTIONAL_FIELD" + "unsafeName": "GET_AND_RETURN_NESTED_WITH_REQUIRED_FIELD_AS_LIST", + "safeName": "GET_AND_RETURN_NESTED_WITH_REQUIRED_FIELD_AS_LIST" }, "pascalCase": { - "unsafeName": "GetAndReturnNestedWithOptionalField", - "safeName": "GetAndReturnNestedWithOptionalField" + "unsafeName": "GetAndReturnNestedWithRequiredFieldAsList", + "safeName": "GetAndReturnNestedWithRequiredFieldAsList" } }, "fernFilepath": { @@ -93587,7 +95540,7 @@ }, "location": { "method": "POST", - "path": "/object/get-and-return-nested-with-optional-field" + "path": "/object/get-and-return-nested-with-required-field-list" }, "request": { "type": "body", @@ -93595,194 +95548,20 @@ "body": { "type": "typeReference", "value": { - "type": "named", - "value": "type_types/object:NestedObjectWithOptionalField" - } - } - }, - "response": { - "type": "json" - }, - "examples": null - }, - "endpoint_endpoints/object.getAndReturnNestedWithRequiredField": { - "auth": { - "type": "bearer", - "token": { - "originalName": "token", - "camelCase": { - "unsafeName": "token", - "safeName": "token" - }, - "snakeCase": { - "unsafeName": "token", - "safeName": "token" - }, - "screamingSnakeCase": { - "unsafeName": "TOKEN", - "safeName": "TOKEN" - }, - "pascalCase": { - "unsafeName": "Token", - "safeName": "Token" - } - } - }, - "declaration": { - "name": { - "originalName": "getAndReturnNestedWithRequiredField", - "camelCase": { - "unsafeName": "getAndReturnNestedWithRequiredField", - "safeName": "getAndReturnNestedWithRequiredField" - }, - "snakeCase": { - "unsafeName": "get_and_return_nested_with_required_field", - "safeName": "get_and_return_nested_with_required_field" - }, - "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_NESTED_WITH_REQUIRED_FIELD", - "safeName": "GET_AND_RETURN_NESTED_WITH_REQUIRED_FIELD" - }, - "pascalCase": { - "unsafeName": "GetAndReturnNestedWithRequiredField", - "safeName": "GetAndReturnNestedWithRequiredField" - } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "endpoints", - "camelCase": { - "unsafeName": "endpoints", - "safeName": "endpoints" - }, - "snakeCase": { - "unsafeName": "endpoints", - "safeName": "endpoints" - }, - "screamingSnakeCase": { - "unsafeName": "ENDPOINTS", - "safeName": "ENDPOINTS" - }, - "pascalCase": { - "unsafeName": "Endpoints", - "safeName": "Endpoints" - } - }, - { - "originalName": "object", - "camelCase": { - "unsafeName": "object", - "safeName": "object" - }, - "snakeCase": { - "unsafeName": "object", - "safeName": "object" - }, - "screamingSnakeCase": { - "unsafeName": "OBJECT", - "safeName": "OBJECT" - }, - "pascalCase": { - "unsafeName": "Object", - "safeName": "Object" - } - } - ], - "packagePath": [ - { - "originalName": "endpoints", - "camelCase": { - "unsafeName": "endpoints", - "safeName": "endpoints" - }, - "snakeCase": { - "unsafeName": "endpoints", - "safeName": "endpoints" - }, - "screamingSnakeCase": { - "unsafeName": "ENDPOINTS", - "safeName": "ENDPOINTS" - }, - "pascalCase": { - "unsafeName": "Endpoints", - "safeName": "Endpoints" - } - } - ], - "file": { - "originalName": "object", - "camelCase": { - "unsafeName": "object", - "safeName": "object" - }, - "snakeCase": { - "unsafeName": "object", - "safeName": "object" - }, - "screamingSnakeCase": { - "unsafeName": "OBJECT", - "safeName": "OBJECT" - }, - "pascalCase": { - "unsafeName": "Object", - "safeName": "Object" + "type": "list", + "value": { + "type": "named", + "value": "type_types/object:NestedObjectWithRequiredField" } } } }, - "location": { - "method": "POST", - "path": "/object/get-and-return-nested-with-required-field/{string}" - }, - "request": { - "type": "body", - "pathParameters": [ - { - "name": { - "name": { - "originalName": "string", - "camelCase": { - "unsafeName": "string", - "safeName": "string" - }, - "snakeCase": { - "unsafeName": "string", - "safeName": "string" - }, - "screamingSnakeCase": { - "unsafeName": "STRING", - "safeName": "STRING" - }, - "pascalCase": { - "unsafeName": "String", - "safeName": "String" - } - }, - "wireValue": "string" - }, - "typeReference": { - "type": "primitive", - "value": "STRING" - }, - "propertyAccess": null, - "variable": null - } - ], - "body": { - "type": "typeReference", - "value": { - "type": "named", - "value": "type_types/object:NestedObjectWithRequiredField" - } - } - }, "response": { "type": "json" }, "examples": null }, - "endpoint_endpoints/object.getAndReturnNestedWithRequiredFieldAsList": { + "endpoint_endpoints/object.getAndReturnWithUnknownField": { "auth": { "type": "bearer", "token": { @@ -93807,22 +95586,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnNestedWithRequiredFieldAsList", + "originalName": "getAndReturnWithUnknownField", "camelCase": { - "unsafeName": "getAndReturnNestedWithRequiredFieldAsList", - "safeName": "getAndReturnNestedWithRequiredFieldAsList" + "unsafeName": "getAndReturnWithUnknownField", + "safeName": "getAndReturnWithUnknownField" }, "snakeCase": { - "unsafeName": "get_and_return_nested_with_required_field_as_list", - "safeName": "get_and_return_nested_with_required_field_as_list" + "unsafeName": "get_and_return_with_unknown_field", + "safeName": "get_and_return_with_unknown_field" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_NESTED_WITH_REQUIRED_FIELD_AS_LIST", - "safeName": "GET_AND_RETURN_NESTED_WITH_REQUIRED_FIELD_AS_LIST" + "unsafeName": "GET_AND_RETURN_WITH_UNKNOWN_FIELD", + "safeName": "GET_AND_RETURN_WITH_UNKNOWN_FIELD" }, "pascalCase": { - "unsafeName": "GetAndReturnNestedWithRequiredFieldAsList", - "safeName": "GetAndReturnNestedWithRequiredFieldAsList" + "unsafeName": "GetAndReturnWithUnknownField", + "safeName": "GetAndReturnWithUnknownField" } }, "fernFilepath": { @@ -93910,7 +95689,7 @@ }, "location": { "method": "POST", - "path": "/object/get-and-return-nested-with-required-field-list" + "path": "/object/get-and-return-with-unknown-field" }, "request": { "type": "body", @@ -93918,11 +95697,8 @@ "body": { "type": "typeReference", "value": { - "type": "list", - "value": { - "type": "named", - "value": "type_types/object:NestedObjectWithRequiredField" - } + "type": "named", + "value": "type_types/object:ObjectWithUnknownField" } } }, @@ -93931,7 +95707,7 @@ }, "examples": null }, - "endpoint_endpoints/object.getAndReturnWithUnknownField": { + "endpoint_endpoints/object.getAndReturnWithDocumentedUnknownType": { "auth": { "type": "bearer", "token": { @@ -93956,22 +95732,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnWithUnknownField", + "originalName": "getAndReturnWithDocumentedUnknownType", "camelCase": { - "unsafeName": "getAndReturnWithUnknownField", - "safeName": "getAndReturnWithUnknownField" + "unsafeName": "getAndReturnWithDocumentedUnknownType", + "safeName": "getAndReturnWithDocumentedUnknownType" }, "snakeCase": { - "unsafeName": "get_and_return_with_unknown_field", - "safeName": "get_and_return_with_unknown_field" + "unsafeName": "get_and_return_with_documented_unknown_type", + "safeName": "get_and_return_with_documented_unknown_type" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_WITH_UNKNOWN_FIELD", - "safeName": "GET_AND_RETURN_WITH_UNKNOWN_FIELD" + "unsafeName": "GET_AND_RETURN_WITH_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "GET_AND_RETURN_WITH_DOCUMENTED_UNKNOWN_TYPE" }, "pascalCase": { - "unsafeName": "GetAndReturnWithUnknownField", - "safeName": "GetAndReturnWithUnknownField" + "unsafeName": "GetAndReturnWithDocumentedUnknownType", + "safeName": "GetAndReturnWithDocumentedUnknownType" } }, "fernFilepath": { @@ -94059,7 +95835,7 @@ }, "location": { "method": "POST", - "path": "/object/get-and-return-with-unknown-field" + "path": "/object/get-and-return-with-documented-unknown-type" }, "request": { "type": "body", @@ -94068,7 +95844,7 @@ "type": "typeReference", "value": { "type": "named", - "value": "type_types/object:ObjectWithUnknownField" + "value": "type_types/object:ObjectWithDocumentedUnknownType" } } }, @@ -94077,7 +95853,7 @@ }, "examples": null }, - "endpoint_endpoints/object.getAndReturnWithDocumentedUnknownType": { + "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType": { "auth": { "type": "bearer", "token": { @@ -94102,22 +95878,22 @@ }, "declaration": { "name": { - "originalName": "getAndReturnWithDocumentedUnknownType", + "originalName": "getAndReturnMapOfDocumentedUnknownType", "camelCase": { - "unsafeName": "getAndReturnWithDocumentedUnknownType", - "safeName": "getAndReturnWithDocumentedUnknownType" + "unsafeName": "getAndReturnMapOfDocumentedUnknownType", + "safeName": "getAndReturnMapOfDocumentedUnknownType" }, "snakeCase": { - "unsafeName": "get_and_return_with_documented_unknown_type", - "safeName": "get_and_return_with_documented_unknown_type" + "unsafeName": "get_and_return_map_of_documented_unknown_type", + "safeName": "get_and_return_map_of_documented_unknown_type" }, "screamingSnakeCase": { - "unsafeName": "GET_AND_RETURN_WITH_DOCUMENTED_UNKNOWN_TYPE", - "safeName": "GET_AND_RETURN_WITH_DOCUMENTED_UNKNOWN_TYPE" + "unsafeName": "GET_AND_RETURN_MAP_OF_DOCUMENTED_UNKNOWN_TYPE", + "safeName": "GET_AND_RETURN_MAP_OF_DOCUMENTED_UNKNOWN_TYPE" }, "pascalCase": { - "unsafeName": "GetAndReturnWithDocumentedUnknownType", - "safeName": "GetAndReturnWithDocumentedUnknownType" + "unsafeName": "GetAndReturnMapOfDocumentedUnknownType", + "safeName": "GetAndReturnMapOfDocumentedUnknownType" } }, "fernFilepath": { @@ -94205,7 +95981,7 @@ }, "location": { "method": "POST", - "path": "/object/get-and-return-with-documented-unknown-type" + "path": "/object/get-and-return-map-of-documented-unknown-type" }, "request": { "type": "body", @@ -94214,7 +95990,7 @@ "type": "typeReference", "value": { "type": "named", - "value": "type_types/object:ObjectWithDocumentedUnknownType" + "value": "type_types/object:MapOfDocumentedUnknownType" } } }, @@ -102325,7 +104101,8 @@ "type_types/object:ObjectWithDatetimeLikeString", "type_types/object:ObjectWithUnknownField", "type_types/object:ObjectWithDocumentedUnknownType", - "type_types/object:DocumentedUnknownType" + "type_types/object:DocumentedUnknownType", + "type_types/object:MapOfDocumentedUnknownType" ], "errors": [ "error_types/object:ObjectWithOptionalFieldError", diff --git a/packages/cli/generation/local-generation/local-workspace-runner/src/runLocalGenerationForWorkspace.ts b/packages/cli/generation/local-generation/local-workspace-runner/src/runLocalGenerationForWorkspace.ts index 609ee9ad1e59..c8e5b14efed0 100644 --- a/packages/cli/generation/local-generation/local-workspace-runner/src/runLocalGenerationForWorkspace.ts +++ b/packages/cli/generation/local-generation/local-workspace-runner/src/runLocalGenerationForWorkspace.ts @@ -305,7 +305,8 @@ export async function runLocalGenerationForWorkspace({ autoVersioningVersionBumpReason } = await writeFilesToDiskAndRunGenerator({ organization: projectConfig.organization, - absolutePathToFernConfig: projectConfig._absolutePath, + absolutePathToFernConfig: + workspace.generatorsConfiguration?.absolutePathToConfiguration ?? projectConfig._absolutePath, workspace: fernWorkspace, generatorInvocation, absolutePathToLocalOutput, diff --git a/packages/cli/workspace/lazy-fern-workspace/src/OSSWorkspace.ts b/packages/cli/workspace/lazy-fern-workspace/src/OSSWorkspace.ts index 4c60da035399..47de6d605295 100644 --- a/packages/cli/workspace/lazy-fern-workspace/src/OSSWorkspace.ts +++ b/packages/cli/workspace/lazy-fern-workspace/src/OSSWorkspace.ts @@ -337,6 +337,7 @@ export class OSSWorkspace extends BaseOpenAPIWorkspace { spec: document.value as any, exampleGenerationArgs: { disabled: false }, errorCollector, + authOverrides, enableUniqueErrorsPerEndpoint, settings: getOpenAPISettings({ options: document.settings }), generateV1Examples diff --git a/packages/cli/yaml/docs-validator/src/rules/no-openapi-v2-in-docs/no-openapi-v2-in-docs.ts b/packages/cli/yaml/docs-validator/src/rules/no-openapi-v2-in-docs/no-openapi-v2-in-docs.ts index 460c95d05a4f..ab171aacbe02 100644 --- a/packages/cli/yaml/docs-validator/src/rules/no-openapi-v2-in-docs/no-openapi-v2-in-docs.ts +++ b/packages/cli/yaml/docs-validator/src/rules/no-openapi-v2-in-docs/no-openapi-v2-in-docs.ts @@ -33,9 +33,9 @@ export const NoOpenApiV2InDocsRule: Rule = { (contents.includes('"swagger":"2.0"') || contents.includes('"swagger": "2.0"')); if (isOpenApiV2Yaml || isOpenApiV2Json) { violations.push({ - severity: "error", - name: "OpenAPI v2.0 not supported", - message: `OpenAPI version 2.0 (Swagger) is not supported in docs generation. Please upgrade to OpenAPI 3.0 or later.`, + severity: "warning", + name: "OpenAPI v2.0 detected", + message: `OpenAPI version 2.0 (Swagger) detected. Consider upgrading to OpenAPI 3.0 or later.`, relativeFilepath: relativePath }); } diff --git a/seed/csharp-model/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto b/seed/csharp-model/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto index 4f302a5b1c95..a19a2141a882 100644 --- a/seed/csharp-model/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto +++ b/seed/csharp-model/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package data.v1; import "google/protobuf/any.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; @@ -262,7 +263,13 @@ message DescribeResponse { uint32 total_count = 4; } +message CheckResponse { + google.protobuf.Timestamp created_at = 1; + google.protobuf.Timestamp updated_at = 2; +} + service DataService { + rpc Check(google.protobuf.Empty) returns (CheckResponse); rpc Upload(UploadRequest) returns (UploadResponse); rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Query(QueryRequest) returns (QueryResponse); diff --git a/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/CheckResponse.cs b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/CheckResponse.cs new file mode 100644 index 000000000000..2d6e0357b4c4 --- /dev/null +++ b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/CheckResponse.cs @@ -0,0 +1,66 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using SeedApi.Core; +using ProtoDataV1Grpc = Data.V1.Grpc; +using WellKnownProto = Google.Protobuf.WellKnownTypes; + +namespace SeedApi; + +[Serializable] +public record CheckResponse : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("created_at")] + public DateTime? CreatedAt { get; set; } + + [JsonPropertyName("updated_at")] + public DateTime? UpdatedAt { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + /// + /// Returns a new CheckResponse type from its Protobuf-equivalent representation. + /// + internal static CheckResponse FromProto(ProtoDataV1Grpc.CheckResponse value) + { + return new CheckResponse + { + CreatedAt = value.CreatedAt?.ToDateTime(), + UpdatedAt = value.UpdatedAt?.ToDateTime(), + }; + } + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + /// Maps the CheckResponse type into its Protobuf-equivalent representation. + /// + internal ProtoDataV1Grpc.CheckResponse ToProto() + { + var result = new ProtoDataV1Grpc.CheckResponse(); + if (CreatedAt != null) + { + result.CreatedAt = WellKnownProto.Timestamp.FromDateTime( + CreatedAt.Value.ToUniversalTime() + ); + } + if (UpdatedAt != null) + { + result.UpdatedAt = WellKnownProto.Timestamp.FromDateTime( + UpdatedAt.Value.ToUniversalTime() + ); + } + return result; + } + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/UpdateResponse.cs b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/UpdateResponse.cs index 9a583442a7e7..4af77fcc82b7 100644 --- a/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/UpdateResponse.cs +++ b/seed/csharp-model/csharp-grpc-proto-exhaustive/src/SeedApi/UpdateResponse.cs @@ -38,7 +38,7 @@ internal static UpdateResponse FromProto(ProtoDataV1Grpc.UpdateResponse value) { return new UpdateResponse { - UpdatedAt = value.UpdatedAt.ToDateTime(), + UpdatedAt = value.UpdatedAt?.ToDateTime(), IndexType = value.IndexType switch { ProtoDataV1Grpc.IndexType.Invalid => SeedApi.IndexType.IndexTypeInvalid, diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/README.md b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/README.md index fb55bd59b407..58c55f2c0e0d 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/README.md +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/README.md @@ -41,7 +41,7 @@ Instantiate and use the client with the following: using SeedApi; var client = new SeedApiClient(); -await client.DataService.CreateAsync(new CreateRequest { Name = "name" }); +await client.DataService.CheckAsync(); ``` ## Exception Handling @@ -53,7 +53,7 @@ will be thrown. using SeedApi; try { - var response = await client.DataService.CreateAsync(...); + var response = await client.DataService.CheckAsync(...); } catch (SeedApiApiException e) { System.Console.WriteLine(e.Body); System.Console.WriteLine(e.StatusCode); @@ -77,7 +77,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret Use the `MaxRetries` request option to configure this behavior. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { MaxRetries: 0 // Override MaxRetries at the request level @@ -90,7 +90,7 @@ var response = await client.DataService.CreateAsync( The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s @@ -103,7 +103,7 @@ var response = await client.DataService.CreateAsync( If you would like to send additional headers as part of the request, use the `AdditionalHeaders` request option. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { AdditionalHeaders = new Dictionary diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/proto/data/v1/data.proto b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/proto/data/v1/data.proto index 4f302a5b1c95..a19a2141a882 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/proto/data/v1/data.proto +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/proto/data/v1/data.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package data.v1; import "google/protobuf/any.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; @@ -262,7 +263,13 @@ message DescribeResponse { uint32 total_count = 4; } +message CheckResponse { + google.protobuf.Timestamp created_at = 1; + google.protobuf.Timestamp updated_at = 2; +} + service DataService { + rpc Check(google.protobuf.Empty) returns (CheckResponse); rpc Upload(UploadRequest) returns (UploadResponse); rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Query(QueryRequest) returns (QueryResponse); diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/reference.md b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/reference.md index 49ca7fcf6303..0be0c5ebe40e 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/reference.md +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/reference.md @@ -25,6 +25,31 @@ await client.PostFooAsync(); ## DataService +
client.DataService.CheckAsync() -> WithRawResponseTask<CheckResponse> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.DataService.CheckAsync(); +``` +
+
+
+
+ + +
+
+
+
client.DataService.CreateAsync(CreateRequest { ... }) -> WithRawResponseTask<CreateResponse>
diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/snippet.json b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/snippet.json index f2c2b5e9fcbc..1aeb6586f4ce 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/snippet.json +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/snippet.json @@ -1,6 +1,18 @@ { "types": {}, "endpoints": [ + { + "example_identifier": null, + "id": { + "path": "/data.v1.DataService/Check", + "method": "POST", + "identifier_override": "endpoint_dataService.Check" + }, + "snippet": { + "type": "csharp", + "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.DataService.CheckAsync();\n" + } + }, { "example_identifier": null, "id": { diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/DataService/DataServiceClient.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/DataService/DataServiceClient.cs index a6d10fe116d1..83f2a8a70309 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/DataService/DataServiceClient.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/DataService/DataServiceClient.cs @@ -27,6 +27,71 @@ internal DataServiceClient(RawClient client) } } + /// + /// await client.DataService.CheckAsync(); + /// + public async Task CheckAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return await _client + .Options.ExceptionHandler.TryCatchAsync(async () => + { + try + { + var metadata = new global::Grpc.Core.Metadata(); + foreach (var header in _client.Options.Headers) + { + var value = await header.Value.ResolveAsync().ConfigureAwait(false); + metadata.Add(header.Key, value); + } + if (_client.Options.AdditionalHeaders != null) + { + foreach (var header in _client.Options.AdditionalHeaders) + { + if (header.Value != null) + metadata.Add(header.Key, header.Value); + } + } + if (options?.AdditionalHeaders != null) + { + foreach (var header in options.AdditionalHeaders) + { + if (header.Value != null) + metadata.Add(header.Key, header.Value); + } + } + + var callOptions = _grpc.CreateCallOptions( + metadata, + options ?? new GrpcRequestOptions(), + cancellationToken + ); + var call = _dataService.CheckAsync( + new Google.Protobuf.WellKnownTypes.Empty(), + callOptions + ); + var response = await call.ConfigureAwait(false); + return CheckResponse.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); + } + }) + .ConfigureAwait(false); + } + /// /// await client.DataService.CreateAsync(new CreateRequest { Name = "name" }); /// diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/DataService/IDataServiceClient.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/DataService/IDataServiceClient.cs index 572af69cadb5..9f6c264179ce 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/DataService/IDataServiceClient.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/DataService/IDataServiceClient.cs @@ -2,6 +2,11 @@ namespace SeedApi; public partial interface IDataServiceClient { + Task CheckAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ); + Task CreateAsync( CreateRequest request, GrpcRequestOptions? options = null, diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/Types/CheckResponse.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/Types/CheckResponse.cs new file mode 100644 index 000000000000..2d6e0357b4c4 --- /dev/null +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/Types/CheckResponse.cs @@ -0,0 +1,66 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using SeedApi.Core; +using ProtoDataV1Grpc = Data.V1.Grpc; +using WellKnownProto = Google.Protobuf.WellKnownTypes; + +namespace SeedApi; + +[Serializable] +public record CheckResponse : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("created_at")] + public DateTime? CreatedAt { get; set; } + + [JsonPropertyName("updated_at")] + public DateTime? UpdatedAt { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + /// + /// Returns a new CheckResponse type from its Protobuf-equivalent representation. + /// + internal static CheckResponse FromProto(ProtoDataV1Grpc.CheckResponse value) + { + return new CheckResponse + { + CreatedAt = value.CreatedAt?.ToDateTime(), + UpdatedAt = value.UpdatedAt?.ToDateTime(), + }; + } + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + /// Maps the CheckResponse type into its Protobuf-equivalent representation. + /// + internal ProtoDataV1Grpc.CheckResponse ToProto() + { + var result = new ProtoDataV1Grpc.CheckResponse(); + if (CreatedAt != null) + { + result.CreatedAt = WellKnownProto.Timestamp.FromDateTime( + CreatedAt.Value.ToUniversalTime() + ); + } + if (UpdatedAt != null) + { + result.UpdatedAt = WellKnownProto.Timestamp.FromDateTime( + UpdatedAt.Value.ToUniversalTime() + ); + } + return result; + } + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/Types/UpdateResponse.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/Types/UpdateResponse.cs index 9a583442a7e7..4af77fcc82b7 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/Types/UpdateResponse.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/include-exception-handler/src/SeedApi/Types/UpdateResponse.cs @@ -38,7 +38,7 @@ internal static UpdateResponse FromProto(ProtoDataV1Grpc.UpdateResponse value) { return new UpdateResponse { - UpdatedAt = value.UpdatedAt.ToDateTime(), + UpdatedAt = value.UpdatedAt?.ToDateTime(), IndexType = value.IndexType switch { ProtoDataV1Grpc.IndexType.Invalid => SeedApi.IndexType.IndexTypeInvalid, diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/README.md b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/README.md index fb55bd59b407..58c55f2c0e0d 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/README.md +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/README.md @@ -41,7 +41,7 @@ Instantiate and use the client with the following: using SeedApi; var client = new SeedApiClient(); -await client.DataService.CreateAsync(new CreateRequest { Name = "name" }); +await client.DataService.CheckAsync(); ``` ## Exception Handling @@ -53,7 +53,7 @@ will be thrown. using SeedApi; try { - var response = await client.DataService.CreateAsync(...); + var response = await client.DataService.CheckAsync(...); } catch (SeedApiApiException e) { System.Console.WriteLine(e.Body); System.Console.WriteLine(e.StatusCode); @@ -77,7 +77,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret Use the `MaxRetries` request option to configure this behavior. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { MaxRetries: 0 // Override MaxRetries at the request level @@ -90,7 +90,7 @@ var response = await client.DataService.CreateAsync( The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s @@ -103,7 +103,7 @@ var response = await client.DataService.CreateAsync( If you would like to send additional headers as part of the request, use the `AdditionalHeaders` request option. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { AdditionalHeaders = new Dictionary diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto index 4f302a5b1c95..a19a2141a882 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/proto/data/v1/data.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package data.v1; import "google/protobuf/any.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; @@ -262,7 +263,13 @@ message DescribeResponse { uint32 total_count = 4; } +message CheckResponse { + google.protobuf.Timestamp created_at = 1; + google.protobuf.Timestamp updated_at = 2; +} + service DataService { + rpc Check(google.protobuf.Empty) returns (CheckResponse); rpc Upload(UploadRequest) returns (UploadResponse); rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Query(QueryRequest) returns (QueryResponse); diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/reference.md b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/reference.md index 49ca7fcf6303..0be0c5ebe40e 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/reference.md +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/reference.md @@ -25,6 +25,31 @@ await client.PostFooAsync();
## DataService +
client.DataService.CheckAsync() -> WithRawResponseTask<CheckResponse> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.DataService.CheckAsync(); +``` +
+
+
+
+ + +
+
+
+
client.DataService.CreateAsync(CreateRequest { ... }) -> WithRawResponseTask<CreateResponse>
diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/snippet.json b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/snippet.json index f2c2b5e9fcbc..1aeb6586f4ce 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/snippet.json +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/snippet.json @@ -1,6 +1,18 @@ { "types": {}, "endpoints": [ + { + "example_identifier": null, + "id": { + "path": "/data.v1.DataService/Check", + "method": "POST", + "identifier_override": "endpoint_dataService.Check" + }, + "snippet": { + "type": "csharp", + "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.DataService.CheckAsync();\n" + } + }, { "example_identifier": null, "id": { diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/DataService/DataServiceClient.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/DataService/DataServiceClient.cs index 85a690d98fa7..8056ee054886 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/DataService/DataServiceClient.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/DataService/DataServiceClient.cs @@ -19,6 +19,66 @@ internal DataServiceClient(RawClient client) _dataService = new DataService.DataServiceClient(_grpc.Channel); } + /// + /// await client.DataService.CheckAsync(); + /// + public async Task CheckAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + try + { + var metadata = new global::Grpc.Core.Metadata(); + foreach (var header in _client.Options.Headers) + { + var value = await header.Value.ResolveAsync().ConfigureAwait(false); + metadata.Add(header.Key, value); + } + if (_client.Options.AdditionalHeaders != null) + { + foreach (var header in _client.Options.AdditionalHeaders) + { + if (header.Value != null) + metadata.Add(header.Key, header.Value); + } + } + if (options?.AdditionalHeaders != null) + { + foreach (var header in options.AdditionalHeaders) + { + if (header.Value != null) + metadata.Add(header.Key, header.Value); + } + } + + var callOptions = _grpc.CreateCallOptions( + metadata, + options ?? new GrpcRequestOptions(), + cancellationToken + ); + var call = _dataService.CheckAsync( + new Google.Protobuf.WellKnownTypes.Empty(), + callOptions + ); + var response = await call.ConfigureAwait(false); + return CheckResponse.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.CreateAsync(new CreateRequest { Name = "name" }); /// diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/DataService/IDataServiceClient.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/DataService/IDataServiceClient.cs index 572af69cadb5..9f6c264179ce 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/DataService/IDataServiceClient.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/DataService/IDataServiceClient.cs @@ -2,6 +2,11 @@ namespace SeedApi; public partial interface IDataServiceClient { + Task CheckAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ); + Task CreateAsync( CreateRequest request, GrpcRequestOptions? options = null, diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/CheckResponse.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/CheckResponse.cs new file mode 100644 index 000000000000..2d6e0357b4c4 --- /dev/null +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/CheckResponse.cs @@ -0,0 +1,66 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using SeedApi.Core; +using ProtoDataV1Grpc = Data.V1.Grpc; +using WellKnownProto = Google.Protobuf.WellKnownTypes; + +namespace SeedApi; + +[Serializable] +public record CheckResponse : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("created_at")] + public DateTime? CreatedAt { get; set; } + + [JsonPropertyName("updated_at")] + public DateTime? UpdatedAt { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + /// + /// Returns a new CheckResponse type from its Protobuf-equivalent representation. + /// + internal static CheckResponse FromProto(ProtoDataV1Grpc.CheckResponse value) + { + return new CheckResponse + { + CreatedAt = value.CreatedAt?.ToDateTime(), + UpdatedAt = value.UpdatedAt?.ToDateTime(), + }; + } + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + /// Maps the CheckResponse type into its Protobuf-equivalent representation. + /// + internal ProtoDataV1Grpc.CheckResponse ToProto() + { + var result = new ProtoDataV1Grpc.CheckResponse(); + if (CreatedAt != null) + { + result.CreatedAt = WellKnownProto.Timestamp.FromDateTime( + CreatedAt.Value.ToUniversalTime() + ); + } + if (UpdatedAt != null) + { + result.UpdatedAt = WellKnownProto.Timestamp.FromDateTime( + UpdatedAt.Value.ToUniversalTime() + ); + } + return result; + } + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UpdateResponse.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UpdateResponse.cs index 9a583442a7e7..4af77fcc82b7 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UpdateResponse.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/no-custom-config/src/SeedApi/Types/UpdateResponse.cs @@ -38,7 +38,7 @@ internal static UpdateResponse FromProto(ProtoDataV1Grpc.UpdateResponse value) { return new UpdateResponse { - UpdatedAt = value.UpdatedAt.ToDateTime(), + UpdatedAt = value.UpdatedAt?.ToDateTime(), IndexType = value.IndexType switch { ProtoDataV1Grpc.IndexType.Invalid => SeedApi.IndexType.IndexTypeInvalid, diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/README.md b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/README.md index b45b127cb11c..b8a01fc06d44 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/README.md +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/README.md @@ -41,7 +41,7 @@ Instantiate and use the client with the following: using SeedApi; var client = new SeedApiClient(); -await client.DataService.CreateAsync(new CreateRequest { Name = "name" }); +await client.DataService.CheckAsync(); ``` ## Exception Handling @@ -53,7 +53,7 @@ will be thrown. using SeedApi; try { - var response = await client.DataService.CreateAsync(...); + var response = await client.DataService.CheckAsync(...); } catch (SeedApiApiException e) { System.Console.WriteLine(e.Body); System.Console.WriteLine(e.StatusCode); @@ -77,7 +77,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret Use the `MaxRetries` request option to configure this behavior. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { MaxRetries: 0 // Override MaxRetries at the request level @@ -90,7 +90,7 @@ var response = await client.DataService.CreateAsync( The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s @@ -103,7 +103,7 @@ var response = await client.DataService.CreateAsync( If you would like to send additional headers as part of the request, use the `AdditionalHeaders` request option. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { AdditionalHeaders = new Dictionary diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/proto/data/v1/data.proto b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/proto/data/v1/data.proto index 4f302a5b1c95..a19a2141a882 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/proto/data/v1/data.proto +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/proto/data/v1/data.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package data.v1; import "google/protobuf/any.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; @@ -262,7 +263,13 @@ message DescribeResponse { uint32 total_count = 4; } +message CheckResponse { + google.protobuf.Timestamp created_at = 1; + google.protobuf.Timestamp updated_at = 2; +} + service DataService { + rpc Check(google.protobuf.Empty) returns (CheckResponse); rpc Upload(UploadRequest) returns (UploadResponse); rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Query(QueryRequest) returns (QueryResponse); diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/reference.md b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/reference.md index 49ca7fcf6303..0be0c5ebe40e 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/reference.md +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/reference.md @@ -25,6 +25,31 @@ await client.PostFooAsync();
## DataService +
client.DataService.CheckAsync() -> WithRawResponseTask<CheckResponse> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.DataService.CheckAsync(); +``` +
+
+
+
+ + +
+
+
+
client.DataService.CreateAsync(CreateRequest { ... }) -> WithRawResponseTask<CreateResponse>
diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/snippet.json b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/snippet.json index f2c2b5e9fcbc..1aeb6586f4ce 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/snippet.json +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/snippet.json @@ -1,6 +1,18 @@ { "types": {}, "endpoints": [ + { + "example_identifier": null, + "id": { + "path": "/data.v1.DataService/Check", + "method": "POST", + "identifier_override": "endpoint_dataService.Check" + }, + "snippet": { + "type": "csharp", + "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.DataService.CheckAsync();\n" + } + }, { "example_identifier": null, "id": { diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/DataService/DataServiceClient.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/DataService/DataServiceClient.cs index 85a690d98fa7..8056ee054886 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/DataService/DataServiceClient.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/DataService/DataServiceClient.cs @@ -19,6 +19,66 @@ internal DataServiceClient(RawClient client) _dataService = new DataService.DataServiceClient(_grpc.Channel); } + /// + /// await client.DataService.CheckAsync(); + /// + public async Task CheckAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + try + { + var metadata = new global::Grpc.Core.Metadata(); + foreach (var header in _client.Options.Headers) + { + var value = await header.Value.ResolveAsync().ConfigureAwait(false); + metadata.Add(header.Key, value); + } + if (_client.Options.AdditionalHeaders != null) + { + foreach (var header in _client.Options.AdditionalHeaders) + { + if (header.Value != null) + metadata.Add(header.Key, header.Value); + } + } + if (options?.AdditionalHeaders != null) + { + foreach (var header in options.AdditionalHeaders) + { + if (header.Value != null) + metadata.Add(header.Key, header.Value); + } + } + + var callOptions = _grpc.CreateCallOptions( + metadata, + options ?? new GrpcRequestOptions(), + cancellationToken + ); + var call = _dataService.CheckAsync( + new Google.Protobuf.WellKnownTypes.Empty(), + callOptions + ); + var response = await call.ConfigureAwait(false); + return CheckResponse.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.CreateAsync(new CreateRequest { Name = "name" }); /// diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/DataService/IDataServiceClient.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/DataService/IDataServiceClient.cs index 572af69cadb5..9f6c264179ce 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/DataService/IDataServiceClient.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/DataService/IDataServiceClient.cs @@ -2,6 +2,11 @@ namespace SeedApi; public partial interface IDataServiceClient { + Task CheckAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ); + Task CreateAsync( CreateRequest request, GrpcRequestOptions? options = null, diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/Types/CheckResponse.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/Types/CheckResponse.cs new file mode 100644 index 000000000000..2d6e0357b4c4 --- /dev/null +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/Types/CheckResponse.cs @@ -0,0 +1,66 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using SeedApi.Core; +using ProtoDataV1Grpc = Data.V1.Grpc; +using WellKnownProto = Google.Protobuf.WellKnownTypes; + +namespace SeedApi; + +[Serializable] +public record CheckResponse : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("created_at")] + public DateTime? CreatedAt { get; set; } + + [JsonPropertyName("updated_at")] + public DateTime? UpdatedAt { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + /// + /// Returns a new CheckResponse type from its Protobuf-equivalent representation. + /// + internal static CheckResponse FromProto(ProtoDataV1Grpc.CheckResponse value) + { + return new CheckResponse + { + CreatedAt = value.CreatedAt?.ToDateTime(), + UpdatedAt = value.UpdatedAt?.ToDateTime(), + }; + } + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + /// Maps the CheckResponse type into its Protobuf-equivalent representation. + /// + internal ProtoDataV1Grpc.CheckResponse ToProto() + { + var result = new ProtoDataV1Grpc.CheckResponse(); + if (CreatedAt != null) + { + result.CreatedAt = WellKnownProto.Timestamp.FromDateTime( + CreatedAt.Value.ToUniversalTime() + ); + } + if (UpdatedAt != null) + { + result.UpdatedAt = WellKnownProto.Timestamp.FromDateTime( + UpdatedAt.Value.ToUniversalTime() + ); + } + return result; + } + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/Types/UpdateResponse.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/Types/UpdateResponse.cs index 9a583442a7e7..4af77fcc82b7 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/Types/UpdateResponse.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/package-id/src/SeedApi/Types/UpdateResponse.cs @@ -38,7 +38,7 @@ internal static UpdateResponse FromProto(ProtoDataV1Grpc.UpdateResponse value) { return new UpdateResponse { - UpdatedAt = value.UpdatedAt.ToDateTime(), + UpdatedAt = value.UpdatedAt?.ToDateTime(), IndexType = value.IndexType switch { ProtoDataV1Grpc.IndexType.Invalid => SeedApi.IndexType.IndexTypeInvalid, diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/README.md b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/README.md index fb55bd59b407..58c55f2c0e0d 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/README.md +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/README.md @@ -41,7 +41,7 @@ Instantiate and use the client with the following: using SeedApi; var client = new SeedApiClient(); -await client.DataService.CreateAsync(new CreateRequest { Name = "name" }); +await client.DataService.CheckAsync(); ``` ## Exception Handling @@ -53,7 +53,7 @@ will be thrown. using SeedApi; try { - var response = await client.DataService.CreateAsync(...); + var response = await client.DataService.CheckAsync(...); } catch (SeedApiApiException e) { System.Console.WriteLine(e.Body); System.Console.WriteLine(e.StatusCode); @@ -77,7 +77,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret Use the `MaxRetries` request option to configure this behavior. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { MaxRetries: 0 // Override MaxRetries at the request level @@ -90,7 +90,7 @@ var response = await client.DataService.CreateAsync( The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s @@ -103,7 +103,7 @@ var response = await client.DataService.CreateAsync( If you would like to send additional headers as part of the request, use the `AdditionalHeaders` request option. ```csharp -var response = await client.DataService.CreateAsync( +var response = await client.DataService.CheckAsync( ..., new RequestOptions { AdditionalHeaders = new Dictionary diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto index 4f302a5b1c95..a19a2141a882 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/proto/data/v1/data.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package data.v1; import "google/protobuf/any.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; @@ -262,7 +263,13 @@ message DescribeResponse { uint32 total_count = 4; } +message CheckResponse { + google.protobuf.Timestamp created_at = 1; + google.protobuf.Timestamp updated_at = 2; +} + service DataService { + rpc Check(google.protobuf.Empty) returns (CheckResponse); rpc Upload(UploadRequest) returns (UploadResponse); rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Query(QueryRequest) returns (QueryResponse); diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/reference.md b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/reference.md index 4966498c8121..82f930a08322 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/reference.md +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/reference.md @@ -25,6 +25,31 @@ await client.PostFooAsync();
## DataService +
client.DataService.CheckAsync() -> WithRawResponseTask<CheckResponse> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.DataService.CheckAsync(); +``` +
+
+
+
+ + +
+
+
+
client.DataService.CreateAsync(CreateRequest { ... }) -> WithRawResponseTask<CreateResponse>
diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/snippet.json b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/snippet.json index 7c3c8dc56e5f..495ce6bb87db 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/snippet.json +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/snippet.json @@ -1,6 +1,18 @@ { "types": {}, "endpoints": [ + { + "example_identifier": null, + "id": { + "path": "/data.v1.DataService/Check", + "method": "POST", + "identifier_override": "endpoint_dataService.Check" + }, + "snippet": { + "type": "csharp", + "client": "using SeedApi;\n\nvar client = new SeedApiClient();\nawait client.DataService.CheckAsync();\n" + } + }, { "example_identifier": null, "id": { diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/DataService/DataServiceClient.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/DataService/DataServiceClient.cs index 6a2cdc53a8e7..361272e2feff 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/DataService/DataServiceClient.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/DataService/DataServiceClient.cs @@ -19,6 +19,66 @@ internal DataServiceClient(RawClient client) _dataService = new DataService.DataServiceClient(_grpc.Channel); } + /// + /// await client.DataService.CheckAsync(); + /// + public async Task CheckAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + try + { + var metadata = new global::Grpc.Core.Metadata(); + foreach (var header in _client.Options.Headers) + { + var value = await header.Value.ResolveAsync().ConfigureAwait(false); + metadata.Add(header.Key, value); + } + if (_client.Options.AdditionalHeaders != null) + { + foreach (var header in _client.Options.AdditionalHeaders) + { + if (header.Value != null) + metadata.Add(header.Key, header.Value); + } + } + if (options?.AdditionalHeaders != null) + { + foreach (var header in options.AdditionalHeaders) + { + if (header.Value != null) + metadata.Add(header.Key, header.Value); + } + } + + var callOptions = _grpc.CreateCallOptions( + metadata, + options ?? new GrpcRequestOptions(), + cancellationToken + ); + var call = _dataService.CheckAsync( + new Google.Protobuf.WellKnownTypes.Empty(), + callOptions + ); + var response = await call.ConfigureAwait(false); + return CheckResponse.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.CreateAsync(new CreateRequest { Name = "name" }); /// diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/DataService/IDataServiceClient.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/DataService/IDataServiceClient.cs index 572af69cadb5..9f6c264179ce 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/DataService/IDataServiceClient.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/DataService/IDataServiceClient.cs @@ -2,6 +2,11 @@ namespace SeedApi; public partial interface IDataServiceClient { + Task CheckAsync( + GrpcRequestOptions? options = null, + CancellationToken cancellationToken = default + ); + Task CreateAsync( CreateRequest request, GrpcRequestOptions? options = null, diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/CheckResponse.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/CheckResponse.cs new file mode 100644 index 000000000000..2d6e0357b4c4 --- /dev/null +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/CheckResponse.cs @@ -0,0 +1,66 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using SeedApi.Core; +using ProtoDataV1Grpc = Data.V1.Grpc; +using WellKnownProto = Google.Protobuf.WellKnownTypes; + +namespace SeedApi; + +[Serializable] +public record CheckResponse : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("created_at")] + public DateTime? CreatedAt { get; set; } + + [JsonPropertyName("updated_at")] + public DateTime? UpdatedAt { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + /// + /// Returns a new CheckResponse type from its Protobuf-equivalent representation. + /// + internal static CheckResponse FromProto(ProtoDataV1Grpc.CheckResponse value) + { + return new CheckResponse + { + CreatedAt = value.CreatedAt?.ToDateTime(), + UpdatedAt = value.UpdatedAt?.ToDateTime(), + }; + } + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + /// Maps the CheckResponse type into its Protobuf-equivalent representation. + /// + internal ProtoDataV1Grpc.CheckResponse ToProto() + { + var result = new ProtoDataV1Grpc.CheckResponse(); + if (CreatedAt != null) + { + result.CreatedAt = WellKnownProto.Timestamp.FromDateTime( + CreatedAt.Value.ToUniversalTime() + ); + } + if (UpdatedAt != null) + { + result.UpdatedAt = WellKnownProto.Timestamp.FromDateTime( + UpdatedAt.Value.ToUniversalTime() + ); + } + return result; + } + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UpdateResponse.cs b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UpdateResponse.cs index 9a583442a7e7..4af77fcc82b7 100644 --- a/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UpdateResponse.cs +++ b/seed/csharp-sdk/csharp-grpc-proto-exhaustive/read-only-memory/src/SeedApi/Types/UpdateResponse.cs @@ -38,7 +38,7 @@ internal static UpdateResponse FromProto(ProtoDataV1Grpc.UpdateResponse value) { return new UpdateResponse { - UpdatedAt = value.UpdatedAt.ToDateTime(), + UpdatedAt = value.UpdatedAt?.ToDateTime(), IndexType = value.IndexType switch { ProtoDataV1Grpc.IndexType.Invalid => SeedApi.IndexType.IndexTypeInvalid, diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/README.md b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/README.md index 98ab45a85b57..2197185a22b8 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/README.md +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/README.md @@ -39,9 +39,9 @@ A full reference for this library is available [here](./reference.md). Instantiate and use the client with the following: ```csharp -using Contoso.Net; -var client = new Contoso(); + +var client = new global::Contoso.Net.Contoso(); await client.CreateUserAsync( new global::Contoso.Net.User { diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/snippet.json b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/snippet.json index 31cd30b1d86e..9e5da2308cf4 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/snippet.json +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/snippet.json @@ -10,7 +10,7 @@ }, "snippet": { "type": "csharp", - "client": "using Contoso.Net;\n\nvar client = new Contoso();\nawait client.CreateUserAsync(\n new global::Contoso.Net.User\n {\n Id = \"id\",\n Name = \"name\",\n Email = \"email\",\n Password = \"password\",\n }\n);\n" + "client": "\n\nvar client = new global::Contoso.Net.Contoso();\nawait client.CreateUserAsync(\n new global::Contoso.Net.User\n {\n Id = \"id\",\n Name = \"name\",\n Email = \"email\",\n Password = \"password\",\n }\n);\n" } }, { @@ -22,7 +22,7 @@ }, "snippet": { "type": "csharp", - "client": "using Contoso.Net;\n\nvar client = new Contoso();\nawait client.CreateTaskAsync(\n new global::Contoso.Net.Task\n {\n Id = \"id\",\n Name = \"name\",\n Email = \"email\",\n Password = \"password\",\n }\n);\n" + "client": "\n\nvar client = new global::Contoso.Net.Contoso();\nawait client.CreateTaskAsync(\n new global::Contoso.Net.Task\n {\n Id = \"id\",\n Name = \"name\",\n Email = \"email\",\n Password = \"password\",\n }\n);\n" } }, { @@ -34,7 +34,7 @@ }, "snippet": { "type": "csharp", - "client": "using Contoso.Net;\n\nvar client = new Contoso();\nawait client.System.CreateUserAsync(\n new global::Contoso.Net.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n }\n);\n" + "client": "\n\nvar client = new global::Contoso.Net.Contoso();\nawait client.System.CreateUserAsync(\n new global::Contoso.Net.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n }\n);\n" } }, { @@ -46,7 +46,7 @@ }, "snippet": { "type": "csharp", - "client": "using Contoso.Net;\n\nvar client = new Contoso();\nawait client.System.CreateTaskAsync(\n new global::Contoso.Net.System.Task\n {\n Name = \"name\",\n User = new global::Contoso.Net.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n },\n Owner = new global::Contoso.Net.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n },\n }\n);\n" + "client": "\n\nvar client = new global::Contoso.Net.Contoso();\nawait client.System.CreateTaskAsync(\n new global::Contoso.Net.System.Task\n {\n Name = \"name\",\n User = new global::Contoso.Net.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n },\n Owner = new global::Contoso.Net.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n },\n }\n);\n" } }, { @@ -58,7 +58,7 @@ }, "snippet": { "type": "csharp", - "client": "using Contoso.Net;\n\nvar client = new Contoso();\nawait client.System.GetUserAsync(\"userId\");\n" + "client": "\n\nvar client = new global::Contoso.Net.Contoso();\nawait client.System.GetUserAsync(\"userId\");\n" } } ] diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/MultipartFormTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/MultipartFormTests.cs index 48e5014db254..f3ebdf75b665 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/MultipartFormTests.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/MultipartFormTests.cs @@ -1056,9 +1056,9 @@ private static string GetBoundary(MultipartFormDataContent content) ?? throw new global::System.Exception("Boundary not found"); } - private static Contoso.Net.Core.MultipartFormRequest CreateMultipartFormRequest() + private static global::Contoso.Net.Core.MultipartFormRequest CreateMultipartFormRequest() { - return new Contoso.Net.Core.MultipartFormRequest + return new global::Contoso.Net.Core.MultipartFormRequest { BaseUrl = "https://localhost", Method = HttpMethod.Post, diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/RetriesTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/RetriesTests.cs index 208ecdfee11b..bfe196bdfb6a 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/RetriesTests.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/RetriesTests.cs @@ -146,7 +146,7 @@ public async SystemTask SendRequestAsync_ShouldNotRetry_WithMultiPartFormRequest .WillSetStateTo("Server Error") .RespondWith(WireMockResponse.Create().WithStatusCode(429).WithBody("Failure")); - var request = new Contoso.Net.Core.MultipartFormRequest + var request = new global::Contoso.Net.Core.MultipartFormRequest { BaseUrl = _baseUrl, Method = HttpMethod.Post, @@ -187,7 +187,7 @@ public async SystemTask SendRequestAsync_ShouldRetry_WithMultiPartFormRequest_Wi .WhenStateIs("Success") .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - var request = new Contoso.Net.Core.MultipartFormRequest + var request = new global::Contoso.Net.Core.MultipartFormRequest { BaseUrl = _baseUrl, Method = HttpMethod.Post, @@ -373,7 +373,7 @@ public async SystemTask SendRequestAsync_ShouldPreserveMultipartBody_OnRetry() .WhenStateIs("Success") .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - var request = new Contoso.Net.Core.MultipartFormRequest + var request = new global::Contoso.Net.Core.MultipartFormRequest { BaseUrl = _baseUrl, Method = HttpMethod.Post, diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/BaseMockServerTest.cs index ce4dc98b39fb..ce47f4439150 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/BaseMockServerTest.cs @@ -1,4 +1,4 @@ -using Contoso.Net; +using global::Contoso.Net; using NUnit.Framework; using WireMock.Logging; using WireMock.Server; @@ -10,7 +10,7 @@ public class BaseMockServerTest { protected WireMockServer Server { get; set; } = null!; - protected Contoso.Net.Contoso Client { get; set; } = null!; + protected global::Contoso.Net.Contoso Client { get; set; } = null!; protected RequestOptions RequestOptions { get; set; } = new(); @@ -23,7 +23,7 @@ public void GlobalSetup() ); // Initialize the Client - Client = new Contoso.Net.Contoso( + Client = new global::Contoso.Net.Contoso( clientOptions: new ClientOptions { BaseUrl = Server.Urls[0], MaxRetries = 0 } ); } diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateTaskTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateTaskTest.cs index a5277c200db0..3f049bc5b617 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateTaskTest.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateTaskTest.cs @@ -1,4 +1,4 @@ -using Contoso.Net.Test.Utils; +using global::Contoso.Net.Test.Utils; using NUnit.Framework; namespace Contoso.Net.Test.Unit.MockServer; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateUserTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateUserTest.cs index 29e7b043aa89..201b37ffe35d 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateUserTest.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateUserTest.cs @@ -1,4 +1,4 @@ -using Contoso.Net.Test.Utils; +using global::Contoso.Net.Test.Utils; using NUnit.Framework; namespace Contoso.Net.Test.Unit.MockServer; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateTaskTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateTaskTest.cs index 24b6d6aa9dac..7c97d6cf14da 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateTaskTest.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateTaskTest.cs @@ -1,5 +1,5 @@ -using Contoso.Net.Test.Unit.MockServer; -using Contoso.Net.Test.Utils; +using global::Contoso.Net.Test.Unit.MockServer; +using global::Contoso.Net.Test.Utils; using NUnit.Framework; namespace Contoso.Net.Test.Unit.MockServer.System; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateUserTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateUserTest.cs index 2f50e8c98fbf..cf4c2d9b90f7 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateUserTest.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateUserTest.cs @@ -1,5 +1,5 @@ -using Contoso.Net.Test.Unit.MockServer; -using Contoso.Net.Test.Utils; +using global::Contoso.Net.Test.Unit.MockServer; +using global::Contoso.Net.Test.Utils; using NUnit.Framework; namespace Contoso.Net.Test.Unit.MockServer.System; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/GetUserTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/GetUserTest.cs index 7f04355acd72..05a5712708a5 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/GetUserTest.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/GetUserTest.cs @@ -1,5 +1,5 @@ -using Contoso.Net.Test.Unit.MockServer; -using Contoso.Net.Test.Utils; +using global::Contoso.Net.Test.Unit.MockServer; +using global::Contoso.Net.Test.Utils; using NUnit.Framework; namespace Contoso.Net.Test.Unit.MockServer.System; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/AdditionalPropertiesComparer.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/AdditionalPropertiesComparer.cs index 1827aca41e05..a0e690b7d471 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/AdditionalPropertiesComparer.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/AdditionalPropertiesComparer.cs @@ -1,6 +1,6 @@ using System.Text.Json; -using Contoso.Net; -using Contoso.Net.Core; +using global::Contoso.Net; +using global::Contoso.Net.Core; using NUnit.Framework.Constraints; namespace NUnit.Framework; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/JsonAssert.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/JsonAssert.cs index f546f6476527..b45f2f74706c 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/JsonAssert.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/JsonAssert.cs @@ -1,4 +1,4 @@ -using Contoso.Net.Core; +using global::Contoso.Net.Core; using global::System.Text.Json; using NUnit.Framework; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/OptionalComparer.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/OptionalComparer.cs index 6a24fc4368c1..9953ff9378d3 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/OptionalComparer.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/OptionalComparer.cs @@ -1,4 +1,4 @@ -using Contoso.Net.Core; +using global::Contoso.Net.Core; using NUnit.Framework.Constraints; using OneOf; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.cs index 55f315c25b1c..a9bb325cb4f5 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.cs @@ -1,6 +1,6 @@ using System.Text.Json; -using Contoso.Net.Core; -using Contoso.Net.System; +using global::Contoso.Net.Core; +using global::Contoso.Net.System; namespace Contoso.Net; @@ -39,7 +39,7 @@ public Contoso(ClientOptions? clientOptions = null) CancellationToken cancellationToken = default ) { - var _headers = await new Contoso.Net.Core.HeadersBuilder.Builder() + var _headers = await new global::Contoso.Net.Core.HeadersBuilder.Builder() .Add(_client.Options.Headers) .Add(_client.Options.AdditionalHeaders) .Add(options?.AdditionalHeaders) @@ -105,7 +105,7 @@ public Contoso(ClientOptions? clientOptions = null) CancellationToken cancellationToken = default ) { - var _headers = await new Contoso.Net.Core.HeadersBuilder.Builder() + var _headers = await new global::Contoso.Net.Core.HeadersBuilder.Builder() .Add(_client.Options.Headers) .Add(_client.Options.AdditionalHeaders) .Add(options?.AdditionalHeaders) diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ClientOptions.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ClientOptions.cs index 82c9a31b40b4..cc3155399c0b 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ClientOptions.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ClientOptions.cs @@ -1,4 +1,4 @@ -using Contoso.Net.Core; +using global::Contoso.Net.Core; namespace Contoso.Net; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/RequestOptions.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/RequestOptions.cs index 7a8196d8636c..d039abaf055f 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/RequestOptions.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/RequestOptions.cs @@ -1,4 +1,4 @@ -using Contoso.Net.Core; +using global::Contoso.Net.Core; namespace Contoso.Net; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/IContoso.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/IContoso.cs index 8c707ead7fc9..887c73e9943d 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/IContoso.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/IContoso.cs @@ -1,4 +1,4 @@ -using Contoso.Net.System; +using global::Contoso.Net.System; namespace Contoso.Net; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/ISystemClient.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/ISystemClient.cs index 23cebcd42efb..10e45356bc00 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/ISystemClient.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/ISystemClient.cs @@ -1,4 +1,4 @@ -using Contoso.Net; +using global::Contoso.Net; namespace Contoso.Net.System; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/SystemClient.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/SystemClient.cs index 5b256467c872..c3e664931d42 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/SystemClient.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/SystemClient.cs @@ -1,6 +1,6 @@ using System.Text.Json; -using Contoso.Net; -using Contoso.Net.Core; +using global::Contoso.Net; +using global::Contoso.Net.Core; namespace Contoso.Net.System; @@ -19,7 +19,7 @@ internal SystemClient(RawClient client) CancellationToken cancellationToken = default ) { - var _headers = await new Contoso.Net.Core.HeadersBuilder.Builder() + var _headers = await new global::Contoso.Net.Core.HeadersBuilder.Builder() .Add(_client.Options.Headers) .Add(_client.Options.AdditionalHeaders) .Add(options?.AdditionalHeaders) @@ -85,7 +85,7 @@ internal SystemClient(RawClient client) CancellationToken cancellationToken = default ) { - var _headers = await new Contoso.Net.Core.HeadersBuilder.Builder() + var _headers = await new global::Contoso.Net.Core.HeadersBuilder.Builder() .Add(_client.Options.Headers) .Add(_client.Options.AdditionalHeaders) .Add(options?.AdditionalHeaders) @@ -151,7 +151,7 @@ internal SystemClient(RawClient client) CancellationToken cancellationToken = default ) { - var _headers = await new Contoso.Net.Core.HeadersBuilder.Builder() + var _headers = await new global::Contoso.Net.Core.HeadersBuilder.Builder() .Add(_client.Options.Headers) .Add(_client.Options.AdditionalHeaders) .Add(options?.AdditionalHeaders) diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/Task.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/Task.cs index ccf4d22b9be4..fbf6f396b037 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/Task.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/Task.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -using Contoso.Net; -using Contoso.Net.Core; +using global::Contoso.Net; +using global::Contoso.Net.Core; namespace Contoso.Net.System; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/User.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/User.cs index 3cebe688feb2..4fd55a675a38 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/User.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/User.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -using Contoso.Net; -using Contoso.Net.Core; +using global::Contoso.Net; +using global::Contoso.Net.Core; namespace Contoso.Net.System; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/Task.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/Task.cs index 675fc6a90d2c..eee1687ab5ec 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/Task.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/Task.cs @@ -1,6 +1,6 @@ using System.Text.Json; using System.Text.Json.Serialization; -using Contoso.Net.Core; +using global::Contoso.Net.Core; namespace Contoso.Net; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/User.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/User.cs index 56b4d5424e38..35f285119ef3 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/User.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/User.cs @@ -1,6 +1,6 @@ using System.Text.Json; using System.Text.Json.Serialization; -using Contoso.Net.Core; +using global::Contoso.Net.Core; namespace Contoso.Net; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example0.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example0.cs index 68218991e4ae..2ebf76048eb8 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example0.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example0.cs @@ -1,11 +1,11 @@ -using Contoso.Net; +using global::Contoso.Net; namespace Usage; public class Example0 { public async global::System.Threading.Tasks.Task Do() { - var client = new Contoso( + var client = new global::Contoso.Net.Contoso( clientOptions: new ClientOptions { BaseUrl = "https://api.fern.com" } diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example1.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example1.cs index 09bf7b2ba63a..cf98cfbf39b4 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example1.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example1.cs @@ -1,11 +1,11 @@ -using Contoso.Net; +using global::Contoso.Net; namespace Usage; public class Example1 { public async global::System.Threading.Tasks.Task Do() { - var client = new Contoso( + var client = new global::Contoso.Net.Contoso( clientOptions: new ClientOptions { BaseUrl = "https://api.fern.com" } diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example2.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example2.cs index 80c99083821f..49faf8437d9c 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example2.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example2.cs @@ -1,11 +1,11 @@ -using Contoso.Net; +using global::Contoso.Net; namespace Usage; public class Example2 { public async global::System.Threading.Tasks.Task Do() { - var client = new Contoso( + var client = new global::Contoso.Net.Contoso( clientOptions: new ClientOptions { BaseUrl = "https://api.fern.com" } diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example3.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example3.cs index 59842b69acd1..82fa69cd894a 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example3.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example3.cs @@ -1,11 +1,11 @@ -using Contoso.Net; +using global::Contoso.Net; namespace Usage; public class Example3 { public async global::System.Threading.Tasks.Task Do() { - var client = new Contoso( + var client = new global::Contoso.Net.Contoso( clientOptions: new ClientOptions { BaseUrl = "https://api.fern.com" } diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example4.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example4.cs index 1117f921c8b2..c5d1d3b7bc0e 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example4.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example4.cs @@ -1,11 +1,11 @@ -using Contoso.Net; +using global::Contoso.Net; namespace Usage; public class Example4 { public async global::System.Threading.Tasks.Task Do() { - var client = new Contoso( + var client = new global::Contoso.Net.Contoso( clientOptions: new ClientOptions { BaseUrl = "https://api.fern.com" } diff --git a/seed/csharp-sdk/csharp-namespace-conflict/.fern/metadata.json b/seed/csharp-sdk/csharp-namespace-conflict/.fern/metadata.json deleted file mode 100644 index 91d0855bee07..000000000000 --- a/seed/csharp-sdk/csharp-namespace-conflict/.fern/metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "cliVersion": "DUMMY", - "generatorName": "fernapi/fern-csharp-sdk", - "generatorVersion": "latest", - "generatorConfig": {}, - "originGitCommit": "DUMMY", - "sdkVersion": "0.0.1" -} \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.editorconfig b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.editorconfig new file mode 100644 index 000000000000..1e7a0adbac80 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.editorconfig @@ -0,0 +1,35 @@ +root = true + +[*.cs] +resharper_arrange_object_creation_when_type_evident_highlighting = hint +resharper_auto_property_can_be_made_get_only_global_highlighting = hint +resharper_check_namespace_highlighting = hint +resharper_class_never_instantiated_global_highlighting = hint +resharper_class_never_instantiated_local_highlighting = hint +resharper_collection_never_updated_global_highlighting = hint +resharper_convert_type_check_pattern_to_null_check_highlighting = hint +resharper_inconsistent_naming_highlighting = hint +resharper_member_can_be_private_global_highlighting = hint +resharper_member_hides_static_from_outer_class_highlighting = hint +resharper_not_accessed_field_local_highlighting = hint +resharper_nullable_warning_suppression_is_used_highlighting = suggestion +resharper_partial_type_with_single_part_highlighting = hint +resharper_prefer_concrete_value_over_default_highlighting = none +resharper_private_field_can_be_converted_to_local_variable_highlighting = hint +resharper_property_can_be_made_init_only_global_highlighting = hint +resharper_property_can_be_made_init_only_local_highlighting = hint +resharper_redundant_name_qualifier_highlighting = none +resharper_redundant_using_directive_highlighting = hint +resharper_replace_slice_with_range_indexer_highlighting = none +resharper_unused_auto_property_accessor_global_highlighting = hint +resharper_unused_auto_property_accessor_local_highlighting = hint +resharper_unused_member_global_highlighting = hint +resharper_unused_type_global_highlighting = hint +resharper_use_string_interpolation_highlighting = hint +dotnet_diagnostic.CS1591.severity = suggestion + +[src/**/Types/*.cs] +resharper_check_namespace_highlighting = none + +[src/**/Core/Public/*.cs] +resharper_check_namespace_highlighting = none \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.fern/metadata.json b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.fern/metadata.json new file mode 100644 index 000000000000..8529dc2dc850 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.fern/metadata.json @@ -0,0 +1,12 @@ +{ + "cliVersion": "DUMMY", + "generatorName": "fernapi/fern-csharp-sdk", + "generatorVersion": "latest", + "generatorConfig": { + "namespace": "Seed.CsharpNamespaceConflict", + "client-class-name": "Seed", + "experimental-fully-qualified-namespaces": true + }, + "originGitCommit": "DUMMY", + "sdkVersion": "0.0.1" +} \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-namespace-conflict/.github/workflows/ci.yml b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.github/workflows/ci.yml similarity index 50% rename from seed/csharp-sdk/csharp-namespace-conflict/.github/workflows/ci.yml rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.github/workflows/ci.yml index 5e74575f3dd2..6d7c4a5cd406 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/.github/workflows/ci.yml +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.github/workflows/ci.yml @@ -26,27 +26,27 @@ jobs: run: dotnet tool restore - name: Restore dependencies - run: dotnet restore src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj + run: dotnet restore src/Seed.CsharpNamespaceConflict/Seed.CsharpNamespaceConflict.csproj - name: Build - run: dotnet build src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj --no-restore -c Release + run: dotnet build src/Seed.CsharpNamespaceConflict/Seed.CsharpNamespaceConflict.csproj --no-restore -c Release - name: Restore test dependencies - run: dotnet restore src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj + run: dotnet restore src/Seed.CsharpNamespaceConflict.Test/Seed.CsharpNamespaceConflict.Test.csproj - name: Build tests - run: dotnet build src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj --no-restore -c Release + run: dotnet build src/Seed.CsharpNamespaceConflict.Test/Seed.CsharpNamespaceConflict.Test.csproj --no-restore -c Release - name: Test - run: dotnet test src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj --no-restore --no-build -c Release + run: dotnet test src/Seed.CsharpNamespaceConflict.Test/Seed.CsharpNamespaceConflict.Test.csproj --no-restore --no-build -c Release - name: Pack if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - run: dotnet pack src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj --no-build --no-restore -c Release + run: dotnet pack src/Seed.CsharpNamespaceConflict/Seed.CsharpNamespaceConflict.csproj --no-build --no-restore -c Release - name: Publish to NuGet.org if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') env: NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: dotnet nuget push src/SeedCsharpNamespaceConflict/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" + run: dotnet nuget push src/Seed.CsharpNamespaceConflict/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.gitignore b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.gitignore new file mode 100644 index 000000000000..11014f2b33d7 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/.gitignore @@ -0,0 +1,484 @@ +## 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/csharp-namespace-conflict/client-class-name-matches-namespace-root/README.md b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/README.md new file mode 100644 index 000000000000..316563cf0d24 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/README.md @@ -0,0 +1,170 @@ +# 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.CsharpNamespaceConflict)](https://nuget.org/packages/Seed.CsharpNamespaceConflict) + +The Seed C# library provides convenient access to the Seed APIs from C#. + +## Table of Contents + +- [Requirements](#requirements) +- [Installation](#installation) +- [Reference](#reference) +- [Usage](#usage) +- [Exception Handling](#exception-handling) +- [Advanced](#advanced) + - [Retries](#retries) + - [Timeouts](#timeouts) + - [Raw Response](#raw-response) + - [Additional Headers](#additional-headers) + - [Additional Query Parameters](#additional-query-parameters) +- [Contributing](#contributing) + +## Requirements + +This SDK requires: + +## Installation + +```sh +dotnet add package Seed.CsharpNamespaceConflict +``` + +## Reference + +A full reference for this library is available [here](./reference.md). + +## Usage + +Instantiate and use the client with the following: + +```csharp + + +var client = new global::Seed.CsharpNamespaceConflict.Seed(); +await client.Tasktest.HelloAsync(); +``` + +## 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 Seed.CsharpNamespaceConflict; + +try { + var response = await client.Tasktest.HelloAsync(...); +} catch (SeedApiException 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 retryable and the number of retry attempts has not grown larger than the configured +retry limit (default: 2). + +A request is deemed retryable 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.Tasktest.HelloAsync( + ..., + 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.Tasktest.HelloAsync( + ..., + new RequestOptions { + Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s + } +); +``` + +### Raw Response + +Access raw HTTP response data (status code, headers, URL) alongside parsed response data using the `.WithRawResponse()` method. + +```csharp +using Seed.CsharpNamespaceConflict; + +// Access raw response data (status code, headers, etc.) alongside the parsed response +var result = await client.Tasktest.HelloAsync(...).WithRawResponse(); + +// Access the parsed data +var data = result.Data; + +// Access raw response metadata +var statusCode = result.RawResponse.StatusCode; +var headers = result.RawResponse.Headers; +var url = result.RawResponse.Url; + +// Access specific headers (case-insensitive) +if (headers.TryGetValue("X-Request-Id", out var requestId)) +{ + System.Console.WriteLine($"Request ID: {requestId}"); +} + +// For the default behavior, simply await without .WithRawResponse() +var data = await client.Tasktest.HelloAsync(...); +``` + +### Additional Headers + +If you would like to send additional headers as part of the request, use the `AdditionalHeaders` request option. + +```csharp +var response = await client.Tasktest.HelloAsync( + ..., + new RequestOptions { + AdditionalHeaders = new Dictionary + { + { "X-Custom-Header", "custom-value" } + } + } +); +``` + +### Additional Query Parameters + +If you would like to send additional query parameters as part of the request, use the `AdditionalQueryParameters` request option. + +```csharp +var response = await client.Tasktest.HelloAsync( + ..., + new RequestOptions { + AdditionalQueryParameters = new Dictionary + { + { "custom_param", "custom-value" } + } + } +); +``` + +## 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! diff --git a/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/Seed.CsharpNamespaceConflict.slnx b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/Seed.CsharpNamespaceConflict.slnx new file mode 100644 index 000000000000..de80588d1a98 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/Seed.CsharpNamespaceConflict.slnx @@ -0,0 +1,4 @@ + + + + diff --git a/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/reference.md b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/reference.md new file mode 100644 index 000000000000..4c6c8826f8bf --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/reference.md @@ -0,0 +1,27 @@ +# Reference +## Tasktest +
client.Tasktest.HelloAsync() +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Tasktest.HelloAsync(); +``` +
+
+
+
+ + +
+
+
+ diff --git a/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/snippet.json b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/snippet.json new file mode 100644 index 000000000000..c6b924ec68d1 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/snippet.json @@ -0,0 +1,17 @@ +{ + "types": {}, + "endpoints": [ + { + "example_identifier": null, + "id": { + "path": "/hello", + "method": "GET", + "identifier_override": "endpoint_tasktest.hello" + }, + "snippet": { + "type": "csharp", + "client": "\n\nvar client = new global::Seed.CsharpNamespaceConflict.Seed();\nawait client.Tasktest.HelloAsync();\n" + } + } + ] +} \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/HeadersBuilderTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/HeadersBuilderTests.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/HeadersBuilderTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/HeadersBuilderTests.cs index 92114ef283b1..2df31eb34336 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/HeadersBuilderTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/HeadersBuilderTests.cs @@ -1,7 +1,7 @@ using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.Test.Core; +namespace Seed.CsharpNamespaceConflict.Test.Core; [TestFixture] public class HeadersBuilderTests diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/AdditionalPropertiesTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/AdditionalPropertiesTests.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/AdditionalPropertiesTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/AdditionalPropertiesTests.cs index 2d0253dc0127..c272fa735495 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/AdditionalPropertiesTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/AdditionalPropertiesTests.cs @@ -1,9 +1,9 @@ using global::System.Text.Json; using global::System.Text.Json.Serialization; using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.Test.Core.Json; +namespace Seed.CsharpNamespaceConflict.Test.Core.Json; [TestFixture] public class AdditionalPropertiesTests diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/DateOnlyJsonTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/DateOnlyJsonTests.cs similarity index 95% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/DateOnlyJsonTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/DateOnlyJsonTests.cs index 651c7e6df267..1d69a7c24e73 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/DateOnlyJsonTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/DateOnlyJsonTests.cs @@ -1,7 +1,7 @@ using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.Test.Core.Json; +namespace Seed.CsharpNamespaceConflict.Test.Core.Json; [TestFixture] public class DateOnlyJsonTests diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/DateTimeJsonTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/DateTimeJsonTests.cs similarity index 97% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/DateTimeJsonTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/DateTimeJsonTests.cs index 2643f9396146..f135c544d70c 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/DateTimeJsonTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/DateTimeJsonTests.cs @@ -1,7 +1,7 @@ using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.Test.Core.Json; +namespace Seed.CsharpNamespaceConflict.Test.Core.Json; [TestFixture] public class DateTimeJsonTests diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/JsonAccessAttributeTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/JsonAccessAttributeTests.cs similarity index 98% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/JsonAccessAttributeTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/JsonAccessAttributeTests.cs index b9f6f9589cc3..fbd137606761 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/Json/JsonAccessAttributeTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/Json/JsonAccessAttributeTests.cs @@ -1,8 +1,8 @@ using global::System.Text.Json.Serialization; using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.Test.Core.Json; +namespace Seed.CsharpNamespaceConflict.Test.Core.Json; [TestFixture] public class JsonAccessAttributeTests diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/QueryStringBuilderTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/QueryStringBuilderTests.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/QueryStringBuilderTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/QueryStringBuilderTests.cs index 1b19717f075e..5f0afea70898 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/QueryStringBuilderTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/QueryStringBuilderTests.cs @@ -1,7 +1,7 @@ using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.Test.Core; +namespace Seed.CsharpNamespaceConflict.Test.Core; [TestFixture] public class QueryStringBuilderTests diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/QueryStringConverterTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/QueryStringConverterTests.cs similarity index 98% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/QueryStringConverterTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/QueryStringConverterTests.cs index 3ba833f2b803..51fc2785d936 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/QueryStringConverterTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/QueryStringConverterTests.cs @@ -1,7 +1,7 @@ using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.Test.Core; +namespace Seed.CsharpNamespaceConflict.Test.Core; [TestFixture] public class QueryStringConverterTests diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/RawClientTests/MultipartFormTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/RawClientTests/MultipartFormTests.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/RawClientTests/MultipartFormTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/RawClientTests/MultipartFormTests.cs index 4466e0ea0844..fc4dafa1a281 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/RawClientTests/MultipartFormTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/RawClientTests/MultipartFormTests.cs @@ -2,10 +2,10 @@ using global::System.Text; using global::System.Text.Json.Serialization; using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; using SystemTask = global::System.Threading.Tasks.Task; -namespace SeedCsharpNamespaceConflict.Test.Core.RawClientTests; +namespace Seed.CsharpNamespaceConflict.Test.Core.RawClientTests; [TestFixture] [Parallelizable(ParallelScope.Self)] @@ -1056,9 +1056,9 @@ private static string GetBoundary(MultipartFormDataContent content) ?? throw new global::System.Exception("Boundary not found"); } - private static SeedCsharpNamespaceConflict.Core.MultipartFormRequest CreateMultipartFormRequest() + private static global::Seed.CsharpNamespaceConflict.Core.MultipartFormRequest CreateMultipartFormRequest() { - return new SeedCsharpNamespaceConflict.Core.MultipartFormRequest + return new global::Seed.CsharpNamespaceConflict.Core.MultipartFormRequest { BaseUrl = "https://localhost", Method = HttpMethod.Post, diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/RawClientTests/QueryParameterTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/RawClientTests/QueryParameterTests.cs similarity index 96% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/RawClientTests/QueryParameterTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/RawClientTests/QueryParameterTests.cs index 15639087e360..6af524fe234d 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/RawClientTests/QueryParameterTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/RawClientTests/QueryParameterTests.cs @@ -1,7 +1,7 @@ using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.Test.Core.RawClientTests; +namespace Seed.CsharpNamespaceConflict.Test.Core.RawClientTests; [TestFixture] [Parallelizable(ParallelScope.Self)] diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/RawClientTests/RetriesTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/RawClientTests/RetriesTests.cs similarity index 97% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/RawClientTests/RetriesTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/RawClientTests/RetriesTests.cs index ddcbf9d3f6e3..2a53aaff5f39 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/RawClientTests/RetriesTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/RawClientTests/RetriesTests.cs @@ -1,13 +1,13 @@ using global::System.Net.Http; using global::System.Text.Json; using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; using WireMock.Server; using SystemTask = global::System.Threading.Tasks.Task; using WireMockRequest = WireMock.RequestBuilders.Request; using WireMockResponse = WireMock.ResponseBuilders.Response; -namespace SeedCsharpNamespaceConflict.Test.Core.RawClientTests; +namespace Seed.CsharpNamespaceConflict.Test.Core.RawClientTests; [TestFixture] [Parallelizable(ParallelScope.Self)] @@ -146,7 +146,7 @@ public async SystemTask SendRequestAsync_ShouldNotRetry_WithMultiPartFormRequest .WillSetStateTo("Server Error") .RespondWith(WireMockResponse.Create().WithStatusCode(429).WithBody("Failure")); - var request = new SeedCsharpNamespaceConflict.Core.MultipartFormRequest + var request = new global::Seed.CsharpNamespaceConflict.Core.MultipartFormRequest { BaseUrl = _baseUrl, Method = HttpMethod.Post, @@ -187,7 +187,7 @@ public async SystemTask SendRequestAsync_ShouldRetry_WithMultiPartFormRequest_Wi .WhenStateIs("Success") .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - var request = new SeedCsharpNamespaceConflict.Core.MultipartFormRequest + var request = new global::Seed.CsharpNamespaceConflict.Core.MultipartFormRequest { BaseUrl = _baseUrl, Method = HttpMethod.Post, @@ -373,7 +373,7 @@ public async SystemTask SendRequestAsync_ShouldPreserveMultipartBody_OnRetry() .WhenStateIs("Success") .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - var request = new SeedCsharpNamespaceConflict.Core.MultipartFormRequest + var request = new global::Seed.CsharpNamespaceConflict.Core.MultipartFormRequest { BaseUrl = _baseUrl, Method = HttpMethod.Post, diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/WithRawResponseTests.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/WithRawResponseTests.cs similarity index 98% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/WithRawResponseTests.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/WithRawResponseTests.cs index 49a1640686e1..151dcad198e1 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Core/WithRawResponseTests.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Core/WithRawResponseTests.cs @@ -1,10 +1,10 @@ using global::System.Net; using global::System.Net.Http.Headers; using NUnit.Framework; -using SeedCsharpNamespaceConflict; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict; +using Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.Test.Core; +namespace Seed.CsharpNamespaceConflict.Test.Core; [TestFixture] public class WithRawResponseTests diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.Custom.props b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Seed.CsharpNamespaceConflict.Test.Custom.props similarity index 100% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.Custom.props rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Seed.CsharpNamespaceConflict.Test.Custom.props diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Seed.CsharpNamespaceConflict.Test.csproj similarity index 85% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Seed.CsharpNamespaceConflict.Test.csproj index 0b5ca4815fe8..b80010b5fdbb 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/SeedCsharpNamespaceConflict.Test.csproj +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Seed.CsharpNamespaceConflict.Test.csproj @@ -29,11 +29,11 @@ - + diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/TestClient.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/TestClient.cs similarity index 58% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/TestClient.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/TestClient.cs index 50fc00871a16..6be692d893c8 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/TestClient.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/TestClient.cs @@ -1,6 +1,6 @@ using NUnit.Framework; -namespace SeedCsharpNamespaceConflict.Test; +namespace Seed.CsharpNamespaceConflict.Test; [TestFixture] public class TestClient; diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Unit/MockServer/BaseMockServerTest.cs similarity index 74% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Unit/MockServer/BaseMockServerTest.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Unit/MockServer/BaseMockServerTest.cs index 48f12a42bd37..64a5917f2737 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Unit/MockServer/BaseMockServerTest.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Unit/MockServer/BaseMockServerTest.cs @@ -1,16 +1,16 @@ +using global::Seed.CsharpNamespaceConflict; using NUnit.Framework; -using SeedCsharpNamespaceConflict; using WireMock.Logging; using WireMock.Server; using WireMock.Settings; -namespace SeedCsharpNamespaceConflict.Test.Unit.MockServer; +namespace Seed.CsharpNamespaceConflict.Test.Unit.MockServer; public class BaseMockServerTest { protected WireMockServer Server { get; set; } = null!; - protected SeedCsharpNamespaceConflictClient Client { get; set; } = null!; + protected global::Seed.CsharpNamespaceConflict.Seed Client { get; set; } = null!; protected RequestOptions RequestOptions { get; set; } = new(); @@ -23,7 +23,7 @@ public void GlobalSetup() ); // Initialize the Client - Client = new SeedCsharpNamespaceConflictClient( + Client = new global::Seed.CsharpNamespaceConflict.Seed( clientOptions: new ClientOptions { BaseUrl = Server.Urls[0], MaxRetries = 0 } ); } diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Unit/MockServer/Tasktest/HelloTest.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Unit/MockServer/Tasktest/HelloTest.cs similarity index 72% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Unit/MockServer/Tasktest/HelloTest.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Unit/MockServer/Tasktest/HelloTest.cs index 8987b08f8f0e..a173e19f4c8f 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Unit/MockServer/Tasktest/HelloTest.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Unit/MockServer/Tasktest/HelloTest.cs @@ -1,13 +1,13 @@ +using global::Seed.CsharpNamespaceConflict.Test.Unit.MockServer; using NUnit.Framework; -using SeedCsharpNamespaceConflict.Test.Unit.MockServer; -namespace SeedCsharpNamespaceConflict.Test.Unit.MockServer.Tasktest; +namespace Seed.CsharpNamespaceConflict.Test.Unit.MockServer.Tasktest; [TestFixture] [Parallelizable(ParallelScope.Self)] public class HelloTest : BaseMockServerTest { - [NUnit.Framework.Test] + [global::NUnit.Framework.Test] public void MockServerTest() { Server diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/AdditionalPropertiesComparer.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/AdditionalPropertiesComparer.cs similarity index 97% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/AdditionalPropertiesComparer.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/AdditionalPropertiesComparer.cs index 6a8e44542c34..c0e15d7e4adf 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/AdditionalPropertiesComparer.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/AdditionalPropertiesComparer.cs @@ -1,7 +1,7 @@ using System.Text.Json; +using global::Seed.CsharpNamespaceConflict; +using global::Seed.CsharpNamespaceConflict.Core; using NUnit.Framework.Constraints; -using SeedCsharpNamespaceConflict; -using SeedCsharpNamespaceConflict.Core; namespace NUnit.Framework; diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/JsonAssert.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/JsonAssert.cs similarity index 86% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/JsonAssert.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/JsonAssert.cs index de5001369c6f..b1b89a52955e 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/JsonAssert.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/JsonAssert.cs @@ -1,8 +1,8 @@ +using global::Seed.CsharpNamespaceConflict.Core; using global::System.Text.Json; using NUnit.Framework; -using SeedCsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.Test.Utils; +namespace Seed.CsharpNamespaceConflict.Test.Utils; internal static class JsonAssert { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/JsonElementComparer.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/JsonElementComparer.cs similarity index 100% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/JsonElementComparer.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/JsonElementComparer.cs diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/NUnitExtensions.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/NUnitExtensions.cs similarity index 100% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/NUnitExtensions.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/NUnitExtensions.cs diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/OneOfComparer.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/OneOfComparer.cs similarity index 100% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/OneOfComparer.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/OneOfComparer.cs diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/OptionalComparer.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/OptionalComparer.cs similarity index 98% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/OptionalComparer.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/OptionalComparer.cs index 94dd200a7dc0..6c78567c64ac 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/OptionalComparer.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/OptionalComparer.cs @@ -1,6 +1,6 @@ +using global::Seed.CsharpNamespaceConflict.Core; using NUnit.Framework.Constraints; using OneOf; -using SeedCsharpNamespaceConflict.Core; namespace NUnit.Framework; diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/ReadOnlyMemoryComparer.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/ReadOnlyMemoryComparer.cs similarity index 100% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict.Test/Utils/ReadOnlyMemoryComparer.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict.Test/Utils/ReadOnlyMemoryComparer.cs diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/A/Aa/Types/A.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/A/Aa/Types/A.cs similarity index 81% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/A/Aa/Types/A.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/A/Aa/Types/A.cs index 5bc0b2ea0597..cf86afa14492 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/A/Aa/Types/A.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/A/Aa/Types/A.cs @@ -1,9 +1,9 @@ using System.Text.Json; using System.Text.Json.Serialization; -using SeedCsharpNamespaceConflict; -using SeedCsharpNamespaceConflict.Core; +using global::Seed.CsharpNamespaceConflict; +using global::Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.A.Aa; +namespace Seed.CsharpNamespaceConflict.A.Aa; [Serializable] public record A : IJsonOnDeserialized diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/A/Aa/Types/B.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/A/Aa/Types/B.cs similarity index 81% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/A/Aa/Types/B.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/A/Aa/Types/B.cs index 7a5607a0e7a7..e85354849ca1 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/A/Aa/Types/B.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/A/Aa/Types/B.cs @@ -1,9 +1,9 @@ using System.Text.Json; using System.Text.Json.Serialization; -using SeedCsharpNamespaceConflict; -using SeedCsharpNamespaceConflict.Core; +using global::Seed.CsharpNamespaceConflict; +using global::Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.A.Aa; +namespace Seed.CsharpNamespaceConflict.A.Aa; [Serializable] public record B : IJsonOnDeserialized diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/A/Aa/Types/SubTestType.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/A/Aa/Types/SubTestType.cs similarity index 84% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/A/Aa/Types/SubTestType.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/A/Aa/Types/SubTestType.cs index e9c4baa5a30e..fdb6cfc0d9af 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/A/Aa/Types/SubTestType.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/A/Aa/Types/SubTestType.cs @@ -1,9 +1,9 @@ using System.Text.Json; using System.Text.Json.Serialization; -using SeedCsharpNamespaceConflict; -using SeedCsharpNamespaceConflict.Core; +using global::Seed.CsharpNamespaceConflict; +using global::Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.A.Aa; +namespace Seed.CsharpNamespaceConflict.A.Aa; [Serializable] public record SubTestType : IJsonOnDeserialized diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/B/Types/TestType.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/B/Types/TestType.cs similarity index 69% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/B/Types/TestType.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/B/Types/TestType.cs index f0b7cc373909..398392e8be9a 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/B/Types/TestType.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/B/Types/TestType.cs @@ -1,9 +1,9 @@ using System.Text.Json; using System.Text.Json.Serialization; -using SeedCsharpNamespaceConflict; -using SeedCsharpNamespaceConflict.Core; +using global::Seed.CsharpNamespaceConflict; +using global::Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict.B; +namespace Seed.CsharpNamespaceConflict.B; [Serializable] public record TestType : IJsonOnDeserialized @@ -13,10 +13,10 @@ public record TestType : IJsonOnDeserialized new Dictionary(); [JsonPropertyName("a")] - public required SeedCsharpNamespaceConflict.A.Aa.A A { get; set; } + public required global::Seed.CsharpNamespaceConflict.A.Aa.A A { get; set; } [JsonPropertyName("b")] - public required SeedCsharpNamespaceConflict.A.Aa.B B { get; set; } + public required global::Seed.CsharpNamespaceConflict.A.Aa.B B { get; set; } [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/ApiResponse.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/ApiResponse.cs similarity index 85% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/ApiResponse.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/ApiResponse.cs index 21c35aa1b772..3cfc5000bb7b 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/ApiResponse.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/ApiResponse.cs @@ -1,6 +1,6 @@ using global::System.Net.Http; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// The response object returned from the API. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/BaseRequest.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/BaseRequest.cs similarity index 97% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/BaseRequest.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/BaseRequest.cs index b9635c0d4e08..0e9303357a56 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/BaseRequest.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/BaseRequest.cs @@ -2,7 +2,7 @@ using global::System.Net.Http.Headers; using global::System.Text; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal abstract record BaseRequest { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/CollectionItemSerializer.cs similarity index 98% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/CollectionItemSerializer.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/CollectionItemSerializer.cs index 87a07ef25478..1416636686c1 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/CollectionItemSerializer.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/CollectionItemSerializer.cs @@ -1,7 +1,7 @@ using global::System.Text.Json; using global::System.Text.Json.Serialization; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Json collection converter. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Constants.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Constants.cs similarity index 78% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Constants.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Constants.cs index 1529aa7ac4f2..f6cf562c23f3 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Constants.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Constants.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal static class Constants { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/DateOnlyConverter.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/DateOnlyConverter.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/DateOnlyConverter.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/DateOnlyConverter.cs index 2b80caff9610..86e637e465bf 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/DateOnlyConverter.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/DateOnlyConverter.cs @@ -15,7 +15,7 @@ // ReSharper disable SuggestVarOrType_SimpleTypes // ReSharper disable SuggestVarOrType_BuiltInTypes -namespace SeedCsharpNamespaceConflict.Core +namespace Seed.CsharpNamespaceConflict.Core { /// /// Custom converter for handling the data type with the System.Text.Json library. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/DateTimeSerializer.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/DateTimeSerializer.cs similarity index 93% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/DateTimeSerializer.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/DateTimeSerializer.cs index c3d80bfcc7da..eef4f0ef1823 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/DateTimeSerializer.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/DateTimeSerializer.cs @@ -2,7 +2,7 @@ using global::System.Text.Json; using global::System.Text.Json.Serialization; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal class DateTimeSerializer : JsonConverter { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/EmptyRequest.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/EmptyRequest.cs similarity index 83% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/EmptyRequest.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/EmptyRequest.cs index 80cf16dcf4d9..e1a74011ab72 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/EmptyRequest.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/EmptyRequest.cs @@ -1,6 +1,6 @@ using global::System.Net.Http; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// The request object to send without a request body. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/EncodingCache.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/EncodingCache.cs similarity index 83% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/EncodingCache.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/EncodingCache.cs index 42210f67a848..a9b47d4b2cbf 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/EncodingCache.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/EncodingCache.cs @@ -1,6 +1,6 @@ using global::System.Text; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal static class EncodingCache { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Extensions.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Extensions.cs similarity index 97% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Extensions.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Extensions.cs index f4fb401158c1..18a9f20a38f2 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Extensions.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Extensions.cs @@ -1,7 +1,7 @@ using global::System.Diagnostics.CodeAnalysis; using global::System.Runtime.Serialization; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal static class Extensions { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/FormUrlEncoder.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/FormUrlEncoder.cs similarity index 97% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/FormUrlEncoder.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/FormUrlEncoder.cs index 46d13ef4ea09..8b0e51205289 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/FormUrlEncoder.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/FormUrlEncoder.cs @@ -1,6 +1,6 @@ using global::System.Net.Http; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Encodes an object into a form URL-encoded content. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HeaderValue.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HeaderValue.cs similarity index 97% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HeaderValue.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HeaderValue.cs index fc9338f23443..45d0dad0e768 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HeaderValue.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HeaderValue.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal sealed class HeaderValue { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Headers.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Headers.cs similarity index 94% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Headers.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Headers.cs index 6cf231ef6c77..633c91e1f7e4 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Headers.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Headers.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Represents the headers sent with the request. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HeadersBuilder.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HeadersBuilder.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HeadersBuilder.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HeadersBuilder.cs index 45eba76c4fa1..542757c953b9 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HeadersBuilder.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HeadersBuilder.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Fluent builder for constructing HTTP headers with support for merging from multiple sources. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HttpContentExtensions.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HttpContentExtensions.cs similarity index 92% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HttpContentExtensions.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HttpContentExtensions.cs index 82271d3cef50..e5068e04e3b8 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HttpContentExtensions.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HttpContentExtensions.cs @@ -1,5 +1,5 @@ #if !NET5_0_OR_GREATER -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Polyfill extension providing a ReadAsStringAsync(CancellationToken) overload diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HttpMethodExtensions.cs similarity index 75% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HttpMethodExtensions.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HttpMethodExtensions.cs index ae3f3e5bc1c0..2a199e0cf03f 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/HttpMethodExtensions.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/HttpMethodExtensions.cs @@ -1,6 +1,6 @@ using global::System.Net.Http; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal static class HttpMethodExtensions { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/IIsRetryableContent.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/IIsRetryableContent.cs similarity index 63% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/IIsRetryableContent.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/IIsRetryableContent.cs index 25f69dce31e7..3282430d83b3 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/IIsRetryableContent.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/IIsRetryableContent.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; public interface IIsRetryableContent { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/IRequestOptions.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/IRequestOptions.cs similarity index 97% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/IRequestOptions.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/IRequestOptions.cs index 196a25a72a40..21ef1b7d61f5 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/IRequestOptions.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/IRequestOptions.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal interface IRequestOptions { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/JsonAccessAttribute.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/JsonAccessAttribute.cs similarity index 88% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/JsonAccessAttribute.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/JsonAccessAttribute.cs index bf8f553cbb0a..f65d65314c10 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/JsonAccessAttribute.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/JsonAccessAttribute.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; [global::System.AttributeUsage( global::System.AttributeTargets.Property | global::System.AttributeTargets.Field diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/JsonConfiguration.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/JsonConfiguration.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/JsonConfiguration.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/JsonConfiguration.cs index 1cf0be80d3a3..60679be2d78a 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/JsonConfiguration.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/JsonConfiguration.cs @@ -5,7 +5,7 @@ using global::System.Text.Json.Serialization; using global::System.Text.Json.Serialization.Metadata; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal static partial class JsonOptions { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/JsonRequest.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/JsonRequest.cs similarity index 95% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/JsonRequest.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/JsonRequest.cs index a59e3f9355c9..58c35665ad68 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/JsonRequest.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/JsonRequest.cs @@ -1,6 +1,6 @@ using global::System.Net.Http; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// The request object to be sent for JSON APIs. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/MultipartFormRequest.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/MultipartFormRequest.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/MultipartFormRequest.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/MultipartFormRequest.cs index 2e20fc1ad18a..b775e2998f65 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/MultipartFormRequest.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/MultipartFormRequest.cs @@ -1,7 +1,7 @@ using global::System.Net.Http; using global::System.Net.Http.Headers; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// The request object to be sent for multipart form data. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/NullableAttribute.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/NullableAttribute.cs similarity index 94% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/NullableAttribute.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/NullableAttribute.cs index abdad1f407b6..1b8c9ca6f0b2 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/NullableAttribute.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/NullableAttribute.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Marks a property as nullable in the OpenAPI specification. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/OneOfSerializer.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/OneOfSerializer.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/OneOfSerializer.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/OneOfSerializer.cs index af3fe82996eb..f8bc65337662 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/OneOfSerializer.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/OneOfSerializer.cs @@ -3,7 +3,7 @@ using global::System.Text.Json.Serialization; using OneOf; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal class OneOfSerializer : JsonConverter { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Optional.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Optional.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Optional.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Optional.cs index 3599004d7e37..26dbc0987d33 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Optional.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Optional.cs @@ -1,7 +1,7 @@ using global::System.Text.Json; using global::System.Text.Json.Serialization; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Non-generic interface for Optional types to enable reflection-free checks. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/OptionalAttribute.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/OptionalAttribute.cs similarity index 94% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/OptionalAttribute.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/OptionalAttribute.cs index f73d768e7339..a1ba2467d065 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/OptionalAttribute.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/OptionalAttribute.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Marks a property as optional in the OpenAPI specification. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/AdditionalProperties.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/AdditionalProperties.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/AdditionalProperties.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/AdditionalProperties.cs index 8775e0f7a715..64bf7fc4e0e4 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/AdditionalProperties.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/AdditionalProperties.cs @@ -2,9 +2,9 @@ using global::System.Collections.ObjectModel; using global::System.Text.Json; using global::System.Text.Json.Nodes; -using SeedCsharpNamespaceConflict.Core; +using Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; public record ReadOnlyAdditionalProperties : ReadOnlyAdditionalProperties { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/ClientOptions.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/ClientOptions.cs similarity index 95% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/ClientOptions.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/ClientOptions.cs index 726efba48715..ef01fb5b34ea 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/ClientOptions.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/ClientOptions.cs @@ -1,6 +1,6 @@ -using SeedCsharpNamespaceConflict.Core; +using global::Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; [Serializable] public partial class ClientOptions diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/FileParameter.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/FileParameter.cs similarity index 97% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/FileParameter.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/FileParameter.cs index 7c0f68a08014..75a525c49044 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/FileParameter.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/FileParameter.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; /// /// File parameter for uploading files. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/RawResponse.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/RawResponse.cs similarity index 93% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/RawResponse.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/RawResponse.cs index 29dceb02a162..06f9cd2cfb05 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/RawResponse.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/RawResponse.cs @@ -1,6 +1,6 @@ using global::System.Net; -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; /// /// Contains HTTP response metadata including status code, URL, and headers. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/RequestOptions.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/RequestOptions.cs similarity index 94% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/RequestOptions.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/RequestOptions.cs index cf9279549578..d8e2cdb0d894 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/RequestOptions.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/RequestOptions.cs @@ -1,6 +1,6 @@ -using SeedCsharpNamespaceConflict.Core; +using global::Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; [Serializable] public partial class RequestOptions : IRequestOptions diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/SeedCsharpNamespaceConflictApiException.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/SeedApiException.cs similarity index 75% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/SeedCsharpNamespaceConflictApiException.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/SeedApiException.cs index 081ad75284da..2815c4a303e0 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/SeedCsharpNamespaceConflictApiException.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/SeedApiException.cs @@ -1,14 +1,14 @@ -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; /// /// This exception type will be thrown for any non-2XX API responses. /// -public class SeedCsharpNamespaceConflictApiException( +public class SeedApiException( string message, int statusCode, object body, Exception? innerException = null -) : SeedCsharpNamespaceConflictException(message, innerException) +) : SeedException(message, innerException) { /// /// The error code of the response that triggered the exception. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/SeedException.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/SeedException.cs new file mode 100644 index 000000000000..2b4b9f42f94c --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/SeedException.cs @@ -0,0 +1,7 @@ +namespace Seed.CsharpNamespaceConflict; + +/// +/// Base exception class for all exceptions thrown by the SDK. +/// +public class SeedException(string message, Exception? innerException = null) + : Exception(message, innerException); diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/Version.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/Version.cs similarity index 68% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/Version.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/Version.cs index 90181780f0a4..411783512bbd 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/Version.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/Version.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; [Serializable] internal class Version diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/WithRawResponse.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/WithRawResponse.cs similarity index 92% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/WithRawResponse.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/WithRawResponse.cs index aa858fac8b15..b8ee5dd8fda1 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/WithRawResponse.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/WithRawResponse.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; /// /// Wraps a parsed response value with its raw HTTP response metadata. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/WithRawResponseTask.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/WithRawResponseTask.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/WithRawResponseTask.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/WithRawResponseTask.cs index decf3a6c7fa5..a170282b1f1b 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/WithRawResponseTask.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/Public/WithRawResponseTask.cs @@ -1,6 +1,6 @@ using global::System.Runtime.CompilerServices; -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; /// /// A task-like type that wraps Task<WithRawResponse<T>> and provides dual-mode awaiting: diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/QueryStringBuilder.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/QueryStringBuilder.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/QueryStringBuilder.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/QueryStringBuilder.cs index f95f9a502437..28aa876cc7ca 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/QueryStringBuilder.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/QueryStringBuilder.cs @@ -4,7 +4,7 @@ using global::System.Text; #endif -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// High-performance query string builder with cross-platform optimizations. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/QueryStringConverter.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/QueryStringConverter.cs similarity index 99% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/QueryStringConverter.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/QueryStringConverter.cs index 47b25db9f1f4..88bb974ff60c 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/QueryStringConverter.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/QueryStringConverter.cs @@ -1,6 +1,6 @@ using global::System.Text.Json; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Converts an object into a query string collection. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/RawClient.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/RawClient.cs similarity index 94% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/RawClient.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/RawClient.cs index 0f459df70122..c70e6842497a 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/RawClient.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/RawClient.cs @@ -3,7 +3,7 @@ using global::System.Text; using SystemTask = global::System.Threading.Tasks.Task; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Utility class for making raw HTTP requests to the API. @@ -25,8 +25,8 @@ internal partial class RawClient(ClientOptions clientOptions) /// internal readonly ClientOptions Options = clientOptions; - internal async global::System.Threading.Tasks.Task SendRequestAsync( - global::SeedCsharpNamespaceConflict.Core.BaseRequest request, + internal async global::System.Threading.Tasks.Task SendRequestAsync( + global::Seed.CsharpNamespaceConflict.Core.BaseRequest request, CancellationToken cancellationToken = default ) { @@ -41,7 +41,7 @@ internal partial class RawClient(ClientOptions clientOptions) .ConfigureAwait(false); } - internal async global::System.Threading.Tasks.Task SendRequestAsync( + internal async global::System.Threading.Tasks.Task SendRequestAsync( HttpRequestMessage request, IRequestOptions? options, CancellationToken cancellationToken = default @@ -123,7 +123,7 @@ HttpRequestMessage request /// Sends the request with retries, unless the request content is not retryable, /// such as stream requests and multipart form data with stream content. /// - private async global::System.Threading.Tasks.Task SendWithRetriesAsync( + private async global::System.Threading.Tasks.Task SendWithRetriesAsync( HttpRequestMessage request, IRequestOptions? options, CancellationToken cancellationToken @@ -138,7 +138,7 @@ CancellationToken cancellationToken if (!isRetryableContent) { - return new global::SeedCsharpNamespaceConflict.Core.ApiResponse + return new global::Seed.CsharpNamespaceConflict.Core.ApiResponse { StatusCode = (int)response.StatusCode, Raw = response, @@ -164,7 +164,7 @@ CancellationToken cancellationToken .ConfigureAwait(false); } - return new global::SeedCsharpNamespaceConflict.Core.ApiResponse + return new global::Seed.CsharpNamespaceConflict.Core.ApiResponse { StatusCode = (int)response.StatusCode, Raw = response, @@ -263,7 +263,7 @@ private static bool IsRetryableContent(HttpRequestMessage request) } internal async global::System.Threading.Tasks.Task CreateHttpRequestAsync( - global::SeedCsharpNamespaceConflict.Core.BaseRequest request + global::Seed.CsharpNamespaceConflict.Core.BaseRequest request ) { var url = BuildUrl(request); @@ -274,7 +274,7 @@ private static bool IsRetryableContent(HttpRequestMessage request) return httpRequest; } - private string BuildUrl(global::SeedCsharpNamespaceConflict.Core.BaseRequest request) + private string BuildUrl(global::Seed.CsharpNamespaceConflict.Core.BaseRequest request) { var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl ?? Options.BaseUrl; diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/RawResponse.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/RawResponse.cs similarity index 92% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/RawResponse.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/RawResponse.cs index 71475d5a4a52..97304ddc1150 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/RawResponse.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/RawResponse.cs @@ -1,6 +1,6 @@ using global::System.Net; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Contains HTTP response metadata including status code, URL, and headers. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/ResponseHeaders.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/ResponseHeaders.cs similarity index 98% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/ResponseHeaders.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/ResponseHeaders.cs index 9142ff67ddc3..e6a28db48e9c 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/ResponseHeaders.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/ResponseHeaders.cs @@ -1,7 +1,7 @@ using global::System.Collections; using global::System.Net.Http.Headers; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Represents HTTP response headers with case-insensitive lookup. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/StreamRequest.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/StreamRequest.cs similarity index 93% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/StreamRequest.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/StreamRequest.cs index 0c3d2a1ae11d..214418bf7873 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/StreamRequest.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/StreamRequest.cs @@ -1,7 +1,7 @@ using global::System.Net.Http; using global::System.Net.Http.Headers; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// The request object to be sent for streaming uploads. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/StringEnum.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/StringEnum.cs similarity index 66% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/StringEnum.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/StringEnum.cs index 93660010d08a..f45da7c83a5c 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/StringEnum.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/StringEnum.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; public interface IStringEnum : IEquatable { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/StringEnumExtensions.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/StringEnumExtensions.cs similarity index 74% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/StringEnumExtensions.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/StringEnumExtensions.cs index 0f42fbb8a2f3..0abbbfbcf465 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/StringEnumExtensions.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/StringEnumExtensions.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; internal static class StringEnumExtensions { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/ValueConvert.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/ValueConvert.cs similarity index 98% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/ValueConvert.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/ValueConvert.cs index 03791e807436..818fba57a2cd 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/ValueConvert.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Core/ValueConvert.cs @@ -1,6 +1,6 @@ using global::System.Globalization; -namespace SeedCsharpNamespaceConflict.Core; +namespace Seed.CsharpNamespaceConflict.Core; /// /// Convert values to string for path and query parameters. diff --git a/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/ISeed.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/ISeed.cs new file mode 100644 index 000000000000..cd8578255f04 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/ISeed.cs @@ -0,0 +1,6 @@ +namespace Seed.CsharpNamespaceConflict; + +public partial interface ISeed +{ + public ITasktestClient Tasktest { get; } +} diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.Custom.props b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Seed.CsharpNamespaceConflict.Custom.props similarity index 100% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.Custom.props rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Seed.CsharpNamespaceConflict.Custom.props diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Seed.CsharpNamespaceConflict.csproj similarity index 92% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Seed.CsharpNamespaceConflict.csproj index 05d9e6656ffb..18b7a504a0e2 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflict.csproj +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Seed.CsharpNamespaceConflict.csproj @@ -50,12 +50,12 @@ - <_Parameter1>SeedCsharpNamespaceConflict.Test + <_Parameter1>Seed.CsharpNamespaceConflict.Test diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflictClient.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Seed.cs similarity index 70% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflictClient.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Seed.cs index 5538ff377f17..7012fd217ad7 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/SeedCsharpNamespaceConflictClient.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Seed.cs @@ -1,19 +1,19 @@ -using SeedCsharpNamespaceConflict.Core; +using global::Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; -public partial class SeedCsharpNamespaceConflictClient : ISeedCsharpNamespaceConflictClient +public partial class Seed : ISeed { private readonly RawClient _client; - public SeedCsharpNamespaceConflictClient(ClientOptions? clientOptions = null) + public Seed(ClientOptions? clientOptions = null) { clientOptions ??= new ClientOptions(); var platformHeaders = new Headers( new Dictionary() { { "X-Fern-Language", "C#" }, - { "X-Fern-SDK-Name", "SeedCsharpNamespaceConflict" }, + { "X-Fern-SDK-Name", "Seed.CsharpNamespaceConflict" }, { "X-Fern-SDK-Version", Version.Current }, { "User-Agent", "Ferncsharp-namespace-conflict/0.0.1" }, } diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Tasktest/ITasktestClient.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Tasktest/ITasktestClient.cs similarity index 82% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Tasktest/ITasktestClient.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Tasktest/ITasktestClient.cs index abbbc43a5f24..f21f50370a8b 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Tasktest/ITasktestClient.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Tasktest/ITasktestClient.cs @@ -1,4 +1,4 @@ -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; public partial interface ITasktestClient { diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Tasktest/TasktestClient.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Tasktest/TasktestClient.cs similarity index 86% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Tasktest/TasktestClient.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Tasktest/TasktestClient.cs index 0701ced9bc7c..91a03a638624 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Tasktest/TasktestClient.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Tasktest/TasktestClient.cs @@ -1,6 +1,6 @@ -using SeedCsharpNamespaceConflict.Core; +using global::Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; public partial class TasktestClient : ITasktestClient { @@ -19,7 +19,7 @@ public async System.Threading.Tasks.Task HelloAsync( CancellationToken cancellationToken = default ) { - var _headers = await new SeedCsharpNamespaceConflict.Core.HeadersBuilder.Builder() + var _headers = await new global::Seed.CsharpNamespaceConflict.Core.HeadersBuilder.Builder() .Add(_client.Options.Headers) .Add(_client.Options.AdditionalHeaders) .Add(options?.AdditionalHeaders) @@ -45,7 +45,7 @@ public async System.Threading.Tasks.Task HelloAsync( var responseBody = await response .Raw.Content.ReadAsStringAsync(cancellationToken) .ConfigureAwait(false); - throw new SeedCsharpNamespaceConflictApiException( + throw new SeedApiException( $"Error with status code {response.StatusCode}", response.StatusCode, responseBody diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Tasktest/Types/Task.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Tasktest/Types/Task.cs similarity index 88% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Tasktest/Types/Task.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Tasktest/Types/Task.cs index 0c6b43be5cbf..1f1e76ad4681 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Tasktest/Types/Task.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/Seed.CsharpNamespaceConflict/Tasktest/Types/Task.cs @@ -1,8 +1,8 @@ using System.Text.Json; using System.Text.Json.Serialization; -using SeedCsharpNamespaceConflict.Core; +using global::Seed.CsharpNamespaceConflict.Core; -namespace SeedCsharpNamespaceConflict; +namespace Seed.CsharpNamespaceConflict; [Serializable] public record Task : IJsonOnDeserialized diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedApi.DynamicSnippets/Example0.cs b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/SeedApi.DynamicSnippets/Example0.cs similarity index 55% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedApi.DynamicSnippets/Example0.cs rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/SeedApi.DynamicSnippets/Example0.cs index 7567fdb7d27c..2a44a7c2c8e6 100644 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedApi.DynamicSnippets/Example0.cs +++ b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/SeedApi.DynamicSnippets/Example0.cs @@ -1,11 +1,11 @@ -using SeedCsharpNamespaceConflict; +using global::Seed.CsharpNamespaceConflict; namespace Usage; public class Example0 { - public async System.Threading.Tasks.Task Do() { - var client = new SeedCsharpNamespaceConflictClient( + public async global::System.Threading.Tasks.Task Do() { + var client = new global::Seed.CsharpNamespaceConflict.Seed( clientOptions: new ClientOptions { BaseUrl = "https://api.fern.com" } diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedApi.DynamicSnippets/SeedApi.DynamicSnippets.csproj b/seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/SeedApi.DynamicSnippets/SeedApi.DynamicSnippets.csproj similarity index 100% rename from seed/csharp-sdk/csharp-namespace-conflict/src/SeedApi.DynamicSnippets/SeedApi.DynamicSnippets.csproj rename to seed/csharp-sdk/csharp-namespace-conflict/client-class-name-matches-namespace-root/src/SeedApi.DynamicSnippets/SeedApi.DynamicSnippets.csproj diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/SeedCsharpNamespaceConflictException.cs b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/SeedCsharpNamespaceConflictException.cs deleted file mode 100644 index 89dbc55c2ad6..000000000000 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/Core/Public/SeedCsharpNamespaceConflictException.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedCsharpNamespaceConflict; - -/// -/// Base exception class for all exceptions thrown by the SDK. -/// -public class SeedCsharpNamespaceConflictException(string message, Exception? innerException = null) - : Exception(message, innerException); diff --git a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/ISeedCsharpNamespaceConflictClient.cs b/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/ISeedCsharpNamespaceConflictClient.cs deleted file mode 100644 index 0f18ab0a73c0..000000000000 --- a/seed/csharp-sdk/csharp-namespace-conflict/src/SeedCsharpNamespaceConflict/ISeedCsharpNamespaceConflictClient.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedCsharpNamespaceConflict; - -public partial interface ISeedCsharpNamespaceConflictClient -{ - public ITasktestClient Tasktest { get; } -} diff --git a/seed/csharp-sdk/seed.yml b/seed/csharp-sdk/seed.yml index d4f3f5fdd0ca..0814f800dcdd 100644 --- a/seed/csharp-sdk/seed.yml +++ b/seed/csharp-sdk/seed.yml @@ -264,6 +264,12 @@ fixtures: explicit-namespaces: true experimental-fully-qualified-namespaces: true outputFolder: namespace-client-collision + csharp-namespace-conflict: + - customConfig: + namespace: Seed.CsharpNamespaceConflict + client-class-name: Seed + experimental-fully-qualified-namespaces: true + outputFolder: client-class-name-matches-namespace-root csharp-system-collision: - customConfig: client-class-name: System @@ -317,7 +323,6 @@ fixtures: redact-response-body-on-error: true outputFolder: redact-response-body-on-error allowedFailures: - - csharp-namespace-collision:namespace-client-collision - enum:forward-compatible-enums - enum:plain-enums - examples:no-custom-config diff --git a/seed/python-sdk/exhaustive/no-custom-config/tests/conftest.py b/seed/python-sdk/exhaustive/no-custom-config/tests/conftest.py index 80f143949200..ec7abafe7356 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/tests/conftest.py +++ b/seed/python-sdk/exhaustive/no-custom-config/tests/conftest.py @@ -15,6 +15,7 @@ import pytest _STARTED: bool = False +_EXTERNAL: bool = False # True when using an external WireMock instance (skip container lifecycle) _WIREMOCK_URL: str = "http://localhost:8080" # Default, will be updated after container starts _PROJECT_NAME: str = "seed-exhaustive" @@ -41,10 +42,19 @@ def _get_wiremock_port() -> str: def _start_wiremock() -> None: """Starts the WireMock container using docker-compose.""" - global _STARTED, _WIREMOCK_URL + global _STARTED, _EXTERNAL, _WIREMOCK_URL if _STARTED: return + # If WIREMOCK_URL is already set (e.g., by CI/CD pipeline), skip container management + existing_url = os.environ.get("WIREMOCK_URL") + if existing_url: + _WIREMOCK_URL = existing_url + _EXTERNAL = True + _STARTED = True + print(f"\nUsing external WireMock at {_WIREMOCK_URL} (container management skipped)") + return + print(f"\nStarting WireMock container (project: {_PROJECT_NAME})...") try: subprocess.run( @@ -65,6 +75,10 @@ def _start_wiremock() -> None: def _stop_wiremock() -> None: """Stops and removes the WireMock container.""" + if _EXTERNAL: + # Container is managed externally; nothing to tear down. + return + print("\nStopping WireMock container...") subprocess.run( ["docker", "compose", "-f", _COMPOSE_FILE, "-p", _PROJECT_NAME, "down", "-v"], diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/tests/conftest.py b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/tests/conftest.py index 80f143949200..ec7abafe7356 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/tests/conftest.py +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/tests/conftest.py @@ -15,6 +15,7 @@ import pytest _STARTED: bool = False +_EXTERNAL: bool = False # True when using an external WireMock instance (skip container lifecycle) _WIREMOCK_URL: str = "http://localhost:8080" # Default, will be updated after container starts _PROJECT_NAME: str = "seed-exhaustive" @@ -41,10 +42,19 @@ def _get_wiremock_port() -> str: def _start_wiremock() -> None: """Starts the WireMock container using docker-compose.""" - global _STARTED, _WIREMOCK_URL + global _STARTED, _EXTERNAL, _WIREMOCK_URL if _STARTED: return + # If WIREMOCK_URL is already set (e.g., by CI/CD pipeline), skip container management + existing_url = os.environ.get("WIREMOCK_URL") + if existing_url: + _WIREMOCK_URL = existing_url + _EXTERNAL = True + _STARTED = True + print(f"\nUsing external WireMock at {_WIREMOCK_URL} (container management skipped)") + return + print(f"\nStarting WireMock container (project: {_PROJECT_NAME})...") try: subprocess.run( @@ -65,6 +75,10 @@ def _start_wiremock() -> None: def _stop_wiremock() -> None: """Stops and removes the WireMock container.""" + if _EXTERNAL: + # Container is managed externally; nothing to tear down. + return + print("\nStopping WireMock container...") subprocess.run( ["docker", "compose", "-f", _COMPOSE_FILE, "-p", _PROJECT_NAME, "down", "-v"], diff --git a/seed/python-sdk/python-streaming-parameter-openapi/with-wire-tests/tests/conftest.py b/seed/python-sdk/python-streaming-parameter-openapi/with-wire-tests/tests/conftest.py index 2dc13b49306e..87c6dcbc13e7 100644 --- a/seed/python-sdk/python-streaming-parameter-openapi/with-wire-tests/tests/conftest.py +++ b/seed/python-sdk/python-streaming-parameter-openapi/with-wire-tests/tests/conftest.py @@ -15,6 +15,7 @@ import pytest _STARTED: bool = False +_EXTERNAL: bool = False # True when using an external WireMock instance (skip container lifecycle) _WIREMOCK_URL: str = "http://localhost:8080" # Default, will be updated after container starts _PROJECT_NAME: str = "seed-api" @@ -41,10 +42,19 @@ def _get_wiremock_port() -> str: def _start_wiremock() -> None: """Starts the WireMock container using docker-compose.""" - global _STARTED, _WIREMOCK_URL + global _STARTED, _EXTERNAL, _WIREMOCK_URL if _STARTED: return + # If WIREMOCK_URL is already set (e.g., by CI/CD pipeline), skip container management + existing_url = os.environ.get("WIREMOCK_URL") + if existing_url: + _WIREMOCK_URL = existing_url + _EXTERNAL = True + _STARTED = True + print(f"\nUsing external WireMock at {_WIREMOCK_URL} (container management skipped)") + return + print(f"\nStarting WireMock container (project: {_PROJECT_NAME})...") try: subprocess.run( @@ -65,6 +75,10 @@ def _start_wiremock() -> None: def _stop_wiremock() -> None: """Stops and removes the WireMock container.""" + if _EXTERNAL: + # Container is managed externally; nothing to tear down. + return + print("\nStopping WireMock container...") subprocess.run( ["docker", "compose", "-f", _COMPOSE_FILE, "-p", _PROJECT_NAME, "down", "-v"], diff --git a/seed/python-sdk/server-sent-events/with-wire-tests/tests/conftest.py b/seed/python-sdk/server-sent-events/with-wire-tests/tests/conftest.py index 742f032edba6..2a3936cc7513 100644 --- a/seed/python-sdk/server-sent-events/with-wire-tests/tests/conftest.py +++ b/seed/python-sdk/server-sent-events/with-wire-tests/tests/conftest.py @@ -15,6 +15,7 @@ import pytest _STARTED: bool = False +_EXTERNAL: bool = False # True when using an external WireMock instance (skip container lifecycle) _WIREMOCK_URL: str = "http://localhost:8080" # Default, will be updated after container starts _PROJECT_NAME: str = "seed-server-sent-events" @@ -41,10 +42,19 @@ def _get_wiremock_port() -> str: def _start_wiremock() -> None: """Starts the WireMock container using docker-compose.""" - global _STARTED, _WIREMOCK_URL + global _STARTED, _EXTERNAL, _WIREMOCK_URL if _STARTED: return + # If WIREMOCK_URL is already set (e.g., by CI/CD pipeline), skip container management + existing_url = os.environ.get("WIREMOCK_URL") + if existing_url: + _WIREMOCK_URL = existing_url + _EXTERNAL = True + _STARTED = True + print(f"\nUsing external WireMock at {_WIREMOCK_URL} (container management skipped)") + return + print(f"\nStarting WireMock container (project: {_PROJECT_NAME})...") try: subprocess.run( @@ -65,6 +75,10 @@ def _start_wiremock() -> None: def _stop_wiremock() -> None: """Stops and removes the WireMock container.""" + if _EXTERNAL: + # Container is managed externally; nothing to tear down. + return + print("\nStopping WireMock container...") subprocess.run( ["docker", "compose", "-f", _COMPOSE_FILE, "-p", _PROJECT_NAME, "down", "-v"], diff --git a/seed/ts-sdk/websocket-bearer-auth/websockets/src/api/resources/realtime/client/Socket.ts b/seed/ts-sdk/websocket-bearer-auth/websockets/src/api/resources/realtime/client/Socket.ts index 548a6750f892..70ed7ea401f7 100644 --- a/seed/ts-sdk/websocket-bearer-auth/websockets/src/api/resources/realtime/client/Socket.ts +++ b/seed/ts-sdk/websocket-bearer-auth/websockets/src/api/resources/realtime/client/Socket.ts @@ -50,7 +50,7 @@ export class RealtimeSocket { } /** The current state of the connection; this is one of the readyState constants. */ - get readyState(): number { + get readyState(): core.ReconnectingWebSocket.ReadyState { return this.socket.readyState; } @@ -109,7 +109,7 @@ export class RealtimeSocket { /** Returns a promise that resolves when the websocket is open. */ public async waitForOpen(): Promise { - if (this.socket.readyState === core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState === core.ReconnectingWebSocket.ReadyState.OPEN) { return this.socket; } @@ -130,7 +130,7 @@ export class RealtimeSocket { throw new Error("Socket is not connected."); } - if (this.socket.readyState !== core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState !== core.ReconnectingWebSocket.ReadyState.OPEN) { throw new Error("Socket is not open."); } } diff --git a/seed/ts-sdk/websocket-bearer-auth/websockets/src/api/resources/realtimeNoAuth/client/Socket.ts b/seed/ts-sdk/websocket-bearer-auth/websockets/src/api/resources/realtimeNoAuth/client/Socket.ts index c97f55d3cb04..564b826056d1 100644 --- a/seed/ts-sdk/websocket-bearer-auth/websockets/src/api/resources/realtimeNoAuth/client/Socket.ts +++ b/seed/ts-sdk/websocket-bearer-auth/websockets/src/api/resources/realtimeNoAuth/client/Socket.ts @@ -46,7 +46,7 @@ export class RealtimeNoAuthSocket { } /** The current state of the connection; this is one of the readyState constants. */ - get readyState(): number { + get readyState(): core.ReconnectingWebSocket.ReadyState { return this.socket.readyState; } @@ -98,7 +98,7 @@ export class RealtimeNoAuthSocket { /** Returns a promise that resolves when the websocket is open. */ public async waitForOpen(): Promise { - if (this.socket.readyState === core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState === core.ReconnectingWebSocket.ReadyState.OPEN) { return this.socket; } @@ -119,7 +119,7 @@ export class RealtimeNoAuthSocket { throw new Error("Socket is not connected."); } - if (this.socket.readyState !== core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState !== core.ReconnectingWebSocket.ReadyState.OPEN) { throw new Error("Socket is not open."); } } diff --git a/seed/ts-sdk/websocket-bearer-auth/websockets/src/core/websocket/ws.ts b/seed/ts-sdk/websocket-bearer-auth/websockets/src/core/websocket/ws.ts index 2a6f3bd5f4aa..95ad4991024d 100644 --- a/seed/ts-sdk/websocket-bearer-auth/websockets/src/core/websocket/ws.ts +++ b/seed/ts-sdk/websocket-bearer-auth/websockets/src/core/websocket/ws.ts @@ -178,11 +178,13 @@ export class ReconnectingWebSocket { /** * The current state of the connection; this is one of the Ready state constants */ - get readyState(): number { + get readyState(): ReconnectingWebSocket.ReadyState { if (this._ws) { - return this._ws.readyState; + return this._ws.readyState as ReconnectingWebSocket.ReadyState; } - return this._options.startClosed ? ReconnectingWebSocket.CLOSED : ReconnectingWebSocket.CONNECTING; + return this._options.startClosed + ? ReconnectingWebSocket.ReadyState.CLOSED + : ReconnectingWebSocket.ReadyState.CONNECTING; } /** @@ -550,3 +552,13 @@ export class ReconnectingWebSocket { clearTimeout(this._uptimeTimeout); } } + +export namespace ReconnectingWebSocket { + export const ReadyState = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3, + } as const; + export type ReadyState = (typeof ReadyState)[keyof typeof ReadyState]; +} diff --git a/seed/ts-sdk/websocket-inferred-auth/websockets/src/api/resources/realtime/client/Socket.ts b/seed/ts-sdk/websocket-inferred-auth/websockets/src/api/resources/realtime/client/Socket.ts index 57f28b6c3144..acd4d6bf6242 100644 --- a/seed/ts-sdk/websocket-inferred-auth/websockets/src/api/resources/realtime/client/Socket.ts +++ b/seed/ts-sdk/websocket-inferred-auth/websockets/src/api/resources/realtime/client/Socket.ts @@ -50,7 +50,7 @@ export class RealtimeSocket { } /** The current state of the connection; this is one of the readyState constants. */ - get readyState(): number { + get readyState(): core.ReconnectingWebSocket.ReadyState { return this.socket.readyState; } @@ -109,7 +109,7 @@ export class RealtimeSocket { /** Returns a promise that resolves when the websocket is open. */ public async waitForOpen(): Promise { - if (this.socket.readyState === core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState === core.ReconnectingWebSocket.ReadyState.OPEN) { return this.socket; } @@ -130,7 +130,7 @@ export class RealtimeSocket { throw new Error("Socket is not connected."); } - if (this.socket.readyState !== core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState !== core.ReconnectingWebSocket.ReadyState.OPEN) { throw new Error("Socket is not open."); } } diff --git a/seed/ts-sdk/websocket-inferred-auth/websockets/src/core/websocket/ws.ts b/seed/ts-sdk/websocket-inferred-auth/websockets/src/core/websocket/ws.ts index 2a6f3bd5f4aa..95ad4991024d 100644 --- a/seed/ts-sdk/websocket-inferred-auth/websockets/src/core/websocket/ws.ts +++ b/seed/ts-sdk/websocket-inferred-auth/websockets/src/core/websocket/ws.ts @@ -178,11 +178,13 @@ export class ReconnectingWebSocket { /** * The current state of the connection; this is one of the Ready state constants */ - get readyState(): number { + get readyState(): ReconnectingWebSocket.ReadyState { if (this._ws) { - return this._ws.readyState; + return this._ws.readyState as ReconnectingWebSocket.ReadyState; } - return this._options.startClosed ? ReconnectingWebSocket.CLOSED : ReconnectingWebSocket.CONNECTING; + return this._options.startClosed + ? ReconnectingWebSocket.ReadyState.CLOSED + : ReconnectingWebSocket.ReadyState.CONNECTING; } /** @@ -550,3 +552,13 @@ export class ReconnectingWebSocket { clearTimeout(this._uptimeTimeout); } } + +export namespace ReconnectingWebSocket { + export const ReadyState = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3, + } as const; + export type ReadyState = (typeof ReadyState)[keyof typeof ReadyState]; +} diff --git a/seed/ts-sdk/websocket/no-serde/src/api/resources/empty/resources/emptyRealtime/client/Socket.ts b/seed/ts-sdk/websocket/no-serde/src/api/resources/empty/resources/emptyRealtime/client/Socket.ts index af61ebb7186e..22c24bdb68e3 100644 --- a/seed/ts-sdk/websocket/no-serde/src/api/resources/empty/resources/emptyRealtime/client/Socket.ts +++ b/seed/ts-sdk/websocket/no-serde/src/api/resources/empty/resources/emptyRealtime/client/Socket.ts @@ -45,7 +45,7 @@ export class EmptyRealtimeSocket { } /** The current state of the connection; this is one of the readyState constants. */ - get readyState(): number { + get readyState(): core.ReconnectingWebSocket.ReadyState { return this.socket.readyState; } @@ -92,7 +92,7 @@ export class EmptyRealtimeSocket { /** Returns a promise that resolves when the websocket is open. */ public async waitForOpen(): Promise { - if (this.socket.readyState === core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState === core.ReconnectingWebSocket.ReadyState.OPEN) { return this.socket; } diff --git a/seed/ts-sdk/websocket/no-serde/src/api/resources/realtime/client/Socket.ts b/seed/ts-sdk/websocket/no-serde/src/api/resources/realtime/client/Socket.ts index 97f450640765..03baf66e5892 100644 --- a/seed/ts-sdk/websocket/no-serde/src/api/resources/realtime/client/Socket.ts +++ b/seed/ts-sdk/websocket/no-serde/src/api/resources/realtime/client/Socket.ts @@ -51,7 +51,7 @@ export class RealtimeSocket { } /** The current state of the connection; this is one of the readyState constants. */ - get readyState(): number { + get readyState(): core.ReconnectingWebSocket.ReadyState { return this.socket.readyState; } @@ -110,7 +110,7 @@ export class RealtimeSocket { /** Returns a promise that resolves when the websocket is open. */ public async waitForOpen(): Promise { - if (this.socket.readyState === core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState === core.ReconnectingWebSocket.ReadyState.OPEN) { return this.socket; } @@ -131,7 +131,7 @@ export class RealtimeSocket { throw new Error("Socket is not connected."); } - if (this.socket.readyState !== core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState !== core.ReconnectingWebSocket.ReadyState.OPEN) { throw new Error("Socket is not open."); } } diff --git a/seed/ts-sdk/websocket/no-serde/src/core/websocket/ws.ts b/seed/ts-sdk/websocket/no-serde/src/core/websocket/ws.ts index 2a6f3bd5f4aa..95ad4991024d 100644 --- a/seed/ts-sdk/websocket/no-serde/src/core/websocket/ws.ts +++ b/seed/ts-sdk/websocket/no-serde/src/core/websocket/ws.ts @@ -178,11 +178,13 @@ export class ReconnectingWebSocket { /** * The current state of the connection; this is one of the Ready state constants */ - get readyState(): number { + get readyState(): ReconnectingWebSocket.ReadyState { if (this._ws) { - return this._ws.readyState; + return this._ws.readyState as ReconnectingWebSocket.ReadyState; } - return this._options.startClosed ? ReconnectingWebSocket.CLOSED : ReconnectingWebSocket.CONNECTING; + return this._options.startClosed + ? ReconnectingWebSocket.ReadyState.CLOSED + : ReconnectingWebSocket.ReadyState.CONNECTING; } /** @@ -550,3 +552,13 @@ export class ReconnectingWebSocket { clearTimeout(this._uptimeTimeout); } } + +export namespace ReconnectingWebSocket { + export const ReadyState = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3, + } as const; + export type ReadyState = (typeof ReadyState)[keyof typeof ReadyState]; +} diff --git a/seed/ts-sdk/websocket/serde/src/api/resources/empty/resources/emptyRealtime/client/Socket.ts b/seed/ts-sdk/websocket/serde/src/api/resources/empty/resources/emptyRealtime/client/Socket.ts index 0da611aeafe6..fa17a0a1ab3a 100644 --- a/seed/ts-sdk/websocket/serde/src/api/resources/empty/resources/emptyRealtime/client/Socket.ts +++ b/seed/ts-sdk/websocket/serde/src/api/resources/empty/resources/emptyRealtime/client/Socket.ts @@ -57,7 +57,7 @@ export class EmptyRealtimeSocket { } /** The current state of the connection; this is one of the readyState constants. */ - get readyState(): number { + get readyState(): core.ReconnectingWebSocket.ReadyState { return this.socket.readyState; } @@ -104,7 +104,7 @@ export class EmptyRealtimeSocket { /** Returns a promise that resolves when the websocket is open. */ public async waitForOpen(): Promise { - if (this.socket.readyState === core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState === core.ReconnectingWebSocket.ReadyState.OPEN) { return this.socket; } diff --git a/seed/ts-sdk/websocket/serde/src/api/resources/realtime/client/Socket.ts b/seed/ts-sdk/websocket/serde/src/api/resources/realtime/client/Socket.ts index fee8d257bbdb..26dc462ed30e 100644 --- a/seed/ts-sdk/websocket/serde/src/api/resources/realtime/client/Socket.ts +++ b/seed/ts-sdk/websocket/serde/src/api/resources/realtime/client/Socket.ts @@ -66,7 +66,7 @@ export class RealtimeSocket { } /** The current state of the connection; this is one of the readyState constants. */ - get readyState(): number { + get readyState(): core.ReconnectingWebSocket.ReadyState { return this.socket.readyState; } @@ -146,7 +146,7 @@ export class RealtimeSocket { /** Returns a promise that resolves when the websocket is open. */ public async waitForOpen(): Promise { - if (this.socket.readyState === core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState === core.ReconnectingWebSocket.ReadyState.OPEN) { return this.socket; } @@ -167,7 +167,7 @@ export class RealtimeSocket { throw new Error("Socket is not connected."); } - if (this.socket.readyState !== core.ReconnectingWebSocket.OPEN) { + if (this.socket.readyState !== core.ReconnectingWebSocket.ReadyState.OPEN) { throw new Error("Socket is not open."); } } diff --git a/seed/ts-sdk/websocket/serde/src/core/websocket/ws.ts b/seed/ts-sdk/websocket/serde/src/core/websocket/ws.ts index 2a6f3bd5f4aa..95ad4991024d 100644 --- a/seed/ts-sdk/websocket/serde/src/core/websocket/ws.ts +++ b/seed/ts-sdk/websocket/serde/src/core/websocket/ws.ts @@ -178,11 +178,13 @@ export class ReconnectingWebSocket { /** * The current state of the connection; this is one of the Ready state constants */ - get readyState(): number { + get readyState(): ReconnectingWebSocket.ReadyState { if (this._ws) { - return this._ws.readyState; + return this._ws.readyState as ReconnectingWebSocket.ReadyState; } - return this._options.startClosed ? ReconnectingWebSocket.CLOSED : ReconnectingWebSocket.CONNECTING; + return this._options.startClosed + ? ReconnectingWebSocket.ReadyState.CLOSED + : ReconnectingWebSocket.ReadyState.CONNECTING; } /** @@ -550,3 +552,13 @@ export class ReconnectingWebSocket { clearTimeout(this._uptimeTimeout); } } + +export namespace ReconnectingWebSocket { + export const ReadyState = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3, + } as const; + export type ReadyState = (typeof ReadyState)[keyof typeof ReadyState]; +} diff --git a/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto b/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto index 4f302a5b1c95..a19a2141a882 100644 --- a/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto +++ b/test-definitions/fern/apis/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package data.v1; import "google/protobuf/any.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; @@ -262,7 +263,13 @@ message DescribeResponse { uint32 total_count = 4; } +message CheckResponse { + google.protobuf.Timestamp created_at = 1; + google.protobuf.Timestamp updated_at = 2; +} + service DataService { + rpc Check(google.protobuf.Empty) returns (CheckResponse); rpc Upload(UploadRequest) returns (UploadResponse); rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Query(QueryRequest) returns (QueryResponse);