diff --git a/.eslintrc.js b/.eslintrc.js index 3aba8b6ca73..1b18e45c8d1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -67,12 +67,7 @@ module.exports = { ignoreRestSiblings: true } ], - "@typescript-eslint/no-namespace": [ - "error", - { - allowDeclarations: true - } - ], + "@typescript-eslint/no-namespace": "off", "@typescript-eslint/explicit-module-boundary-types": [ "error", { @@ -129,7 +124,7 @@ module.exports = { { files: ['**/*.test.ts', '**/*.spec.ts'], rules: { - 'no-console': 'off' + 'no-console': 'off' } } ] diff --git a/README.md b/README.md index a61a4d0d182..224a93bf1bf 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ Postman Collections, Server boilerplate, etc.). To add a generator run `fern add | `fernapi/fern-ruby-sdk` | ![Ruby Generator Version](https://img.shields.io/docker/v/fernapi/fern-ruby-sdk) | [cli.ts](./generators/ruby/sdk/src/cli.ts) | | `fernapi/fern-go-sdk` | ![Go Generator Version](https://img.shields.io/docker/v/fernapi/fern-go-sdk) | [main.go](./generators/go/cmd/fern-go-sdk/main.go) | | `fernapi/fern-csharp-sdk` | ![C# Generator Version](https://img.shields.io/docker/v/fernapi/fern-csharp-sdk) | [cli.ts](./generators/csharp/sdk/src/cli.ts) | +| `fernapi/fern-php-sdk` | ![PHP Generator Version](https://img.shields.io/docker/v/fernapi/fern-php-sdk) | [cli.ts](./generators/php/sdk/src/cli.ts) | ### Server-side Generators diff --git a/fern/docs.yml b/fern/docs.yml index 60f44f05e8b..a4f1d70a6c6 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -155,6 +155,10 @@ navigation: icon: fa-regular fa-file path: ./pages/api-definition/fern-definition/endpoints/multipart.mdx slug: multipart + - page: Bytes + path: ./pages/api-definition/fern-definition/endpoints/bytes.mdx + icon: fa-regular fa-server + slug: bytes - page: Server Sent Events icon: fa-regular fa-signal-stream path: ./pages/api-definition/fern-definition/endpoints/sse.mdx diff --git a/fern/pages/api-definition/fern-definition/endpoints/bytes.mdx b/fern/pages/api-definition/fern-definition/endpoints/bytes.mdx new file mode 100644 index 00000000000..20672d09424 --- /dev/null +++ b/fern/pages/api-definition/fern-definition/endpoints/bytes.mdx @@ -0,0 +1,55 @@ +--- +title: Binary Data and Files +subtitle: Use the `bytes` type to handle binary data in your API +--- + + + The `bytes` type allows you to handle binary data in both requests and responses. + + +## Sending bytes + +If your API needs to send a stream of bytes (i.e. typical for assets like audio, images and other files) then +you can use the `bytes` type in the Fern Definition to model this. + +```yml audio.yml +service: + base-path: /audio + endpoints: + upload: + display-name: Upload audio + method: POST + path: /upload + content-type: application/octet-stream + request: + type: bytes + docs: The bytes of the MP3 file that you would like to upload +``` + +## Receiving bytes + +On the other hand, if your API is returning a stream of bytes, then you can leverage the `bytes` type as a response. + +```yml textToSpeech.yml +service: + base-path: /tts + endpoints: + upload: + display-name: Upload audio + method: POST + path: "" + request: + name: TTSRequest + body: + properties: + text: + type: string + docs: The text that you want converted to speach. + response: + type: bytes + docs: The bytes of the audio file. +``` + + + + diff --git a/fern/pages/changelogs/cli/2024-12-05.mdx b/fern/pages/changelogs/cli/2024-12-05.mdx index 8dbf596d6c6..4aa53ac1300 100644 --- a/fern/pages/changelogs/cli/2024-12-05.mdx +++ b/fern/pages/changelogs/cli/2024-12-05.mdx @@ -1,4 +1,4 @@ ## 0.45.3 -**`(fix):`** Unknown schemas are no longer incorrectly marked as `additionalProperties: true`. +**`(fix):`** Unknown schemas are no longer incorrectly marked as `additionalProperties: true`. diff --git a/fern/pages/changelogs/cli/2024-12-10.mdx b/fern/pages/changelogs/cli/2024-12-10.mdx new file mode 100644 index 00000000000..dfceddb4453 --- /dev/null +++ b/fern/pages/changelogs/cli/2024-12-10.mdx @@ -0,0 +1,4 @@ +## 0.45.4-rc1 +**`(chore):`** Unknown schemas are no longer incorrectly marked as `additionalProperties: true`. + + diff --git a/fern/pages/changelogs/cli/2024-12-11.mdx b/fern/pages/changelogs/cli/2024-12-11.mdx new file mode 100644 index 00000000000..4f787adf6d9 --- /dev/null +++ b/fern/pages/changelogs/cli/2024-12-11.mdx @@ -0,0 +1,4 @@ +## 0.45.4 +**`(fix):`** Defaults are no longer set on datetimes when converting to docs shapes. + + diff --git a/fern/pages/changelogs/cli/2024-12-12.mdx b/fern/pages/changelogs/cli/2024-12-12.mdx new file mode 100644 index 00000000000..e84d5b08da9 --- /dev/null +++ b/fern/pages/changelogs/cli/2024-12-12.mdx @@ -0,0 +1,4 @@ +## 0.46.0 +**`(internal):`** No changes; promote `0.46.0-rc1` release candidate to minor version. + + diff --git a/fern/pages/changelogs/go-sdk/2024-12-12.mdx b/fern/pages/changelogs/go-sdk/2024-12-12.mdx new file mode 100644 index 00000000000..6476bfd794c --- /dev/null +++ b/fern/pages/changelogs/go-sdk/2024-12-12.mdx @@ -0,0 +1,4 @@ +## 0.34.0 +**`(feat):`** Add support for sending the `User-Agent` header on every request. Go packages are uniquely identified by their full module path, so the `User-Agent` header is generated in the `/` format, e.g. +``` User-Agent: github.com/acme/acme-go/1.0.0 ``` + diff --git a/fern/pages/changelogs/java-model/2024-12-10.mdx b/fern/pages/changelogs/java-model/2024-12-10.mdx new file mode 100644 index 00000000000..aec352b8f41 --- /dev/null +++ b/fern/pages/changelogs/java-model/2024-12-10.mdx @@ -0,0 +1,4 @@ +## 1.3.0 +**`(chore):`** Bump IR version to latest (v53) + + diff --git a/fern/pages/changelogs/java-sdk/2024-12-10.mdx b/fern/pages/changelogs/java-sdk/2024-12-10.mdx new file mode 100644 index 00000000000..7a36665e135 --- /dev/null +++ b/fern/pages/changelogs/java-sdk/2024-12-10.mdx @@ -0,0 +1,5 @@ +## 2.4.0 +**`(feat):`** We now support overriding sdk package prefixes by adding a "package-prefix" key under the java-sdk generator +configuration. + + diff --git a/fern/pages/changelogs/java-sdk/2024-12-11.mdx b/fern/pages/changelogs/java-sdk/2024-12-11.mdx new file mode 100644 index 00000000000..ef7a801845a --- /dev/null +++ b/fern/pages/changelogs/java-sdk/2024-12-11.mdx @@ -0,0 +1,4 @@ +## 2.7.0 +**`(feat):`** Apply Content-Type header from endpoint definition in SDK generator. + + diff --git a/fern/pages/changelogs/java-spring/2024-12-10.mdx b/fern/pages/changelogs/java-spring/2024-12-10.mdx new file mode 100644 index 00000000000..aec352b8f41 --- /dev/null +++ b/fern/pages/changelogs/java-spring/2024-12-10.mdx @@ -0,0 +1,4 @@ +## 1.3.0 +**`(chore):`** Bump IR version to latest (v53) + + diff --git a/fern/pages/docs/building-your-docs/custom-css-js.mdx b/fern/pages/docs/building-your-docs/custom-css-js.mdx index 926f8a33fb7..1a9e22a8b63 100644 --- a/fern/pages/docs/building-your-docs/custom-css-js.mdx +++ b/fern/pages/docs/building-your-docs/custom-css-js.mdx @@ -122,7 +122,7 @@ check out the [Global Configuration](/learn/docs/getting-started/global-configur Customize the behavior of your Docs site by injecting custom JavaScript globally. Add a `custom.js` file and include it in your `fern/` project: - + ```bash {5} fern/ ├─ openapi/ diff --git a/fern/pages/sdks/comparison/speakeasy.mdx b/fern/pages/sdks/comparison/speakeasy.mdx index 8b3d55b2e79..36e22954903 100644 --- a/fern/pages/sdks/comparison/speakeasy.mdx +++ b/fern/pages/sdks/comparison/speakeasy.mdx @@ -8,7 +8,7 @@ walk through the different capabilities of Fern and Speakeasy. ### 1. Fern is an all-in-one: SDKs + Docs -If you choose Speakeasy, you'll have to find a separate docs vendor such as ReadMe. With Fern, you'll be able to generate SDKs and +If you choose Speakeasy, you can integrate with third-party documentation providers or use its native Scalar integration. With Fern, you'll be able to generate SDKs and Docs with embedded code snippets. @@ -21,8 +21,8 @@ Fern's SDKs are battle-tested and have been downloaded millions of times. | Language | Fern | Speakeasy | | ---------- | ------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- | -| TypeScript | **93k** weekly downloads ([Cohere](https://www.npmjs.com/package/cohere-ai)) | **5k** weekly downloads ([Unstructured](https://www.npmjs.com/package/unstructured-client)) | -| Python | **5 million** lifetime downloads ([ElevenLabs](https://github.com/elevenlabs/elevenlabs-python)) | **194k** lifetime downloads ([Airbyte](https://github.com/airbytehq/airbyte-api-python-sdk)) | +| TypeScript | **120k** weekly downloads ([Cohere](https://www.npmjs.com/package/cohere-ai)) | **85k** weekly downloads ([Mistral AI](https://www.npmjs.com/package/@mistralai/mistralai)) | +| Python | **6 million** lifetime downloads ([ElevenLabs](https://pepy.tech/projects/ElevenLabs)) | **17 million** lifetime downloads ([Unstructured](https://pepy.tech/projects/unstructured-client)) | ### 3. Fern offers more Generally Available SDK languages. @@ -33,7 +33,11 @@ Fern's SDKs are battle-tested and have been downloaded millions of times. | Java | ✅ | ✅ | | Go | ✅ | ✅ | | C# | ✅ | ✅ | +| PHP | ✅ | ✅ | +| Terraform | ❌ | ✅ | | Ruby | ✅ | ❌ (Alpha) | +| Unity | ❌ | ❌ (Beta) | + ### 4. Speakeasy generates Terraform providers. @@ -49,7 +53,7 @@ is blocked if any failures are encountered. -On the other hand, Speakeasy produces no tests in their SDKs ([example](https://github.com/airbytehq/airbyte-api-python-sdk)). +On the other hand, Speakeasy supports contract testing, server mocking, and API sequence testing to streamline development workflows. ([example](https://www.speakeasy.com/docs/testing)). ### 6. Fern supports OAuth + DPoP. @@ -58,8 +62,8 @@ On the other hand, Speakeasy produces no tests in their SDKs ([example](https:// | `Bearer` | ✅ | ✅ | | `Basic` | ✅ | ✅ | | Custom Headers | ✅ | ✅ | -| `OAuth` Client Credentials | ✅ | 🏗️ Partial | -| `OAuth` Refresh | ✅ | 🏗️ Partial | +| `OAuth` Client Credentials | ✅ | ✅ | +| `OAuth` Refresh | ✅ | ✅ | | DPop (Proof of possession) | ✅ | ❌ | ### 7. Fern's file structure is resource based. @@ -91,6 +95,6 @@ behavior. | Feature | Fern | Speakeasy | | ---------------- | ---- | --------- | -| Auth Override | ✅ | ❌ | -| Timeout Override | ✅ | ❌ | -| Retry Override | ✅ | ❌ | +| Auth Override | ✅ | ✅ | +| Timeout Override | ✅ | ✅ | +| Retry Override | ✅ | ✅ | diff --git a/fern/pages/sdks/publish-sdk/publish-your-sdk.mdx b/fern/pages/sdks/publish-sdk/publish-your-sdk.mdx index 831a6878b18..73b78bf7b40 100644 --- a/fern/pages/sdks/publish-sdk/publish-your-sdk.mdx +++ b/fern/pages/sdks/publish-sdk/publish-your-sdk.mdx @@ -77,6 +77,8 @@ This guide will walk you through how to publish public-facing SDKs through Fern. ``` + Here are the [latest versions of each generator](https://github.com/fern-api/fern?tab=readme-ov-file#-generators). + ### Configure `output` location In order to setup publishing your SDK, you'll need to configure diff --git a/generators/browser-compatible-base/src/utils/getSdkVersion.ts b/generators/browser-compatible-base/src/utils/getSdkVersion.ts index 2bf95c59e84..fd2aff5f68f 100644 --- a/generators/browser-compatible-base/src/utils/getSdkVersion.ts +++ b/generators/browser-compatible-base/src/utils/getSdkVersion.ts @@ -10,32 +10,3 @@ export function getSdkVersion(config: FernGeneratorExec.GeneratorConfig): string } }); } - -export function getPackageName(config: FernGeneratorExec.GeneratorConfig): string | undefined { - return config.output.mode._visit({ - publish: (gpc: FernGeneratorExec.GeneratorPublishConfig) => - gpc.publishTarget?._visit({ - maven: (mrc: FernGeneratorExec.MavenRegistryConfigV2) => mrc.coordinate, - npm: (nrc: FernGeneratorExec.NpmRegistryConfigV2) => nrc.packageName, - pypi: (prc: FernGeneratorExec.PypiRegistryConfig) => prc.packageName, - rubygems: (rgrc: FernGeneratorExec.RubyGemsRegistryConfig) => rgrc.packageName, - nuget: (nrc: FernGeneratorExec.NugetRegistryConfig) => nrc.packageName, - postman: () => undefined, - _other: () => undefined - }), - downloadFiles: () => undefined, - github: (gom: FernGeneratorExec.GithubOutputMode) => - gom.publishInfo?._visit({ - maven: (mrc: FernGeneratorExec.MavenGithubPublishInfo) => mrc.coordinate, - npm: (nrc: FernGeneratorExec.NpmGithubPublishInfo) => nrc.packageName, - pypi: (prc: FernGeneratorExec.PypiGithubPublishInfo) => prc.packageName, - rubygems: (rgrc: FernGeneratorExec.RubyGemsGithubPublishInfo) => rgrc.packageName, - nuget: (nrc: FernGeneratorExec.NugetGithubPublishInfo) => nrc.packageName, - postman: () => undefined, - _other: () => undefined - }), - _other: () => { - throw new Error("Unrecognized output mode."); - } - }); -} diff --git a/generators/go-v2/ast/package.json b/generators/go-v2/ast/package.json index 7fe9468c01a..c3a0a660718 100644 --- a/generators/go-v2/ast/package.json +++ b/generators/go-v2/ast/package.json @@ -30,14 +30,14 @@ "@fern-api/browser-compatible-base-generator": "workspace:*", "@fern-api/core-utils": "workspace:*", "@fern-api/path-utils": "workspace:*", - "@fern-fern/ir-sdk": "^53.23.0", + "@fern-fern/ir-sdk": "^53.24.0", "zod": "^3.22.3" }, "devDependencies": { "@fern-api/browser-compatible-base-generator": "workspace:*", "@fern-api/core-utils": "workspace:*", "@fern-api/path-utils": "workspace:*", - "@fern-fern/ir-sdk": "^53.23.0", + "@fern-fern/ir-sdk": "^53.24.0", "@types/jest": "^29.5.12", "depcheck": "^1.4.6", "eslint": "^8.56.0", diff --git a/generators/go-v2/dynamic-snippets/build.cjs b/generators/go-v2/dynamic-snippets/build.cjs index 493a872afe9..3ecb9feb92c 100644 --- a/generators/go-v2/dynamic-snippets/build.cjs +++ b/generators/go-v2/dynamic-snippets/build.cjs @@ -1,30 +1,48 @@ +const { NodeModulesPolyfillPlugin } = require('@esbuild-plugins/node-modules-polyfill'); +const { NodeGlobalsPolyfillPlugin } = require('@esbuild-plugins/node-globals-polyfill'); const packageJson = require("./package.json"); const tsup = require('tsup'); -const { writeFile, rename } = require("fs/promises"); +const { writeFile, mkdir } = require("fs/promises"); const path = require("path"); main(); async function main() { - await tsup.build({ + const config = { entry: ['src/**/*.ts', '!src/__test__'], - format: ['cjs'], - clean: true, + target: "es2017", minify: true, dts: true, - outDir: 'dist', - target: "es2017", external: [ - // Test dependencies should not be included in the published package. '@fern-api/go-formatter', ], + esbuildPlugins: [ + NodeModulesPolyfillPlugin(), + NodeGlobalsPolyfillPlugin({ + process: true, + buffer: true, + util: true + }) + ], tsconfig: "./build.tsconfig.json" + }; + + await tsup.build({ + ...config, + format: ['cjs'], + outDir: 'dist/cjs', + clean: true, }); - process.chdir(path.join(__dirname, "dist")); + await tsup.build({ + ...config, + format: ['esm'], + outDir: 'dist/esm', + clean: false, + }); - // The module expects the imports defined in the index.d.ts file. - await rename("index.d.cts", "index.d.ts"); + await mkdir(path.join(__dirname, "dist"), { recursive: true }); + process.chdir(path.join(__dirname, "dist")); await writeFile( "package.json", @@ -33,9 +51,26 @@ async function main() { name: packageJson.name, version: process.argv[2] || packageJson.version, repository: packageJson.repository, - main: "index.cjs", - types: "index.d.ts", - files: ["index.cjs", "index.d.ts"] + type: "module", + exports: { + // Conditional exports for ESM and CJS. + "import": { + "types": "./esm/index.d.ts", + "default": "./esm/index.js" + }, + "require": { + "types": "./cjs/index.d.cts", + "default": "./cjs/index.cjs" + } + }, + // Fallback for older tooling or direct imports. + main: "./cjs/index.cjs", + module: "./esm/index.js", + types: "./cjs/index.d.cts", + files: [ + "cjs", + "esm" + ] }, undefined, 2 diff --git a/generators/go-v2/dynamic-snippets/package.json b/generators/go-v2/dynamic-snippets/package.json index b891c442153..7f51e512227 100644 --- a/generators/go-v2/dynamic-snippets/package.json +++ b/generators/go-v2/dynamic-snippets/package.json @@ -28,13 +28,15 @@ "dist": "pnpm compile && node build.cjs" }, "devDependencies": { + "@esbuild-plugins/node-globals-polyfill": "^0.2.3", + "@esbuild-plugins/node-modules-polyfill": "^0.2.2", "@fern-api/browser-compatible-base-generator": "workspace:*", "@fern-api/core-utils": "workspace:*", "@fern-api/fern-definition-schema": "workspace:*", "@fern-api/go-ast": "workspace:*", "@fern-api/go-formatter": "workspace:*", "@fern-api/path-utils": "workspace:*", - "@fern-fern/ir-sdk": "^53.23.0", + "@fern-fern/ir-sdk": "^53.24.0", "@types/jest": "^29.5.12", "depcheck": "^1.4.6", "eslint": "^8.56.0", diff --git a/generators/go-v2/dynamic-snippets/src/DynamicSnippetsGenerator.ts b/generators/go-v2/dynamic-snippets/src/DynamicSnippetsGenerator.ts index 896200bed0b..b34ecf85e79 100644 --- a/generators/go-v2/dynamic-snippets/src/DynamicSnippetsGenerator.ts +++ b/generators/go-v2/dynamic-snippets/src/DynamicSnippetsGenerator.ts @@ -3,17 +3,10 @@ import { AbstractFormatter, FernGeneratorExec } from "@fern-api/browser-compatible-base-generator"; -import { go } from "@fern-api/go-ast"; import { DynamicSnippetsGeneratorContext } from "./context/DynamicSnippetsGeneratorContext"; import { dynamic as DynamicSnippets } from "@fern-fern/ir-sdk/api"; -import { ErrorReporter, Severity } from "./context/ErrorReporter"; -import { Scope } from "./Scope"; -import { FilePropertyInfo } from "./context/FilePropertyMapper"; - -const SNIPPET_PACKAGE_NAME = "example"; -const SNIPPET_IMPORT_PATH = "fern"; -const SNIPPET_FUNC_NAME = "do"; -const CLIENT_VAR_NAME = "client"; +import { EndpointSnippetGenerator } from "./EndpointSnippetGenerator"; +import { Result } from "./Result"; export class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator< DynamicSnippets.DynamicIntermediateRepresentation, @@ -43,47 +36,29 @@ export class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator< if (endpoints.length === 0) { throw new Error(`No endpoints found that match "${request.endpoint.method} ${request.endpoint.path}"`); } - - let bestReporter: ErrorReporter | undefined; - let bestSnippet: string | undefined; - let err: Error | undefined; + const result = new Result(); for (const endpoint of endpoints) { - this.context.errors.reset(); + const context = this.context.clone(); + const snippetGenerator = new EndpointSnippetGenerator({ + context, + formatter: this.formatter + }); try { - const code = this.buildCodeBlock({ endpoint, snippet: request }); - const snippet = await code.toString({ - packageName: SNIPPET_PACKAGE_NAME, - importPath: SNIPPET_IMPORT_PATH, - rootImportPath: this.context.rootImportPath, - customConfig: this.context.customConfig ?? {}, - formatter: this.formatter - }); - if (this.context.errors.empty()) { + const snippet = await snippetGenerator.generateSnippet({ endpoint, request }); + if (context.errors.empty()) { return { snippet, errors: undefined }; } - if (bestReporter == null || bestReporter.size() > this.context.errors.size()) { - bestReporter = this.context.errors.clone(); - bestSnippet = snippet; - } + result.update({ context, snippet }); } catch (error) { - if (err == null) { - err = error as Error; + if (result.err == null) { + result.err = error as Error; } } } - if (bestSnippet != null && bestReporter != null) { - return { - snippet: bestSnippet, - errors: bestReporter.toDynamicSnippetErrors() - }; - } - throw ( - err ?? - new Error(`Failed to generate snippet for endpoint "${request.endpoint.method} ${request.endpoint.path}"`) - ); + return result.getResponseOrThrow({ endpoint: request.endpoint }); } public generateSync(request: DynamicSnippets.EndpointSnippetRequest): DynamicSnippets.EndpointSnippetResponse { @@ -91,585 +66,28 @@ export class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator< if (endpoints.length === 0) { throw new Error(`No endpoints found that match "${request.endpoint.method} ${request.endpoint.path}"`); } - - let bestReporter: ErrorReporter | undefined; - let bestSnippet: string | undefined; - let err: Error | undefined; + const result = new Result(); for (const endpoint of endpoints) { - this.context.errors.reset(); + const context = this.context.clone(); + const snippetGenerator = new EndpointSnippetGenerator({ + context, + formatter: this.formatter + }); try { - const code = this.buildCodeBlock({ endpoint, snippet: request }); - const snippet = code.toStringSync({ - packageName: SNIPPET_PACKAGE_NAME, - importPath: SNIPPET_IMPORT_PATH, - rootImportPath: this.context.rootImportPath, - customConfig: this.context.customConfig ?? {}, - formatter: this.formatter - }); - if (this.context.errors.empty()) { + const snippet = snippetGenerator.generateSnippetSync({ endpoint, request }); + if (context.errors.empty()) { return { snippet, errors: undefined }; } - if (bestReporter == null || bestReporter.size() > this.context.errors.size()) { - bestReporter = this.context.errors.clone(); - bestSnippet = snippet; - } + result.update({ context, snippet }); } catch (error) { - if (err == null) { - err = error as Error; + if (result.err == null) { + result.err = error as Error; } } } - if (bestSnippet != null && bestReporter != null) { - return { - snippet: bestSnippet, - errors: bestReporter.toDynamicSnippetErrors() - }; - } - throw ( - err ?? - new Error(`Failed to generate snippet for endpoint "${request.endpoint.method} ${request.endpoint.path}"`) - ); - } - - private buildCodeBlock({ - endpoint, - snippet - }: { - endpoint: DynamicSnippets.Endpoint; - snippet: DynamicSnippets.EndpointSnippetRequest; - }): go.AstNode { - return go.func({ - name: SNIPPET_FUNC_NAME, - parameters: [], - return_: [], - body: go.codeblock((writer) => { - writer.writeNode(this.constructClient({ endpoint, snippet })); - writer.writeLine(); - writer.writeNode(this.callMethod({ endpoint, snippet })); - }) - }); - } - - private constructClient({ - endpoint, - snippet - }: { - endpoint: DynamicSnippets.Endpoint; - snippet: DynamicSnippets.EndpointSnippetRequest; - }): go.CodeBlock { - return go.codeblock((writer) => { - writer.write(`${CLIENT_VAR_NAME} := `); - writer.writeNode(this.getRootClientFuncInvocation(this.getConstructorArgs({ endpoint, snippet }))); - }); - } - - private callMethod({ - endpoint, - snippet - }: { - endpoint: DynamicSnippets.Endpoint; - snippet: DynamicSnippets.EndpointSnippetRequest; - }): go.MethodInvocation { - return go.invokeMethod({ - on: go.codeblock(CLIENT_VAR_NAME), - method: this.getMethod({ endpoint }), - arguments_: [this.context.getContextTodoFunctionInvocation(), ...this.getMethodArgs({ endpoint, snippet })] - }); - } - - private getConstructorArgs({ - endpoint, - snippet - }: { - endpoint: DynamicSnippets.Endpoint; - snippet: DynamicSnippets.EndpointSnippetRequest; - }): go.AstNode[] { - const args: go.AstNode[] = []; - if (endpoint.auth != null) { - if (snippet.auth != null) { - args.push(this.getConstructorAuthArg({ auth: endpoint.auth, values: snippet.auth })); - } else { - this.context.errors.add({ - severity: Severity.Warning, - message: `Auth with ${endpoint.auth.type} configuration is required for this endpoint` - }); - } - } - this.context.errors.scope(Scope.Headers); - if (this.context.ir.headers != null && snippet.headers != null) { - args.push(...this.getConstructorHeaderArgs({ headers: this.context.ir.headers, values: snippet.headers })); - } - this.context.errors.unscope(); - return args; - } - - private getConstructorAuthArg({ - auth, - values - }: { - auth: DynamicSnippets.Auth; - values: DynamicSnippets.AuthValues; - }): go.AstNode { - switch (auth.type) { - case "basic": - if (values.type !== "basic") { - this.context.errors.add({ - severity: Severity.Critical, - message: this.newAuthMismatchError({ auth, values }).message - }); - return go.TypeInstantiation.nop(); - } - return this.getConstructorBasicAuthArg({ auth, values }); - case "bearer": - if (values.type !== "bearer") { - this.context.errors.add({ - severity: Severity.Critical, - message: this.newAuthMismatchError({ auth, values }).message - }); - return go.TypeInstantiation.nop(); - } - return this.getConstructorBearerAuthArg({ auth, values }); - case "header": - if (values.type !== "header") { - this.context.errors.add({ - severity: Severity.Critical, - message: this.newAuthMismatchError({ auth, values }).message - }); - return go.TypeInstantiation.nop(); - } - return this.getConstructorHeaderAuthArg({ auth, values }); - } - } - - private getConstructorBasicAuthArg({ - auth, - values - }: { - auth: DynamicSnippets.BasicAuth; - values: DynamicSnippets.BasicAuthValues; - }): go.AstNode { - return go.codeblock((writer) => { - writer.writeNode( - go.invokeFunc({ - func: go.typeReference({ - name: "WithBasicAuth", - importPath: this.context.getOptionImportPath() - }), - arguments_: [ - go.TypeInstantiation.string(values.username), - go.TypeInstantiation.string(values.password) - ] - }) - ); - }); - } - - private getConstructorBearerAuthArg({ - auth, - values - }: { - auth: DynamicSnippets.BearerAuth; - values: DynamicSnippets.BearerAuthValues; - }): go.AstNode { - return go.codeblock((writer) => { - writer.writeNode( - go.invokeFunc({ - func: go.typeReference({ - name: `With${auth.token.pascalCase.unsafeName}`, - importPath: this.context.getOptionImportPath() - }), - arguments_: [go.TypeInstantiation.string(values.token)] - }) - ); - }); - } - - private getConstructorHeaderAuthArg({ - auth, - values - }: { - auth: DynamicSnippets.HeaderAuth; - values: DynamicSnippets.HeaderAuthValues; - }): go.AstNode { - return go.codeblock((writer) => { - writer.writeNode( - go.invokeFunc({ - func: go.typeReference({ - name: `With${auth.header.name.name.pascalCase.unsafeName}`, - importPath: this.context.getOptionImportPath() - }), - arguments_: [ - this.context.dynamicTypeInstantiationMapper.convert({ - typeReference: auth.header.typeReference, - value: values.value - }) - ] - }) - ); - }); - } - - private getConstructorHeaderArgs({ - headers, - values - }: { - headers: DynamicSnippets.NamedParameter[]; - values: DynamicSnippets.Values; - }): go.AstNode[] { - const args: go.AstNode[] = []; - for (const header of headers) { - const arg = this.getConstructorHeaderArg({ header, value: values.value }); - if (arg != null) { - args.push(arg); - } - } - return args; - } - - private getConstructorHeaderArg({ - header, - value - }: { - header: DynamicSnippets.NamedParameter; - value: unknown; - }): go.AstNode | undefined { - const typeInstantiation = this.context.dynamicTypeInstantiationMapper.convert({ - typeReference: header.typeReference, - value - }); - if (go.TypeInstantiation.isNop(typeInstantiation)) { - // Literal header values (e.g. "X-API-Version") should not be included in the - // client constructor. - return undefined; - } - return go.codeblock((writer) => { - writer.writeNode( - go.invokeFunc({ - func: go.typeReference({ - name: `With${header.name.name.pascalCase.unsafeName}`, - importPath: this.context.getOptionImportPath() - }), - arguments_: [typeInstantiation] - }) - ); - }); - } - - private getMethodArgs({ - endpoint, - snippet - }: { - endpoint: DynamicSnippets.Endpoint; - snippet: DynamicSnippets.EndpointSnippetRequest; - }): go.AstNode[] { - switch (endpoint.request.type) { - case "inlined": - return this.getMethodArgsForInlinedRequest({ request: endpoint.request, snippet }); - case "body": - return this.getMethodArgsForBodyRequest({ request: endpoint.request, snippet }); - } - } - - private getMethodArgsForBodyRequest({ - request, - snippet - }: { - request: DynamicSnippets.BodyRequest; - snippet: DynamicSnippets.EndpointSnippetRequest; - }): go.TypeInstantiation[] { - const args: go.TypeInstantiation[] = []; - - this.context.errors.scope(Scope.PathParameters); - if (request.pathParameters != null) { - const pathParameterFields = this.getPathParameters({ namedParameters: request.pathParameters, snippet }); - args.push(...pathParameterFields.map((field) => field.value)); - } - this.context.errors.unscope(); - - this.context.errors.scope(Scope.RequestBody); - if (request.body != null) { - args.push(this.getBodyRequestArg({ body: request.body, value: snippet.requestBody })); - } - this.context.errors.unscope(); - - return args; - } - - private getBodyRequestArg({ - body, - value - }: { - body: DynamicSnippets.ReferencedRequestBodyType; - value: unknown; - }): go.TypeInstantiation { - switch (body.type) { - case "bytes": { - return this.getBytesBodyRequestArg({ value }); - } - case "typeReference": - return this.context.dynamicTypeInstantiationMapper.convert({ typeReference: body.value, value }); - } - } - - private getBytesBodyRequestArg({ value }: { value: unknown }): go.TypeInstantiation { - if (typeof value !== "string") { - this.context.errors.add({ - severity: Severity.Critical, - message: `Expected bytes value to be a string, got ${typeof value}` - }); - return go.TypeInstantiation.nop(); - } - return go.TypeInstantiation.bytes(value as string); - } - - private getMethodArgsForInlinedRequest({ - request, - snippet - }: { - request: DynamicSnippets.InlinedRequest; - snippet: DynamicSnippets.EndpointSnippetRequest; - }): go.TypeInstantiation[] { - const args: go.TypeInstantiation[] = []; - - this.context.errors.scope(Scope.PathParameters); - const pathParameterFields: go.StructField[] = []; - if (request.pathParameters != null) { - pathParameterFields.push(...this.getPathParameters({ namedParameters: request.pathParameters, snippet })); - } - this.context.errors.unscope(); - - this.context.errors.scope(Scope.RequestBody); - const filePropertyInfo = this.getFilePropertyInfo({ request, snippet }); - this.context.errors.unscope(); - - if (!this.context.includePathParametersInWrappedRequest({ request })) { - args.push(...pathParameterFields.map((field) => field.value)); - } - - if (!this.context.customConfig?.inlineFileProperties) { - args.push(...filePropertyInfo.fileFields.map((field) => field.value)); - } - - if (this.context.needsRequestParameter({ request })) { - args.push( - this.getInlinedRequestArg({ - request, - snippet, - pathParameterFields: this.context.includePathParametersInWrappedRequest({ request }) - ? pathParameterFields - : [], - filePropertyInfo - }) - ); - } - return args; - } - - private getFilePropertyInfo({ - request, - snippet - }: { - request: DynamicSnippets.InlinedRequest; - snippet: DynamicSnippets.EndpointSnippetRequest; - }): FilePropertyInfo { - if (request.body == null || !this.context.isFileUploadRequestBody(request.body)) { - return { - fileFields: [], - bodyPropertyFields: [] - }; - } - return this.context.filePropertyMapper.getFilePropertyInfo({ - body: request.body, - value: snippet.requestBody - }); - } - - private getInlinedRequestArg({ - request, - snippet, - pathParameterFields, - filePropertyInfo - }: { - request: DynamicSnippets.InlinedRequest; - snippet: DynamicSnippets.EndpointSnippetRequest; - pathParameterFields: go.StructField[]; - filePropertyInfo: FilePropertyInfo; - }): go.TypeInstantiation { - this.context.errors.scope(Scope.QueryParameters); - const queryParameters = this.context.associateQueryParametersByWireValue({ - parameters: request.queryParameters ?? [], - values: snippet.queryParameters ?? {} - }); - const queryParameterFields = queryParameters.map((queryParameter) => ({ - name: queryParameter.name.name.pascalCase.unsafeName, - value: this.context.dynamicTypeInstantiationMapper.convert(queryParameter) - })); - this.context.errors.unscope(); - - this.context.errors.scope(Scope.Headers); - const headers = this.context.associateByWireValue({ - parameters: request.headers ?? [], - values: snippet.headers ?? {} - }); - const headerFields = headers.map((header) => ({ - name: header.name.name.pascalCase.unsafeName, - value: this.context.dynamicTypeInstantiationMapper.convert(header) - })); - this.context.errors.unscope(); - - this.context.errors.scope(Scope.RequestBody); - const requestBodyFields = - request.body != null - ? this.getInlinedRequestBodyStructFields({ - body: request.body, - value: snippet.requestBody, - filePropertyInfo - }) - : []; - this.context.errors.unscope(); - - return go.TypeInstantiation.structPointer({ - typeReference: go.typeReference({ - name: this.context.getMethodName(request.declaration.name), - importPath: this.context.getImportPath(request.declaration.fernFilepath) - }), - fields: [...pathParameterFields, ...queryParameterFields, ...headerFields, ...requestBodyFields] - }); - } - - private getInlinedRequestBodyStructFields({ - body, - value, - filePropertyInfo - }: { - body: DynamicSnippets.InlinedRequestBody; - value: unknown; - filePropertyInfo: FilePropertyInfo; - }): go.StructField[] { - switch (body.type) { - case "properties": - return this.getInlinedRequestBodyPropertyStructFields({ parameters: body.value, value }); - case "referenced": - return [this.getReferencedRequestBodyPropertyStructField({ body, value })]; - case "fileUpload": - return this.getFileUploadRequestBodyStructFields({ filePropertyInfo }); - } - } - - private getFileUploadRequestBodyStructFields({ - filePropertyInfo - }: { - filePropertyInfo: FilePropertyInfo; - }): go.StructField[] { - if (this.context.customConfig?.inlineFileProperties) { - return [...filePropertyInfo.fileFields, ...filePropertyInfo.bodyPropertyFields]; - } - return filePropertyInfo.bodyPropertyFields; - } - - private getReferencedRequestBodyPropertyStructField({ - body, - value - }: { - body: DynamicSnippets.ReferencedRequestBody; - value: unknown; - }): go.StructField { - return { - name: this.context.getTypeName(body.bodyKey), - value: this.getReferencedRequestBodyPropertyTypeInstantiation({ body: body.bodyType, value }) - }; - } - - private getReferencedRequestBodyPropertyTypeInstantiation({ - body, - value - }: { - body: DynamicSnippets.ReferencedRequestBodyType; - value: unknown; - }): go.TypeInstantiation { - switch (body.type) { - case "bytes": - return this.getBytesBodyRequestArg({ value }); - case "typeReference": - return this.context.dynamicTypeInstantiationMapper.convert({ typeReference: body.value, value }); - } - } - - private getInlinedRequestBodyPropertyStructFields({ - parameters, - value - }: { - parameters: DynamicSnippets.NamedParameter[]; - value: unknown; - }): go.StructField[] { - const fields: go.StructField[] = []; - - const bodyProperties = this.context.associateByWireValue({ - parameters, - values: this.context.getRecord(value) ?? {} - }); - for (const parameter of bodyProperties) { - fields.push({ - name: this.context.getTypeName(parameter.name.name), - value: this.context.dynamicTypeInstantiationMapper.convert(parameter) - }); - } - - return fields; - } - - private getPathParameters({ - namedParameters, - snippet - }: { - namedParameters: DynamicSnippets.NamedParameter[]; - snippet: DynamicSnippets.EndpointSnippetRequest; - }): go.StructField[] { - const args: go.StructField[] = []; - - const pathParameters = this.context.associateByWireValue({ - parameters: namedParameters, - values: snippet.pathParameters ?? {} - }); - for (const parameter of pathParameters) { - args.push({ - name: this.context.getTypeName(parameter.name.name), - value: this.context.dynamicTypeInstantiationMapper.convert(parameter) - }); - } - - return args; - } - - private getMethod({ endpoint }: { endpoint: DynamicSnippets.Endpoint }): string { - if (endpoint.declaration.fernFilepath.allParts.length > 0) { - return `${endpoint.declaration.fernFilepath.allParts - .map((val) => this.context.getMethodName(val)) - .join(".")}.${this.context.getMethodName(endpoint.declaration.name)}`; - } - return this.context.getMethodName(endpoint.declaration.name); - } - - private getRootClientFuncInvocation(arguments_: go.AstNode[]): go.FuncInvocation { - return go.invokeFunc({ - func: go.typeReference({ - name: "NewClient", - importPath: this.context.getClientImportPath() - }), - arguments_ - }); - } - - private newAuthMismatchError({ - auth, - values - }: { - auth: DynamicSnippets.Auth; - values: DynamicSnippets.AuthValues; - }): Error { - return new Error(`Expected auth type ${auth.type}, got ${values.type}`); + return result.getResponseOrThrow({ endpoint: request.endpoint }); } } diff --git a/generators/go-v2/dynamic-snippets/src/EndpointSnippetGenerator.ts b/generators/go-v2/dynamic-snippets/src/EndpointSnippetGenerator.ts new file mode 100644 index 00000000000..f14e918b465 --- /dev/null +++ b/generators/go-v2/dynamic-snippets/src/EndpointSnippetGenerator.ts @@ -0,0 +1,666 @@ +import { AbstractFormatter } from "@fern-api/browser-compatible-base-generator"; +import { go } from "@fern-api/go-ast"; +import { DynamicSnippetsGeneratorContext } from "./context/DynamicSnippetsGeneratorContext"; +import { dynamic as DynamicSnippets } from "@fern-fern/ir-sdk/api"; +import { Severity } from "./context/ErrorReporter"; +import { Scope } from "./Scope"; +import { FilePropertyInfo } from "./context/FilePropertyMapper"; + +const SNIPPET_PACKAGE_NAME = "example"; +const SNIPPET_IMPORT_PATH = "fern"; +const SNIPPET_FUNC_NAME = "do"; +const CLIENT_VAR_NAME = "client"; + +export class EndpointSnippetGenerator { + private context: DynamicSnippetsGeneratorContext; + private formatter: AbstractFormatter | undefined; + + constructor({ context, formatter }: { context: DynamicSnippetsGeneratorContext; formatter?: AbstractFormatter }) { + this.context = context; + this.formatter = formatter; + } + + public async generateSnippet({ + endpoint, + request + }: { + endpoint: DynamicSnippets.Endpoint; + request: DynamicSnippets.EndpointSnippetRequest; + }): Promise { + const code = this.buildCodeBlock({ endpoint, snippet: request }); + return await code.toString({ + packageName: SNIPPET_PACKAGE_NAME, + importPath: SNIPPET_IMPORT_PATH, + rootImportPath: this.context.rootImportPath, + customConfig: this.context.customConfig ?? {}, + formatter: this.formatter + }); + } + + public generateSnippetSync({ + endpoint, + request + }: { + endpoint: DynamicSnippets.Endpoint; + request: DynamicSnippets.EndpointSnippetRequest; + }): string { + const code = this.buildCodeBlock({ endpoint, snippet: request }); + return code.toStringSync({ + packageName: SNIPPET_PACKAGE_NAME, + importPath: SNIPPET_IMPORT_PATH, + rootImportPath: this.context.rootImportPath, + customConfig: this.context.customConfig ?? {}, + formatter: this.formatter + }); + } + + private buildCodeBlock({ + endpoint, + snippet + }: { + endpoint: DynamicSnippets.Endpoint; + snippet: DynamicSnippets.EndpointSnippetRequest; + }): go.AstNode { + return go.func({ + name: SNIPPET_FUNC_NAME, + parameters: [], + return_: [], + body: go.codeblock((writer) => { + writer.writeNode(this.constructClient({ endpoint, snippet })); + writer.writeLine(); + writer.writeNode(this.callMethod({ endpoint, snippet })); + }) + }); + } + + private constructClient({ + endpoint, + snippet + }: { + endpoint: DynamicSnippets.Endpoint; + snippet: DynamicSnippets.EndpointSnippetRequest; + }): go.CodeBlock { + return go.codeblock((writer) => { + writer.write(`${CLIENT_VAR_NAME} := `); + writer.writeNode(this.getRootClientFuncInvocation(this.getConstructorArgs({ endpoint, snippet }))); + }); + } + + private callMethod({ + endpoint, + snippet + }: { + endpoint: DynamicSnippets.Endpoint; + snippet: DynamicSnippets.EndpointSnippetRequest; + }): go.MethodInvocation { + return go.invokeMethod({ + on: go.codeblock(CLIENT_VAR_NAME), + method: this.getMethod({ endpoint }), + arguments_: [this.context.getContextTodoFunctionInvocation(), ...this.getMethodArgs({ endpoint, snippet })] + }); + } + + private getConstructorArgs({ + endpoint, + snippet + }: { + endpoint: DynamicSnippets.Endpoint; + snippet: DynamicSnippets.EndpointSnippetRequest; + }): go.AstNode[] { + const args: go.AstNode[] = []; + const baseUrlArg = this.getConstructorBaseUrlArg({ + baseUrl: snippet.baseUrl, + environment: snippet.environment + }); + if (baseUrlArg != null) { + args.push(baseUrlArg); + } + if (endpoint.auth != null) { + if (snippet.auth != null) { + args.push(this.getConstructorAuthArg({ auth: endpoint.auth, values: snippet.auth })); + } else { + this.context.errors.add({ + severity: Severity.Warning, + message: `Auth with ${endpoint.auth.type} configuration is required for this endpoint` + }); + } + } + this.context.errors.scope(Scope.Headers); + if (this.context.ir.headers != null && snippet.headers != null) { + args.push(...this.getConstructorHeaderArgs({ headers: this.context.ir.headers, values: snippet.headers })); + } + this.context.errors.unscope(); + return args; + } + + private getConstructorAuthArg({ + auth, + values + }: { + auth: DynamicSnippets.Auth; + values: DynamicSnippets.AuthValues; + }): go.AstNode { + switch (auth.type) { + case "basic": + if (values.type !== "basic") { + this.context.errors.add({ + severity: Severity.Critical, + message: this.newAuthMismatchError({ auth, values }).message + }); + return go.TypeInstantiation.nop(); + } + return this.getConstructorBasicAuthArg({ auth, values }); + case "bearer": + if (values.type !== "bearer") { + this.context.errors.add({ + severity: Severity.Critical, + message: this.newAuthMismatchError({ auth, values }).message + }); + return go.TypeInstantiation.nop(); + } + return this.getConstructorBearerAuthArg({ auth, values }); + case "header": + if (values.type !== "header") { + this.context.errors.add({ + severity: Severity.Critical, + message: this.newAuthMismatchError({ auth, values }).message + }); + return go.TypeInstantiation.nop(); + } + return this.getConstructorHeaderAuthArg({ auth, values }); + } + } + + private getConstructorBasicAuthArg({ + auth, + values + }: { + auth: DynamicSnippets.BasicAuth; + values: DynamicSnippets.BasicAuthValues; + }): go.AstNode { + return go.codeblock((writer) => { + writer.writeNode( + go.invokeFunc({ + func: go.typeReference({ + name: "WithBasicAuth", + importPath: this.context.getOptionImportPath() + }), + arguments_: [ + go.TypeInstantiation.string(values.username), + go.TypeInstantiation.string(values.password) + ] + }) + ); + }); + } + + private getConstructorBaseUrlArg({ + baseUrl, + environment + }: { + baseUrl: string | undefined; + environment: DynamicSnippets.EnvironmentValues | undefined; + }): go.AstNode | undefined { + const baseUrlArg = this.getBaseUrlArg({ baseUrl, environment }); + if (baseUrlArg == null) { + return undefined; + } + return go.codeblock((writer) => { + writer.writeNode( + go.invokeFunc({ + func: go.typeReference({ + name: "WithBaseURL", + importPath: this.context.getOptionImportPath() + }), + arguments_: [baseUrlArg] + }) + ); + }); + } + + private getBaseUrlArg({ + baseUrl, + environment + }: { + baseUrl: string | undefined; + environment: DynamicSnippets.EnvironmentValues | undefined; + }): go.AstNode | undefined { + if (baseUrl != null && environment != null) { + this.context.errors.add({ + severity: Severity.Critical, + message: "Cannot specify both baseUrl and environment options" + }); + return undefined; + } + if (baseUrl != null) { + return go.TypeInstantiation.string(baseUrl); + } + if (environment != null) { + if (this.context.isSingleEnvironmentID(environment)) { + const typeReference = this.context.getEnvironmentTypeReferenceFromID(environment); + if (typeReference == null) { + this.context.errors.add({ + severity: Severity.Warning, + message: `Environment "${environment}" was not found` + }); + return undefined; + } + return go.TypeInstantiation.reference(typeReference); + } + if (this.context.isMultiEnvironmentValues(environment)) { + this.context.errors.add({ + severity: Severity.Warning, + message: + "The Go SDK doesn't support a multi-environment client option yet; use the baseUrl option instead" + }); + } + } + return undefined; + } + + private getConstructorBearerAuthArg({ + auth, + values + }: { + auth: DynamicSnippets.BearerAuth; + values: DynamicSnippets.BearerAuthValues; + }): go.AstNode { + return go.codeblock((writer) => { + writer.writeNode( + go.invokeFunc({ + func: go.typeReference({ + name: `With${auth.token.pascalCase.unsafeName}`, + importPath: this.context.getOptionImportPath() + }), + arguments_: [go.TypeInstantiation.string(values.token)] + }) + ); + }); + } + + private getConstructorHeaderAuthArg({ + auth, + values + }: { + auth: DynamicSnippets.HeaderAuth; + values: DynamicSnippets.HeaderAuthValues; + }): go.AstNode { + return go.codeblock((writer) => { + writer.writeNode( + go.invokeFunc({ + func: go.typeReference({ + name: `With${auth.header.name.name.pascalCase.unsafeName}`, + importPath: this.context.getOptionImportPath() + }), + arguments_: [ + this.context.dynamicTypeInstantiationMapper.convert({ + typeReference: auth.header.typeReference, + value: values.value + }) + ] + }) + ); + }); + } + + private getConstructorHeaderArgs({ + headers, + values + }: { + headers: DynamicSnippets.NamedParameter[]; + values: DynamicSnippets.Values; + }): go.AstNode[] { + const args: go.AstNode[] = []; + for (const header of headers) { + const arg = this.getConstructorHeaderArg({ header, value: values.value }); + if (arg != null) { + args.push(arg); + } + } + return args; + } + + private getConstructorHeaderArg({ + header, + value + }: { + header: DynamicSnippets.NamedParameter; + value: unknown; + }): go.AstNode | undefined { + const typeInstantiation = this.context.dynamicTypeInstantiationMapper.convert({ + typeReference: header.typeReference, + value + }); + if (go.TypeInstantiation.isNop(typeInstantiation)) { + // Literal header values (e.g. "X-API-Version") should not be included in the + // client constructor. + return undefined; + } + return go.codeblock((writer) => { + writer.writeNode( + go.invokeFunc({ + func: go.typeReference({ + name: `With${header.name.name.pascalCase.unsafeName}`, + importPath: this.context.getOptionImportPath() + }), + arguments_: [typeInstantiation] + }) + ); + }); + } + + private getMethodArgs({ + endpoint, + snippet + }: { + endpoint: DynamicSnippets.Endpoint; + snippet: DynamicSnippets.EndpointSnippetRequest; + }): go.AstNode[] { + switch (endpoint.request.type) { + case "inlined": + return this.getMethodArgsForInlinedRequest({ request: endpoint.request, snippet }); + case "body": + return this.getMethodArgsForBodyRequest({ request: endpoint.request, snippet }); + } + } + + private getMethodArgsForBodyRequest({ + request, + snippet + }: { + request: DynamicSnippets.BodyRequest; + snippet: DynamicSnippets.EndpointSnippetRequest; + }): go.TypeInstantiation[] { + const args: go.TypeInstantiation[] = []; + + this.context.errors.scope(Scope.PathParameters); + if (request.pathParameters != null) { + const pathParameterFields = this.getPathParameters({ namedParameters: request.pathParameters, snippet }); + args.push(...pathParameterFields.map((field) => field.value)); + } + this.context.errors.unscope(); + + this.context.errors.scope(Scope.RequestBody); + if (request.body != null) { + args.push(this.getBodyRequestArg({ body: request.body, value: snippet.requestBody })); + } + this.context.errors.unscope(); + + return args; + } + + private getBodyRequestArg({ + body, + value + }: { + body: DynamicSnippets.ReferencedRequestBodyType; + value: unknown; + }): go.TypeInstantiation { + switch (body.type) { + case "bytes": { + return this.getBytesBodyRequestArg({ value }); + } + case "typeReference": + return this.context.dynamicTypeInstantiationMapper.convert({ typeReference: body.value, value }); + } + } + + private getBytesBodyRequestArg({ value }: { value: unknown }): go.TypeInstantiation { + if (typeof value !== "string") { + this.context.errors.add({ + severity: Severity.Critical, + message: `Expected bytes value to be a string, got ${typeof value}` + }); + return go.TypeInstantiation.nop(); + } + return go.TypeInstantiation.bytes(value as string); + } + + private getMethodArgsForInlinedRequest({ + request, + snippet + }: { + request: DynamicSnippets.InlinedRequest; + snippet: DynamicSnippets.EndpointSnippetRequest; + }): go.TypeInstantiation[] { + const args: go.TypeInstantiation[] = []; + + this.context.errors.scope(Scope.PathParameters); + const pathParameterFields: go.StructField[] = []; + if (request.pathParameters != null) { + pathParameterFields.push(...this.getPathParameters({ namedParameters: request.pathParameters, snippet })); + } + this.context.errors.unscope(); + + this.context.errors.scope(Scope.RequestBody); + const filePropertyInfo = this.getFilePropertyInfo({ request, snippet }); + this.context.errors.unscope(); + + if (!this.context.includePathParametersInWrappedRequest({ request })) { + args.push(...pathParameterFields.map((field) => field.value)); + } + + if (!this.context.customConfig?.inlineFileProperties) { + args.push(...filePropertyInfo.fileFields.map((field) => field.value)); + } + + if (this.context.needsRequestParameter({ request })) { + args.push( + this.getInlinedRequestArg({ + request, + snippet, + pathParameterFields: this.context.includePathParametersInWrappedRequest({ request }) + ? pathParameterFields + : [], + filePropertyInfo + }) + ); + } + return args; + } + + private getFilePropertyInfo({ + request, + snippet + }: { + request: DynamicSnippets.InlinedRequest; + snippet: DynamicSnippets.EndpointSnippetRequest; + }): FilePropertyInfo { + if (request.body == null || !this.context.isFileUploadRequestBody(request.body)) { + return { + fileFields: [], + bodyPropertyFields: [] + }; + } + return this.context.filePropertyMapper.getFilePropertyInfo({ + body: request.body, + value: snippet.requestBody + }); + } + + private getInlinedRequestArg({ + request, + snippet, + pathParameterFields, + filePropertyInfo + }: { + request: DynamicSnippets.InlinedRequest; + snippet: DynamicSnippets.EndpointSnippetRequest; + pathParameterFields: go.StructField[]; + filePropertyInfo: FilePropertyInfo; + }): go.TypeInstantiation { + this.context.errors.scope(Scope.QueryParameters); + const queryParameters = this.context.associateQueryParametersByWireValue({ + parameters: request.queryParameters ?? [], + values: snippet.queryParameters ?? {} + }); + const queryParameterFields = queryParameters.map((queryParameter) => ({ + name: queryParameter.name.name.pascalCase.unsafeName, + value: this.context.dynamicTypeInstantiationMapper.convert(queryParameter) + })); + this.context.errors.unscope(); + + this.context.errors.scope(Scope.Headers); + const headers = this.context.associateByWireValue({ + parameters: request.headers ?? [], + values: snippet.headers ?? {} + }); + const headerFields = headers.map((header) => ({ + name: header.name.name.pascalCase.unsafeName, + value: this.context.dynamicTypeInstantiationMapper.convert(header) + })); + this.context.errors.unscope(); + + this.context.errors.scope(Scope.RequestBody); + const requestBodyFields = + request.body != null + ? this.getInlinedRequestBodyStructFields({ + body: request.body, + value: snippet.requestBody, + filePropertyInfo + }) + : []; + this.context.errors.unscope(); + + return go.TypeInstantiation.structPointer({ + typeReference: go.typeReference({ + name: this.context.getMethodName(request.declaration.name), + importPath: this.context.getImportPath(request.declaration.fernFilepath) + }), + fields: [...pathParameterFields, ...queryParameterFields, ...headerFields, ...requestBodyFields] + }); + } + + private getInlinedRequestBodyStructFields({ + body, + value, + filePropertyInfo + }: { + body: DynamicSnippets.InlinedRequestBody; + value: unknown; + filePropertyInfo: FilePropertyInfo; + }): go.StructField[] { + switch (body.type) { + case "properties": + return this.getInlinedRequestBodyPropertyStructFields({ parameters: body.value, value }); + case "referenced": + return [this.getReferencedRequestBodyPropertyStructField({ body, value })]; + case "fileUpload": + return this.getFileUploadRequestBodyStructFields({ filePropertyInfo }); + } + } + + private getFileUploadRequestBodyStructFields({ + filePropertyInfo + }: { + filePropertyInfo: FilePropertyInfo; + }): go.StructField[] { + if (this.context.customConfig?.inlineFileProperties) { + return [...filePropertyInfo.fileFields, ...filePropertyInfo.bodyPropertyFields]; + } + return filePropertyInfo.bodyPropertyFields; + } + + private getReferencedRequestBodyPropertyStructField({ + body, + value + }: { + body: DynamicSnippets.ReferencedRequestBody; + value: unknown; + }): go.StructField { + return { + name: this.context.getTypeName(body.bodyKey), + value: this.getReferencedRequestBodyPropertyTypeInstantiation({ body: body.bodyType, value }) + }; + } + + private getReferencedRequestBodyPropertyTypeInstantiation({ + body, + value + }: { + body: DynamicSnippets.ReferencedRequestBodyType; + value: unknown; + }): go.TypeInstantiation { + switch (body.type) { + case "bytes": + return this.getBytesBodyRequestArg({ value }); + case "typeReference": + return this.context.dynamicTypeInstantiationMapper.convert({ typeReference: body.value, value }); + } + } + + private getInlinedRequestBodyPropertyStructFields({ + parameters, + value + }: { + parameters: DynamicSnippets.NamedParameter[]; + value: unknown; + }): go.StructField[] { + const fields: go.StructField[] = []; + + const bodyProperties = this.context.associateByWireValue({ + parameters, + values: this.context.getRecord(value) ?? {} + }); + for (const parameter of bodyProperties) { + fields.push({ + name: this.context.getTypeName(parameter.name.name), + value: this.context.dynamicTypeInstantiationMapper.convert(parameter) + }); + } + + return fields; + } + + private getPathParameters({ + namedParameters, + snippet + }: { + namedParameters: DynamicSnippets.NamedParameter[]; + snippet: DynamicSnippets.EndpointSnippetRequest; + }): go.StructField[] { + const args: go.StructField[] = []; + + const pathParameters = this.context.associateByWireValue({ + parameters: namedParameters, + values: snippet.pathParameters ?? {} + }); + for (const parameter of pathParameters) { + args.push({ + name: this.context.getTypeName(parameter.name.name), + value: this.context.dynamicTypeInstantiationMapper.convert(parameter) + }); + } + + return args; + } + + private getMethod({ endpoint }: { endpoint: DynamicSnippets.Endpoint }): string { + if (endpoint.declaration.fernFilepath.allParts.length > 0) { + return `${endpoint.declaration.fernFilepath.allParts + .map((val) => this.context.getMethodName(val)) + .join(".")}.${this.context.getMethodName(endpoint.declaration.name)}`; + } + return this.context.getMethodName(endpoint.declaration.name); + } + + private getRootClientFuncInvocation(arguments_: go.AstNode[]): go.FuncInvocation { + return go.invokeFunc({ + func: go.typeReference({ + name: this.context.getClientConstructorName(), + importPath: this.context.getClientImportPath() + }), + arguments_ + }); + } + + private newAuthMismatchError({ + auth, + values + }: { + auth: DynamicSnippets.Auth; + values: DynamicSnippets.AuthValues; + }): Error { + return new Error(`Expected auth type ${auth.type}, got ${values.type}`); + } +} diff --git a/generators/go-v2/dynamic-snippets/src/Result.ts b/generators/go-v2/dynamic-snippets/src/Result.ts new file mode 100644 index 00000000000..4389132b31a --- /dev/null +++ b/generators/go-v2/dynamic-snippets/src/Result.ts @@ -0,0 +1,32 @@ +import { DynamicSnippetsGeneratorContext } from "./context/DynamicSnippetsGeneratorContext"; +import { ErrorReporter } from "./context/ErrorReporter"; +import { dynamic } from "@fern-fern/ir-sdk/api"; + +export class Result { + public reporter: ErrorReporter | undefined; + public snippet: string | undefined; + public err: Error | undefined; + + constructor() { + this.snippet = undefined; + this.reporter = undefined; + this.err = undefined; + } + + public update({ context, snippet }: { context: DynamicSnippetsGeneratorContext; snippet: string }): void { + if (this.reporter == null || this.reporter.size() > context.errors.size()) { + this.reporter = context.errors.clone(); + this.snippet = snippet; + } + } + + public getResponseOrThrow({ endpoint }: { endpoint: dynamic.EndpointLocation }): dynamic.EndpointSnippetResponse { + if (this.snippet != null && this.reporter != null) { + return { + snippet: this.snippet, + errors: this.reporter.toDynamicSnippetErrors() + }; + } + throw this.err ?? new Error(`Failed to generate snippet for endpoint "${endpoint.method} ${endpoint.path}"`); + } +} diff --git a/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/imdb.test.ts.snap b/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/imdb.test.ts.snap index 75f048bade0..eadbd3fb122 100644 --- a/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/imdb.test.ts.snap +++ b/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/imdb.test.ts.snap @@ -119,3 +119,52 @@ func do() () { } " `; + +exports[`imdb (sync) > GET /movies/{movieId} w/ baseURL 1`] = ` +"package example + +import ( + client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" + context "context" +) + +func do() () { + client := client.NewClient( + option.WithBaseURL( + "http://localhost:8080", + ), + option.WithToken( + "", + ), + ) + client.Imdb.GetMovie( + context.TODO(), + "movie_xyz", + ) +} +" +`; + +exports[`imdb (sync) > GET /movies/{movieId} w/ exportedClientName 1`] = ` +"package example + +import ( + client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" + context "context" +) + +func do() () { + client := client.NewFernClient( + option.WithToken( + "", + ), + ) + client.Imdb.GetMovie( + context.TODO(), + "movie_xyz", + ) +} +" +`; diff --git a/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/single-url-environment-default.test.ts.snap b/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/single-url-environment-default.test.ts.snap new file mode 100644 index 00000000000..76d4f3794ab --- /dev/null +++ b/generators/go-v2/dynamic-snippets/src/__test__/__snapshots__/single-url-environment-default.test.ts.snap @@ -0,0 +1,98 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`single-url-environment-default > custom baseURL 1`] = ` +"package example + +import ( + context "context" + client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" +) + +func do() { + client := client.NewClient( + option.WithBaseURL( + "http://localhost:8080", + ), + option.WithToken( + "", + ), + ) + client.Dummy.GetDummy( + context.TODO(), + ) +} +" +`; + +exports[`single-url-environment-default > invalid baseURL and environment 1`] = ` +[ + { + "message": "Cannot specify both baseUrl and environment options", + "path": [], + "severity": "CRITICAL", + }, +] +`; + +exports[`single-url-environment-default > invalid environment 1`] = ` +[ + { + "message": "Environment "Unrecognized" was not found", + "path": [], + "severity": "WARNING", + }, +] +`; + +exports[`single-url-environment-default > production environment 1`] = ` +"package example + +import ( + context "context" + acme "github.com/acme/acme-go" + client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" +) + +func do() { + client := client.NewClient( + option.WithBaseURL( + acme.Environments.Production, + ), + option.WithToken( + "", + ), + ) + client.Dummy.GetDummy( + context.TODO(), + ) +} +" +`; + +exports[`single-url-environment-default > staging environment 1`] = ` +"package example + +import ( + context "context" + acme "github.com/acme/acme-go" + client "github.com/acme/acme-go/client" + option "github.com/acme/acme-go/option" +) + +func do() { + client := client.NewClient( + option.WithBaseURL( + acme.Environments.Staging, + ), + option.WithToken( + "", + ), + ) + client.Dummy.GetDummy( + context.TODO(), + ) +} +" +`; diff --git a/generators/go-v2/dynamic-snippets/src/__test__/examples.test.ts b/generators/go-v2/dynamic-snippets/src/__test__/examples.test.ts index 1d418078939..623116f0a6f 100644 --- a/generators/go-v2/dynamic-snippets/src/__test__/examples.test.ts +++ b/generators/go-v2/dynamic-snippets/src/__test__/examples.test.ts @@ -14,6 +14,8 @@ describe("examples", () => { method: "GET", path: "/metadata" }, + baseUrl: undefined, + environment: undefined, auth: AuthValues.bearer({ token: "" }), @@ -35,6 +37,8 @@ describe("examples", () => { method: "GET", path: "/metadata" }, + baseUrl: undefined, + environment: undefined, auth: AuthValues.bearer({ token: "" }), @@ -56,6 +60,8 @@ describe("examples", () => { method: "POST", path: "/movie" }, + baseUrl: undefined, + environment: undefined, auth: AuthValues.bearer({ token: "" }), @@ -89,6 +95,8 @@ describe("examples", () => { method: "POST", path: "/big-entity" }, + baseUrl: undefined, + environment: undefined, auth: AuthValues.bearer({ token: "" }), @@ -128,6 +136,8 @@ describe("examples (errors)", () => { auth: AuthValues.bearer({ token: "" }), + baseUrl: undefined, + environment: undefined, pathParameters: undefined, queryParameters: undefined, headers: undefined, diff --git a/generators/go-v2/dynamic-snippets/src/__test__/exhaustive.test.ts b/generators/go-v2/dynamic-snippets/src/__test__/exhaustive.test.ts index c1df36b203e..96e68f6d9e2 100644 --- a/generators/go-v2/dynamic-snippets/src/__test__/exhaustive.test.ts +++ b/generators/go-v2/dynamic-snippets/src/__test__/exhaustive.test.ts @@ -14,6 +14,8 @@ describe("exhaustive", () => { method: "POST", path: "/container/list-of-primitives" }, + baseUrl: undefined, + environment: undefined, auth: dynamic.AuthValues.bearer({ token: "" }), @@ -30,6 +32,8 @@ describe("exhaustive", () => { method: "POST", path: "/container/list-of-objects" }, + baseUrl: undefined, + environment: undefined, auth: dynamic.AuthValues.bearer({ token: "" }), @@ -71,6 +75,8 @@ describe("exhaustive (errors)", () => { method: "POST", path: "/container/list-of-objects" }, + baseUrl: undefined, + environment: undefined, auth: dynamic.AuthValues.bearer({ token: "" }), diff --git a/generators/go-v2/dynamic-snippets/src/__test__/file-upload.test.ts b/generators/go-v2/dynamic-snippets/src/__test__/file-upload.test.ts index 33881fc1c78..2f9a16ec52d 100644 --- a/generators/go-v2/dynamic-snippets/src/__test__/file-upload.test.ts +++ b/generators/go-v2/dynamic-snippets/src/__test__/file-upload.test.ts @@ -13,6 +13,8 @@ describe("file-upload (success)", () => { method: "POST", path: "/" }, + baseUrl: undefined, + environment: undefined, auth: undefined, pathParameters: undefined, queryParameters: undefined, @@ -30,6 +32,8 @@ describe("file-upload (success)", () => { method: "POST", path: "/just-file" }, + baseUrl: undefined, + environment: undefined, auth: undefined, pathParameters: undefined, queryParameters: undefined, @@ -46,6 +50,8 @@ describe("file-upload (success)", () => { method: "POST", path: "/just-file-with-query-params" }, + baseUrl: undefined, + environment: undefined, auth: undefined, pathParameters: undefined, queryParameters: { diff --git a/generators/go-v2/dynamic-snippets/src/__test__/imdb.test.ts b/generators/go-v2/dynamic-snippets/src/__test__/imdb.test.ts index 9eb29c90934..cc9037d52e2 100644 --- a/generators/go-v2/dynamic-snippets/src/__test__/imdb.test.ts +++ b/generators/go-v2/dynamic-snippets/src/__test__/imdb.test.ts @@ -14,6 +14,8 @@ describe("imdb (success)", () => { method: "GET", path: "/movies/{movieId}" }, + baseUrl: undefined, + environment: undefined, auth: dynamic.AuthValues.bearer({ token: "" }), @@ -32,6 +34,8 @@ describe("imdb (success)", () => { method: "POST", path: "/movies/create-movie" }, + baseUrl: undefined, + environment: undefined, auth: dynamic.AuthValues.bearer({ token: "" }), @@ -66,6 +70,62 @@ describe("imdb (sync)", () => { method: "GET", path: "/movies/{movieId}" }, + baseUrl: undefined, + environment: undefined, + auth: dynamic.AuthValues.bearer({ + token: "" + }), + pathParameters: { + movieId: "movie_xyz" + }, + queryParameters: undefined, + headers: undefined, + requestBody: undefined + }); + expect(response.snippet).toMatchSnapshot(); + }); + + it("GET /movies/{movieId} w/ baseURL", () => { + const generator = buildDynamicSnippetsGenerator({ + irFilepath: AbsoluteFilePath.of(`${DYNAMIC_IR_TEST_DEFINITIONS_DIRECTORY}/imdb.json`), + config: buildGeneratorConfig() + }); + const response = generator.generateSync({ + endpoint: { + method: "GET", + path: "/movies/{movieId}" + }, + baseUrl: "http://localhost:8080", + environment: undefined, + auth: dynamic.AuthValues.bearer({ + token: "" + }), + pathParameters: { + movieId: "movie_xyz" + }, + queryParameters: undefined, + headers: undefined, + requestBody: undefined + }); + expect(response.snippet).toMatchSnapshot(); + }); + + it("GET /movies/{movieId} w/ exportedClientName", () => { + const generator = buildDynamicSnippetsGenerator({ + irFilepath: AbsoluteFilePath.of(`${DYNAMIC_IR_TEST_DEFINITIONS_DIRECTORY}/imdb.json`), + config: buildGeneratorConfig({ + customConfig: { + exportedClientName: "FernClient" + } + }) + }); + const response = generator.generateSync({ + endpoint: { + method: "GET", + path: "/movies/{movieId}" + }, + baseUrl: undefined, + environment: undefined, auth: dynamic.AuthValues.bearer({ token: "" }), @@ -91,6 +151,8 @@ describe("imdb (errors)", () => { method: "GET", path: "/movies/{movieId}" }, + baseUrl: undefined, + environment: undefined, auth: dynamic.AuthValues.bearer({ token: "" }), @@ -114,6 +176,8 @@ describe("imdb (errors)", () => { method: "POST", path: "/movies/create-movie" }, + baseUrl: undefined, + environment: undefined, auth: dynamic.AuthValues.bearer({ token: "" }), @@ -138,6 +202,8 @@ describe("imdb (errors)", () => { method: "POST", path: "/movies/create-movie" }, + baseUrl: undefined, + environment: undefined, auth: dynamic.AuthValues.bearer({ token: "" }), diff --git a/generators/go-v2/dynamic-snippets/src/__test__/single-url-environment-default.test.ts b/generators/go-v2/dynamic-snippets/src/__test__/single-url-environment-default.test.ts new file mode 100644 index 00000000000..45c17d77fa4 --- /dev/null +++ b/generators/go-v2/dynamic-snippets/src/__test__/single-url-environment-default.test.ts @@ -0,0 +1,133 @@ +import { buildDynamicSnippetsGenerator } from "./utils/buildDynamicSnippetsGenerator"; +import { DYNAMIC_IR_TEST_DEFINITIONS_DIRECTORY } from "./utils/constant"; +import { buildGeneratorConfig } from "./utils/buildGeneratorConfig"; +import { AuthValues } from "@fern-fern/ir-sdk/api/resources/dynamic"; +import { AbsoluteFilePath } from "@fern-api/path-utils"; +import { TestCase } from "./utils/TestCase"; + +describe("single-url-environment-default", () => { + it("production environment", async () => { + const generator = buildDynamicSnippetsGenerator({ + irFilepath: AbsoluteFilePath.of( + `${DYNAMIC_IR_TEST_DEFINITIONS_DIRECTORY}/single-url-environment-default.json` + ), + config: buildGeneratorConfig() + }); + const response = await generator.generate({ + endpoint: { + method: "GET", + path: "/dummy" + }, + auth: AuthValues.bearer({ + token: "" + }), + baseUrl: undefined, + environment: "Production", + pathParameters: undefined, + queryParameters: undefined, + headers: undefined, + requestBody: undefined + }); + expect(response.snippet).toMatchSnapshot(); + }); + + it("staging environment", async () => { + const generator = buildDynamicSnippetsGenerator({ + irFilepath: AbsoluteFilePath.of( + `${DYNAMIC_IR_TEST_DEFINITIONS_DIRECTORY}/single-url-environment-default.json` + ), + config: buildGeneratorConfig() + }); + const response = await generator.generate({ + endpoint: { + method: "GET", + path: "/dummy" + }, + auth: AuthValues.bearer({ + token: "" + }), + baseUrl: undefined, + environment: "Staging", + pathParameters: undefined, + queryParameters: undefined, + headers: undefined, + requestBody: undefined + }); + expect(response.snippet).toMatchSnapshot(); + }); + + it("custom baseURL", async () => { + const generator = buildDynamicSnippetsGenerator({ + irFilepath: AbsoluteFilePath.of( + `${DYNAMIC_IR_TEST_DEFINITIONS_DIRECTORY}/single-url-environment-default.json` + ), + config: buildGeneratorConfig() + }); + const response = await generator.generate({ + endpoint: { + method: "GET", + path: "/dummy" + }, + auth: AuthValues.bearer({ + token: "" + }), + baseUrl: "http://localhost:8080", + environment: undefined, + pathParameters: undefined, + queryParameters: undefined, + headers: undefined, + requestBody: undefined + }); + expect(response.snippet).toMatchSnapshot(); + }); + + it("invalid environment", async () => { + const generator = buildDynamicSnippetsGenerator({ + irFilepath: AbsoluteFilePath.of( + `${DYNAMIC_IR_TEST_DEFINITIONS_DIRECTORY}/single-url-environment-default.json` + ), + config: buildGeneratorConfig() + }); + const response = await generator.generate({ + endpoint: { + method: "GET", + path: "/dummy" + }, + auth: AuthValues.bearer({ + token: "" + }), + baseUrl: undefined, + environment: "Unrecognized", + pathParameters: undefined, + queryParameters: undefined, + headers: undefined, + requestBody: undefined + }); + expect(response.errors).toMatchSnapshot(); + }); + + it("invalid baseURL and environment", async () => { + const generator = buildDynamicSnippetsGenerator({ + irFilepath: AbsoluteFilePath.of( + `${DYNAMIC_IR_TEST_DEFINITIONS_DIRECTORY}/single-url-environment-default.json` + ), + config: buildGeneratorConfig() + }); + const response = await generator.generate({ + endpoint: { + method: "GET", + path: "/dummy" + }, + auth: AuthValues.bearer({ + token: "" + }), + baseUrl: "http://localhost:8080", + environment: "Production", + pathParameters: undefined, + queryParameters: undefined, + headers: undefined, + requestBody: undefined + }); + expect(response.errors).toMatchSnapshot(); + }); +}); diff --git a/generators/go-v2/dynamic-snippets/src/context/DynamicSnippetsGeneratorContext.ts b/generators/go-v2/dynamic-snippets/src/context/DynamicSnippetsGeneratorContext.ts index 2fdb3c9b2a7..813d80d9391 100644 --- a/generators/go-v2/dynamic-snippets/src/context/DynamicSnippetsGeneratorContext.ts +++ b/generators/go-v2/dynamic-snippets/src/context/DynamicSnippetsGeneratorContext.ts @@ -4,7 +4,7 @@ import { FernGeneratorExec } from "@fern-api/browser-compatible-base-generator"; import { BaseGoCustomConfigSchema, resolveRootImportPath } from "@fern-api/go-ast"; -import { FernFilepath, dynamic, TypeId, Name } from "@fern-fern/ir-sdk/api"; +import { FernFilepath, dynamic, TypeId, Name, EnvironmentId } from "@fern-fern/ir-sdk/api"; import { HttpEndpointReferenceParser } from "@fern-api/fern-definition-schema"; import { TypeInstance } from "../TypeInstance"; import { DiscriminatedUnionTypeInstance } from "../DiscriminatedUnionTypeInstance"; @@ -41,6 +41,13 @@ export class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGene this.httpEndpointReferenceParser = new HttpEndpointReferenceParser(); } + public clone(): DynamicSnippetsGeneratorContext { + return new DynamicSnippetsGeneratorContext({ + ir: this.ir, + config: this.config + }); + } + public associateQueryParametersByWireValue({ parameters, values @@ -319,6 +326,13 @@ export class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGene }); } + public getClientConstructorName(): string { + if (this.customConfig?.exportedClientName != null) { + return `New${this.customConfig.exportedClientName}`; + } + return "NewClient"; + } + public getClientImportPath(): string { return `${this.rootImportPath}/client`; } @@ -355,10 +369,52 @@ export class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGene }); } + public getEnvironmentTypeReferenceFromID(environmentID: string): go.TypeReference | undefined { + if (this.ir.environments == null) { + return undefined; + } + const environments = this.ir.environments.environments; + switch (environments.type) { + case "singleBaseUrl": { + const environment = environments.environments.find((env) => env.id === environmentID); + if (environment == null) { + return undefined; + } + return this.getEnvironmentTypeReference(environment.name); + } + case "multipleBaseUrls": { + const environment = environments.environments.find((env) => env.id === environmentID); + if (environment == null) { + return undefined; + } + return this.getEnvironmentTypeReference(environment.name); + } + default: + assertNever(environments); + } + } + + public isSingleEnvironmentID(environment: dynamic.EnvironmentValues): environment is EnvironmentId { + return typeof environment === "string"; + } + + public isMultiEnvironmentValues( + environment: dynamic.EnvironmentValues + ): environment is dynamic.MultipleEnvironmentUrlValues { + return typeof environment === "object"; + } + public newParameterNotRecognizedError(parameterName: string): Error { return new Error(`"${parameterName}" is not a recognized parameter for this endpoint`); } + private getEnvironmentTypeReference(name: Name): go.TypeReference { + return go.typeReference({ + name: `Environments.${this.getTypeName(name)}`, + importPath: this.rootImportPath + }); + } + private isListTypeReference(typeReference: dynamic.TypeReference): boolean { if (typeReference.type === "optional") { return this.isListTypeReference(typeReference.value); diff --git a/generators/go/internal/generator/sdk.go b/generators/go/internal/generator/sdk.go index df87652c474..6922d35ebfa 100644 --- a/generators/go/internal/generator/sdk.go +++ b/generators/go/internal/generator/sdk.go @@ -496,6 +496,9 @@ func (f *fileWriter) writePlatformHeaders( f.P(fmt.Sprintf("headers.Set(%q, %q)", sdkConfig.PlatformHeaders.Language, goLanguageHeader)) f.P(fmt.Sprintf("headers.Set(%q, %q)", sdkConfig.PlatformHeaders.SdkName, moduleConfig.Path)) f.P(fmt.Sprintf("headers.Set(%q, %q)", sdkConfig.PlatformHeaders.SdkVersion, sdkVersion)) + if sdkConfig.PlatformHeaders.UserAgent != nil { + f.P(fmt.Sprintf("headers.Set(%q, %q)", sdkConfig.PlatformHeaders.UserAgent.Header(), sdkConfig.PlatformHeaders.UserAgent.Value)) + } f.P("return headers") f.P("}") } diff --git a/generators/go/sdk/versions.yml b/generators/go/sdk/versions.yml index 380e182455f..9ce98490dc0 100644 --- a/generators/go/sdk/versions.yml +++ b/generators/go/sdk/versions.yml @@ -1,3 +1,15 @@ +- version: 0.34.0 + changelogEntry: + - type: feat + summary: >- + Add support for sending the `User-Agent` header on every request. Go packages + are uniquely identified by their full module path, so the `User-Agent` header + is generated in the `/` format, e.g. + + ``` + User-Agent: github.com/acme/acme-go/1.0.0 + ``` + irVersion: 53 - version: 0.33.0 changelogEntry: - type: feat diff --git a/generators/java/generator-utils/build.gradle b/generators/java/generator-utils/build.gradle index 98da2c47168..938525d026d 100644 --- a/generators/java/generator-utils/build.gradle +++ b/generators/java/generator-utils/build.gradle @@ -1,6 +1,6 @@ dependencies { api 'com.squareup:javapoet' - api 'com.fern.fern:irV46' + api 'com.fern.fern:irV53' api 'com.fern.fern:generator-exec-client' api 'com.fasterxml.jackson.core:jackson-annotations' api 'com.fasterxml.jackson.core:jackson-databind' diff --git a/generators/java/generator-utils/src/main/java/com/fern/java/ICustomConfig.java b/generators/java/generator-utils/src/main/java/com/fern/java/ICustomConfig.java index 724d305faaa..c1021bbecd9 100644 --- a/generators/java/generator-utils/src/main/java/com/fern/java/ICustomConfig.java +++ b/generators/java/generator-utils/src/main/java/com/fern/java/ICustomConfig.java @@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Optional; import org.immutables.value.Value; public interface ICustomConfig { @@ -58,6 +59,9 @@ default Boolean disableRequiredPropertyBuilderChecks() { return false; } + @JsonProperty("package-prefix") + Optional packagePrefix(); + enum JsonInclude { NON_EMPTY("non-empty"), NON_ABSENT("non-absent"); diff --git a/generators/java/generator-utils/src/main/java/com/fern/java/PoetTypeNameMapper.java b/generators/java/generator-utils/src/main/java/com/fern/java/PoetTypeNameMapper.java index a32ee87e543..610a77f14e9 100644 --- a/generators/java/generator-utils/src/main/java/com/fern/java/PoetTypeNameMapper.java +++ b/generators/java/generator-utils/src/main/java/com/fern/java/PoetTypeNameMapper.java @@ -2,17 +2,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fern.ir.model.commons.TypeId; -import com.fern.ir.model.types.AliasTypeDeclaration; -import com.fern.ir.model.types.ContainerType; -import com.fern.ir.model.types.DeclaredTypeName; -import com.fern.ir.model.types.Literal; -import com.fern.ir.model.types.MapType; -import com.fern.ir.model.types.PrimitiveType; -import com.fern.ir.model.types.PrimitiveTypeV1; -import com.fern.ir.model.types.ResolvedNamedType; -import com.fern.ir.model.types.ResolvedTypeReference; -import com.fern.ir.model.types.TypeDeclaration; -import com.fern.ir.model.types.TypeReference; +import com.fern.ir.model.types.*; import com.squareup.javapoet.ArrayTypeName; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.ParameterizedTypeName; @@ -57,9 +47,9 @@ private TypeReferenceToTypeNameConverter(boolean primitiveAllowed) { } @Override - public TypeName visitNamed(DeclaredTypeName declaredTypeName) { + public TypeName visitNamed(NamedType named) { if (!customConfig.wrappedAliases()) { - TypeDeclaration typeDeclaration = typeDefinitionsByName.get(declaredTypeName.getTypeId()); + TypeDeclaration typeDeclaration = typeDefinitionsByName.get(named.getTypeId()); boolean isAlias = typeDeclaration.getShape().isAlias(); if (isAlias) { AliasTypeDeclaration aliasTypeDeclaration = @@ -67,7 +57,11 @@ public TypeName visitNamed(DeclaredTypeName declaredTypeName) { return aliasTypeDeclaration.getResolvedType().visit(this); } } - return poetClassNameFactory.getTypeClassName(declaredTypeName); + return poetClassNameFactory.getTypeClassName(DeclaredTypeName.builder() + .typeId(named.getTypeId()) + .fernFilepath(named.getFernFilepath()) + .name(named.getName()) + .build()); } @Override @@ -139,6 +133,30 @@ public TypeName visitLong() { return ClassName.get(Long.class); } + @Override + public TypeName visitUint() { + if (primitiveAllowed) { + return TypeName.LONG; + } + return ClassName.get(Long.class); + } + + @Override + public TypeName visitUint64() { + if (primitiveAllowed) { + return TypeName.LONG; + } + return ClassName.get(Long.class); + } + + @Override + public TypeName visitFloat() { + if (primitiveAllowed) { + return TypeName.FLOAT; + } + return ClassName.get(Float.class); + } + @Override public TypeName visitDateTime() { return ClassName.get(OffsetDateTime.class); diff --git a/generators/java/generator-utils/src/main/java/com/fern/java/generators/AliasGenerator.java b/generators/java/generator-utils/src/main/java/com/fern/java/generators/AliasGenerator.java index 9d18b794957..404fe93ea42 100644 --- a/generators/java/generator-utils/src/main/java/com/fern/java/generators/AliasGenerator.java +++ b/generators/java/generator-utils/src/main/java/com/fern/java/generators/AliasGenerator.java @@ -213,6 +213,21 @@ public CodeBlock visitLong() { return CodeBlock.of("return $T.$L($L)", Long.class, "toString", VALUE_FIELD_NAME); } + @Override + public CodeBlock visitUint() { + return CodeBlock.of("return $T.$L($L)", Long.class, "toString", VALUE_FIELD_NAME); + } + + @Override + public CodeBlock visitUint64() { + return CodeBlock.of("return $T.$L($L)", Long.class, "toString", VALUE_FIELD_NAME); + } + + @Override + public CodeBlock visitFloat() { + return CodeBlock.of("return $T.$L($L)", Float.class, "toString", VALUE_FIELD_NAME); + } + @Override public CodeBlock visitDateTime() { return CodeBlock.of("return $L.$L()", VALUE_FIELD_NAME, "toString"); @@ -273,6 +288,21 @@ public CodeBlock visitLong() { return CodeBlock.of("return $L.hashCode()", VALUE_FIELD_NAME); } + @Override + public CodeBlock visitUint() { + return CodeBlock.of("return $L.hashCode()", VALUE_FIELD_NAME); + } + + @Override + public CodeBlock visitUint64() { + return CodeBlock.of("return $L.hashCode()", VALUE_FIELD_NAME); + } + + @Override + public CodeBlock visitFloat() { + return CodeBlock.of("return $T.hashCode($L)", Float.class, VALUE_FIELD_NAME); + } + @Override public CodeBlock visitDateTime() { return CodeBlock.of("return $L.hashCode()", VALUE_FIELD_NAME); diff --git a/generators/java/generator-utils/src/main/java/com/fern/java/generators/UnionGenerator.java b/generators/java/generator-utils/src/main/java/com/fern/java/generators/UnionGenerator.java index 871c661cfee..9d1b7a78c44 100644 --- a/generators/java/generator-utils/src/main/java/com/fern/java/generators/UnionGenerator.java +++ b/generators/java/generator-utils/src/main/java/com/fern/java/generators/UnionGenerator.java @@ -5,12 +5,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.fern.ir.model.commons.NameAndWireValue; import com.fern.ir.model.constants.Constants; -import com.fern.ir.model.types.DeclaredTypeName; -import com.fern.ir.model.types.SingleUnionType; -import com.fern.ir.model.types.SingleUnionTypeProperties; -import com.fern.ir.model.types.SingleUnionTypeProperty; -import com.fern.ir.model.types.TypeReference; -import com.fern.ir.model.types.UnionTypeDeclaration; +import com.fern.ir.model.types.*; import com.fern.java.AbstractGeneratorContext; import com.fern.java.FernJavaAnnotations; import com.fern.java.generators.union.UnionSubType; @@ -192,7 +187,13 @@ public Void visitSamePropertiesAsObject(DeclaredTypeName samePropertiesAsObject) generatorContext .getPoetTypeNameMapper() .convertToTypeName( - true, TypeReference.named(samePropertiesAsObject)), + true, + TypeReference.named(NamedType.builder() + .typeId(samePropertiesAsObject.getTypeId()) + .fernFilepath( + samePropertiesAsObject.getFernFilepath()) + .name(samePropertiesAsObject.getName()) + .build())), "value") .build()) .addStatement("this.$L = $L", "value", "value") @@ -275,7 +276,13 @@ public Optional visitSamePropertiesAsObject(DeclaredTypeName sameProp return Optional.of(FieldSpec.builder( generatorContext .getPoetTypeNameMapper() - .convertToTypeName(true, TypeReference.named(samePropertiesAsObject)), + .convertToTypeName( + true, + TypeReference.named(NamedType.builder() + .typeId(samePropertiesAsObject.getTypeId()) + .fernFilepath(samePropertiesAsObject.getFernFilepath()) + .name(samePropertiesAsObject.getName()) + .build())), "value", Modifier.PRIVATE) .addAnnotation(JsonUnwrapped.class) diff --git a/generators/java/generator-utils/src/main/java/com/fern/java/utils/TypeReferenceUtils.java b/generators/java/generator-utils/src/main/java/com/fern/java/utils/TypeReferenceUtils.java index f46380e20d4..cc41a1bd261 100644 --- a/generators/java/generator-utils/src/main/java/com/fern/java/utils/TypeReferenceUtils.java +++ b/generators/java/generator-utils/src/main/java/com/fern/java/utils/TypeReferenceUtils.java @@ -1,12 +1,6 @@ package com.fern.java.utils; -import com.fern.ir.model.types.ContainerType; -import com.fern.ir.model.types.DeclaredTypeName; -import com.fern.ir.model.types.Literal; -import com.fern.ir.model.types.MapType; -import com.fern.ir.model.types.PrimitiveType; -import com.fern.ir.model.types.PrimitiveTypeV1; -import com.fern.ir.model.types.TypeReference; +import com.fern.ir.model.types.*; import java.util.Optional; public class TypeReferenceUtils { @@ -56,7 +50,7 @@ public String visitContainer(ContainerType container) { } @Override - public String visitNamed(DeclaredTypeName named) { + public String visitNamed(NamedType named) { return named.getName().getPascalCase().getUnsafeName(); } @@ -171,6 +165,21 @@ public String visitLong() { return "Long"; } + @Override + public String visitUint() { + return "Long"; + } + + @Override + public String visitUint64() { + return "Long"; + } + + @Override + public String visitFloat() { + return "Float"; + } + @Override public String visitDateTime() { return "DateTime"; diff --git a/generators/java/model/versions.yml b/generators/java/model/versions.yml index 13a83d04c69..2e1780d9e87 100644 --- a/generators/java/model/versions.yml +++ b/generators/java/model/versions.yml @@ -1,3 +1,10 @@ +- changelogEntry: + - summary: | + Bump IR version to latest (v53) + type: chore + createdAt: '2024-12-10' + irVersion: 53 + version: 1.3.0 - changelogEntry: - summary: | Bump Jackson version to latest (2.17.2) diff --git a/generators/java/sdk/src/main/java/com/fern/java/client/Cli.java b/generators/java/sdk/src/main/java/com/fern/java/client/Cli.java index 0fb72f3aee2..a7c250fbdb3 100644 --- a/generators/java/sdk/src/main/java/com/fern/java/client/Cli.java +++ b/generators/java/sdk/src/main/java/com/fern/java/client/Cli.java @@ -119,8 +119,12 @@ public void runInGithubModeHook( IntermediateRepresentation ir, JavaSdkCustomConfig customConfig, GithubOutputMode githubOutputMode) { - ClientPoetClassNameFactory clientPoetClassNameFactory = new ClientPoetClassNameFactory( - AbstractPoetClassNameFactory.getPackagePrefixWithOrgAndApiName(ir, generatorConfig.getOrganization())); + List packagePrefixTokens = customConfig + .packagePrefix() + .map(List::of) + .orElseGet(() -> AbstractPoetClassNameFactory.getPackagePrefixWithOrgAndApiName( + ir, generatorConfig.getOrganization())); + ClientPoetClassNameFactory clientPoetClassNameFactory = new ClientPoetClassNameFactory(packagePrefixTokens); List resolvedAuthSchemes = new FeatureResolver(ir, generatorConfig, generatorExecClient).getResolvedAuthSchemes(); ClientGeneratorContext context = new ClientGeneratorContext( @@ -152,8 +156,12 @@ public void runInPublishModeHook( IntermediateRepresentation ir, JavaSdkCustomConfig customConfig, GeneratorPublishConfig publishOutputMode) { - ClientPoetClassNameFactory clientPoetClassNameFactory = new ClientPoetClassNameFactory( - AbstractPoetClassNameFactory.getPackagePrefixWithOrgAndApiName(ir, generatorConfig.getOrganization())); + List packagePrefixTokens = customConfig + .packagePrefix() + .map(List::of) + .orElseGet(() -> AbstractPoetClassNameFactory.getPackagePrefixWithOrgAndApiName( + ir, generatorConfig.getOrganization())); + ClientPoetClassNameFactory clientPoetClassNameFactory = new ClientPoetClassNameFactory(packagePrefixTokens); List resolvedAuthSchemes = new FeatureResolver(ir, generatorConfig, generatorExecClient).getResolvedAuthSchemes(); ClientGeneratorContext context = new ClientGeneratorContext( diff --git a/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/AbstractEndpointWriter.java b/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/AbstractEndpointWriter.java index 4448df9d75c..3ff1e9b5ce3 100644 --- a/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/AbstractEndpointWriter.java +++ b/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/AbstractEndpointWriter.java @@ -23,44 +23,9 @@ import com.fern.ir.model.commons.TypeId; import com.fern.ir.model.environment.EnvironmentBaseUrlId; import com.fern.ir.model.errors.ErrorDeclaration; -import com.fern.ir.model.http.BytesRequest; -import com.fern.ir.model.http.CursorPagination; -import com.fern.ir.model.http.FileDownloadResponse; -import com.fern.ir.model.http.FileProperty; -import com.fern.ir.model.http.FileUploadRequest; -import com.fern.ir.model.http.FileUploadRequestProperty; -import com.fern.ir.model.http.HttpEndpoint; -import com.fern.ir.model.http.HttpRequestBody; -import com.fern.ir.model.http.HttpRequestBodyReference; -import com.fern.ir.model.http.HttpResponseBody; -import com.fern.ir.model.http.HttpService; -import com.fern.ir.model.http.InlinedRequestBody; -import com.fern.ir.model.http.InlinedRequestBodyProperty; -import com.fern.ir.model.http.JsonResponse; -import com.fern.ir.model.http.JsonResponseBody; -import com.fern.ir.model.http.JsonResponseBodyWithProperty; -import com.fern.ir.model.http.JsonStreamChunk; -import com.fern.ir.model.http.OffsetPagination; +import com.fern.ir.model.http.*; import com.fern.ir.model.http.Pagination.Visitor; -import com.fern.ir.model.http.PathParameter; -import com.fern.ir.model.http.SdkRequest; -import com.fern.ir.model.http.SdkRequestBodyType; -import com.fern.ir.model.http.SdkRequestShape; -import com.fern.ir.model.http.SdkRequestWrapper; -import com.fern.ir.model.http.SseStreamChunk; -import com.fern.ir.model.http.StreamingResponse; -import com.fern.ir.model.http.TextResponse; -import com.fern.ir.model.http.TextStreamChunk; -import com.fern.ir.model.types.AliasTypeDeclaration; -import com.fern.ir.model.types.DeclaredTypeName; -import com.fern.ir.model.types.EnumTypeDeclaration; -import com.fern.ir.model.types.ObjectProperty; -import com.fern.ir.model.types.ObjectTypeDeclaration; -import com.fern.ir.model.types.PrimitiveType; -import com.fern.ir.model.types.Type; -import com.fern.ir.model.types.TypeDeclaration; -import com.fern.ir.model.types.UndiscriminatedUnionTypeDeclaration; -import com.fern.ir.model.types.UnionTypeDeclaration; +import com.fern.ir.model.types.*; import com.fern.java.client.ClientGeneratorContext; import com.fern.java.client.GeneratedClientOptions; import com.fern.java.client.GeneratedEnvironmentsClass; @@ -235,10 +200,41 @@ public final HttpEndpointMethodSpecs generate() { boolean sendContentType = httpEndpoint.getRequestBody().isPresent() || (httpEndpoint.getResponse().isPresent() && httpEndpoint.getResponse().get().getBody().isPresent()); + String contentType = httpEndpoint + .getRequestBody() + .flatMap(body -> body.visit(new HttpRequestBody.Visitor>() { + @Override + public Optional visitInlinedRequestBody(InlinedRequestBody inlinedRequestBody) { + return inlinedRequestBody.getContentType(); + } + + @Override + public Optional visitReference(HttpRequestBodyReference httpRequestBodyReference) { + return httpRequestBodyReference.getContentType(); + } + + @Override + public Optional visitFileUpload(FileUploadRequest fileUploadRequest) { + // N.B. File upload headers are obtained from request configuration. + return Optional.empty(); + } + + @Override + public Optional visitBytes(BytesRequest bytesRequest) { + return bytesRequest.getContentType(); + } + + @Override + public Optional _visitUnknown(Object o) { + throw new IllegalArgumentException("Unknown request type."); + } + })) + .orElse(AbstractEndpointWriter.APPLICATION_JSON_HEADER); CodeBlock requestInitializer = getInitializeRequestCodeBlock( clientOptionsField, generatedClientOptions, httpEndpoint, + contentType, generatedObjectMapper, generatedHttpUrl.inlinableBuild(), sendContentType); @@ -369,6 +365,7 @@ public abstract CodeBlock getInitializeRequestCodeBlock( FieldSpec clientOptionsMember, GeneratedClientOptions clientOptions, HttpEndpoint endpoint, + String contentType, GeneratedObjectMapper objectMapper, CodeBlock inlineableHttpUrl, boolean sendContentType); @@ -748,6 +745,10 @@ public JsonResponseBodyWithProperty _visitUnknown(Object unknownType) { httpEndpoint.getPagination().get().visit(new Visitor() { @Override public Void visitCursor(CursorPagination cursor) { + if (cursor.getPage().getPropertyPath().isPresent() + && !cursor.getPage().getPropertyPath().get().isEmpty()) { + return null; + } SnippetAndResultType nextSnippet = getNestedPropertySnippet( cursor.getNext().getPropertyPath(), cursor.getNext().getProperty(), @@ -762,10 +763,31 @@ public Void visitCursor(CursorPagination cursor) { .build(); httpResponseBuilder.addStatement(nextBlock); String builderStartingAfterProperty = cursor.getPage() - .getName() - .getName() - .getCamelCase() - .getUnsafeName(); + .getProperty() + .visit(new RequestPropertyValue.Visitor() { + @Override + public String visitQuery(QueryParameter queryParameter) { + return queryParameter + .getName() + .getName() + .getCamelCase() + .getUnsafeName(); + } + + @Override + public String visitBody(ObjectProperty objectProperty) { + return objectProperty + .getName() + .getName() + .getCamelCase() + .getUnsafeName(); + } + + @Override + public String _visitUnknown(Object o) { + throw new IllegalArgumentException("Unkown request property value type."); + } + }); httpResponseBuilder.addStatement( "$T $L = $T.builder().from($L).$L($L).build()", requestParameterSpec.type, @@ -811,8 +833,30 @@ public Void visitCursor(CursorPagination cursor) { @Override public Void visitOffset(OffsetPagination offset) { - com.fern.ir.model.types.TypeReference pageType = - offset.getPage().getValueType(); + if (offset.getPage().getPropertyPath().isPresent() + && !offset.getPage().getPropertyPath().get().isEmpty()) { + return null; + } + com.fern.ir.model.types.TypeReference pageType = offset.getPage() + .getProperty() + .visit(new RequestPropertyValue.Visitor() { + @Override + public com.fern.ir.model.types.TypeReference visitQuery( + QueryParameter queryParameter) { + return queryParameter.getValueType(); + } + + @Override + public com.fern.ir.model.types.TypeReference visitBody( + ObjectProperty objectProperty) { + return objectProperty.getValueType(); + } + + @Override + public com.fern.ir.model.types.TypeReference _visitUnknown(Object o) { + throw new IllegalArgumentException("Unknown request property value type."); + } + }); Boolean pageIsOptional = pageType.visit(new TypeReferenceIsOptional(true)); if (pageIsOptional) { com.fern.ir.model.types.TypeReference numberType = @@ -824,11 +868,31 @@ public Void visitOffset(OffsetPagination offset) { .convertToTypeName(true, numberType), getNewPageNumberVariableName(), requestParameterSpec.name, - offset.getPage() - .getName() - .getName() - .getPascalCase() - .getUnsafeName())); + offset.getPage().getProperty().visit(new RequestPropertyValue.Visitor() { + + @Override + public String visitQuery(QueryParameter queryParameter) { + return queryParameter + .getName() + .getName() + .getPascalCase() + .getUnsafeName(); + } + + @Override + public String visitBody(ObjectProperty objectProperty) { + return objectProperty + .getName() + .getName() + .getPascalCase() + .getUnsafeName(); + } + + @Override + public String _visitUnknown(Object o) { + throw new IllegalArgumentException("Unknown request property value type."); + } + }))); } else { httpResponseBuilder.addStatement(CodeBlock.of( "$T $L = $L.get$L() + 1", @@ -837,11 +901,31 @@ public Void visitOffset(OffsetPagination offset) { .convertToTypeName(true, pageType), getNewPageNumberVariableName(), requestParameterSpec.name, - offset.getPage() - .getName() - .getName() - .getPascalCase() - .getUnsafeName())); + offset.getPage().getProperty().visit(new RequestPropertyValue.Visitor() { + + @Override + public String visitQuery(QueryParameter queryParameter) { + return queryParameter + .getName() + .getName() + .getPascalCase() + .getUnsafeName(); + } + + @Override + public String visitBody(ObjectProperty objectProperty) { + return objectProperty + .getName() + .getName() + .getPascalCase() + .getUnsafeName(); + } + + @Override + public String _visitUnknown(Object o) { + throw new IllegalArgumentException("Unknown request property value type."); + } + }))); } httpResponseBuilder.addStatement( "$T $L = $T.builder().from($L).$L($L).build()", @@ -849,11 +933,31 @@ public Void visitOffset(OffsetPagination offset) { getNextRequestVariableName(), requestParameterSpec.type, requestParameterSpec.name, - offset.getPage() - .getName() - .getName() - .getCamelCase() - .getUnsafeName(), + offset.getPage().getProperty().visit(new RequestPropertyValue.Visitor() { + + @Override + public String visitQuery(QueryParameter queryParameter) { + return queryParameter + .getName() + .getName() + .getCamelCase() + .getUnsafeName(); + } + + @Override + public String visitBody(ObjectProperty objectProperty) { + return objectProperty + .getName() + .getName() + .getCamelCase() + .getUnsafeName(); + } + + @Override + public String _visitUnknown(Object o) { + throw new IllegalArgumentException("Unknown request property value type."); + } + }), getNewPageNumberVariableName()); SnippetAndResultType resultSnippet = getNestedPropertySnippet( @@ -961,6 +1065,12 @@ public com.fern.ir.model.types.TypeReference _visitUnknown(Object unknownType) { return null; } + @Override + public Void visitStreamParameter(StreamParameterResponse streamParameterResponse) { + // TODO: Implement stream parameters. + throw new UnsupportedOperationException("Not implemented."); + } + @Override public Void _visitUnknown(Object unknownType) { return null; @@ -1097,7 +1207,7 @@ public GetSnippetOutput visitContainer(com.fern.ir.model.types.ContainerType con } @Override - public GetSnippetOutput visitNamed(DeclaredTypeName named) { + public GetSnippetOutput visitNamed(NamedType named) { TypeDeclaration typeDeclaration = clientGeneratorContext.getTypeDeclarations().get(named.getTypeId()); return typeDeclaration.getShape().visit(new Type.Visitor<>() { @@ -1141,7 +1251,11 @@ public GetSnippetOutput visitObject(ObjectTypeDeclaration object) { if (maybeMatchingProperty.isEmpty()) { for (DeclaredTypeName declaredTypeName : object.getExtends()) { try { - return visitNamed(declaredTypeName); + return visitNamed(NamedType.builder() + .typeId(declaredTypeName.getTypeId()) + .fernFilepath(declaredTypeName.getFernFilepath()) + .name(declaredTypeName.getName()) + .build()); } catch (Exception e) { } } @@ -1299,7 +1413,7 @@ public Boolean visitContainer(com.fern.ir.model.types.ContainerType container) { } @Override - public Boolean visitNamed(DeclaredTypeName named) { + public Boolean visitNamed(NamedType named) { if (visitNamedType) { TypeDeclaration typeDeclaration = clientGeneratorContext.getTypeDeclarations().get(named.getTypeId()); @@ -1412,7 +1526,7 @@ public Boolean visitFile(FileProperty file) { } @Override - public Boolean visitBodyProperty(InlinedRequestBodyProperty bodyProperty) { + public Boolean visitBodyProperty(FileUploadBodyProperty bodyProperty) { return bodyProperty.getValueType().visit(new TypeReferenceIsOptional(false)); } diff --git a/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/HttpRequestBodyIsWrappedInOptional.java b/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/HttpRequestBodyIsWrappedInOptional.java index 260ef382a25..f46a30b351a 100644 --- a/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/HttpRequestBodyIsWrappedInOptional.java +++ b/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/HttpRequestBodyIsWrappedInOptional.java @@ -22,7 +22,7 @@ import com.fern.ir.model.http.HttpRequestBodyReference; import com.fern.ir.model.http.InlinedRequestBody; import com.fern.ir.model.types.ContainerType; -import com.fern.ir.model.types.DeclaredTypeName; +import com.fern.ir.model.types.NamedType; import com.fern.ir.model.types.PrimitiveType; public class HttpRequestBodyIsWrappedInOptional { @@ -72,7 +72,7 @@ public Boolean visitContainer(ContainerType container) { } @Override - public Boolean visitNamed(DeclaredTypeName named) { + public Boolean visitNamed(NamedType named) { return false; } diff --git a/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/NoRequestEndpointWriter.java b/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/NoRequestEndpointWriter.java index 204d6489dc5..2508645bffe 100644 --- a/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/NoRequestEndpointWriter.java +++ b/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/NoRequestEndpointWriter.java @@ -17,10 +17,7 @@ package com.fern.java.client.generators.endpoint; import com.fern.ir.model.commons.ErrorId; -import com.fern.ir.model.http.HttpEndpoint; -import com.fern.ir.model.http.HttpMethod; -import com.fern.ir.model.http.HttpService; -import com.fern.ir.model.http.SdkRequest; +import com.fern.ir.model.http.*; import com.fern.java.client.ClientGeneratorContext; import com.fern.java.client.GeneratedClientOptions; import com.fern.java.client.GeneratedEnvironmentsClass; @@ -86,6 +83,7 @@ public CodeBlock getInitializeRequestCodeBlock( FieldSpec clientOptionsMember, GeneratedClientOptions clientOptions, HttpEndpoint httpEndpoint, + String contentType, GeneratedObjectMapper generatedObjectMapper, CodeBlock inlineableHttpUrl, boolean sendContentType) { @@ -111,10 +109,7 @@ public CodeBlock getInitializeRequestCodeBlock( ClientOptionsGenerator.HEADERS_METHOD_NAME, REQUEST_OPTIONS_PARAMETER_NAME); if (sendContentType) { - builder.add( - ".addHeader($S, $S)\n", - AbstractEndpointWriter.CONTENT_TYPE_HEADER, - AbstractEndpointWriter.APPLICATION_JSON_HEADER); + builder.add(".addHeader($S, $S)\n", AbstractEndpointWriter.CONTENT_TYPE_HEADER, contentType); } return builder.add(".build();\n").unindent().build(); } diff --git a/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/OnlyRequestEndpointWriter.java b/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/OnlyRequestEndpointWriter.java index 5434d9c69eb..bf4c57d8890 100644 --- a/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/OnlyRequestEndpointWriter.java +++ b/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/OnlyRequestEndpointWriter.java @@ -167,6 +167,7 @@ public CodeBlock getInitializeRequestCodeBlock( FieldSpec clientOptionsMember, GeneratedClientOptions clientOptions, HttpEndpoint endpoint, + String contentType, GeneratedObjectMapper generatedObjectMapper, CodeBlock inlineableHttpUrl, boolean sendContentType) { @@ -192,10 +193,7 @@ public CodeBlock getInitializeRequestCodeBlock( @Override public Void visitTypeReference(HttpRequestBodyReference typeReference) { - builder.add( - ".addHeader($S, $S)\n", - AbstractEndpointWriter.CONTENT_TYPE_HEADER, - AbstractEndpointWriter.APPLICATION_JSON_HEADER); + builder.add(".addHeader($S, $S)\n", AbstractEndpointWriter.CONTENT_TYPE_HEADER, contentType); return null; } @@ -228,10 +226,7 @@ public Void _visitUnknown(Object unknownType) { clientOptionsMember.name, ClientOptionsGenerator.HEADERS_METHOD_NAME, REQUEST_OPTIONS_PARAMETER_NAME); - builder.add( - ".addHeader($S, $S)\n", - AbstractEndpointWriter.CONTENT_TYPE_HEADER, - AbstractEndpointWriter.APPLICATION_JSON_HEADER); + builder.add(".addHeader($S, $S)\n", AbstractEndpointWriter.CONTENT_TYPE_HEADER, contentType); return builder.add(".build();\n").unindent().build(); } } diff --git a/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/WrappedRequestEndpointWriter.java b/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/WrappedRequestEndpointWriter.java index dd44ef002f5..3e49a659f81 100644 --- a/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/WrappedRequestEndpointWriter.java +++ b/generators/java/sdk/src/main/java/com/fern/java/client/generators/endpoint/WrappedRequestEndpointWriter.java @@ -18,11 +18,7 @@ import com.fern.ir.model.commons.ErrorId; import com.fern.ir.model.commons.NameAndWireValue; -import com.fern.ir.model.http.FileProperty; -import com.fern.ir.model.http.HttpEndpoint; -import com.fern.ir.model.http.HttpMethod; -import com.fern.ir.model.http.HttpService; -import com.fern.ir.model.http.SdkRequest; +import com.fern.ir.model.http.*; import com.fern.java.client.ClientGeneratorContext; import com.fern.java.client.GeneratedClientOptions; import com.fern.java.client.GeneratedEnvironmentsClass; @@ -139,6 +135,7 @@ public CodeBlock getInitializeRequestCodeBlock( FieldSpec clientOptionsMember, GeneratedClientOptions clientOptions, HttpEndpoint _unused, + String contentType, GeneratedObjectMapper generatedObjectMapper, CodeBlock inlineableHttpUrl, boolean sendContentType) { @@ -201,10 +198,7 @@ public CodeBlock getInitializeRequestCodeBlock( clientOptionsMember.name, ClientOptionsGenerator.HEADERS_METHOD_NAME, AbstractEndpointWriter.REQUEST_OPTIONS_PARAMETER_NAME) - .add( - ".addHeader($S, $S);\n", - AbstractEndpointWriter.CONTENT_TYPE_HEADER, - AbstractEndpointWriter.APPLICATION_JSON_HEADER); + .add(".addHeader($S, $S);\n", AbstractEndpointWriter.CONTENT_TYPE_HEADER, contentType); } else { requestBodyCodeBlock.add( ".headers($T.of($L.$L($L)));\n", diff --git a/generators/java/sdk/versions.yml b/generators/java/sdk/versions.yml index 0c266867c8f..ba31d555203 100644 --- a/generators/java/sdk/versions.yml +++ b/generators/java/sdk/versions.yml @@ -1,3 +1,33 @@ +- changelogEntry: + - summary: | + Apply Content-Type header from endpoint definition in SDK generator. + type: feat + createdAt: '2024-12-11' + irVersion: 53 + version: 2.7.0 +- changelogEntry: + - summary: | + Don't generate pagination with nonempty path. Fixes pagination seed tests breaking. + type: fix + createdAt: '2024-12-10' + irVersion: 53 + version: 2.6.0 +- changelogEntry: + - summary: | + Bump IR version to latest (v53) + type: chore + createdAt: '2024-12-10' + irVersion: 53 + version: 2.5.0 +- changelogEntry: + - summary: | + We now support overriding sdk package prefixes by adding a "package-prefix" key under the java-sdk generator + configuration. + type: feat + createdAt: '2024-12-10' + irVersion: 46 + version: 2.4.0 + - changelogEntry: - summary: | The rootProject.name is now set in settings.gradle and ci.yml uses ./gradlew sonatypeCentralUpload for publishing. diff --git a/generators/java/spring/src/main/java/com/fern/java/spring/generators/SpringServerInterfaceGenerator.java b/generators/java/spring/src/main/java/com/fern/java/spring/generators/SpringServerInterfaceGenerator.java index 62dffde3fd6..9bc35e79339 100644 --- a/generators/java/spring/src/main/java/com/fern/java/spring/generators/SpringServerInterfaceGenerator.java +++ b/generators/java/spring/src/main/java/com/fern/java/spring/generators/SpringServerInterfaceGenerator.java @@ -17,22 +17,7 @@ import com.fern.ir.model.commons.ErrorId; import com.fern.ir.model.commons.TypeId; -import com.fern.ir.model.http.BytesRequest; -import com.fern.ir.model.http.EndpointName; -import com.fern.ir.model.http.FileDownloadResponse; -import com.fern.ir.model.http.FileUploadRequest; -import com.fern.ir.model.http.HttpEndpoint; -import com.fern.ir.model.http.HttpRequestBody; -import com.fern.ir.model.http.HttpRequestBodyReference; -import com.fern.ir.model.http.HttpResponse; -import com.fern.ir.model.http.HttpResponseBody; -import com.fern.ir.model.http.HttpService; -import com.fern.ir.model.http.InlinedRequestBody; -import com.fern.ir.model.http.JsonResponse; -import com.fern.ir.model.http.JsonResponseBody; -import com.fern.ir.model.http.JsonResponseBodyWithProperty; -import com.fern.ir.model.http.StreamingResponse; -import com.fern.ir.model.http.TextResponse; +import com.fern.ir.model.http.*; import com.fern.java.generators.AbstractFileGenerator; import com.fern.java.output.AbstractGeneratedJavaFile; import com.fern.java.output.GeneratedAuthFiles; @@ -163,6 +148,12 @@ public Void visitStreaming(StreamingResponse streaming) { throw new RuntimeException("Streaming responses are not supported in spring server generator"); } + @Override + public Void visitStreamParameter(StreamParameterResponse streamParameterResponse) { + throw new RuntimeException( + "Stream parameter responses are not supported in spring server generator"); + } + @Override public Void _visitUnknown(Object unknownType) { return null; diff --git a/generators/java/spring/versions.yml b/generators/java/spring/versions.yml index 5c58a14148b..30d47a4f0ba 100644 --- a/generators/java/spring/versions.yml +++ b/generators/java/spring/versions.yml @@ -1,3 +1,10 @@ +- changelogEntry: + - summary: | + Bump IR version to latest (v53) + type: chore + createdAt: '2024-12-10' + irVersion: 53 + version: 1.3.0 - changelogEntry: - summary: | Bump Jackson version to latest (2.17.2) diff --git a/generators/java/versions.lock b/generators/java/versions.lock index 9d1893f55e2..9bea9e1ca2a 100644 --- a/generators/java/versions.lock +++ b/generators/java/versions.lock @@ -5,12 +5,12 @@ com.atlassian.commonmark:commonmark:0.12.1 (1 constraints: 36052a3b) com.fasterxml.jackson:jackson-bom:2.17.2 (9 constraints: 349e3b26) com.fasterxml.jackson.core:jackson-annotations:2.17.2 (8 constraints: 2c7787b5) com.fasterxml.jackson.core:jackson-core:2.17.2 (8 constraints: f0870cf8) -com.fasterxml.jackson.core:jackson-databind:2.17.2 (12 constraints: ddaf9215) -com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2 (8 constraints: 0266e1bd) -com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2 (3 constraints: 8e1c9f5a) +com.fasterxml.jackson.core:jackson-databind:2.17.2 (12 constraints: dbafcf13) +com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2 (8 constraints: 006674bc) +com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2 (3 constraints: 8c1c8a5a) com.fern.fern:generator-exec-client:0.0.806 (1 constraints: 70059d40) com.fern.fern:generator-exec-model:0.0.806 (1 constraints: 760ff78e) -com.fern.fern:irV46:0.0.3517 (1 constraints: a2053546) +com.fern.fern:irV53:53.23.0 (1 constraints: 6f05cb40) com.google.code.findbugs:annotations:3.0.1 (5 constraints: 0b486b6a) com.google.code.findbugs:jsr305:3.0.2 (6 constraints: 3e53d684) com.google.errorprone:error_prone_annotations:2.12.1 (5 constraints: 7b44cddd) diff --git a/generators/java/versions.props b/generators/java/versions.props index 40e15509c8c..07dc34c29b6 100644 --- a/generators/java/versions.props +++ b/generators/java/versions.props @@ -8,7 +8,7 @@ org.immutables:* = 2.8.8 org.apache.commons:commons-lang3 = 3.12.0 # fern -com.fern.fern:irV46 = 0.0.3517 +com.fern.fern:irV53 = 53.23.0 com.fern.fern:generator-exec-client = 0.0.806 # testing diff --git a/generators/python-v2/ast/src/PythonFile.ts b/generators/python-v2/ast/src/PythonFile.ts index ddc5ec338cb..558bde6b910 100644 --- a/generators/python-v2/ast/src/PythonFile.ts +++ b/generators/python-v2/ast/src/PythonFile.ts @@ -2,8 +2,19 @@ import { AstNode } from "./core/AstNode"; import { Comment } from "./Comment"; import { Writer } from "./core/Writer"; import { Reference } from "./Reference"; -import { ModulePath } from "./core/types"; +import { ImportedName, ModulePath } from "./core/types"; import { StarImport } from "./StarImport"; +import { Class } from "./Class"; +import { Method } from "./Method"; +import { Field } from "./Field"; +import { Type } from "./Type"; +import { createPythonClassName } from "./core/utils"; + +interface UniqueReferenceValue { + modulePath: ModulePath; + references: Reference[]; + referenceNames: Set; +} export declare namespace PythonFile { interface Args { @@ -44,8 +55,12 @@ export class PythonFile extends AstNode { } public write(writer: Writer): void { + const uniqueReferences = this.deduplicateReferences(); + + this.updateWriterRefNameOverrides({ writer, uniqueReferences }); + this.writeComments(writer); - this.writeImports(writer); + this.writeImports({ writer, uniqueReferences }); this.statements.forEach((statement, idx) => { statement.write(writer); writer.newLine(); @@ -53,38 +68,87 @@ export class PythonFile extends AstNode { writer.newLine(); } }); + + writer.unsetRefNameOverrides(); } /******************************* * Helper Methods *******************************/ - private writeComments(writer: Writer): void { - this.comments.forEach((comment) => { - comment.write(writer); + private updateWriterRefNameOverrides({ + writer, + uniqueReferences + }: { + writer: Writer; + uniqueReferences: Map; + }): void { + const references: Reference[] = Array.from(uniqueReferences.values()).flatMap(({ references }) => references); + + // Build up a map of refs to their name overrides, keeping track of names that have been used as we go. + const completeRefPathsToNameOverrides: Record = {}; + const usedNames = this.getInitialUsedNames(); + + references.forEach((reference) => { + // Skip star imports since we should never override their import alias + if (reference instanceof StarImport) { + return; + } + + const name = reference.alias ?? reference.name; + const fullyQualifiedModulePath = reference.getFullyQualifiedModulePath(); + + let nameOverride = name; + let modulePathIdx = reference.modulePath.length - 1; + let isAlias = !!reference.alias; + + while (usedNames.has(nameOverride)) { + isAlias = true; + + const module = reference.modulePath[modulePathIdx]; + if (modulePathIdx < 0 || !module) { + nameOverride = `_${nameOverride}`; + } else { + nameOverride = `${createPythonClassName(module)}${nameOverride}`; + } + + modulePathIdx--; + } + usedNames.add(nameOverride); + + completeRefPathsToNameOverrides[fullyQualifiedModulePath] = { + name: nameOverride, + isAlias + }; }); - if (this.comments.length > 0) { - writer.newLine(); - } + writer.setRefNameOverrides(completeRefPathsToNameOverrides); } - private getImportName(reference: Reference): string { - const name = reference.name; - const alias = reference.alias; - return `${name}${alias ? ` as ${alias}` : ""}`; + private getInitialUsedNames(): Set { + const usedNames = new Set(); + + this.statements.forEach((statement) => { + if (statement instanceof Class) { + usedNames.add(statement.name); + } else if (statement instanceof Method) { + usedNames.add(statement.name); + } else if (statement instanceof Field) { + usedNames.add(statement.name); + } + }); + + return usedNames; } - private writeImports(writer: Writer): void { + private deduplicateReferences() { // Deduplicate references by their fully qualified paths - const uniqueReferences = new Map< - string, - { modulePath: ModulePath; references: Reference[]; referenceNames: Set } - >(); + const uniqueReferences = new Map(); for (const reference of this.references) { - const fullyQualifiedPath = reference.getFullyQualifiedModulePath(); - const existingRefs = uniqueReferences.get(fullyQualifiedPath); const referenceName = reference.name; + const fullyQualifiedPath = reference.getFullyQualifiedPath(); + const existingRefs = uniqueReferences.get(fullyQualifiedPath); + if (existingRefs) { if (!existingRefs.referenceNames.has(referenceName)) { existingRefs.references.push(reference); @@ -99,6 +163,35 @@ export class PythonFile extends AstNode { } } + return uniqueReferences; + } + + private writeComments(writer: Writer): void { + this.comments.forEach((comment) => { + comment.write(writer); + }); + + if (this.comments.length > 0) { + writer.newLine(); + } + } + + private getImportName({ writer, reference }: { writer: Writer; reference: Reference }): string { + const nameOverride = writer.getRefNameOverride(reference); + + const name = reference.name; + const alias = nameOverride.isAlias ? nameOverride.name : undefined; + + return `${name}${alias ? ` as ${alias}` : ""}`; + } + + private writeImports({ + writer, + uniqueReferences + }: { + writer: Writer; + uniqueReferences: Map; + }): void { for (const [fullyQualifiedPath, { modulePath, references }] of uniqueReferences) { const refModulePath = modulePath; if (refModulePath[0] === this.path[0]) { @@ -127,12 +220,16 @@ export class PythonFile extends AstNode { // Write the relative import statement writer.write( - `from ${relativePath} import ${references.map((ref) => this.getImportName(ref)).join(", ")}` + `from ${relativePath} import ${references + .map((reference) => this.getImportName({ writer, reference })) + .join(", ")}` ); } else { // Use fully qualified path writer.write( - `from ${fullyQualifiedPath} import ${references.map((ref) => this.getImportName(ref)).join(", ")}` + `from ${fullyQualifiedPath} import ${references + .map((reference) => this.getImportName({ writer, reference })) + .join(", ")}` ); } diff --git a/generators/python-v2/ast/src/Reference.ts b/generators/python-v2/ast/src/Reference.ts index c3fed7fd680..26b5d9b4e48 100644 --- a/generators/python-v2/ast/src/Reference.ts +++ b/generators/python-v2/ast/src/Reference.ts @@ -43,7 +43,8 @@ export class Reference extends AstNode { } public write(writer: Writer): void { - writer.write(this.alias ?? this.name); + const nameOverride = writer.getRefNameOverride(this); + writer.write(nameOverride.name); if (this.genericTypes.length > 0) { writer.write("["); @@ -67,7 +68,11 @@ export class Reference extends AstNode { } } - public getFullyQualifiedModulePath(): string { + public getFullyQualifiedPath(): string { return this.modulePath.join("."); } + + public getFullyQualifiedModulePath(): string { + return `${this.getFullyQualifiedPath()}.${this.name}`; + } } diff --git a/generators/python-v2/ast/src/__test__/PythonFile.test.ts b/generators/python-v2/ast/src/__test__/PythonFile.test.ts index 75968d22f65..4cfac924fc5 100644 --- a/generators/python-v2/ast/src/__test__/PythonFile.test.ts +++ b/generators/python-v2/ast/src/__test__/PythonFile.test.ts @@ -303,7 +303,10 @@ describe("PythonFile", () => { const file = python.file({ path: ["root"], comments: [python.comment({ docs: "flake8: noqa: F401, F403" })], - imports: [python.starImport({ modulePath: ["root", "my_module"] })], + imports: [ + python.starImport({ modulePath: ["root", "my_module_a"] }), + python.starImport({ modulePath: ["root", "my_module_b"] }) + ], statements: [ python.field({ name: "my_id", @@ -314,6 +317,72 @@ describe("PythonFile", () => { file.write(writer); expect(await writer.toStringFormatted()).toMatchSnapshot(); - expect(file.getReferences()).toHaveLength(2); + expect(file.getReferences()).toHaveLength(3); + }); + + it("Write duplicative import names", async () => { + const file = python.file({ path: ["root"] }); + + const local_class = python.class_({ + name: "Car" + }); + + local_class.add( + python.field({ + name: "car", + initializer: python.instantiateClass({ + classReference: python.reference({ + modulePath: ["root", "cars"], + name: "Car" + }), + arguments_: [] + }) + }) + ); + + local_class.add( + python.field({ + name: "car", + initializer: python.instantiateClass({ + classReference: python.reference({ + modulePath: ["root", "transportation", "vehicles"], + name: "Car" + }), + arguments_: [] + }) + }) + ); + + local_class.add( + python.field({ + name: "automobile", + initializer: python.instantiateClass({ + classReference: python.reference({ + modulePath: ["root", "automobiles"], + name: "Car" + }), + arguments_: [] + }) + }) + ); + + local_class.add( + python.field({ + name: "vehicle", + initializer: python.instantiateClass({ + classReference: python.reference({ + modulePath: ["root", "vehicles", "automobiles"], + name: "Car" + }), + arguments_: [] + }) + }) + ); + + file.addStatement(local_class); + + file.write(writer); + expect(await writer.toStringFormatted()).toMatchSnapshot(); + expect(file.getReferences()).toHaveLength(4); }); }); diff --git a/generators/python-v2/ast/src/__test__/__snapshots__/PythonFile.test.ts.snap b/generators/python-v2/ast/src/__test__/__snapshots__/PythonFile.test.ts.snap index 00a3170736e..68b01d373f2 100644 --- a/generators/python-v2/ast/src/__test__/__snapshots__/PythonFile.test.ts.snap +++ b/generators/python-v2/ast/src/__test__/__snapshots__/PythonFile.test.ts.snap @@ -112,11 +112,27 @@ my_variable: ImportedClass.nested.attribute " `; +exports[`PythonFile > Write duplicative import names 1`] = ` +"from .cars import Car as CarsCar +from .transportation.vehicles import Car as VehiclesCar +from .automobiles import Car as AutomobilesCar +from .vehicles.automobiles import Car as VehiclesAutomobilesCar + + +class Car: + car = CarsCar() + car = VehiclesCar() + automobile = AutomobilesCar() + vehicle = VehiclesAutomobilesCar() +" +`; + exports[`PythonFile > Write star imports 1`] = ` "# flake8: noqa: F401, F403 from uuid import UUID -from .my_module import * +from .my_module_a import * +from .my_module_b import * my_id = UUID("1234") " diff --git a/generators/python-v2/ast/src/__test__/core/utils.test.ts b/generators/python-v2/ast/src/__test__/core/utils.test.ts new file mode 100644 index 00000000000..de17c1fbd4c --- /dev/null +++ b/generators/python-v2/ast/src/__test__/core/utils.test.ts @@ -0,0 +1,33 @@ +import { createPythonClassName } from "../../core/utils"; + +describe("Casing", () => { + describe("createPythonClassName", () => { + const testCases: [string, string][] = [ + // Basic cases + ["hello world", "HelloWorld"], + ["simpleTestCase", "SimpleTestCase"], + // Special characters + ["hello-world", "HelloWorld"], + ["$special#characters%", "SpecialCharacters"], + // Numbers + ["123 invalid class name", "Class123InvalidClassName"], + ["mixed 123 cases", "Mixed123Cases"], + // Underscores + ["_leading_underscores_", "LeadingUnderscores"], + ["trailing_underscores_", "TrailingUnderscores"], + ["_123numbers_starting", "Class123NumbersStarting"], + // Empty and invalid input + ["", "Class"], + ["123", "Class123"], + ["_123_", "Class123"], + // Complex cases + ["complex mix_of-DifferentCases", "ComplexMixOfDifferentCases"], + ["ALLCAPS input", "ALLCAPSInput"], // Preserve ALLCAPS as requested + ["PascalCaseAlready", "PascalCaseAlready"] + ]; + + it.each<[string, string]>(testCases)("should convert %s' to %s'", (input, expected) => { + expect(createPythonClassName(input)).toBe(expected); + }); + }); +}); diff --git a/generators/python-v2/ast/src/core/Writer.ts b/generators/python-v2/ast/src/core/Writer.ts index 3a937e958b5..1726f404910 100644 --- a/generators/python-v2/ast/src/core/Writer.ts +++ b/generators/python-v2/ast/src/core/Writer.ts @@ -1,9 +1,32 @@ import { AbstractWriter } from "@fern-api/base-generator"; import { Config } from "@wasm-fmt/ruff_fmt"; +import { Reference } from "../Reference"; +import { ImportedName } from "./types"; export declare namespace Writer {} export class Writer extends AbstractWriter { + private fullyQualifiedModulePathsToImportedNames: Record = {}; + + public setRefNameOverrides(completeRefPathsToNameOverrides: Record): void { + this.fullyQualifiedModulePathsToImportedNames = completeRefPathsToNameOverrides; + } + + public unsetRefNameOverrides(): void { + this.fullyQualifiedModulePathsToImportedNames = {}; + } + + public getRefNameOverride(reference: Reference): ImportedName { + const explicitNameOverride = + this.fullyQualifiedModulePathsToImportedNames[reference.getFullyQualifiedModulePath()]; + + if (explicitNameOverride) { + return explicitNameOverride; + } + + return { name: reference.alias ?? reference.name, isAlias: !!reference.alias }; + } + public toString(): string { return this.buffer; } diff --git a/generators/python-v2/ast/src/core/types.ts b/generators/python-v2/ast/src/core/types.ts index 491f0101733..756acb54ddd 100644 --- a/generators/python-v2/ast/src/core/types.ts +++ b/generators/python-v2/ast/src/core/types.ts @@ -1,2 +1,8 @@ export type ModulePath = string[] | Readonly; + export type AttrPath = string[] | Readonly; + +export interface ImportedName { + name: string; + isAlias?: boolean; +} diff --git a/generators/python-v2/ast/src/core/utils.ts b/generators/python-v2/ast/src/core/utils.ts new file mode 100644 index 00000000000..6e00d4e593b --- /dev/null +++ b/generators/python-v2/ast/src/core/utils.ts @@ -0,0 +1,48 @@ +export function createPythonClassName(input: string): string { + // Handle empty input + if (!input) { + return "Class"; + } + + // Clean up the input string + let cleanedInput = input + .replace(/[^a-zA-Z0-9\s_-]/g, " ") // Replace special characters with spaces + .replace(/[-_\s]+/g, " ") // Replace hyphens, underscores and multiple spaces with single space + .trim(); // Remove leading/trailing spaces + + // Handle numeric-only or empty string after cleanup + if (!cleanedInput || /^\d+$/.test(cleanedInput)) { + return "Class" + (cleanedInput || ""); + } + + // Handle strings starting with numbers + if (/^\d/.test(cleanedInput)) { + cleanedInput = "Class" + cleanedInput; + } + + // Split into words and handle special cases + const words = cleanedInput + .split(/(?=[A-Z])|[-_\s]+/) + .filter((word) => word.length > 0) + .map((word) => { + // Fix any garbled text by splitting on number boundaries + return word.split(/(?<=\d)(?=[a-zA-Z])|(?<=[a-zA-Z])(?=\d)/).filter((w) => w.length > 0); + }) + .flat(); + + // Process each word + return words + .map((word, index) => { + // If it's the first word and starts with a number, prepend "Class" + if (index === 0 && /^\d/.test(word)) { + return "Class" + word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(); + } + // Preserve words that are all uppercase and longer than one character + if (word.length > 1 && word === word.toUpperCase() && !/^\d+$/.test(word)) { + return word; + } + // Capitalize first letter, lowercase rest + return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(); + }) + .join(""); +} diff --git a/generators/typescript/codegen/package.json b/generators/typescript/codegen/package.json index 15b70ad5af8..8dc1b2687d7 100644 --- a/generators/typescript/codegen/package.json +++ b/generators/typescript/codegen/package.json @@ -28,7 +28,7 @@ "devDependencies": { "@fern-api/core-utils": "workspace:*", "@fern-api/base-generator": "workspace:*", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@types/jest": "^29.5.12", "@types/node": "18.7.18", "depcheck": "^1.4.6", diff --git a/generators/typescript/express/cli/package.json b/generators/typescript/express/cli/package.json index 83bd0cde9d4..5a0ebd5b3db 100644 --- a/generators/typescript/express/cli/package.json +++ b/generators/typescript/express/cli/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@fern-fern/generator-exec-sdk": "^0.0.898", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/abstract-generator-cli": "workspace:*", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", diff --git a/generators/typescript/express/cli/src/ExpressGeneratorCli.ts b/generators/typescript/express/cli/src/ExpressGeneratorCli.ts index 35389879eec..315a099a3b1 100644 --- a/generators/typescript/express/cli/src/ExpressGeneratorCli.ts +++ b/generators/typescript/express/cli/src/ExpressGeneratorCli.ts @@ -5,7 +5,6 @@ import { NpmPackage, PersistedTypescriptProject } from "@fern-typescript/commons import { GeneratorContext } from "@fern-typescript/contexts"; import { ExpressGenerator } from "@fern-typescript/express-generator"; import { camelCase, upperFirst } from "lodash-es"; -import { custom } from "zod"; import { ExpressCustomConfig } from "./custom-config/ExpressCustomConfig"; import { ExpressCustomConfigSchema } from "./custom-config/schema/ExpressCustomConfigSchema"; @@ -13,6 +12,7 @@ export class ExpressGeneratorCli extends AbstractGeneratorCli { + return this.intermediateRepresentation.types; + } + private generateTypeDeclarations() { - for (const typeDeclaration of Object.values(this.intermediateRepresentation.types)) { + for (const typeDeclaration of Object.values(this.getTypesToGenerate())) { this.withSourceFile({ filepath: this.typeDeclarationReferencer.getExportedFilepath(typeDeclaration.name), run: ({ sourceFile, importsManager }) => { - const context = this.generateExpressContext({ sourceFile, importsManager }); + const context = this.generateExpressContext({ + logger: this.context.logger, + sourceFile, + importsManager + }); context.type.getGeneratedType(typeDeclaration.name).writeToFile(context); } }); @@ -289,11 +299,15 @@ export class ExpressGenerator { } private generateTypeSchemas() { - for (const typeDeclaration of Object.values(this.intermediateRepresentation.types)) { + for (const typeDeclaration of Object.values(this.getTypesToGenerate())) { this.withSourceFile({ filepath: this.typeSchemaDeclarationReferencer.getExportedFilepath(typeDeclaration.name), run: ({ sourceFile, importsManager }) => { - const context = this.generateExpressContext({ sourceFile, importsManager }); + const context = this.generateExpressContext({ + logger: this.context.logger, + sourceFile, + importsManager + }); context.typeSchema.getGeneratedTypeSchema(typeDeclaration.name).writeToFile(context); } }); @@ -305,7 +319,11 @@ export class ExpressGenerator { this.withSourceFile({ filepath: this.expressErrorDeclarationReferencer.getExportedFilepath(errorDeclaration.name), run: ({ sourceFile, importsManager }) => { - const context = this.generateExpressContext({ sourceFile, importsManager }); + const context = this.generateExpressContext({ + logger: this.context.logger, + sourceFile, + importsManager + }); context.expressError.getGeneratedExpressError(errorDeclaration.name).writeToFile(context); } }); @@ -317,7 +335,11 @@ export class ExpressGenerator { this.withSourceFile({ filepath: this.expressErrorSchemaDeclarationReferencer.getExportedFilepath(errorDeclaration.name), run: ({ sourceFile, importsManager }) => { - const context = this.generateExpressContext({ sourceFile, importsManager }); + const context = this.generateExpressContext({ + logger: this.context.logger, + sourceFile, + importsManager + }); context.expressErrorSchema .getGeneratedExpressErrorSchema(errorDeclaration.name) ?.writeToFile(context); @@ -336,7 +358,11 @@ export class ExpressGenerator { endpoint }), run: ({ sourceFile, importsManager }) => { - const context = this.generateExpressContext({ sourceFile, importsManager }); + const context = this.generateExpressContext({ + logger: this.context.logger, + sourceFile, + importsManager + }); context.expressInlinedRequestBody .getGeneratedInlinedRequestBody(packageId, endpoint.name) .writeToFile(context); @@ -357,7 +383,11 @@ export class ExpressGenerator { endpoint }), run: ({ sourceFile, importsManager }) => { - const context = this.generateExpressContext({ sourceFile, importsManager }); + const context = this.generateExpressContext({ + logger: this.context.logger, + sourceFile, + importsManager + }); context.expressInlinedRequestBodySchema .getGeneratedInlinedRequestBodySchema(packageId, endpoint.name) .writeToFile(context); @@ -377,7 +407,11 @@ export class ExpressGenerator { endpoint }), run: ({ sourceFile, importsManager }) => { - const context = this.generateExpressContext({ sourceFile, importsManager }); + const context = this.generateExpressContext({ + logger: this.context.logger, + sourceFile, + importsManager + }); context.expressEndpointTypeSchemas .getGeneratedEndpointTypeSchemas(packageId, endpoint.name) .writeToFile(context); @@ -392,7 +426,11 @@ export class ExpressGenerator { this.withSourceFile({ filepath: this.expressServiceDeclarationReferencer.getExportedFilepath(packageId), run: ({ sourceFile, importsManager }) => { - const context = this.generateExpressContext({ sourceFile, importsManager }); + const context = this.generateExpressContext({ + logger: this.context.logger, + sourceFile, + importsManager + }); context.expressService.getGeneratedExpressService(packageId).writeToFile(context); } }); @@ -403,7 +441,11 @@ export class ExpressGenerator { this.withSourceFile({ filepath: this.expressRegisterDeclarationReferencer.getExportedFilepath(), run: ({ sourceFile, importsManager }) => { - const context = this.generateExpressContext({ sourceFile, importsManager }); + const context = this.generateExpressContext({ + logger: this.context.logger, + sourceFile, + importsManager + }); context.expressRegister.getGeneratedExpressRegister()?.writeToFile(context); } }); @@ -413,7 +455,11 @@ export class ExpressGenerator { this.withSourceFile({ filepath: this.genericApiExpressErrorDeclarationReferencer.getExportedFilepath(), run: ({ sourceFile, importsManager }) => { - const context = this.generateExpressContext({ sourceFile, importsManager }); + const context = this.generateExpressContext({ + logger: this.context.logger, + sourceFile, + importsManager + }); context.genericAPIExpressError.getGeneratedGenericAPIExpressError().writeToFile(context); } }); @@ -470,13 +516,16 @@ export class ExpressGenerator { } private generateExpressContext({ + logger, sourceFile, importsManager }: { + logger: Logger; sourceFile: SourceFile; importsManager: ImportsManager; }): ExpressContextImpl { return new ExpressContextImpl({ + logger, sourceFile, coreUtilitiesManager: this.coreUtilitiesManager, dependencyManager: this.dependencyManager, @@ -509,7 +558,8 @@ export class ExpressGenerator { expressErrorSchemaGenerator: this.expressErrorSchemaGenerator, includeSerdeLayer: this.config.includeSerdeLayer, retainOriginalCasing: this.config.retainOriginalCasing, - useBigInt: this.config.useBigInt + useBigInt: this.config.useBigInt, + enableInlineTypes: false }); } } diff --git a/generators/typescript/express/generator/src/contexts/ExpressContextImpl.ts b/generators/typescript/express/generator/src/contexts/ExpressContextImpl.ts index 8e1513d8dcb..e3a21c2957d 100644 --- a/generators/typescript/express/generator/src/contexts/ExpressContextImpl.ts +++ b/generators/typescript/express/generator/src/contexts/ExpressContextImpl.ts @@ -26,6 +26,7 @@ import { TypeGenerator } from "@fern-typescript/type-generator"; import { TypeReferenceExampleGenerator } from "@fern-typescript/type-reference-example-generator"; import { TypeSchemaGenerator } from "@fern-typescript/type-schema-generator"; import { SourceFile } from "ts-morph"; +import { Logger } from "@fern-api/logger"; import { EndpointDeclarationReferencer } from "../declaration-referencers/EndpointDeclarationReferencer"; import { ExpressErrorDeclarationReferencer } from "../declaration-referencers/ExpressErrorDeclarationReferencer"; import { ExpressInlinedRequestBodyDeclarationReferencer } from "../declaration-referencers/ExpressInlinedRequestBodyDeclarationReferencer"; @@ -45,6 +46,7 @@ import { TypeContextImpl } from "./type/TypeContextImpl"; export declare namespace ExpressContextImpl { export interface Init { + logger: Logger; sourceFile: SourceFile; importsManager: ImportsManager; dependencyManager: DependencyManager; @@ -78,10 +80,12 @@ export declare namespace ExpressContextImpl { includeSerdeLayer: boolean; retainOriginalCasing: boolean; useBigInt: boolean; + enableInlineTypes: boolean; } } export class ExpressContextImpl implements ExpressContext { + public readonly logger: Logger; public readonly sourceFile: SourceFile; public readonly externalDependencies: ExternalDependencies; public readonly coreUtilities: CoreUtilities; @@ -101,6 +105,7 @@ export class ExpressContextImpl implements ExpressContext { public readonly expressErrorSchema: ExpressErrorSchemaContext; constructor({ + logger, typeResolver, typeGenerator, typeDeclarationReferencer, @@ -132,8 +137,10 @@ export class ExpressContextImpl implements ExpressContext { expressErrorSchemaGenerator, includeSerdeLayer, retainOriginalCasing, + enableInlineTypes, useBigInt }: ExpressContextImpl.Init) { + this.logger = logger; this.includeSerdeLayer = includeSerdeLayer; this.sourceFile = sourceFile; this.externalDependencies = createExternalDependencies({ @@ -156,7 +163,9 @@ export class ExpressContextImpl implements ExpressContext { treatUnknownAsAny, includeSerdeLayer, retainOriginalCasing, - useBigInt + useBigInt, + enableInlineTypes, + context: this }); this.typeSchema = new TypeSchemaContextImpl({ sourceFile, @@ -170,7 +179,8 @@ export class ExpressContextImpl implements ExpressContext { treatUnknownAsAny, includeSerdeLayer, retainOriginalCasing, - useBigInt + useBigInt, + enableInlineTypes }); this.expressInlinedRequestBody = new ExpressInlinedRequestBodyContextImpl({ diff --git a/generators/typescript/express/generator/src/contexts/type-schema/TypeSchemaContextImpl.ts b/generators/typescript/express/generator/src/contexts/type-schema/TypeSchemaContextImpl.ts index e79c44acd7e..817c3595b76 100644 --- a/generators/typescript/express/generator/src/contexts/type-schema/TypeSchemaContextImpl.ts +++ b/generators/typescript/express/generator/src/contexts/type-schema/TypeSchemaContextImpl.ts @@ -9,7 +9,7 @@ import { TypeReferenceToSchemaConverter } from "@fern-typescript/type-reference-converters"; import { TypeSchemaGenerator } from "@fern-typescript/type-schema-generator"; -import { SourceFile } from "ts-morph"; +import { SourceFile, ts } from "ts-morph"; import { TypeDeclarationReferencer } from "../../declaration-referencers/TypeDeclarationReferencer"; import { getSchemaImportStrategy } from "../getSchemaImportStrategy"; @@ -27,6 +27,7 @@ export declare namespace TypeSchemaContextImpl { includeSerdeLayer: boolean; retainOriginalCasing: boolean; useBigInt: boolean; + enableInlineTypes: boolean; } } @@ -56,17 +57,20 @@ export class TypeSchemaContextImpl implements TypeSchemaContext { treatUnknownAsAny, includeSerdeLayer, retainOriginalCasing, - useBigInt + useBigInt, + enableInlineTypes }: TypeSchemaContextImpl.Init) { this.sourceFile = sourceFile; this.coreUtilities = coreUtilities; this.importsManager = importsManager; this.typeReferenceToRawTypeNodeConverter = new TypeReferenceToRawTypeNodeConverter({ getReferenceToNamedType: (typeName) => this.getReferenceToRawNamedType(typeName).getEntityName(), + generateForInlineUnion: (typeName) => this.generateForInlineUnion(typeName), typeResolver, treatUnknownAsAny, includeSerdeLayer, - useBigInt + useBigInt, + enableInlineTypes }); this.typeReferenceToSchemaConverter = new TypeReferenceToSchemaConverter({ getSchemaOfNamedType: (typeName) => this.getSchemaOfNamedType(typeName, { isGeneratingSchema: true }), @@ -74,7 +78,8 @@ export class TypeSchemaContextImpl implements TypeSchemaContext { typeResolver, treatUnknownAsAny, includeSerdeLayer, - useBigInt + useBigInt, + enableInlineTypes }); this.typeDeclarationReferencer = typeDeclarationReferencer; this.typeSchemaDeclarationReferencer = typeSchemaDeclarationReferencer; @@ -104,7 +109,8 @@ export class TypeSchemaContextImpl implements TypeSchemaContext { typeName: this.typeDeclarationReferencer.getExportedName(typeDeclaration.name), getReferenceToSelf: (context) => context.type.getReferenceToNamedType(typeName), includeSerdeLayer: this.includeSerdeLayer, - retainOriginalCasing: this.retainOriginalCasing + retainOriginalCasing: this.retainOriginalCasing, + inline: typeDeclaration.inline ?? false }), getReferenceToGeneratedType: () => this.typeDeclarationReferencer @@ -129,7 +135,7 @@ export class TypeSchemaContextImpl implements TypeSchemaContext { } public getReferenceToRawType(typeReference: TypeReference): TypeReferenceNode { - return this.typeReferenceToRawTypeNodeConverter.convert(typeReference); + return this.typeReferenceToRawTypeNodeConverter.convert({ typeReference }); } public getReferenceToRawNamedType(typeName: DeclaredTypeName): Reference { @@ -146,8 +152,12 @@ export class TypeSchemaContextImpl implements TypeSchemaContext { }); } + private generateForInlineUnion(typeName: DeclaredTypeName): ts.TypeNode { + throw new Error("Inline unions are not supported in Express Schemas"); + } + public getSchemaOfTypeReference(typeReference: TypeReference): Zurg.Schema { - return this.typeReferenceToSchemaConverter.convert(typeReference); + return this.typeReferenceToSchemaConverter.convert({ typeReference }); } public getSchemaOfNamedType( diff --git a/generators/typescript/express/generator/src/contexts/type/TypeContextImpl.ts b/generators/typescript/express/generator/src/contexts/type/TypeContextImpl.ts index 00f71925f04..e2b627d0ec1 100644 --- a/generators/typescript/express/generator/src/contexts/type/TypeContextImpl.ts +++ b/generators/typescript/express/generator/src/contexts/type/TypeContextImpl.ts @@ -1,12 +1,13 @@ import { DeclaredTypeName, ExampleTypeReference, + ObjectProperty, ResolvedTypeReference, TypeDeclaration, TypeReference } from "@fern-fern/ir-sdk/api"; import { ImportsManager, Reference, TypeReferenceNode } from "@fern-typescript/commons"; -import { GeneratedType, GeneratedTypeReferenceExample, TypeContext } from "@fern-typescript/contexts"; +import { BaseContext, GeneratedType, GeneratedTypeReferenceExample, TypeContext } from "@fern-typescript/contexts"; import { TypeResolver } from "@fern-typescript/resolvers"; import { TypeGenerator } from "@fern-typescript/type-generator"; import { @@ -29,6 +30,8 @@ export declare namespace TypeContextImpl { includeSerdeLayer: boolean; retainOriginalCasing: boolean; useBigInt: boolean; + context: BaseContext; + enableInlineTypes: boolean; } } @@ -43,6 +46,7 @@ export class TypeContextImpl implements TypeContext { private typeReferenceExampleGenerator: TypeReferenceExampleGenerator; private includeSerdeLayer: boolean; private retainOriginalCasing: boolean; + private context: BaseContext; constructor({ sourceFile, @@ -54,7 +58,9 @@ export class TypeContextImpl implements TypeContext { treatUnknownAsAny, includeSerdeLayer, retainOriginalCasing, - useBigInt + useBigInt, + enableInlineTypes, + context }: TypeContextImpl.Init) { this.sourceFile = sourceFile; this.importsManager = importsManager; @@ -64,24 +70,61 @@ export class TypeContextImpl implements TypeContext { this.typeReferenceExampleGenerator = typeReferenceExampleGenerator; this.includeSerdeLayer = includeSerdeLayer; this.retainOriginalCasing = retainOriginalCasing; + this.context = context; this.typeReferenceToParsedTypeNodeConverter = new TypeReferenceToParsedTypeNodeConverter({ getReferenceToNamedType: (typeName) => this.getReferenceToNamedType(typeName).getEntityName(), + generateForInlineUnion: (typeName) => this.generateForInlineUnion(typeName), typeResolver, treatUnknownAsAny, includeSerdeLayer, - useBigInt + useBigInt, + enableInlineTypes }); this.typeReferenceToStringExpressionConverter = new TypeReferenceToStringExpressionConverter({ typeResolver, treatUnknownAsAny, includeSerdeLayer, - useBigInt + useBigInt, + enableInlineTypes }); } public getReferenceToType(typeReference: TypeReference): TypeReferenceNode { - return this.typeReferenceToParsedTypeNodeConverter.convert(typeReference); + return this.typeReferenceToParsedTypeNodeConverter.convert({ typeReference }); + } + + public getReferenceToInlinePropertyType( + typeReference: TypeReference, + parentTypeName: string, + propertyName: string + ): TypeReferenceNode { + return this.typeReferenceToParsedTypeNodeConverter.convert({ + typeReference, + type: "inlinePropertyParams", + parentTypeName, + propertyName + }); + } + + public getReferenceToInlineAliasType(typeReference: TypeReference, aliasTypeName: string): TypeReferenceNode { + return this.typeReferenceToParsedTypeNodeConverter.convert({ + typeReference, + type: "inlineAliasParams", + aliasTypeName + }); + } + + public generateForInlineUnion(typeName: DeclaredTypeName): ts.TypeNode { + const generatedType = this.getGeneratedType(typeName); + return generatedType.generateForInlineUnion(this.context); + } + + public getReferenceToTypeForInlineUnion(typeReference: TypeReference): TypeReferenceNode { + return this.typeReferenceToParsedTypeNodeConverter.convert({ + typeReference, + type: "forInlineUnionParams" + }); } public getTypeDeclaration(typeName: DeclaredTypeName): TypeDeclaration { @@ -110,7 +153,7 @@ export class TypeContextImpl implements TypeContext { return this.getGeneratedType(typeDeclaration.name); } - public getGeneratedType(typeName: DeclaredTypeName): GeneratedType { + public getGeneratedType(typeName: DeclaredTypeName, typeNameOverride?: string): GeneratedType { const typeDeclaration = this.typeResolver.getTypeDeclarationFromName(typeName); const examples = typeDeclaration.userProvidedExamples; if (examples.length === 0) { @@ -120,12 +163,13 @@ export class TypeContextImpl implements TypeContext { return this.typeGenerator.generateType({ shape: typeDeclaration.shape, docs: typeDeclaration.docs ?? undefined, - typeName: this.typeDeclarationReferencer.getExportedName(typeDeclaration.name), + typeName: typeNameOverride ?? this.typeDeclarationReferencer.getExportedName(typeDeclaration.name), examples, fernFilepath: typeDeclaration.name.fernFilepath, getReferenceToSelf: (context) => context.type.getReferenceToNamedType(typeName), includeSerdeLayer: this.includeSerdeLayer, - retainOriginalCasing: this.retainOriginalCasing + retainOriginalCasing: this.retainOriginalCasing, + inline: typeDeclaration.inline ?? false }); } @@ -135,11 +179,13 @@ export class TypeContextImpl implements TypeContext { { includeNullCheckIfOptional }: { includeNullCheckIfOptional: boolean } ): ts.Expression { if (includeNullCheckIfOptional) { - return this.typeReferenceToStringExpressionConverter.convertWithNullCheckIfOptional(valueType)( - valueToStringify - ); + return this.typeReferenceToStringExpressionConverter.convertWithNullCheckIfOptional({ + typeReference: valueType + })(valueToStringify); } else { - return this.typeReferenceToStringExpressionConverter.convert(valueType)(valueToStringify); + return this.typeReferenceToStringExpressionConverter.convert({ + typeReference: valueType + })(valueToStringify); } } diff --git a/generators/typescript/model/type-generator/package.json b/generators/typescript/model/type-generator/package.json index afa139c4c1a..c7b904b8884 100644 --- a/generators/typescript/model/type-generator/package.json +++ b/generators/typescript/model/type-generator/package.json @@ -27,7 +27,7 @@ "depcheck": "depcheck" }, "dependencies": { - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", "@fern-typescript/union-generator": "workspace:*", diff --git a/generators/typescript/model/type-generator/src/AbstractGeneratedType.ts b/generators/typescript/model/type-generator/src/AbstractGeneratedType.ts index a3050ec5a2c..8529b489ae5 100644 --- a/generators/typescript/model/type-generator/src/AbstractGeneratedType.ts +++ b/generators/typescript/model/type-generator/src/AbstractGeneratedType.ts @@ -1,7 +1,7 @@ import { ExampleType, ExampleTypeShape, FernFilepath } from "@fern-fern/ir-sdk/api"; import { GetReferenceOpts, getTextOfTsNode, Reference } from "@fern-typescript/commons"; -import { BaseGeneratedType } from "@fern-typescript/contexts"; -import { ts } from "ts-morph"; +import { BaseContext, BaseGeneratedType } from "@fern-typescript/contexts"; +import { ModuleDeclarationStructure, StatementStructures, ts, WriterFunction } from "ts-morph"; export declare namespace AbstractGeneratedType { export interface Init { @@ -14,12 +14,14 @@ export declare namespace AbstractGeneratedType { includeSerdeLayer: boolean; noOptionalProperties: boolean; retainOriginalCasing: boolean; + /** Whether inline types should be inlined */ + enableInlineTypes: boolean; } } const EXAMPLE_PREFIX = " "; -export abstract class AbstractGeneratedType implements BaseGeneratedType { +export abstract class AbstractGeneratedType implements BaseGeneratedType { protected typeName: string; protected shape: Shape; protected examples: ExampleType[]; @@ -28,6 +30,7 @@ export abstract class AbstractGeneratedType implements BaseGener protected includeSerdeLayer: boolean; protected noOptionalProperties: boolean; protected retainOriginalCasing: boolean; + protected enableInlineTypes: boolean; private docs: string | undefined; @@ -40,7 +43,8 @@ export abstract class AbstractGeneratedType implements BaseGener fernFilepath, includeSerdeLayer, noOptionalProperties, - retainOriginalCasing + retainOriginalCasing, + enableInlineTypes }: AbstractGeneratedType.Init) { this.typeName = typeName; this.shape = shape; @@ -51,6 +55,7 @@ export abstract class AbstractGeneratedType implements BaseGener this.includeSerdeLayer = includeSerdeLayer; this.noOptionalProperties = noOptionalProperties; this.retainOriginalCasing = retainOriginalCasing; + this.enableInlineTypes = enableInlineTypes; } protected getDocs(context: Context): string | undefined { @@ -72,6 +77,14 @@ export abstract class AbstractGeneratedType implements BaseGener return groups.join("\n\n"); } - public abstract writeToFile(context: Context): void; + public writeToFile(context: Context): void { + context.sourceFile.addStatements(this.generateStatements(context)); + } + + public abstract generateStatements( + context: Context + ): string | WriterFunction | (string | WriterFunction | StatementStructures)[]; + public abstract generateForInlineUnion(context: Context): ts.TypeNode; + public abstract generateModule(context: Context): ModuleDeclarationStructure | undefined; public abstract buildExample(example: ExampleTypeShape, context: Context, opts: GetReferenceOpts): ts.Expression; } diff --git a/generators/typescript/model/type-generator/src/TypeGenerator.ts b/generators/typescript/model/type-generator/src/TypeGenerator.ts index 2c18dac5794..82791705f42 100644 --- a/generators/typescript/model/type-generator/src/TypeGenerator.ts +++ b/generators/typescript/model/type-generator/src/TypeGenerator.ts @@ -17,7 +17,7 @@ import { GeneratedType, GeneratedUndiscriminatedUnionType, GeneratedUnionType, - ModelContext + BaseContext } from "@fern-typescript/contexts"; import { GeneratedAliasTypeImpl } from "./alias/GeneratedAliasTypeImpl"; import { GeneratedBrandedStringAliasImpl } from "./alias/GeneratedBrandedStringAliasImpl"; @@ -34,6 +34,7 @@ export declare namespace TypeGenerator { includeSerdeLayer: boolean; noOptionalProperties: boolean; retainOriginalCasing: boolean; + enableInlineTypes: boolean; } export namespace generateType { @@ -46,17 +47,19 @@ export declare namespace TypeGenerator { getReferenceToSelf: (context: Context) => Reference; includeSerdeLayer: boolean; retainOriginalCasing: boolean; + inline: boolean; } } } -export class TypeGenerator { +export class TypeGenerator { private useBrandedStringAliases: boolean; private includeUtilsOnUnionMembers: boolean; private includeOtherInUnionTypes: boolean; private includeSerdeLayer: boolean; private noOptionalProperties: boolean; private retainOriginalCasing: boolean; + private enableInlineTypes: boolean; constructor({ useBrandedStringAliases, @@ -64,7 +67,8 @@ export class TypeGenerator { includeOtherInUnionTypes, includeSerdeLayer, noOptionalProperties, - retainOriginalCasing + retainOriginalCasing, + enableInlineTypes }: TypeGenerator.Init) { this.useBrandedStringAliases = useBrandedStringAliases; this.includeUtilsOnUnionMembers = includeUtilsOnUnionMembers; @@ -72,6 +76,7 @@ export class TypeGenerator { this.includeSerdeLayer = includeSerdeLayer; this.noOptionalProperties = noOptionalProperties; this.retainOriginalCasing = retainOriginalCasing; + this.enableInlineTypes = enableInlineTypes; } public generateType({ @@ -80,10 +85,12 @@ export class TypeGenerator { typeName, docs, fernFilepath, - getReferenceToSelf + getReferenceToSelf, + inline }: TypeGenerator.generateType.Args): GeneratedType { return Type._visit>(shape, { - union: (shape) => this.generateUnion({ typeName, shape, examples, docs, fernFilepath, getReferenceToSelf }), + union: (shape) => + this.generateUnion({ typeName, shape, examples, docs, fernFilepath, getReferenceToSelf, inline }), undiscriminatedUnion: (shape) => this.generateUndiscriminatedUnion({ typeName, @@ -135,7 +142,8 @@ export class TypeGenerator { getReferenceToSelf, includeSerdeLayer: this.includeSerdeLayer, noOptionalProperties: this.noOptionalProperties, - retainOriginalCasing: this.retainOriginalCasing + retainOriginalCasing: this.retainOriginalCasing, + enableInlineTypes: this.enableInlineTypes }); } @@ -145,7 +153,8 @@ export class TypeGenerator { examples, docs, fernFilepath, - getReferenceToSelf + getReferenceToSelf, + inline }: { typeName: string; shape: UnionTypeDeclaration; @@ -153,6 +162,7 @@ export class TypeGenerator { docs: string | undefined; fernFilepath: FernFilepath; getReferenceToSelf: (context: Context) => Reference; + inline: boolean; }): GeneratedUnionType { return new GeneratedUnionTypeImpl({ typeName, @@ -165,7 +175,9 @@ export class TypeGenerator { includeOtherInUnionTypes: this.includeOtherInUnionTypes, includeSerdeLayer: this.includeSerdeLayer, noOptionalProperties: this.noOptionalProperties, - retainOriginalCasing: this.retainOriginalCasing + retainOriginalCasing: this.retainOriginalCasing, + enableInlineTypes: this.enableInlineTypes, + inline }); } @@ -193,7 +205,8 @@ export class TypeGenerator { getReferenceToSelf, includeSerdeLayer: this.includeSerdeLayer, noOptionalProperties: this.noOptionalProperties, - retainOriginalCasing: this.retainOriginalCasing + retainOriginalCasing: this.retainOriginalCasing, + enableInlineTypes: this.enableInlineTypes }); } @@ -222,7 +235,8 @@ export class TypeGenerator { includeSerdeLayer: this.includeSerdeLayer, noOptionalProperties: this.noOptionalProperties, includeEnumUtils: this.includeUtilsOnUnionMembers, - retainOriginalCasing: this.retainOriginalCasing + retainOriginalCasing: this.retainOriginalCasing, + enableInlineTypes: this.enableInlineTypes }); } @@ -251,7 +265,8 @@ export class TypeGenerator { getReferenceToSelf, includeSerdeLayer: this.includeSerdeLayer, noOptionalProperties: this.noOptionalProperties, - retainOriginalCasing: this.retainOriginalCasing + retainOriginalCasing: this.retainOriginalCasing, + enableInlineTypes: this.enableInlineTypes }) : new GeneratedAliasTypeImpl({ typeName, @@ -262,7 +277,8 @@ export class TypeGenerator { getReferenceToSelf, includeSerdeLayer: this.includeSerdeLayer, noOptionalProperties: this.noOptionalProperties, - retainOriginalCasing: this.retainOriginalCasing + retainOriginalCasing: this.retainOriginalCasing, + enableInlineTypes: this.enableInlineTypes }); } } diff --git a/generators/typescript/model/type-generator/src/alias/GeneratedAliasTypeImpl.ts b/generators/typescript/model/type-generator/src/alias/GeneratedAliasTypeImpl.ts index 487ed372ddd..873abd928e3 100644 --- a/generators/typescript/model/type-generator/src/alias/GeneratedAliasTypeImpl.ts +++ b/generators/typescript/model/type-generator/src/alias/GeneratedAliasTypeImpl.ts @@ -1,33 +1,72 @@ import { ExampleTypeShape, TypeReference } from "@fern-fern/ir-sdk/api"; -import { GetReferenceOpts, getTextOfTsNode, maybeAddDocs } from "@fern-typescript/commons"; -import { ModelContext, NotBrandedGeneratedAliasType } from "@fern-typescript/contexts"; -import { ts } from "ts-morph"; +import { + generateInlineAliasModule, + GetReferenceOpts, + getTextOfTsNode, + maybeAddDocsStructure +} from "@fern-typescript/commons"; +import { BaseContext, NotBrandedGeneratedAliasType } from "@fern-typescript/contexts"; +import { + ModuleDeclarationStructure, + StatementStructures, + StructureKind, + ts, + TypeAliasDeclarationStructure, + WriterFunction +} from "ts-morph"; import { AbstractGeneratedType } from "../AbstractGeneratedType"; -export class GeneratedAliasTypeImpl +export class GeneratedAliasTypeImpl extends AbstractGeneratedType implements NotBrandedGeneratedAliasType { public readonly type = "alias"; public readonly isBranded = false; - public writeToFile(context: Context): void { - this.writeTypeAlias(context); + public generateStatements( + context: Context + ): string | WriterFunction | (string | WriterFunction | StatementStructures)[] { + const statements: StatementStructures[] = [this.generateTypeAlias(context)]; + const module = this.generateModule(context); + if (module) { + statements.push(module); + } + return statements; } - public buildExample(example: ExampleTypeShape, context: Context, opts: GetReferenceOpts): ts.Expression { - if (example.type !== "alias") { - throw new Error("Example is not for an alias"); - } - return context.type.getGeneratedExample(example.value).build(context, opts); + public generateForInlineUnion(context: Context): ts.TypeNode { + return context.type.getReferenceToType(this.shape).typeNode; } - private writeTypeAlias(context: Context) { - const typeAlias = context.sourceFile.addTypeAlias({ + private generateTypeAlias(context: Context): TypeAliasDeclarationStructure { + const typeAlias: TypeAliasDeclarationStructure = { + kind: StructureKind.TypeAlias, name: this.typeName, - type: getTextOfTsNode(context.type.getReferenceToType(this.shape).typeNode), + type: getTextOfTsNode(context.type.getReferenceToInlineAliasType(this.shape, this.typeName).typeNode), isExported: true + }; + maybeAddDocsStructure(typeAlias, this.getDocs(context)); + return typeAlias; + } + + public generateModule(context: Context): ModuleDeclarationStructure | undefined { + if (!this.enableInlineTypes) { + return undefined; + } + + return generateInlineAliasModule({ + aliasTypeName: this.typeName, + typeReference: this.shape, + generateStatements: (typeName, typeNameOverride) => + context.type.getGeneratedType(typeName, typeNameOverride).generateStatements(context), + getTypeDeclaration: (namedType) => context.type.getTypeDeclaration(namedType) }); - maybeAddDocs(typeAlias, this.getDocs(context)); + } + + public buildExample(example: ExampleTypeShape, context: Context, opts: GetReferenceOpts): ts.Expression { + if (example.type !== "alias") { + throw new Error("Example is not for an alias"); + } + return context.type.getGeneratedExample(example.value).build(context, opts); } } diff --git a/generators/typescript/model/type-generator/src/alias/GeneratedBrandedStringAliasImpl.ts b/generators/typescript/model/type-generator/src/alias/GeneratedBrandedStringAliasImpl.ts index 895b95f3991..e700272c7aa 100644 --- a/generators/typescript/model/type-generator/src/alias/GeneratedBrandedStringAliasImpl.ts +++ b/generators/typescript/model/type-generator/src/alias/GeneratedBrandedStringAliasImpl.ts @@ -1,19 +1,44 @@ import { ExampleTypeShape, TypeReference } from "@fern-fern/ir-sdk/api"; -import { GetReferenceOpts, getTextOfTsKeyword, getTextOfTsNode, maybeAddDocs } from "@fern-typescript/commons"; -import { BrandedGeneratedAliasType, ModelContext } from "@fern-typescript/contexts"; -import { ts } from "ts-morph"; +import { + GetReferenceOpts, + getTextOfTsKeyword, + getTextOfTsNode, + maybeAddDocsNode, + maybeAddDocsStructure, + writerToString +} from "@fern-typescript/commons"; +import { BrandedGeneratedAliasType, BaseContext } from "@fern-typescript/contexts"; +import { + FunctionDeclarationStructure, + ModuleDeclarationStructure, + StatementStructures, + StructureKind, + ts, + TypeAliasDeclarationStructure, + WriterFunction +} from "ts-morph"; import { AbstractGeneratedType } from "../AbstractGeneratedType"; -export class GeneratedBrandedStringAliasImpl +export class GeneratedBrandedStringAliasImpl extends AbstractGeneratedType implements BrandedGeneratedAliasType { public readonly type = "alias"; public readonly isBranded = true; - public writeToFile(context: Context): void { - this.writeTypeAlias(context); - this.writeBuilder(context); + public generateStatements( + context: Context + ): string | WriterFunction | (string | WriterFunction | StatementStructures)[] { + return [this.generateTypeAliasStructure(context), this.generateBuilderFunction(context)]; + } + + public generateForInlineUnion(context: Context): ts.TypeNode { + const type = writerToString(this.generateTypeAliasStructure(context).type); + return ts.factory.createTypeReferenceNode(type); + } + + public generateModule(): ModuleDeclarationStructure | undefined { + return undefined; } public getReferenceToCreator(context: Context, opts?: GetReferenceOpts): ts.Expression { @@ -29,10 +54,11 @@ export class GeneratedBrandedStringAliasImpl ]); } - private writeTypeAlias(context: Context) { + private generateTypeAliasStructure(context: Context): TypeAliasDeclarationStructure { const referenceToAliasedType = context.type.getReferenceToType(this.shape).typeNode; - const typeAlias = context.sourceFile.addTypeAlias({ + const typeAlias: TypeAliasDeclarationStructure = { name: this.typeName, + kind: StructureKind.TypeAlias, type: getTextOfTsNode( ts.factory.createIntersectionTypeNode([ referenceToAliasedType, @@ -47,13 +73,15 @@ export class GeneratedBrandedStringAliasImpl ]) ), isExported: true - }); - maybeAddDocs(typeAlias, this.getDocs(context)); + }; + maybeAddDocsStructure(typeAlias, this.getDocs(context)); + return typeAlias; } - private writeBuilder(context: Context) { + private generateBuilderFunction(context: Context): FunctionDeclarationStructure { const VALUE_PARAMETER_NAME = "value"; - context.sourceFile.addFunction({ + const builderFunction: FunctionDeclarationStructure = { + kind: StructureKind.Function, name: this.typeName, parameters: [ { @@ -76,7 +104,8 @@ export class GeneratedBrandedStringAliasImpl ) ], isExported: true - }); + }; + return builderFunction; } private getStringBrand(): string { diff --git a/generators/typescript/model/type-generator/src/enum/GeneratedEnumTypeImpl.ts b/generators/typescript/model/type-generator/src/enum/GeneratedEnumTypeImpl.ts index 4405053cb5b..e5dda9347b3 100644 --- a/generators/typescript/model/type-generator/src/enum/GeneratedEnumTypeImpl.ts +++ b/generators/typescript/model/type-generator/src/enum/GeneratedEnumTypeImpl.ts @@ -3,10 +3,23 @@ import { GetReferenceOpts, getTextOfTsNode, getWriterForMultiLineUnionType, - maybeAddDocs + maybeAddDocsNode, + maybeAddDocsStructure } from "@fern-typescript/commons"; import { BaseContext, GeneratedEnumType } from "@fern-typescript/contexts"; -import { OptionalKind, PropertySignatureStructure, ts, VariableDeclarationKind } from "ts-morph"; +import { + ModuleDeclarationStructure, + OptionalKind, + PropertySignatureStructure, + StatementStructures, + StructureKind, + ts, + TypeAliasDeclarationStructure, + VariableDeclarationKind, + VariableStatementStructure, + WriterFunction, + WriterFunctionOrValue +} from "ts-morph"; import { AbstractGeneratedType } from "../AbstractGeneratedType"; export declare namespace GeneratedEnumTypeImpl { @@ -34,28 +47,48 @@ export class GeneratedEnumTypeImpl this.includeEnumUtils = includeEnumUtils; } - public writeToFile(context: Context): void { - const type = context.sourceFile.addTypeAlias({ + private generateEnumType(context: Context): TypeAliasDeclarationStructure { + const type: TypeAliasDeclarationStructure = { + kind: StructureKind.TypeAlias, name: this.typeName, isExported: true, type: getWriterForMultiLineUnionType( this.shape.values.map((value) => ({ docs: value.docs, - node: ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(value.name.wireValue)) + node: ts.factory.createStringLiteral(value.name.wireValue) })) ) - }); + }; + + maybeAddDocsStructure(type, this.getDocs(context)); + return type; + } - maybeAddDocs(type, this.getDocs(context)); + public generateForInlineUnion(context: Context): ts.TypeNode { + return ts.factory.createParenthesizedType( + ts.factory.createUnionTypeNode( + this.shape.values.map((value) => + ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(value.name.wireValue)) + ) + ) + ); + } - this.addConst(context); + public generateStatements( + context: Context + ): string | WriterFunction | (string | WriterFunction | StatementStructures)[] { + const statements: (string | WriterFunction | StatementStructures)[] = [ + this.generateEnumType(context), + this.generateConst(context) + ]; if (this.includeEnumUtils) { - this.addModule(context); + statements.push(this.generateModule()); } + return statements; } - private addConst(context: Context) { + private generateConst(context: Context): VariableStatementStructure { const constProperties = this.shape.values.map((value) => ts.factory.createPropertyAssignment( ts.factory.createIdentifier(this.getEnumValueName(value)), @@ -160,7 +193,8 @@ export class GeneratedEnumTypeImpl ); } - context.sourceFile.addVariableStatement({ + return { + kind: StructureKind.VariableStatement, declarationKind: VariableDeclarationKind.Const, isExported: true, declarations: [ @@ -174,50 +208,55 @@ export class GeneratedEnumTypeImpl ) } ] - }); + }; } - private addModule(context: Context) { - const enumModule = context.sourceFile.addModule({ + public generateModule(): ModuleDeclarationStructure { + const enumModule: ModuleDeclarationStructure = { + kind: StructureKind.Module, name: this.typeName, isExported: true, - hasDeclareKeyword: true - }); - - enumModule.addInterface({ - name: GeneratedEnumTypeImpl.VISITOR_INTERFACE_NAME, - typeParameters: [GeneratedEnumTypeImpl.VISITOR_RETURN_TYPE_PARAMETER], - properties: [ - ...this.shape.values.map( - (enumValue): OptionalKind => ({ - name: this.getEnumValueVisitPropertyName(enumValue), - type: getTextOfTsNode( - ts.factory.createFunctionTypeNode( - undefined, - [], - ts.factory.createTypeReferenceNode( - GeneratedEnumTypeImpl.VISITOR_RETURN_TYPE_PARAMETER, - undefined - ) - ) - ) - }) - ), + hasDeclareKeyword: false, + statements: [ { - name: GeneratedEnumTypeImpl.OTHER_VISITOR_METHOD_NAME, - type: getTextOfTsNode( - ts.factory.createFunctionTypeNode( - undefined, - [], - ts.factory.createTypeReferenceNode( - GeneratedEnumTypeImpl.VISITOR_RETURN_TYPE_PARAMETER, - undefined + kind: StructureKind.Interface, + name: GeneratedEnumTypeImpl.VISITOR_INTERFACE_NAME, + typeParameters: [GeneratedEnumTypeImpl.VISITOR_RETURN_TYPE_PARAMETER], + properties: [ + ...this.shape.values.map( + (enumValue): OptionalKind => ({ + name: this.getEnumValueVisitPropertyName(enumValue), + type: getTextOfTsNode( + ts.factory.createFunctionTypeNode( + undefined, + [], + ts.factory.createTypeReferenceNode( + GeneratedEnumTypeImpl.VISITOR_RETURN_TYPE_PARAMETER, + undefined + ) + ) + ) + }) + ), + { + name: GeneratedEnumTypeImpl.OTHER_VISITOR_METHOD_NAME, + type: getTextOfTsNode( + ts.factory.createFunctionTypeNode( + undefined, + [], + ts.factory.createTypeReferenceNode( + GeneratedEnumTypeImpl.VISITOR_RETURN_TYPE_PARAMETER, + undefined + ) + ) ) - ) - ) + } + ] } ] - }); + }; + + return enumModule; } public buildExample(example: ExampleTypeShape, context: Context, opts: GetReferenceOpts): ts.Expression { diff --git a/generators/typescript/model/type-generator/src/object/GeneratedObjectTypeImpl.ts b/generators/typescript/model/type-generator/src/object/GeneratedObjectTypeImpl.ts index 3d1fcefb8c1..7582ae5bac9 100644 --- a/generators/typescript/model/type-generator/src/object/GeneratedObjectTypeImpl.ts +++ b/generators/typescript/model/type-generator/src/object/GeneratedObjectTypeImpl.ts @@ -1,50 +1,129 @@ import { ExampleTypeShape, ObjectProperty, ObjectTypeDeclaration, TypeReference } from "@fern-fern/ir-sdk/api"; -import { GetReferenceOpts, getTextOfTsNode, maybeAddDocs } from "@fern-typescript/commons"; -import { GeneratedObjectType, ModelContext } from "@fern-typescript/contexts"; -import { OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; +import { + generateInlinePropertiesModule, + GetReferenceOpts, + getTextOfTsNode, + maybeAddDocsStructure, + TypeReferenceNode +} from "@fern-typescript/commons"; +import { GeneratedObjectType, BaseContext } from "@fern-typescript/contexts"; +import { + InterfaceDeclarationStructure, + ModuleDeclarationStructure, + PropertySignatureStructure, + StatementStructures, + StructureKind, + ts, + WriterFunction +} from "ts-morph"; import { AbstractGeneratedType } from "../AbstractGeneratedType"; -export class GeneratedObjectTypeImpl +interface Property { + name: string; + type: ts.TypeNode; + hasQuestionToken: boolean; + docs: string | undefined; + irProperty: ObjectProperty | undefined; +} + +export class GeneratedObjectTypeImpl extends AbstractGeneratedType implements GeneratedObjectType { public readonly type = "object"; - public writeToFile(context: Context): void { - const interfaceNode = context.sourceFile.addInterface({ - name: this.typeName, - properties: [ - ...this.shape.properties.map((property) => { - const value = context.type.getReferenceToType(property.valueType); - const propertyNode: OptionalKind = { - name: `"${this.getPropertyKeyFromProperty(property)}"`, - type: getTextOfTsNode( - this.noOptionalProperties ? value.typeNode : value.typeNodeWithoutUndefined - ), - hasQuestionToken: !this.noOptionalProperties && value.isOptional, - docs: property.docs != null ? [{ description: property.docs }] : undefined - }; - - return propertyNode; - }), - ...(this.shape.extraProperties - ? [ - { - name: "[key: string]", // This is the simpler way to add an index signature - type: "any", - docs: [{ description: "Accepts any additional properties" }] - } - ] - : []) - ], - isExported: true + public generateStatements( + context: Context + ): string | WriterFunction | (string | WriterFunction | StatementStructures)[] { + const statements: (string | WriterFunction | StatementStructures)[] = [this.generateInterface(context)]; + const iModule = this.generateModule(context); + if (iModule) { + statements.push(iModule); + } + return statements; + } + + public generateForInlineUnion(context: Context): ts.TypeNode { + return ts.factory.createTypeLiteralNode( + this.generatePropertiesInternal(context).map(({ name, type, hasQuestionToken, docs, irProperty }) => { + let propertyValue: ts.TypeNode = type; + if (irProperty) { + const inlineUnionRef = context.type.getReferenceToTypeForInlineUnion(irProperty.valueType); + propertyValue = hasQuestionToken + ? inlineUnionRef.typeNode + : inlineUnionRef.typeNodeWithoutUndefined; + } + return ts.factory.createPropertySignature( + undefined, + ts.factory.createIdentifier(name), + hasQuestionToken ? ts.factory.createToken(ts.SyntaxKind.QuestionToken) : undefined, + propertyValue + ); + }) + ); + } + + public generateProperties(context: Context): PropertySignatureStructure[] { + return this.generatePropertiesInternal(context).map(({ name, type, hasQuestionToken, docs }) => { + const propertyNode: PropertySignatureStructure = { + kind: StructureKind.PropertySignature, + name, + type: getTextOfTsNode(type), + hasQuestionToken, + docs: docs != null ? [{ description: docs }] : undefined + }; + + return propertyNode; }); + } - maybeAddDocs(interfaceNode, this.getDocs(context)); + private generatePropertiesInternal(context: Context): Property[] { + const props = this.shape.properties.map((property) => { + const value = this.getTypeForObjectProperty(context, property); + const propertyNode: Property = { + name: `"${this.getPropertyKeyFromProperty(property)}"`, + type: this.noOptionalProperties ? value.typeNode : value.typeNodeWithoutUndefined, + hasQuestionToken: !this.noOptionalProperties && value.isOptional, + docs: property.docs, + irProperty: property + }; + return propertyNode; + }); + if (this.shape.extraProperties) { + props.push({ + name: "[key: string]", // This is the simpler way to add an index signature + type: ts.factory.createTypeReferenceNode("any"), + hasQuestionToken: false, + docs: "Accepts any additional properties", + irProperty: undefined + }); + } + return props; + } + + public generateInterface(context: Context): InterfaceDeclarationStructure { + const interfaceNode: InterfaceDeclarationStructure = { + kind: StructureKind.Interface, + name: this.typeName, + properties: [...this.generateProperties(context)], + isExported: true + }; + maybeAddDocsStructure(interfaceNode, this.getDocs(context)); + const iExtends = []; for (const extension of this.shape.extends) { - interfaceNode.addExtends(getTextOfTsNode(context.type.getReferenceToNamedType(extension).getTypeNode())); + iExtends.push(getTextOfTsNode(context.type.getReferenceToNamedType(extension).getTypeNode())); } + interfaceNode.extends = iExtends; + return interfaceNode; + } + + private getTypeForObjectProperty(context: Context, property: ObjectProperty): TypeReferenceNode { + return context.type.getReferenceToInlinePropertyType( + property.valueType, + this.typeName, + property.name.name.pascalCase.safeName + ); } public getPropertyKey({ propertyWireKey }: { propertyWireKey: string }): string { @@ -125,4 +204,20 @@ export class GeneratedObjectTypeImpl }) ]; } + + public generateModule(context: Context): ModuleDeclarationStructure | undefined { + if (!this.enableInlineTypes) { + return undefined; + } + return generateInlinePropertiesModule({ + parentTypeName: this.typeName, + properties: this.shape.properties.map((prop) => ({ + propertyName: prop.name.name.pascalCase.safeName, + typeReference: prop.valueType + })), + generateStatements: (typeName, typeNameOverride) => + context.type.getGeneratedType(typeName, typeNameOverride).generateStatements(context), + getTypeDeclaration: (namedType) => context.type.getTypeDeclaration(namedType) + }); + } } diff --git a/generators/typescript/model/type-generator/src/undiscriminated-union/GeneratedUndiscriminatedUnionTypeImpl.ts b/generators/typescript/model/type-generator/src/undiscriminated-union/GeneratedUndiscriminatedUnionTypeImpl.ts index 94a347ab875..655d8e0dd3a 100644 --- a/generators/typescript/model/type-generator/src/undiscriminated-union/GeneratedUndiscriminatedUnionTypeImpl.ts +++ b/generators/typescript/model/type-generator/src/undiscriminated-union/GeneratedUndiscriminatedUnionTypeImpl.ts @@ -1,28 +1,66 @@ -import { ExampleTypeShape, UndiscriminatedUnionTypeDeclaration } from "@fern-fern/ir-sdk/api"; -import { GetReferenceOpts, getWriterForMultiLineUnionType, maybeAddDocs } from "@fern-typescript/commons"; -import { GeneratedUndiscriminatedUnionType, ModelContext } from "@fern-typescript/contexts"; -import { ts } from "ts-morph"; +import { + ExampleTypeShape, + UndiscriminatedUnionMember, + UndiscriminatedUnionTypeDeclaration +} from "@fern-fern/ir-sdk/api"; +import { + GetReferenceOpts, + getWriterForMultiLineUnionType, + maybeAddDocsNode, + maybeAddDocsStructure +} from "@fern-typescript/commons"; +import { GeneratedUndiscriminatedUnionType, BaseContext } from "@fern-typescript/contexts"; +import { + ModuleDeclarationStructure, + StatementStructures, + StructureKind, + ts, + TypeAliasDeclarationStructure, + WriterFunction +} from "ts-morph"; import { AbstractGeneratedType } from "../AbstractGeneratedType"; -export class GeneratedUndiscriminatedUnionTypeImpl +export class GeneratedUndiscriminatedUnionTypeImpl extends AbstractGeneratedType implements GeneratedUndiscriminatedUnionType { public readonly type = "undiscriminatedUnion"; - public writeToFile(context: Context): void { - const type = context.sourceFile.addTypeAlias({ + public generateStatements( + context: Context + ): string | WriterFunction | (string | WriterFunction | StatementStructures)[] { + const statements: StatementStructures[] = [this.generateTypeAlias(context)]; + return statements; + } + + public generateForInlineUnion(context: Context): ts.TypeNode { + return ts.factory.createUnionTypeNode(this.shape.members.map((value) => this.getTypeNode(context, value))); + } + + public generateModule(): ModuleDeclarationStructure | undefined { + return undefined; + } + + private generateTypeAlias(context: Context): TypeAliasDeclarationStructure { + const alias: TypeAliasDeclarationStructure = { name: this.typeName, + kind: StructureKind.TypeAlias, isExported: true, type: getWriterForMultiLineUnionType( - this.shape.members.map((value) => ({ - docs: value.docs, - node: context.type.getReferenceToType(value.type).typeNode - })) + this.shape.members.map((value) => { + return { + docs: value.docs, + node: this.getTypeNode(context, value) + }; + }) ) - }); + }; + maybeAddDocsStructure(alias, this.getDocs(context)); + return alias; + } - maybeAddDocs(type, this.getDocs(context)); + private getTypeNode(context: Context, member: UndiscriminatedUnionMember): ts.TypeNode { + return context.type.getReferenceToTypeForInlineUnion(member.type).typeNode; } public buildExample(example: ExampleTypeShape, context: Context, opts: GetReferenceOpts): ts.Expression { diff --git a/generators/typescript/model/type-generator/src/union/GeneratedUnionTypeImpl.ts b/generators/typescript/model/type-generator/src/union/GeneratedUnionTypeImpl.ts index 5757e2c358a..90c632d2360 100644 --- a/generators/typescript/model/type-generator/src/union/GeneratedUnionTypeImpl.ts +++ b/generators/typescript/model/type-generator/src/union/GeneratedUnionTypeImpl.ts @@ -5,36 +5,40 @@ import { UnionTypeDeclaration } from "@fern-fern/ir-sdk/api"; import { GetReferenceOpts } from "@fern-typescript/commons"; -import { GeneratedUnion, GeneratedUnionType, ModelContext } from "@fern-typescript/contexts"; +import { GeneratedUnion, GeneratedUnionType, BaseContext } from "@fern-typescript/contexts"; import { GeneratedUnionImpl } from "@fern-typescript/union-generator"; -import { ts } from "ts-morph"; +import { ModuleDeclarationStructure, StatementStructures, ts, WriterFunction } from "ts-morph"; import { AbstractGeneratedType } from "../AbstractGeneratedType"; import { ParsedSingleUnionTypeForUnion } from "./ParsedSingleUnionTypeForUnion"; import { UnknownSingleUnionType } from "./UnknownSingleUnionType"; import { UnknownSingleUnionTypeGenerator } from "./UnknownSingleUnionTypeGenerator"; export declare namespace GeneratedUnionTypeImpl { - export interface Init + export interface Init extends AbstractGeneratedType.Init { includeUtilsOnUnionMembers: boolean; includeOtherInUnionTypes: boolean; + inline: boolean; } } -export class GeneratedUnionTypeImpl +export class GeneratedUnionTypeImpl extends AbstractGeneratedType implements GeneratedUnionType { public readonly type = "union"; private generatedUnion: GeneratedUnionImpl; + private readonly inline: boolean; constructor({ includeUtilsOnUnionMembers, includeOtherInUnionTypes, + inline, ...superInit }: GeneratedUnionTypeImpl.Init) { super(superInit); + this.inline = inline; const parsedSingleUnionTypes = this.shape.types.map( (singleUnionType) => @@ -44,7 +48,8 @@ export class GeneratedUnionTypeImpl includeUtilsOnUnionMembers, includeSerdeLayer: this.includeSerdeLayer, retainOriginalCasing: this.retainOriginalCasing, - noOptionalProperties: this.noOptionalProperties + noOptionalProperties: this.noOptionalProperties, + enableInlineTypes: this.enableInlineTypes }) ); @@ -67,12 +72,24 @@ export class GeneratedUnionTypeImpl baseProperties: this.shape.baseProperties, includeSerdeLayer: this.includeSerdeLayer, retainOriginalCasing: this.retainOriginalCasing, - noOptionalProperties: this.noOptionalProperties + noOptionalProperties: this.noOptionalProperties, + inline: this.inline, + enableInlineTypes: this.enableInlineTypes }); } - public writeToFile(context: Context): void { - this.generatedUnion.writeToFile(context); + public generateStatements( + context: Context + ): string | WriterFunction | (string | WriterFunction | StatementStructures)[] { + return this.generatedUnion.generateStatements(context); + } + + public generateForInlineUnion(context: Context): ts.TypeNode { + return this.generatedUnion.generateForInlineUnion(context); + } + + public generateModule(): ModuleDeclarationStructure | undefined { + return undefined; } public getGeneratedUnion(): GeneratedUnion { diff --git a/generators/typescript/model/type-generator/src/union/ParsedSingleUnionTypeForUnion.ts b/generators/typescript/model/type-generator/src/union/ParsedSingleUnionTypeForUnion.ts index 36da8b43008..4c456fdbdba 100644 --- a/generators/typescript/model/type-generator/src/union/ParsedSingleUnionTypeForUnion.ts +++ b/generators/typescript/model/type-generator/src/union/ParsedSingleUnionTypeForUnion.ts @@ -5,7 +5,7 @@ import { SingleUnionTypeProperty, UnionTypeDeclaration } from "@fern-fern/ir-sdk/api"; -import { ModelContext } from "@fern-typescript/contexts"; +import { BaseContext } from "@fern-typescript/contexts"; import { AbstractKnownSingleUnionType, NoPropertiesSingleUnionTypeGenerator, @@ -22,10 +22,11 @@ export declare namespace ParsedSingleUnionTypeForUnion { includeSerdeLayer: boolean; retainOriginalCasing: boolean; noOptionalProperties: boolean; + enableInlineTypes: boolean; } } -export class ParsedSingleUnionTypeForUnion extends AbstractKnownSingleUnionType { +export class ParsedSingleUnionTypeForUnion extends AbstractKnownSingleUnionType { private singleUnionTypeFromUnion: SingleUnionType; private includeSerdeLayer: boolean; private retainOriginalCasing: boolean; @@ -37,7 +38,8 @@ export class ParsedSingleUnionTypeForUnion extends includeUtilsOnUnionMembers, includeSerdeLayer, retainOriginalCasing, - noOptionalProperties + noOptionalProperties, + enableInlineTypes }: ParsedSingleUnionTypeForUnion.Init) { super({ singleUnionType: SingleUnionTypeProperties._visit>( @@ -45,7 +47,7 @@ export class ParsedSingleUnionTypeForUnion extends { noProperties: () => new NoPropertiesSingleUnionTypeGenerator(), samePropertiesAsObject: (extended) => - new SamePropertiesAsObjectSingleUnionTypeGenerator({ extended }), + new SamePropertiesAsObjectSingleUnionTypeGenerator({ extended, enableInlineTypes }), singleProperty: (singleProperty) => new SinglePropertySingleUnionTypeGenerator({ propertyName: ParsedSingleUnionTypeForUnion.getSinglePropertyKey(singleProperty, { @@ -54,7 +56,10 @@ export class ParsedSingleUnionTypeForUnion extends }), getReferenceToPropertyType: (context) => context.type.getReferenceToType(singleProperty.type), - noOptionalProperties + getReferenceToPropertyTypeForInlineUnion: (context) => + context.type.getReferenceToTypeForInlineUnion(singleProperty.type), + noOptionalProperties, + enableInlineTypes }), _other: () => { throw new Error("Unknown SingleUnionTypeProperties: " + singleUnionType.shape.propertiesType); diff --git a/generators/typescript/model/type-generator/src/union/SamePropertiesAsObjectSingleUnionTypeGenerator.ts b/generators/typescript/model/type-generator/src/union/SamePropertiesAsObjectSingleUnionTypeGenerator.ts index 7c62f2b5e14..3ffa593082e 100644 --- a/generators/typescript/model/type-generator/src/union/SamePropertiesAsObjectSingleUnionTypeGenerator.ts +++ b/generators/typescript/model/type-generator/src/union/SamePropertiesAsObjectSingleUnionTypeGenerator.ts @@ -1,29 +1,69 @@ import { DeclaredTypeName } from "@fern-fern/ir-sdk/api"; -import { ModelContext } from "@fern-typescript/contexts"; +import { BaseContext } from "@fern-typescript/contexts"; import { SingleUnionTypeGenerator } from "@fern-typescript/union-generator"; -import { OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; +import { ModuleDeclarationStructure, OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; export declare namespace SamePropertiesAsObjectSingleUnionTypeGenerator { export interface Init { extended: DeclaredTypeName; + enableInlineTypes: boolean; } } -export class SamePropertiesAsObjectSingleUnionTypeGenerator +export class SamePropertiesAsObjectSingleUnionTypeGenerator implements SingleUnionTypeGenerator { private static BUILDER_PARAMETER_NAME = "value"; private extended: DeclaredTypeName; + private enableInlineTypes: boolean; - constructor({ extended }: SamePropertiesAsObjectSingleUnionTypeGenerator.Init) { + constructor({ extended, enableInlineTypes }: SamePropertiesAsObjectSingleUnionTypeGenerator.Init) { this.extended = extended; + this.enableInlineTypes = enableInlineTypes; + } + + public generateForInlineUnion(context: Context): ts.TypeNode { + const typeDeclaration = context.type.getTypeDeclaration(this.extended); + if (typeDeclaration.inline) { + const type = context.type.getGeneratedType(typeDeclaration.name); + return type.generateForInlineUnion(context); + } + return context.type.getReferenceToNamedType(this.extended).getTypeNode(); } public getExtendsForInterface(context: Context): ts.TypeNode[] { + const typeDeclaration = context.type.getTypeDeclaration(this.extended); + if (this.enableInlineTypes && typeDeclaration.inline) { + // inline types don't inherit the properties from the interface, but have the properties directly on the parent interface + return []; + } return [context.type.getReferenceToNamedType(this.extended).getTypeNode()]; } + public getDiscriminantPropertiesForInterface(context: Context): OptionalKind[] { + const typeDeclaration = context.type.getTypeDeclaration(this.extended); + if (this.enableInlineTypes && typeDeclaration.inline) { + const type = context.type.getGeneratedType(typeDeclaration.name); + if (type.type === "object") { + return type.generateProperties(context); + } + } + return []; + } + + public generateModule(context: Context): ModuleDeclarationStructure | undefined { + if (!this.enableInlineTypes) { + return undefined; + } + const typeDeclaration = context.type.getTypeDeclaration(this.extended); + if (!typeDeclaration.inline) { + return undefined; + } + const type = context.type.getGeneratedType(typeDeclaration.name); + return type.generateModule(context); + } + public getNonDiscriminantPropertiesForInterface(): OptionalKind[] { return []; } diff --git a/generators/typescript/model/type-generator/src/union/UnknownSingleUnionType.ts b/generators/typescript/model/type-generator/src/union/UnknownSingleUnionType.ts index 87fe64ae931..8f8cb0725bb 100644 --- a/generators/typescript/model/type-generator/src/union/UnknownSingleUnionType.ts +++ b/generators/typescript/model/type-generator/src/union/UnknownSingleUnionType.ts @@ -1,7 +1,7 @@ -import { ModelContext } from "@fern-typescript/contexts"; +import { BaseContext } from "@fern-typescript/contexts"; import { AbstractUnknownSingleUnionType } from "@fern-typescript/union-generator"; -export class UnknownSingleUnionType extends AbstractUnknownSingleUnionType { +export class UnknownSingleUnionType extends AbstractUnknownSingleUnionType { public getDocs(): string | null | undefined { return undefined; } diff --git a/generators/typescript/model/type-generator/src/union/UnknownSingleUnionTypeGenerator.ts b/generators/typescript/model/type-generator/src/union/UnknownSingleUnionTypeGenerator.ts index b003385945e..75697b73ae3 100644 --- a/generators/typescript/model/type-generator/src/union/UnknownSingleUnionTypeGenerator.ts +++ b/generators/typescript/model/type-generator/src/union/UnknownSingleUnionTypeGenerator.ts @@ -1,14 +1,26 @@ -import { ModelContext } from "@fern-typescript/contexts"; +import { BaseContext } from "@fern-typescript/contexts"; import { SingleUnionTypeGenerator } from "@fern-typescript/union-generator"; -import { OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; +import { ModuleDeclarationStructure, OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; -export class UnknownSingleUnionTypeGenerator implements SingleUnionTypeGenerator { +export class UnknownSingleUnionTypeGenerator implements SingleUnionTypeGenerator { private static BUILDER_PARAMETER_NAME = "value"; + public generateForInlineUnion(context: BaseContext): ts.TypeNode { + return ts.factory.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword); + } + public getExtendsForInterface(): ts.TypeNode[] { return []; } + public getDiscriminantPropertiesForInterface(): OptionalKind[] { + return []; + } + + public generateModule(context: BaseContext): ModuleDeclarationStructure | undefined { + return undefined; + } + public getNonDiscriminantPropertiesForInterface(): OptionalKind[] { return []; } @@ -22,7 +34,7 @@ export class UnknownSingleUnionTypeGenerator implements SingleUnionTypeGenerator } public getVisitMethodParameterType( - _context: ModelContext, + _context: BaseContext, { discriminant }: { discriminant: string } ): ts.TypeNode | undefined { return ts.factory.createTypeLiteralNode([ @@ -36,7 +48,7 @@ export class UnknownSingleUnionTypeGenerator implements SingleUnionTypeGenerator } public getParametersForBuilder( - _context: ModelContext, + _context: BaseContext, { discriminant }: { discriminant: string } ): ts.ParameterDeclaration[] { return [ diff --git a/generators/typescript/model/type-reference-converters/package.json b/generators/typescript/model/type-reference-converters/package.json index b19dd645d68..e5405ede708 100644 --- a/generators/typescript/model/type-reference-converters/package.json +++ b/generators/typescript/model/type-reference-converters/package.json @@ -27,7 +27,8 @@ "depcheck": "depcheck" }, "dependencies": { - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", + "@fern-api/core-utils": "workspace:*", "@fern-typescript/commons": "workspace:*", "@fern-typescript/resolvers": "workspace:*", "ts-morph": "^15.1.0" diff --git a/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceConverter.ts b/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceConverter.ts index d191e53c8d5..e698ff62e20 100644 --- a/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceConverter.ts +++ b/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceConverter.ts @@ -18,63 +18,129 @@ export declare namespace AbstractTypeReferenceConverter { treatUnknownAsAny: boolean; includeSerdeLayer: boolean; useBigInt: boolean; + enableInlineTypes: boolean; } } +export type ConvertTypeReferenceParams = + | ConvertTypeReferenceParams.DefaultParams + | ConvertTypeReferenceParams.InlinePropertyTypeParams + | ConvertTypeReferenceParams.InlineAliasTypeParams + | ConvertTypeReferenceParams.ForInlineUnionTypeParams; + +export namespace ConvertTypeReferenceParams { + export function isInlinePropertyParams(params: ConvertTypeReferenceParams): params is InlinePropertyTypeParams { + return params.type === "inlinePropertyParams"; + } + export function isInlineAliasParams(params: ConvertTypeReferenceParams): params is InlineAliasTypeParams { + return params.type === "inlineAliasParams"; + } + export function isForInlineUnionParams(params: ConvertTypeReferenceParams): params is ForInlineUnionTypeParams { + return params.type === "forInlineUnionParams"; + } + export function hasGenericIn( + params: ConvertTypeReferenceParams + ): params is InlinePropertyTypeParams | InlineAliasTypeParams { + return isInlinePropertyParams(params) || isInlineAliasParams(params); + } + + export interface DefaultParams extends WithTypeReference { + type?: undefined; + } + + /** + * Metadata for converting inline types + */ + export interface InlinePropertyTypeParams extends WithGenericIn, WithTypeReference { + type: "inlinePropertyParams"; + parentTypeName: string; + propertyName: string; + } + + export interface InlineAliasTypeParams extends WithGenericIn, WithTypeReference { + type: "inlineAliasParams"; + aliasTypeName: string; + } + + export interface ForInlineUnionTypeParams extends WithTypeReference { + type: "forInlineUnionParams"; + } + + export interface WithGenericIn { + genericIn?: GenericIn; + } + + export interface WithTypeReference { + typeReference: TypeReference; + } + + export const GenericIn = { + List: "list", + Map: "map", + Set: "set" + } as const; + export type GenericIn = typeof GenericIn[keyof typeof GenericIn]; +} + +const genericIn = ConvertTypeReferenceParams.GenericIn; + export abstract class AbstractTypeReferenceConverter { protected typeResolver: TypeResolver; protected treatUnknownAsAny: boolean; protected includeSerdeLayer: boolean; protected useBigInt: boolean; + protected enableInlineTypes: boolean; constructor({ typeResolver, treatUnknownAsAny, includeSerdeLayer, - useBigInt + useBigInt, + enableInlineTypes }: AbstractTypeReferenceConverter.Init) { this.typeResolver = typeResolver; this.treatUnknownAsAny = treatUnknownAsAny; this.includeSerdeLayer = includeSerdeLayer; this.useBigInt = useBigInt; + this.enableInlineTypes = enableInlineTypes; } - public convert(typeReference: TypeReference): T { - return TypeReference._visit(typeReference, { - named: this.named.bind(this), - primitive: this.primitive.bind(this), - container: this.container.bind(this), - unknown: this.treatUnknownAsAny ? this.any.bind(this) : this.unknown.bind(this), + public convert(params: ConvertTypeReferenceParams): T { + return TypeReference._visit(params.typeReference, { + named: (type) => this.named(type, params), + primitive: (type) => this.primitive(type), + container: (type) => this.container(type, params), + unknown: () => (this.treatUnknownAsAny ? this.any() : this.unknown()), _other: () => { - throw new Error("Unexpected type reference: " + typeReference.type); + throw new Error("Unexpected type reference: " + params.typeReference.type); } }); } - protected container(container: ContainerType): T { + protected container(container: ContainerType, params: ConvertTypeReferenceParams): T { return ContainerType._visit(container, { - map: this.map.bind(this), - list: this.list.bind(this), - set: this.set.bind(this), - optional: this.optional.bind(this), - literal: this.literal.bind(this), + map: (type) => this.map(type, setGenericIn(params, genericIn.Map)), + list: (type) => this.list(type, setGenericIn(params, genericIn.List)), + set: (type) => this.set(type, setGenericIn(params, genericIn.Set)), + optional: (type) => this.optional(type, params), + literal: (type) => this.literal(type, params), _other: () => { throw new Error("Unexpected container type: " + container.type); } }); } - protected abstract named(typeName: DeclaredTypeName): T; + protected abstract named(typeName: DeclaredTypeName, params: ConvertTypeReferenceParams): T; protected abstract string(): T; protected abstract number(): T; protected abstract long(): T; protected abstract bigInteger(): T; protected abstract boolean(): T; protected abstract dateTime(): T; - protected abstract list(itemType: TypeReference): T; - protected abstract set(itemType: TypeReference): T; - protected abstract optional(itemType: TypeReference): T; - protected abstract literal(literal: Literal): T; + protected abstract list(itemType: TypeReference, params: ConvertTypeReferenceParams): T; + protected abstract set(itemType: TypeReference, params: ConvertTypeReferenceParams): T; + protected abstract optional(itemType: TypeReference, params: ConvertTypeReferenceParams): T; + protected abstract literal(literal: Literal, params: ConvertTypeReferenceParams): T; protected abstract unknown(): T; protected abstract any(): T; @@ -99,17 +165,17 @@ export abstract class AbstractTypeReferenceConverter { }); } - protected map(mapType: MapType): T { + protected map(mapType: MapType, params: ConvertTypeReferenceParams): T { const resolvdKeyType = this.typeResolver.resolveTypeReference(mapType.keyType); if (resolvdKeyType.type === "named" && resolvdKeyType.shape === ShapeType.Enum) { - return this.mapWithEnumKeys(mapType); + return this.mapWithEnumKeys(mapType, params); } else { - return this.mapWithNonEnumKeys(mapType); + return this.mapWithNonEnumKeys(mapType, params); } } - protected abstract mapWithEnumKeys(mapType: MapType): T; - protected abstract mapWithNonEnumKeys(mapType: MapType): T; + protected abstract mapWithEnumKeys(mapType: MapType, params: ConvertTypeReferenceParams): T; + protected abstract mapWithNonEnumKeys(mapType: MapType, params: ConvertTypeReferenceParams): T; protected isTypeReferencePrimitive(typeReference: TypeReference): boolean { const resolvedType = this.typeResolver.resolveTypeReference(typeReference); @@ -130,3 +196,16 @@ export abstract class AbstractTypeReferenceConverter { }; } } + +function setGenericIn( + params: ConvertTypeReferenceParams, + genericIn: ConvertTypeReferenceParams.GenericIn +): ConvertTypeReferenceParams { + if (ConvertTypeReferenceParams.hasGenericIn(params)) { + params = { + ...params, + genericIn + }; + } + return params; +} diff --git a/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceToTypeNodeConverter.ts b/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceToTypeNodeConverter.ts index 5651e791176..b49c7aeed11 100644 --- a/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceToTypeNodeConverter.ts +++ b/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceToTypeNodeConverter.ts @@ -1,26 +1,38 @@ import { DeclaredTypeName, Literal, MapType, ResolvedTypeReference, TypeReference } from "@fern-fern/ir-sdk/api"; import { TypeReferenceNode } from "@fern-typescript/commons"; import { ts } from "ts-morph"; -import { AbstractTypeReferenceConverter } from "./AbstractTypeReferenceConverter"; +import { assertNever } from "@fern-api/core-utils"; +import { AbstractTypeReferenceConverter, ConvertTypeReferenceParams } from "./AbstractTypeReferenceConverter"; +import { InlineConsts } from "@fern-typescript/commons/src/codegen-utils/inlineConsts"; export declare namespace AbstractTypeReferenceToTypeNodeConverter { export interface Init extends AbstractTypeReferenceConverter.Init { - getReferenceToNamedType: (typeName: DeclaredTypeName) => ts.EntityName; + getReferenceToNamedType: (typeName: DeclaredTypeName, params: ConvertTypeReferenceParams) => ts.EntityName; + generateForInlineUnion(typeName: DeclaredTypeName): ts.TypeNode; } } export abstract class AbstractTypeReferenceToTypeNodeConverter extends AbstractTypeReferenceConverter { - protected getReferenceToNamedType: (typeName: DeclaredTypeName) => ts.EntityName; - - constructor({ getReferenceToNamedType, ...superInit }: AbstractTypeReferenceToTypeNodeConverter.Init) { + protected getReferenceToNamedType: ( + typeName: DeclaredTypeName, + params: ConvertTypeReferenceParams + ) => ts.EntityName; + protected generateForInlineUnion: (typeName: DeclaredTypeName) => ts.TypeNode; + + constructor({ + getReferenceToNamedType, + generateForInlineUnion, + ...superInit + }: AbstractTypeReferenceToTypeNodeConverter.Init) { super(superInit); this.getReferenceToNamedType = getReferenceToNamedType; + this.generateForInlineUnion = generateForInlineUnion; } - protected override named(typeName: DeclaredTypeName): TypeReferenceNode { + protected override named(typeName: DeclaredTypeName, params: ConvertTypeReferenceParams): TypeReferenceNode { const resolvedType = this.typeResolver.resolveTypeName(typeName); const isOptional = ResolvedTypeReference._visit(resolvedType, { - container: (container) => this.container(container).isOptional, + container: (container) => this.container(container, params).isOptional, primitive: (primitive) => this.primitive(primitive).isOptional, named: () => false, unknown: () => this.unknown().isOptional, @@ -29,7 +41,26 @@ export abstract class AbstractTypeReferenceToTypeNodeConverter extends AbstractT } }); - const typeNodeWithoutUndefined = ts.factory.createTypeReferenceNode(this.getReferenceToNamedType(typeName)); + let typeNodeWithoutUndefined: ts.TypeNode; + const typeDeclaration = this.typeResolver.getTypeDeclarationFromName(typeName); + if (this.enableInlineTypes && typeDeclaration.inline) { + if (ConvertTypeReferenceParams.isInlinePropertyParams(params)) { + typeNodeWithoutUndefined = this.createTypeRefenceForInlinePropertyNamedType(params); + } else if (ConvertTypeReferenceParams.isInlineAliasParams(params)) { + typeNodeWithoutUndefined = this.createTypeRefenceForInlineAliasNamedType(typeName, params); + } else if (ConvertTypeReferenceParams.isForInlineUnionParams(params)) { + typeNodeWithoutUndefined = this.createTypeRefenceForInlineNamedTypeForInlineUnion(typeName); + } else { + typeNodeWithoutUndefined = ts.factory.createTypeReferenceNode( + this.getReferenceToNamedType(typeName, params) + ); + } + } else { + typeNodeWithoutUndefined = ts.factory.createTypeReferenceNode( + this.getReferenceToNamedType(typeName, params) + ); + } + if (!isOptional) { return this.generateNonOptionalTypeReferenceNode(typeNodeWithoutUndefined); } else { @@ -41,6 +72,60 @@ export abstract class AbstractTypeReferenceToTypeNodeConverter extends AbstractT } } + private createTypeRefenceForInlineNamedTypeForInlineUnion(typeName: DeclaredTypeName): ts.TypeNode { + return this.generateForInlineUnion(typeName); + } + + private createTypeRefenceForInlineAliasNamedType( + typeName: DeclaredTypeName, + params: ConvertTypeReferenceParams.InlineAliasTypeParams + ): ts.TypeNode { + let name: ts.EntityName = ts.factory.createIdentifier(params.aliasTypeName); + switch (params.genericIn) { + case "list": + name = ts.factory.createQualifiedName(name, InlineConsts.LIST_ITEM_TYPE_NAME); + break; + case "map": + name = ts.factory.createQualifiedName(name, InlineConsts.MAP_VALUE_TYPE_NAME); + break; + case "set": + name = ts.factory.createQualifiedName(name, InlineConsts.LIST_ITEM_TYPE_NAME); + break; + default: + return ts.factory.createTypeReferenceNode(this.getReferenceToNamedType(typeName, params)); + } + + return ts.factory.createTypeReferenceNode(name); + } + + private createTypeRefenceForInlinePropertyNamedType({ + parentTypeName, + propertyName, + genericIn + }: ConvertTypeReferenceParams.InlinePropertyTypeParams): ts.TypeNode { + let name = ts.factory.createQualifiedName( + ts.factory.createIdentifier(parentTypeName), + ts.factory.createIdentifier(propertyName) + ); + switch (genericIn) { + case "list": + name = ts.factory.createQualifiedName(name, InlineConsts.LIST_ITEM_TYPE_NAME); + break; + case "map": + name = ts.factory.createQualifiedName(name, InlineConsts.MAP_VALUE_TYPE_NAME); + break; + case "set": + name = ts.factory.createQualifiedName(name, InlineConsts.LIST_ITEM_TYPE_NAME); + break; + case undefined: + break; + default: + assertNever(genericIn); + } + + return ts.factory.createTypeReferenceNode(name); + } + protected override string(): TypeReferenceNode { return this.generateNonOptionalTypeReferenceNode(ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword)); } @@ -73,8 +158,8 @@ export abstract class AbstractTypeReferenceToTypeNodeConverter extends AbstractT return this.generateNonOptionalTypeReferenceNode(ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword)); } - protected override optional(itemType: TypeReference): TypeReferenceNode { - const referencedToValueType = this.convert(itemType).typeNode; + protected override optional(itemType: TypeReference, params: ConvertTypeReferenceParams): TypeReferenceNode { + const referencedToValueType = this.convert({ ...params, typeReference: itemType }).typeNode; return { isOptional: true, typeNode: this.addUndefinedToTypeNode(referencedToValueType), @@ -107,9 +192,9 @@ export abstract class AbstractTypeReferenceToTypeNodeConverter extends AbstractT }; } - protected override list(itemType: TypeReference): TypeReferenceNode { + protected override list(itemType: TypeReference, params: ConvertTypeReferenceParams): TypeReferenceNode { return this.generateNonOptionalTypeReferenceNode( - ts.factory.createArrayTypeNode(this.convert(itemType).typeNode) + ts.factory.createArrayTypeNode(this.convert({ ...params, typeReference: itemType }).typeNode) ); } @@ -139,25 +224,25 @@ export abstract class AbstractTypeReferenceToTypeNodeConverter extends AbstractT }); } - protected override mapWithEnumKeys(map: MapType): TypeReferenceNode { - return this.mapWithOptionalValues(map); + protected override mapWithEnumKeys(map: MapType, params: ConvertTypeReferenceParams): TypeReferenceNode { + return this.mapWithOptionalValues(map, params); } - protected override mapWithNonEnumKeys(map: MapType): TypeReferenceNode { + protected override mapWithNonEnumKeys(map: MapType, params: ConvertTypeReferenceParams): TypeReferenceNode { return this.generateNonOptionalTypeReferenceNode( ts.factory.createTypeReferenceNode("Record", [ - this.convert(map.keyType).typeNode, - this.convert(map.valueType).typeNode + this.convert({ ...params, typeReference: map.keyType }).typeNode, + this.convert({ ...params, typeReference: map.valueType }).typeNode ]) ); } - protected mapWithOptionalValues(map: MapType): TypeReferenceNode { - const valueType = this.convert(map.valueType); + protected mapWithOptionalValues(map: MapType, params: ConvertTypeReferenceParams): TypeReferenceNode { + const valueType = this.convert({ ...params, typeReference: map.valueType }); return this.generateNonOptionalTypeReferenceNode( ts.factory.createTypeReferenceNode("Record", [ - this.convert(map.keyType).typeNode, - (valueType.isOptional ? valueType : this.optional(map.valueType)).typeNode + this.convert({ ...params, typeReference: map.keyType }).typeNode, + (valueType.isOptional ? valueType : this.optional(map.valueType, params)).typeNode ]) ); } diff --git a/generators/typescript/model/type-reference-converters/src/TypeReferenceToParsedTypeNodeConverter.ts b/generators/typescript/model/type-reference-converters/src/TypeReferenceToParsedTypeNodeConverter.ts index 7de607125bc..343fabec135 100644 --- a/generators/typescript/model/type-reference-converters/src/TypeReferenceToParsedTypeNodeConverter.ts +++ b/generators/typescript/model/type-reference-converters/src/TypeReferenceToParsedTypeNodeConverter.ts @@ -1,6 +1,7 @@ import { TypeReference } from "@fern-fern/ir-sdk/api"; import { TypeReferenceNode } from "@fern-typescript/commons"; import { ts } from "ts-morph"; +import { ConvertTypeReferenceParams } from "./AbstractTypeReferenceConverter"; import { AbstractTypeReferenceToTypeNodeConverter } from "./AbstractTypeReferenceToTypeNodeConverter"; export declare namespace TypeReferenceToParsedTypeNodeConverter { @@ -8,12 +9,12 @@ export declare namespace TypeReferenceToParsedTypeNodeConverter { } export class TypeReferenceToParsedTypeNodeConverter extends AbstractTypeReferenceToTypeNodeConverter { - protected override set(itemType: TypeReference): TypeReferenceNode { + protected override set(itemType: TypeReference, params: ConvertTypeReferenceParams): TypeReferenceNode { if (this.includeSerdeLayer && this.isTypeReferencePrimitive(itemType)) { - const itemTypeNode = this.convert(itemType).typeNode; + const itemTypeNode = this.convert({ ...params, typeReference: itemType }).typeNode; return this.generateNonOptionalTypeReferenceNode(ts.factory.createTypeReferenceNode("Set", [itemTypeNode])); } else { - return this.list(itemType); + return this.list(itemType, params); } } diff --git a/generators/typescript/model/type-reference-converters/src/TypeReferenceToRawTypeNodeConverter.ts b/generators/typescript/model/type-reference-converters/src/TypeReferenceToRawTypeNodeConverter.ts index 4bb04a41297..aeb0d6ae57a 100644 --- a/generators/typescript/model/type-reference-converters/src/TypeReferenceToRawTypeNodeConverter.ts +++ b/generators/typescript/model/type-reference-converters/src/TypeReferenceToRawTypeNodeConverter.ts @@ -1,17 +1,18 @@ import { TypeReference } from "@fern-fern/ir-sdk/api"; import { TypeReferenceNode } from "@fern-typescript/commons"; import { ts } from "ts-morph"; +import { ConvertTypeReferenceParams } from "./AbstractTypeReferenceConverter"; import { AbstractTypeReferenceToTypeNodeConverter } from "./AbstractTypeReferenceToTypeNodeConverter"; export class TypeReferenceToRawTypeNodeConverter extends AbstractTypeReferenceToTypeNodeConverter { - protected override set(itemType: TypeReference): TypeReferenceNode { + protected override set(itemType: TypeReference, params: ConvertTypeReferenceParams): TypeReferenceNode { return this.generateNonOptionalTypeReferenceNode( - ts.factory.createArrayTypeNode(this.convert(itemType).typeNode) + ts.factory.createArrayTypeNode(this.convert({ ...params, typeReference: itemType }).typeNode) ); } - protected override optional(itemType: TypeReference): TypeReferenceNode { - const referencedToValueType = this.convert(itemType).typeNode; + protected override optional(itemType: TypeReference, params: ConvertTypeReferenceParams): TypeReferenceNode { + const referencedToValueType = this.convert({ ...params, typeReference: itemType }).typeNode; return { isOptional: true, typeNode: ts.factory.createUnionTypeNode([ diff --git a/generators/typescript/model/type-reference-converters/src/TypeReferenceToSchemaConverter.ts b/generators/typescript/model/type-reference-converters/src/TypeReferenceToSchemaConverter.ts index 2c826715b6d..e3f96b82cea 100644 --- a/generators/typescript/model/type-reference-converters/src/TypeReferenceToSchemaConverter.ts +++ b/generators/typescript/model/type-reference-converters/src/TypeReferenceToSchemaConverter.ts @@ -1,6 +1,6 @@ import { DeclaredTypeName, Literal, MapType, TypeReference } from "@fern-fern/ir-sdk/api"; import { Zurg } from "@fern-typescript/commons"; -import { AbstractTypeReferenceConverter } from "./AbstractTypeReferenceConverter"; +import { AbstractTypeReferenceConverter, ConvertTypeReferenceParams } from "./AbstractTypeReferenceConverter"; export declare namespace TypeReferenceToSchemaConverter { export interface Init extends AbstractTypeReferenceConverter.Init { @@ -19,7 +19,7 @@ export class TypeReferenceToSchemaConverter extends AbstractTypeReferenceConvert this.zurg = zurg; } - protected override named(typeName: DeclaredTypeName): Zurg.Schema { + protected override named(typeName: DeclaredTypeName, params: ConvertTypeReferenceParams): Zurg.Schema { return this.getSchemaOfNamedType(typeName); } @@ -53,8 +53,8 @@ export class TypeReferenceToSchemaConverter extends AbstractTypeReferenceConvert return this.zurg.date(); } - protected override optional(itemType: TypeReference): Zurg.Schema { - return this.convert(itemType).optional(); + protected override optional(itemType: TypeReference, params: ConvertTypeReferenceParams): Zurg.Schema { + return this.convert({ ...params, typeReference: itemType }).optional(); } protected override unknown(): Zurg.Schema { @@ -65,8 +65,8 @@ export class TypeReferenceToSchemaConverter extends AbstractTypeReferenceConvert return this.zurg.any(); } - protected override list(itemType: TypeReference): Zurg.Schema { - return this.zurg.list(this.convert(itemType)); + protected override list(itemType: TypeReference, params: ConvertTypeReferenceParams): Zurg.Schema { + return this.zurg.list(this.convert({ ...params, typeReference: itemType })); } protected override literal(literal: Literal): Zurg.Schema { @@ -79,30 +79,33 @@ export class TypeReferenceToSchemaConverter extends AbstractTypeReferenceConvert }); } - protected override mapWithEnumKeys(map: MapType): Zurg.Schema { - return this.mapWithOptionalValues(map); + protected override mapWithEnumKeys(map: MapType, params: ConvertTypeReferenceParams): Zurg.Schema { + return this.mapWithOptionalValues(map, params); } - protected override mapWithNonEnumKeys({ keyType, valueType }: MapType): Zurg.Schema { + protected override mapWithNonEnumKeys( + { keyType, valueType }: MapType, + params: ConvertTypeReferenceParams + ): Zurg.Schema { return this.zurg.record({ - keySchema: this.convert(keyType), - valueSchema: this.convert(valueType) + keySchema: this.convert({ ...params, typeReference: keyType }), + valueSchema: this.convert({ ...params, typeReference: valueType }) }); } - protected mapWithOptionalValues({ keyType, valueType }: MapType): Zurg.Schema { - const valueSchema = this.convert(valueType); + protected mapWithOptionalValues({ keyType, valueType }: MapType, params: ConvertTypeReferenceParams): Zurg.Schema { + const valueSchema = this.convert({ ...params, typeReference: valueType }); return this.zurg.record({ - keySchema: this.convert(keyType), + keySchema: this.convert({ ...params, typeReference: keyType }), valueSchema: valueSchema.isOptional ? valueSchema : valueSchema.optional() }); } - protected override set(itemType: TypeReference): Zurg.Schema { + protected override set(itemType: TypeReference, params: ConvertTypeReferenceParams): Zurg.Schema { if (this.isTypeReferencePrimitive(itemType)) { - return this.zurg.set(this.convert(itemType)); + return this.zurg.set(this.convert({ ...params, typeReference: itemType })); } else { - return this.list(itemType); + return this.list(itemType, params); } } } diff --git a/generators/typescript/model/type-reference-converters/src/TypeReferenceToStringExpressionConverter.ts b/generators/typescript/model/type-reference-converters/src/TypeReferenceToStringExpressionConverter.ts index 6fbdaec0fbd..9effd39cfcf 100644 --- a/generators/typescript/model/type-reference-converters/src/TypeReferenceToStringExpressionConverter.ts +++ b/generators/typescript/model/type-reference-converters/src/TypeReferenceToStringExpressionConverter.ts @@ -7,7 +7,7 @@ import { TypeReference } from "@fern-fern/ir-sdk/api"; import { ts } from "ts-morph"; -import { AbstractTypeReferenceConverter } from "./AbstractTypeReferenceConverter"; +import { AbstractTypeReferenceConverter, ConvertTypeReferenceParams } from "./AbstractTypeReferenceConverter"; export declare namespace TypeReferenceToStringExpressionConverter { export interface Init extends AbstractTypeReferenceConverter.Init {} @@ -16,7 +16,10 @@ export declare namespace TypeReferenceToStringExpressionConverter { export class TypeReferenceToStringExpressionConverter extends AbstractTypeReferenceConverter< (reference: ts.Expression) => ts.Expression > { - public convertWithNullCheckIfOptional(type: TypeReference): (reference: ts.Expression) => ts.Expression { + public convertWithNullCheckIfOptional( + params: ConvertTypeReferenceParams + ): (reference: ts.Expression) => ts.Expression { + const type = params.typeReference; const isNullable = TypeReference._visit(type, { named: (typeName) => { const resolvedType = this.typeResolver.resolveTypeName(typeName); @@ -31,7 +34,7 @@ export class TypeReferenceToStringExpressionConverter extends AbstractTypeRefere }); if (!isNullable) { - return this.convert(type); + return this.convert(params); } return (reference) => @@ -42,21 +45,24 @@ export class TypeReferenceToStringExpressionConverter extends AbstractTypeRefere ts.factory.createNull() ), ts.factory.createToken(ts.SyntaxKind.QuestionToken), - this.convert(type)(reference), + this.convert(params)(reference), ts.factory.createToken(ts.SyntaxKind.ColonToken), ts.factory.createIdentifier("undefined") ); } - protected override named(typeName: DeclaredTypeName): (reference: ts.Expression) => ts.Expression { + protected override named( + typeName: DeclaredTypeName, + params: ConvertTypeReferenceParams + ): (reference: ts.Expression) => ts.Expression { const resolvedType = this.typeResolver.resolveTypeName(typeName); return ResolvedTypeReference._visit<(reference: ts.Expression) => ts.Expression>(resolvedType, { container: (containerType) => ContainerType._visit(containerType, { list: this.list.bind(this), - optional: this.optional.bind(this), + optional: (optionalType) => this.optional(optionalType, params), set: this.set.bind(this), - map: this.map.bind(this), + map: (mapType) => this.map(mapType, params), literal: this.literal.bind(this), _other: () => { throw new Error("Unknown ContainerType: " + containerType.type); @@ -137,8 +143,11 @@ export class TypeReferenceToStringExpressionConverter extends AbstractTypeRefere return (reference) => reference; } - protected override optional(itemType: TypeReference): (reference: ts.Expression) => ts.Expression { - return (reference) => this.convert(itemType)(reference); + protected override optional( + itemType: TypeReference, + params: ConvertTypeReferenceParams + ): (reference: ts.Expression) => ts.Expression { + return (reference) => this.convert({ ...params, typeReference: itemType })(reference); } protected override unknown(): (reference: ts.Expression) => ts.Expression { diff --git a/generators/typescript/model/type-reference-example-generator/package.json b/generators/typescript/model/type-reference-example-generator/package.json index 9249695b5d0..bb2b78f0016 100644 --- a/generators/typescript/model/type-reference-example-generator/package.json +++ b/generators/typescript/model/type-reference-example-generator/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@fern-api/core-utils": "workspace:*", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", "ts-morph": "^15.1.0" diff --git a/generators/typescript/model/type-reference-example-generator/src/GeneratedTypeReferenceExampleImpl.ts b/generators/typescript/model/type-reference-example-generator/src/GeneratedTypeReferenceExampleImpl.ts index 3319b62b028..ae783aafa9b 100644 --- a/generators/typescript/model/type-reference-example-generator/src/GeneratedTypeReferenceExampleImpl.ts +++ b/generators/typescript/model/type-reference-example-generator/src/GeneratedTypeReferenceExampleImpl.ts @@ -6,7 +6,7 @@ import { ExampleTypeReferenceShape } from "@fern-fern/ir-sdk/api"; import { GetReferenceOpts } from "@fern-typescript/commons"; -import { GeneratedTypeReferenceExample, ModelContext } from "@fern-typescript/contexts"; +import { GeneratedTypeReferenceExample, BaseContext } from "@fern-typescript/contexts"; import { ts } from "ts-morph"; export declare namespace GeneratedTypeReferenceExampleImpl { @@ -22,7 +22,7 @@ export class GeneratedTypeReferenceExampleImpl implements GeneratedTypeReference this.example = example; } - public build(context: ModelContext, opts: GetReferenceOpts): ts.Expression { + public build(context: BaseContext, opts: GetReferenceOpts): ts.Expression { return this.buildExample({ example: this.example, context, opts }); } @@ -32,7 +32,7 @@ export class GeneratedTypeReferenceExampleImpl implements GeneratedTypeReference opts }: { example: ExampleTypeReference; - context: ModelContext; + context: BaseContext; opts: GetReferenceOpts; }): ts.Expression { return ExampleTypeReferenceShape._visit(example.shape, { @@ -164,7 +164,7 @@ export class GeneratedTypeReferenceExampleImpl implements GeneratedTypeReference opts }: { example: ExampleTypeReference; - context: ModelContext; + context: BaseContext; opts: GetReferenceOpts; }): ts.PropertyName { return ExampleTypeReferenceShape._visit(example.shape, { diff --git a/generators/typescript/model/type-schema-generator/package.json b/generators/typescript/model/type-schema-generator/package.json index 5042bb162e0..b44d9777503 100644 --- a/generators/typescript/model/type-schema-generator/package.json +++ b/generators/typescript/model/type-schema-generator/package.json @@ -27,7 +27,7 @@ "depcheck": "depcheck" }, "dependencies": { - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/abstract-schema-generator": "workspace:*", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", diff --git a/generators/typescript/model/union-generator/package.json b/generators/typescript/model/union-generator/package.json index 5d836bdadc8..74042f0e321 100644 --- a/generators/typescript/model/union-generator/package.json +++ b/generators/typescript/model/union-generator/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@fern-api/core-utils": "workspace:*", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", "ts-morph": "^15.1.0" diff --git a/generators/typescript/model/union-generator/src/GeneratedUnionImpl.ts b/generators/typescript/model/union-generator/src/GeneratedUnionImpl.ts index 2e3de6daa38..8f02e7436c2 100644 --- a/generators/typescript/model/union-generator/src/GeneratedUnionImpl.ts +++ b/generators/typescript/model/union-generator/src/GeneratedUnionImpl.ts @@ -3,17 +3,23 @@ import { FernWriters, getTextOfTsNode, getWriterForMultiLineUnionType, - maybeAddDocs, + maybeAddDocsStructure, ObjectWriter, Reference } from "@fern-typescript/commons"; import { GeneratedUnion, ModelContext } from "@fern-typescript/contexts"; import { InterfaceDeclarationStructure, + ModuleDeclarationStructure, OptionalKind, PropertySignatureStructure, + StatementStructures, + StructureKind, ts, - VariableDeclarationKind + TypeAliasDeclarationStructure, + VariableDeclarationKind, + VariableStatementStructure, + WriterFunction } from "ts-morph"; import { KnownSingleUnionType } from "./known-single-union-type/KnownSingleUnionType"; import { ParsedSingleUnionType } from "./parsed-single-union-type/ParsedSingleUnionType"; @@ -36,6 +42,8 @@ export declare namespace GeneratedUnionImpl { includeSerdeLayer: boolean; retainOriginalCasing: boolean; noOptionalProperties: boolean; + inline: boolean; + enableInlineTypes: boolean; } } @@ -64,6 +72,8 @@ export class GeneratedUnionImpl implements Generat private retainOriginalCasing: boolean; private includeConstBuilders: boolean; private noOptionalProperties: boolean; + private inline: boolean; + private enableInlineTypes: boolean; constructor({ typeName, @@ -78,7 +88,9 @@ export class GeneratedUnionImpl implements Generat baseProperties = [], includeSerdeLayer, retainOriginalCasing, - noOptionalProperties + noOptionalProperties, + inline, + enableInlineTypes }: GeneratedUnionImpl.Init) { this.getReferenceToUnion = getReferenceToUnion; this.discriminant = discriminant; @@ -93,14 +105,35 @@ export class GeneratedUnionImpl implements Generat this.retainOriginalCasing = retainOriginalCasing; this.includeConstBuilders = includeConstBuilders; this.noOptionalProperties = noOptionalProperties; + this.inline = inline; + this.enableInlineTypes = enableInlineTypes; } - public writeToFile(context: Context): void { - this.writeTypeAlias(context); - this.writeModule(context); + public generateStatements( + context: Context + ): string | WriterFunction | (string | WriterFunction | StatementStructures)[] { + const statements: (string | WriterFunction | StatementStructures)[] = [ + this.generateTypeAlias(context), + this.generateModule(context) + ]; + if (this.includeConstBuilders) { - this.writeConst(context); + const consts = this.generateConst(context); + if (consts) { + statements.push(consts); + } } + return statements; + } + + public generateForInlineUnion(context: Context): ts.TypeNode { + return ts.factory.createParenthesizedType( + ts.factory.createUnionTypeNode( + this.getAllSingleUnionTypesForAlias().map((singleUnionType) => + singleUnionType.generateForInlineUnion(context, this) + ) + ) + ); } public getReferenceTo(context: Context): ts.TypeNode { @@ -234,8 +267,9 @@ export class GeneratedUnionImpl implements Generat * TYPE ALIAS * **************/ - private writeTypeAlias(context: Context): void { - const typeAlias = context.sourceFile.addTypeAlias({ + private generateTypeAlias(context: Context): TypeAliasDeclarationStructure { + const typeAlias: TypeAliasDeclarationStructure = { + kind: StructureKind.TypeAlias, name: this.typeName, type: getWriterForMultiLineUnionType( this.getAllSingleUnionTypesForAlias().map((singleUnionType) => ({ @@ -244,16 +278,23 @@ export class GeneratedUnionImpl implements Generat })) ), isExported: true - }); - if (this.getDocs != null) { - maybeAddDocs(typeAlias, this.getDocs(context)); - } + }; + maybeAddDocsStructure(typeAlias, this.getDocs?.(context)); + return typeAlias; } public getReferenceToSingleUnionType( singleUnionType: ParsedSingleUnionType, context: Context ): ts.TypeNode { + if (this.enableInlineTypes && this.inline) { + return ts.factory.createTypeReferenceNode( + ts.factory.createQualifiedName( + ts.factory.createIdentifier(this.typeName), + singleUnionType.getInterfaceName() + ) + ); + } return ts.factory.createTypeReferenceNode( ts.factory.createQualifiedName( this.getReferenceToUnion(context).getEntityName(), @@ -266,25 +307,29 @@ export class GeneratedUnionImpl implements Generat * MODULE * **********/ - private writeModule(context: Context): void { - const module = context.sourceFile.addModule({ + private generateModule(context: Context): ModuleDeclarationStructure { + const module: ModuleDeclarationStructure = { + kind: StructureKind.Module, name: this.typeName, isExported: true, - hasDeclareKeyword: true - }); - module.addInterfaces(this.getSingleUnionTypeInterfaces(context)); + hasDeclareKeyword: false + }; + const statements = [...this.getSingleUnionTypeInterfaces(context)]; if (this.includeUtilsOnUnionMembers) { - module.addInterface(this.getUtilsInterface(context)); + statements.push(this.getUtilsInterface(context)); } if (this.includeUtilsOnUnionMembers || this.includeConstBuilders) { - module.addInterface(this.getVisitorInterface(context)); + statements.push(this.getVisitorInterface(context)); } if (this.hasBaseInterface()) { - module.addInterface(this.getBaseInterface(context)); + statements.push(this.getBaseInterface(context)); } + module.statements = statements; + return module; } - private getSingleUnionTypeInterfaces(context: Context): OptionalKind[] { + private getSingleUnionTypeInterfaces(context: Context): StatementStructures[] { + const statements: StatementStructures[] = []; const interfaces = this.getAllSingleUnionTypesForAlias().map((singleUnionType) => singleUnionType.getInterfaceDeclaration(context, this) ); @@ -298,15 +343,24 @@ export class GeneratedUnionImpl implements Generat } } - return interfaces.map((interface_) => ({ - name: interface_.name, - extends: interface_.extends.map(getTextOfTsNode), - properties: interface_.jsonProperties - })); + for (const interface_ of interfaces) { + statements.push({ + kind: StructureKind.Interface, + name: interface_.name, + isExported: true, + extends: interface_.extends.map(getTextOfTsNode), + properties: interface_.properties + }); + if (interface_.module) { + statements.push(interface_.module); + } + } + return statements; } - private getUtilsInterface(context: Context): OptionalKind { + private getUtilsInterface(context: Context): InterfaceDeclarationStructure { return { + kind: StructureKind.Interface, name: GeneratedUnionImpl.UTILS_INTERFACE_NAME, properties: [ { @@ -317,8 +371,9 @@ export class GeneratedUnionImpl implements Generat }; } - private getBaseInterface(context: Context): OptionalKind { + private getBaseInterface(context: Context): InterfaceDeclarationStructure { return { + kind: StructureKind.Interface, name: GeneratedUnionImpl.BASE_INTERFACE_NAME, properties: this.baseProperties.map((property) => { const type = context.type.getReferenceToType(property.valueType); @@ -359,8 +414,9 @@ export class GeneratedUnionImpl implements Generat ); } - private getVisitorInterface(context: Context): OptionalKind { + private getVisitorInterface(context: Context): InterfaceDeclarationStructure { return { + kind: StructureKind.Interface, name: GeneratedUnionImpl.VISITOR_INTERFACE_NAME, typeParameters: [ { @@ -390,7 +446,7 @@ export class GeneratedUnionImpl implements Generat * CONST * *********/ - private writeConst(context: Context): void { + private generateConst(context: Context): VariableStatementStructure | undefined { const writer = FernWriters.object.writer({ asConst: true }); this.addBuilderProperties(context, writer); @@ -400,7 +456,8 @@ export class GeneratedUnionImpl implements Generat return; } - context.sourceFile.addVariableStatement({ + return { + kind: StructureKind.VariableStatement, declarationKind: VariableDeclarationKind.Const, declarations: [ { @@ -409,7 +466,7 @@ export class GeneratedUnionImpl implements Generat } ], isExported: true - }); + }; } private addBuilderProperties(context: Context, writer: ObjectWriter) { diff --git a/generators/typescript/model/union-generator/src/parsed-single-union-type/AbstractParsedSingleUnionType.ts b/generators/typescript/model/union-generator/src/parsed-single-union-type/AbstractParsedSingleUnionType.ts index a376e7ec874..45a77a93ef3 100644 --- a/generators/typescript/model/union-generator/src/parsed-single-union-type/AbstractParsedSingleUnionType.ts +++ b/generators/typescript/model/union-generator/src/parsed-single-union-type/AbstractParsedSingleUnionType.ts @@ -32,16 +32,22 @@ export abstract class AbstractParsedSingleUnionType): ts.TypeNode { + return this.singleUnionType.generateForInlineUnion(context); + } + public getBuilder(context: Context, generatedUnion: GeneratedUnionImpl): ts.ArrowFunction { const referenceToBuiltType = generatedUnion.getReferenceToSingleUnionType(this, context); diff --git a/generators/typescript/model/union-generator/src/parsed-single-union-type/ParsedSingleUnionType.ts b/generators/typescript/model/union-generator/src/parsed-single-union-type/ParsedSingleUnionType.ts index 2445a287572..bc6c380516d 100644 --- a/generators/typescript/model/union-generator/src/parsed-single-union-type/ParsedSingleUnionType.ts +++ b/generators/typescript/model/union-generator/src/parsed-single-union-type/ParsedSingleUnionType.ts @@ -1,5 +1,5 @@ import { ModelContext } from "@fern-typescript/contexts"; -import { OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; +import { ModuleDeclarationStructure, OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; import { GeneratedUnionImpl } from "../GeneratedUnionImpl"; export interface ParsedSingleUnionType { @@ -13,6 +13,7 @@ export interface ParsedSingleUnionType { context: Context, generatedUnion: GeneratedUnionImpl ): ParsedSingleUnionType.InterfaceDeclaration; + generateForInlineUnion(context: Context, generatedUnion: GeneratedUnionImpl): ts.TypeNode; getBuilder(context: Context, generatedUnion: GeneratedUnionImpl): ts.ArrowFunction; getBuilderName(): string; getBuilderArgsFromExistingValue(existingValue: ts.Expression): ts.Expression[]; @@ -29,6 +30,7 @@ export declare namespace ParsedSingleUnionType { export interface InterfaceDeclaration { name: string; extends: ts.TypeNode[]; - jsonProperties: OptionalKind[]; + properties: OptionalKind[]; + module: ModuleDeclarationStructure | undefined; } } diff --git a/generators/typescript/model/union-generator/src/single-union-type-generator/SingleUnionTypeGenerator.ts b/generators/typescript/model/union-generator/src/single-union-type-generator/SingleUnionTypeGenerator.ts index feacc726caf..94c17b8ebbb 100644 --- a/generators/typescript/model/union-generator/src/single-union-type-generator/SingleUnionTypeGenerator.ts +++ b/generators/typescript/model/union-generator/src/single-union-type-generator/SingleUnionTypeGenerator.ts @@ -1,6 +1,9 @@ -import { OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; +import { ModuleDeclarationStructure, OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; export interface SingleUnionTypeGenerator { + generateForInlineUnion(context: Context): ts.TypeNode; + getDiscriminantPropertiesForInterface(context: Context): OptionalKind[]; + generateModule(context: Context): ModuleDeclarationStructure | undefined; getExtendsForInterface(context: Context): ts.TypeNode[]; getNonDiscriminantPropertiesForInterface(context: Context): OptionalKind[]; getVisitorArguments(args: { localReferenceToUnionValue: ts.Expression }): ts.Expression[]; diff --git a/generators/typescript/model/union-generator/src/single-union-type-generator/common/NoPropertiesSingleUnionTypeGenerator.ts b/generators/typescript/model/union-generator/src/single-union-type-generator/common/NoPropertiesSingleUnionTypeGenerator.ts index 57289922414..4c54e02ad50 100644 --- a/generators/typescript/model/union-generator/src/single-union-type-generator/common/NoPropertiesSingleUnionTypeGenerator.ts +++ b/generators/typescript/model/union-generator/src/single-union-type-generator/common/NoPropertiesSingleUnionTypeGenerator.ts @@ -1,11 +1,23 @@ -import { OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; +import { ModuleDeclarationStructure, OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; import { SingleUnionTypeGenerator } from "../SingleUnionTypeGenerator"; export class NoPropertiesSingleUnionTypeGenerator implements SingleUnionTypeGenerator { + public generateForInlineUnion(context: Context): ts.TypeNode { + return ts.factory.createTypeLiteralNode([]); + } + public getExtendsForInterface(): ts.TypeNode[] { return []; } + public getDiscriminantPropertiesForInterface(context: Context): OptionalKind[] { + return []; + } + + public generateModule(context: Context): ModuleDeclarationStructure | undefined { + return undefined; + } + public getNonDiscriminantPropertiesForInterface(): OptionalKind[] { return []; } diff --git a/generators/typescript/model/union-generator/src/single-union-type-generator/common/SinglePropertySingleUnionTypeGenerator.ts b/generators/typescript/model/union-generator/src/single-union-type-generator/common/SinglePropertySingleUnionTypeGenerator.ts index ebe4c29e57a..2ed14dec8e2 100644 --- a/generators/typescript/model/union-generator/src/single-union-type-generator/common/SinglePropertySingleUnionTypeGenerator.ts +++ b/generators/typescript/model/union-generator/src/single-union-type-generator/common/SinglePropertySingleUnionTypeGenerator.ts @@ -1,36 +1,67 @@ +import { assertNever } from "@fern-api/core-utils"; +import { NamedType, ObjectProperty, SingleUnionTypeProperty, TypeReference } from "@fern-fern/ir-sdk/api"; import { getTextOfTsNode, TypeReferenceNode } from "@fern-typescript/commons"; -import { OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; +import { ModelContext } from "@fern-typescript/contexts"; +import { ModuleDeclarationStructure, OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; import { SingleUnionTypeGenerator } from "../SingleUnionTypeGenerator"; export declare namespace SinglePropertySingleUnionTypeGenerator { export interface Init { propertyName: string; getReferenceToPropertyType: (context: Context) => TypeReferenceNode; + getReferenceToPropertyTypeForInlineUnion: (context: Context) => TypeReferenceNode; noOptionalProperties: boolean; + enableInlineTypes: boolean; } } -export class SinglePropertySingleUnionTypeGenerator implements SingleUnionTypeGenerator { +export class SinglePropertySingleUnionTypeGenerator + implements SingleUnionTypeGenerator +{ private static BUILDER_PARAMETER_NAME = "value"; private propertyName: string; private getReferenceToPropertyType: (context: Context) => TypeReferenceNode; + private getReferenceToPropertyTypeForInlineUnion: (context: Context) => TypeReferenceNode; private noOptionalProperties: boolean; constructor({ propertyName, getReferenceToPropertyType, + getReferenceToPropertyTypeForInlineUnion, noOptionalProperties }: SinglePropertySingleUnionTypeGenerator.Init) { this.propertyName = propertyName; this.getReferenceToPropertyType = getReferenceToPropertyType; + this.getReferenceToPropertyTypeForInlineUnion = getReferenceToPropertyTypeForInlineUnion; this.noOptionalProperties = noOptionalProperties; } + public generateForInlineUnion(context: Context): ts.TypeNode { + const typeReference = this.getReferenceToPropertyTypeForInlineUnion(context); + const hasOptionalToken = !this.noOptionalProperties && typeReference.isOptional; + return ts.factory.createTypeLiteralNode([ + ts.factory.createPropertySignature( + undefined, + this.propertyName, + hasOptionalToken ? ts.factory.createToken(ts.SyntaxKind.QuestionToken) : undefined, + this.noOptionalProperties ? typeReference.typeNode : typeReference.typeNodeWithoutUndefined + ) + ]); + } + public getExtendsForInterface(): ts.TypeNode[] { return []; } + public getDiscriminantPropertiesForInterface(context: Context): OptionalKind[] { + return []; + } + + public generateModule(context: Context): ModuleDeclarationStructure | undefined { + return undefined; + } + public getNonDiscriminantPropertiesForInterface(context: Context): OptionalKind[] { const type = this.getReferenceToPropertyType(context); return [ diff --git a/generators/typescript/model/union-schema-generator/package.json b/generators/typescript/model/union-schema-generator/package.json index 74dfc158309..ee09125bf07 100644 --- a/generators/typescript/model/union-schema-generator/package.json +++ b/generators/typescript/model/union-schema-generator/package.json @@ -27,7 +27,7 @@ "depcheck": "depcheck" }, "dependencies": { - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/abstract-schema-generator": "workspace:*", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", diff --git a/generators/typescript/sdk/CHANGELOG.md b/generators/typescript/sdk/CHANGELOG.md index 7f363a08e37..5b7cc0f5cd1 100644 --- a/generators/typescript/sdk/CHANGELOG.md +++ b/generators/typescript/sdk/CHANGELOG.md @@ -5,15 +5,73 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.43.0] - 2024-12-11 + +- Feature: Generate inline types for inline schemas by setting `enableInlineTypes` to `true` in the generator config. + When enabled, the inline schemas will be generated as nested types in TypeScript. + This results in cleaner type names and a more intuitive developer experience. + + Before: + + ```ts + // MyRootType.ts + import * as MySdk from "..."; + + export interface MyRootType { + foo: MySdk.MyRootTypeFoo; + } + + // MyRootTypeFoo.ts + import * as MySdk from "..."; + + export interface MyRootTypeFoo { + bar: MySdk.MyRootTypeFooBar; + } + + // MyRootTypeFooBar.ts + import * as MySdk from "..."; + + export interface MyRootTypeFooBar {} + ``` + + After: + + ```ts + // MyRootType.ts + import * as MySdk from "..."; + + export interface MyRootType { + foo: MyRootType.Foo; + } + + export namespace MyRootType { + export interface Foo { + bar: Foo.Bar; + } + + export namespace Foo { + export interface Bar {} + } + } + ``` + + Now users can get the deep nested `Bar` type as follows: + + ```ts + import { MyRootType } from MySdk; + + const bar: MyRootType.Foo.Bar = {}; + ``` + ## [0.42.7] - 2024-12-03 -- Feature: Support `additionalProperties` in OpenAPI or `extra-properties` in the Fern Defnition. Now - an object that has additionalProperties marked as true will generate the following interface: +- Feature: Support `additionalProperties` in OpenAPI or `extra-properties` in the Fern Defnition. Now + an object that has additionalProperties marked as true will generate the following interface: ```ts interface User { - propertyOne: string - [key: string]: any + propertyOne: string; + [key: string]: any; } ``` diff --git a/generators/typescript/sdk/VERSION b/generators/typescript/sdk/VERSION index 6028e3fe54d..8298bb08b2d 100644 --- a/generators/typescript/sdk/VERSION +++ b/generators/typescript/sdk/VERSION @@ -1 +1 @@ -0.42.7 +0.43.0 diff --git a/generators/typescript/sdk/cli/package.json b/generators/typescript/sdk/cli/package.json index 22ae8a4290b..f730baa59db 100644 --- a/generators/typescript/sdk/cli/package.json +++ b/generators/typescript/sdk/cli/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@fern-api/fs-utils": "workspace:*", "@fern-api/base-generator": "workspace:*", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/abstract-generator-cli": "workspace:*", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", diff --git a/generators/typescript/sdk/cli/src/SdkGeneratorCli.ts b/generators/typescript/sdk/cli/src/SdkGeneratorCli.ts index 6d9c4510e45..1356425e8df 100644 --- a/generators/typescript/sdk/cli/src/SdkGeneratorCli.ts +++ b/generators/typescript/sdk/cli/src/SdkGeneratorCli.ts @@ -54,6 +54,7 @@ export class SdkGeneratorCli extends AbstractGeneratorCli { retainOriginalCasing: parsed?.retainOriginalCasing ?? false, allowExtraFields: parsed?.allowExtraFields ?? false, inlineFileProperties: parsed?.inlineFileProperties ?? false, + enableInlineTypes: parsed?.enableInlineTypes ?? false, packageJson: parsed?.packageJson, publishToJsr: parsed?.publishToJsr ?? false, omitUndefined: parsed?.omitUndefined ?? false, @@ -135,7 +136,8 @@ export class SdkGeneratorCli extends AbstractGeneratorCli { packageJson: customConfig.packageJson, outputJsr: customConfig.publishToJsr ?? false, omitUndefined: customConfig.omitUndefined ?? false, - useBigInt: customConfig.useBigInt ?? false + useBigInt: customConfig.useBigInt ?? false, + enableInlineTypes: customConfig.enableInlineTypes ?? false } }); const typescriptProject = await sdkGenerator.generate(); diff --git a/generators/typescript/sdk/cli/src/custom-config/SdkCustomConfig.ts b/generators/typescript/sdk/cli/src/custom-config/SdkCustomConfig.ts index 0752a2cc3a8..81d6e6faed5 100644 --- a/generators/typescript/sdk/cli/src/custom-config/SdkCustomConfig.ts +++ b/generators/typescript/sdk/cli/src/custom-config/SdkCustomConfig.ts @@ -28,6 +28,7 @@ export interface SdkCustomConfig { retainOriginalCasing: boolean | undefined; allowExtraFields: boolean | undefined; inlineFileProperties: boolean | undefined; + enableInlineTypes: boolean | undefined; packageJson: Record | undefined; publishToJsr: boolean | undefined; omitUndefined: boolean | undefined; diff --git a/generators/typescript/sdk/cli/src/custom-config/schema/SdkCustomConfigSchema.ts b/generators/typescript/sdk/cli/src/custom-config/schema/SdkCustomConfigSchema.ts index 0f02543b4cf..21915edec84 100644 --- a/generators/typescript/sdk/cli/src/custom-config/schema/SdkCustomConfigSchema.ts +++ b/generators/typescript/sdk/cli/src/custom-config/schema/SdkCustomConfigSchema.ts @@ -33,6 +33,7 @@ export const SdkCustomConfigSchema = z.strictObject({ retainOriginalCasing: z.optional(z.boolean()), allowExtraFields: z.optional(z.boolean()), inlineFileProperties: z.optional(z.boolean()), + enableInlineTypes: z.optional(z.boolean()), generateWireTests: z.optional(z.boolean()), noScripts: z.optional(z.boolean()), diff --git a/generators/typescript/sdk/client-class-generator/package.json b/generators/typescript/sdk/client-class-generator/package.json index b3c5d25577d..52afab49d26 100644 --- a/generators/typescript/sdk/client-class-generator/package.json +++ b/generators/typescript/sdk/client-class-generator/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@fern-api/core-utils": "workspace:*", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", "@fern-typescript/resolvers": "workspace:*", diff --git a/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts b/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts index 06e33d31718..22923cff469 100644 --- a/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts +++ b/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts @@ -1,4 +1,4 @@ -import { assertNever } from "@fern-api/core-utils"; +import { assertNever, SetRequired } from "@fern-api/core-utils"; import { AuthScheme, BasicAuthScheme, @@ -19,13 +19,24 @@ import { getTextOfTsNode, ImportsManager, JavaScriptRuntime, - maybeAddDocs, + maybeAddDocsStructure, NpmPackage, PackageId } from "@fern-typescript/commons"; import { GeneratedEndpointImplementation, GeneratedSdkClientClass, SdkContext } from "@fern-typescript/contexts"; import { ErrorResolver, PackageResolver } from "@fern-typescript/resolvers"; -import { InterfaceDeclarationStructure, OptionalKind, PropertySignatureStructure, Scope, ts } from "ts-morph"; +import { + ClassDeclarationStructure, + InterfaceDeclarationStructure, + MethodDeclarationStructure, + ModuleDeclarationStructure, + OptionalKind, + PropertyDeclarationStructure, + PropertySignatureStructure, + Scope, + StructureKind, + ts +} from "ts-morph"; import { code } from "ts-poet"; import { GeneratedBytesEndpointRequest } from "./endpoint-request/GeneratedBytesEndpointRequest"; import { GeneratedDefaultEndpointRequest } from "./endpoint-request/GeneratedDefaultEndpointRequest"; @@ -425,23 +436,34 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { } public writeToFile(context: SdkContext): void { - const serviceModule = context.sourceFile.addModule({ + const serviceModule: ModuleDeclarationStructure = { + kind: StructureKind.Module, name: this.serviceClassName, isExported: true, hasDeclareKeyword: true - }); + }; - const optionsInterface = serviceModule.addInterface(this.generateOptionsInterface(context)); - serviceModule.addInterface(this.generateRequestOptionsInterface(context)); + const optionsInterface = this.generateOptionsInterface(context); + serviceModule.statements = [optionsInterface, this.generateRequestOptionsInterface(context)]; + context.sourceFile.addModule(serviceModule); - const serviceClass = context.sourceFile.addClass({ + const serviceClass: SetRequired< + ClassDeclarationStructure, + "properties" | "ctors" | "methods" | "getAccessors" + > = { + kind: StructureKind.Class, name: this.serviceClassName, - isExported: true - }); - maybeAddDocs(serviceClass, this.package_.docs); + isExported: true, + properties: [], + getAccessors: [], + ctors: [], + methods: [] + }; + maybeAddDocsStructure(serviceClass, this.package_.docs); if (this.isRoot && context.generateOAuthClients) { - serviceClass.addProperty({ + serviceClass.properties.push({ + kind: StructureKind.Property, name: OAuthTokenProviderGenerator.OAUTH_TOKEN_PROVIDER_PROPERTY_NAME, type: getTextOfTsNode(context.coreUtilities.auth.OAuthTokenProvider._getReferenceToType()), scope: Scope.Private, @@ -509,8 +531,8 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { type: getTextOfTsNode( ts.factory.createTypeReferenceNode( ts.factory.createQualifiedName( - ts.factory.createIdentifier(serviceModule.getName()), - ts.factory.createIdentifier(optionsInterface.getName()) + ts.factory.createIdentifier(serviceModule.name), + ts.factory.createIdentifier(optionsInterface.name) ) ) ) @@ -567,12 +589,12 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { }), }); `; - serviceClass.addConstructor({ + serviceClass.ctors.push({ parameters, statements: statements.toString({ dprintOptions: { indentWidth: 4 } }) }); } else { - serviceClass.addConstructor({ + serviceClass.ctors.push({ parameters: [ { name: GeneratedSdkClientClassImpl.OPTIONS_PRIVATE_MEMBER, @@ -581,12 +603,12 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { type: getTextOfTsNode( ts.factory.createTypeReferenceNode( ts.factory.createQualifiedName( - ts.factory.createIdentifier(serviceModule.getName()), - ts.factory.createIdentifier(optionsInterface.getName()) + ts.factory.createIdentifier(serviceModule.name), + ts.factory.createIdentifier(optionsInterface.name) ) ) ), - initializer: optionsInterface.getProperties().every((property) => property.hasQuestionToken()) + initializer: optionsInterface.properties?.every((property) => property.hasQuestionToken) ? "{}" : undefined } @@ -608,7 +630,8 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { const statements = endpoint.getStatements(context); // const returnsAPIPromise = !context.neverThrowErrors && !endpoint.isPaginated(context); - const method = serviceClass.addMethod({ + const method: MethodDeclarationStructure = { + kind: StructureKind.Method, name: endpoint.endpoint.name.camelCase.unsafeName, parameters: signature.parameters, returnType: getTextOfTsNode( @@ -624,15 +647,16 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { ts.factory.createTypeReferenceNode("Promise", [overload.returnTypeWithoutPromise]) ) })) - }); + }; + serviceClass.methods.push(method); if (overloads.length === 0) { - maybeAddDocs(method, docs); + maybeAddDocsStructure(method, docs); } } if (isIdempotent) { - serviceModule.addInterface(this.generateIdempotentRequestOptionsInterface(context)); + serviceModule.statements.push(this.generateIdempotentRequestOptionsInterface(context)); } for (const wrappedService of this.generatedWrappedServices) { @@ -657,7 +681,7 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword) ]); - serviceClass.addMethod({ + serviceClass.methods.push({ scope: Scope.Protected, isAsync: true, name: GeneratedSdkClientClassImpl.AUTHORIZATION_HEADER_HELPER_METHOD_NAME, @@ -667,13 +691,15 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { } if (this.shouldGenerateCustomAuthorizationHeaderHelperMethod()) { - serviceClass.addMethod({ + serviceClass.methods.push({ scope: Scope.Protected, isAsync: true, name: GeneratedSdkClientClassImpl.CUSTOM_AUTHORIZATION_HEADER_HELPER_METHOD_NAME, statements: this.getCustomAuthorizationHeaderStatements(context).map(getTextOfTsNode) }); } + + context.sourceFile.addClass(serviceClass); } private shouldGenerateAuthorizationHeaderHelperMethod(): boolean { @@ -932,8 +958,9 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { : `${this.serviceClassName}.${GeneratedSdkClientClassImpl.REQUEST_OPTIONS_INTERFACE_NAME}`; } - private generateRequestOptionsInterface(context: SdkContext): OptionalKind { - const requestOptions = { + private generateRequestOptionsInterface(context: SdkContext): InterfaceDeclarationStructure { + const requestOptions: SetRequired = { + kind: StructureKind.Interface, name: GeneratedSdkClientClassImpl.REQUEST_OPTIONS_INTERFACE_NAME, properties: [ { @@ -988,9 +1015,7 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { * IDEMPOTENT REQUEST OPTIONS * ******************************/ - private generateIdempotentRequestOptionsInterface( - context: SdkContext - ): OptionalKind { + private generateIdempotentRequestOptionsInterface(context: SdkContext): InterfaceDeclarationStructure { const properties: OptionalKind[] = []; for (const header of this.intermediateRepresentation.idempotencyHeaders) { if (!isLiteralHeader(header, context)) { @@ -1003,6 +1028,7 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { } } return { + kind: StructureKind.Interface, name: GeneratedSdkClientClassImpl.IDEMPOTENT_REQUEST_OPTIONS_INTERFACE_NAME, extends: [GeneratedSdkClientClassImpl.REQUEST_OPTIONS_INTERFACE_NAME], properties @@ -1107,7 +1133,7 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { return properties; } - private generateOptionsInterface(context: SdkContext): OptionalKind { + private generateOptionsInterface(context: SdkContext): InterfaceDeclarationStructure { const properties: OptionalKind[] = []; if (!this.requireDefaultEnvironment) { @@ -1304,6 +1330,7 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { } return { + kind: StructureKind.Interface, name: GeneratedSdkClientClassImpl.OPTIONS_INTERFACE_NAME, properties }; diff --git a/generators/typescript/sdk/client-class-generator/src/GeneratedWrappedService.ts b/generators/typescript/sdk/client-class-generator/src/GeneratedWrappedService.ts index a8d49851de1..3b75ce4aa79 100644 --- a/generators/typescript/sdk/client-class-generator/src/GeneratedWrappedService.ts +++ b/generators/typescript/sdk/client-class-generator/src/GeneratedWrappedService.ts @@ -1,7 +1,8 @@ import { Subpackage, SubpackageId } from "@fern-fern/ir-sdk/api"; import { getTextOfTsNode, Reference } from "@fern-typescript/commons"; +import { SetRequired } from "@fern-api/core-utils"; import { SdkContext } from "@fern-typescript/contexts"; -import { ClassDeclaration, Scope, ts } from "ts-morph"; +import { ClassDeclarationStructure, Scope, ts } from "ts-morph"; import { GeneratedSdkClientClassImpl } from "./GeneratedSdkClientClassImpl"; import { OAuthTokenProviderGenerator } from "./oauth-generator/OAuthTokenProviderGenerator"; @@ -30,7 +31,7 @@ export class GeneratedWrappedService { context }: { isRoot: boolean; - class_: ClassDeclaration; + class_: SetRequired; context: SdkContext; }): void { const referenceToWrapped = this.getReferenceToWrappedService(class_, context); @@ -39,7 +40,7 @@ export class GeneratedWrappedService { subpackageId: this.wrappedSubpackageId }); - class_.addProperty({ + class_.properties.push({ name: this.getCachedMemberName(), scope: Scope.Protected, type: getTextOfTsNode( @@ -51,7 +52,7 @@ export class GeneratedWrappedService { }); if (isRoot && context.generateOAuthClients) { - class_.addGetAccessor({ + class_.getAccessors.push({ name: this.getGetterName(), returnType: getTextOfTsNode(referenceToWrapped.getTypeNode()), scope: Scope.Public, @@ -112,7 +113,7 @@ export class GeneratedWrappedService { }); return; } - class_.addGetAccessor({ + class_.getAccessors.push({ name: this.getGetterName(), returnType: getTextOfTsNode(referenceToWrapped.getTypeNode()), scope: Scope.Public, @@ -151,7 +152,10 @@ export class GeneratedWrappedService { return lastFernFilepathPart.camelCase.unsafeName; } - private getReferenceToWrappedService(serviceClass: ClassDeclaration, context: SdkContext): Reference { + private getReferenceToWrappedService( + serviceClass: SetRequired, + context: SdkContext + ): Reference { const reference = context.sdkClientClass.getReferenceToClientClass({ isRoot: false, subpackageId: this.wrappedSubpackageId @@ -163,7 +167,7 @@ export class GeneratedWrappedService { }) ); - if (wrappedServiceClassName !== serviceClass.getName()) { + if (wrappedServiceClassName !== serviceClass.name) { return reference; } else { return context.sdkClientClass.getReferenceToClientClass( diff --git a/generators/typescript/sdk/endpoint-error-union-generator/package.json b/generators/typescript/sdk/endpoint-error-union-generator/package.json index 78c69f89171..75a75dccf9e 100644 --- a/generators/typescript/sdk/endpoint-error-union-generator/package.json +++ b/generators/typescript/sdk/endpoint-error-union-generator/package.json @@ -27,7 +27,7 @@ "depcheck": "depcheck" }, "dependencies": { - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", "@fern-typescript/resolvers": "workspace:*", diff --git a/generators/typescript/sdk/endpoint-error-union-generator/src/EndpointErrorUnionGenerator.ts b/generators/typescript/sdk/endpoint-error-union-generator/src/EndpointErrorUnionGenerator.ts index 33ffffc072a..7f20e8286d9 100644 --- a/generators/typescript/sdk/endpoint-error-union-generator/src/EndpointErrorUnionGenerator.ts +++ b/generators/typescript/sdk/endpoint-error-union-generator/src/EndpointErrorUnionGenerator.ts @@ -11,6 +11,7 @@ export declare namespace EndpointErrorUnionGenerator { includeSerdeLayer: boolean; retainOriginalCasing: boolean; noOptionalProperties: boolean; + enableInlineTypes: boolean; } export namespace generateEndpointErrorUnion { @@ -27,19 +28,22 @@ export class EndpointErrorUnionGenerator { private includeSerdeLayer: boolean; private retainOriginalCasing: boolean; private noOptionalProperties: boolean; + private enableInlineTypes: boolean; constructor({ intermediateRepresentation, errorResolver, includeSerdeLayer, retainOriginalCasing, - noOptionalProperties + noOptionalProperties, + enableInlineTypes }: EndpointErrorUnionGenerator.Init) { this.intermediateRepresentation = intermediateRepresentation; this.errorResolver = errorResolver; this.includeSerdeLayer = includeSerdeLayer; this.retainOriginalCasing = retainOriginalCasing; this.noOptionalProperties = noOptionalProperties; + this.enableInlineTypes = enableInlineTypes; } public generateEndpointErrorUnion({ @@ -53,7 +57,8 @@ export class EndpointErrorUnionGenerator { errorDiscriminationStrategy: this.intermediateRepresentation.errorDiscriminationStrategy, includeSerdeLayer: this.includeSerdeLayer, retainOriginalCasing: this.retainOriginalCasing, - noOptionalProperties: this.noOptionalProperties + noOptionalProperties: this.noOptionalProperties, + enableInlineTypes: this.enableInlineTypes }); } } diff --git a/generators/typescript/sdk/endpoint-error-union-generator/src/GeneratedEndpointErrorUnionImpl.ts b/generators/typescript/sdk/endpoint-error-union-generator/src/GeneratedEndpointErrorUnionImpl.ts index aebb8f7d7b7..b8b173c9415 100644 --- a/generators/typescript/sdk/endpoint-error-union-generator/src/GeneratedEndpointErrorUnionImpl.ts +++ b/generators/typescript/sdk/endpoint-error-union-generator/src/GeneratedEndpointErrorUnionImpl.ts @@ -16,6 +16,7 @@ export declare namespace GeneratedEndpointErrorUnionImpl { includeSerdeLayer: boolean; noOptionalProperties: boolean; retainOriginalCasing: boolean; + enableInlineTypes: boolean; } } @@ -33,7 +34,8 @@ export class GeneratedEndpointErrorUnionImpl implements GeneratedEndpointErrorUn errorDiscriminationStrategy, includeSerdeLayer, noOptionalProperties, - retainOriginalCasing + retainOriginalCasing, + enableInlineTypes }: GeneratedEndpointErrorUnionImpl.Init) { this.endpoint = endpoint; @@ -57,7 +59,8 @@ export class GeneratedEndpointErrorUnionImpl implements GeneratedEndpointErrorUn errorDiscriminationStrategy, includeUtilsOnUnionMembers, noOptionalProperties, - retainOriginalCasing + retainOriginalCasing, + enableInlineTypes }) ), getReferenceToUnion: (context) => @@ -73,7 +76,10 @@ export class GeneratedEndpointErrorUnionImpl implements GeneratedEndpointErrorUn includeOtherInUnionTypes: true, includeSerdeLayer, noOptionalProperties, - retainOriginalCasing + retainOriginalCasing, + enableInlineTypes, + // generate separate root types for errors in union + inline: false }); } @@ -95,7 +101,7 @@ export class GeneratedEndpointErrorUnionImpl implements GeneratedEndpointErrorUn } public writeToFile(context: SdkContext): void { - this.errorUnion.writeToFile(context); + context.sourceFile.addStatements(this.errorUnion.generateStatements(context)); } public getErrorUnion(): GeneratedUnion { diff --git a/generators/typescript/sdk/endpoint-error-union-generator/src/error/ParsedSingleUnionTypeForError.ts b/generators/typescript/sdk/endpoint-error-union-generator/src/error/ParsedSingleUnionTypeForError.ts index eebf8449cad..c1a23e6cc40 100644 --- a/generators/typescript/sdk/endpoint-error-union-generator/src/error/ParsedSingleUnionTypeForError.ts +++ b/generators/typescript/sdk/endpoint-error-union-generator/src/error/ParsedSingleUnionTypeForError.ts @@ -16,6 +16,7 @@ export declare namespace ParsedSingleUnionTypeForError { includeUtilsOnUnionMembers: boolean; noOptionalProperties: boolean; retainOriginalCasing: boolean; + enableInlineTypes: boolean; } } @@ -31,7 +32,8 @@ export class ParsedSingleUnionTypeForError extends AbstractKnownSingleUnionType< errorResolver, includeUtilsOnUnionMembers, noOptionalProperties, - retainOriginalCasing + retainOriginalCasing, + enableInlineTypes }: ParsedSingleUnionTypeForError.Init) { const errorDeclaration = errorResolver.getErrorDeclarationFromName(error.error); super({ @@ -39,7 +41,8 @@ export class ParsedSingleUnionTypeForError extends AbstractKnownSingleUnionType< errorDiscriminationStrategy, errorDeclaration, noOptionalProperties, - retainOriginalCasing + retainOriginalCasing, + enableInlineTypes }), includeUtilsOnUnionMembers }); @@ -87,12 +90,14 @@ function getSingleUnionTypeGenerator({ errorDiscriminationStrategy, errorDeclaration, noOptionalProperties, - retainOriginalCasing + retainOriginalCasing, + enableInlineTypes }: { errorDiscriminationStrategy: ErrorDiscriminationStrategy; errorDeclaration: ErrorDeclaration; noOptionalProperties: boolean; retainOriginalCasing: boolean; + enableInlineTypes: boolean; }): SingleUnionTypeGenerator { if (errorDeclaration.type == null) { return new NoPropertiesSingleUnionTypeGenerator(); @@ -111,6 +116,8 @@ function getSingleUnionTypeGenerator({ return new SinglePropertySingleUnionTypeGenerator({ propertyName, getReferenceToPropertyType: (context) => context.type.getReferenceToType(type), - noOptionalProperties + getReferenceToPropertyTypeForInlineUnion: (context) => context.type.getReferenceToTypeForInlineUnion(type), + noOptionalProperties, + enableInlineTypes }); } diff --git a/generators/typescript/sdk/endpoint-error-union-generator/src/error/UnknownErrorSingleUnionTypeGenerator.ts b/generators/typescript/sdk/endpoint-error-union-generator/src/error/UnknownErrorSingleUnionTypeGenerator.ts index c71c1cba103..9e5ccc5538d 100644 --- a/generators/typescript/sdk/endpoint-error-union-generator/src/error/UnknownErrorSingleUnionTypeGenerator.ts +++ b/generators/typescript/sdk/endpoint-error-union-generator/src/error/UnknownErrorSingleUnionTypeGenerator.ts @@ -1,7 +1,7 @@ import { getTextOfTsNode } from "@fern-typescript/commons"; import { SdkContext } from "@fern-typescript/contexts"; import { SingleUnionTypeGenerator } from "@fern-typescript/union-generator"; -import { OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; +import { ModuleDeclarationStructure, OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; export declare namespace UnknownErrorSingleUnionTypeGenerator { export interface Init { @@ -19,10 +19,29 @@ export class UnknownErrorSingleUnionTypeGenerator implements SingleUnionTypeGene this.discriminant = discriminant; } + public generateForInlineUnion(context: SdkContext): ts.TypeNode { + return ts.factory.createTypeLiteralNode([ + ts.factory.createPropertySignature( + undefined, + UnknownErrorSingleUnionTypeGenerator.CONTENT_PROPERTY_NAME, + undefined, + context.coreUtilities.fetcher.Fetcher.Error._getReferenceToType() + ) + ]); + } + public getExtendsForInterface(): ts.TypeNode[] { return []; } + public getDiscriminantPropertiesForInterface(): OptionalKind[] { + return []; + } + + public generateModule(): ModuleDeclarationStructure | undefined { + return undefined; + } + public getNonDiscriminantPropertiesForInterface(context: SdkContext): OptionalKind[] { return [ { diff --git a/generators/typescript/sdk/environments-generator/package.json b/generators/typescript/sdk/environments-generator/package.json index eab64d97613..658ecfc5e0a 100644 --- a/generators/typescript/sdk/environments-generator/package.json +++ b/generators/typescript/sdk/environments-generator/package.json @@ -27,7 +27,7 @@ "depcheck": "depcheck" }, "dependencies": { - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", "ts-morph": "^15.1.0" diff --git a/generators/typescript/sdk/generator/package.json b/generators/typescript/sdk/generator/package.json index 9fa358cc545..99c86f0016d 100644 --- a/generators/typescript/sdk/generator/package.json +++ b/generators/typescript/sdk/generator/package.json @@ -34,7 +34,7 @@ "@fern-api/logger": "workspace:*", "@fern-fern/generator-cli-sdk": "0.0.17", "@fern-fern/generator-exec-sdk": "^0.0.898", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-fern/snippet-sdk": "^0.0.5526", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", diff --git a/generators/typescript/sdk/generator/src/SdkGenerator.ts b/generators/typescript/sdk/generator/src/SdkGenerator.ts index bed1ab1ff30..2a2efd7df7a 100644 --- a/generators/typescript/sdk/generator/src/SdkGenerator.ts +++ b/generators/typescript/sdk/generator/src/SdkGenerator.ts @@ -7,7 +7,9 @@ import { HttpEndpoint, HttpService, IntermediateRepresentation, - OAuthScheme + OAuthScheme, + TypeDeclaration, + TypeId } from "@fern-fern/ir-sdk/api"; import { FdrSnippetTemplate, FdrSnippetTemplateClient, FdrSnippetTemplateEnvironment } from "@fern-fern/snippet-sdk"; import { @@ -119,6 +121,7 @@ export declare namespace SdkGenerator { allowExtraFields: boolean; writeUnitTests: boolean; inlineFileProperties: boolean; + enableInlineTypes: boolean; omitUndefined: boolean; executionEnvironment: "local" | "dev" | "prod"; organization: string; @@ -298,7 +301,8 @@ export class SdkGenerator { includeOtherInUnionTypes: config.includeOtherInUnionTypes, includeSerdeLayer: config.includeSerdeLayer, noOptionalProperties: config.noOptionalProperties, - retainOriginalCasing: config.retainOriginalCasing + retainOriginalCasing: config.retainOriginalCasing, + enableInlineTypes: config.enableInlineTypes }); this.typeSchemaGenerator = new TypeSchemaGenerator({ includeUtilsOnUnionMembers: config.includeUtilsOnUnionMembers, @@ -317,7 +321,8 @@ export class SdkGenerator { intermediateRepresentation, includeSerdeLayer: config.includeSerdeLayer, retainOriginalCasing: config.retainOriginalCasing, - noOptionalProperties: config.noOptionalProperties + noOptionalProperties: config.noOptionalProperties, + enableInlineTypes: config.enableInlineTypes }); this.sdkEndpointTypeSchemasGenerator = new SdkEndpointTypeSchemasGenerator({ errorResolver: this.errorResolver, @@ -540,6 +545,17 @@ export class SdkGenerator { }); } + private getTypesToGenerate(): Record { + if (this.config.enableInlineTypes) { + return Object.fromEntries( + Object.entries(this.intermediateRepresentation.types).filter( + ([_, typeDeclaration]) => !typeDeclaration.inline + ) + ); + } + return this.intermediateRepresentation.types; + } + public async copyCoreUtilities({ pathToSrc, pathToRoot @@ -551,7 +567,7 @@ export class SdkGenerator { } private generateTypeDeclarations() { - for (const typeDeclaration of Object.values(this.intermediateRepresentation.types)) { + for (const typeDeclaration of Object.values(this.getTypesToGenerate())) { this.withSourceFile({ filepath: this.typeDeclarationReferencer.getExportedFilepath(typeDeclaration.name), run: ({ sourceFile, importsManager }) => { @@ -564,7 +580,7 @@ export class SdkGenerator { private generateTypeSchemas(): { generated: boolean } { let generated = false; - for (const typeDeclaration of Object.values(this.intermediateRepresentation.types)) { + for (const typeDeclaration of Object.values(this.getTypesToGenerate())) { this.withSourceFile({ filepath: this.typeSchemaDeclarationReferencer.getExportedFilepath(typeDeclaration.name), run: ({ sourceFile, importsManager }) => { @@ -1281,6 +1297,7 @@ export class SdkGenerator { retainOriginalCasing: this.config.retainOriginalCasing, targetRuntime: this.config.targetRuntime, inlineFileProperties: this.config.inlineFileProperties, + enableInlineTypes: this.config.enableInlineTypes, generateOAuthClients: this.generateOAuthClients, omitUndefined: this.config.omitUndefined, useBigInt: this.config.useBigInt, diff --git a/generators/typescript/sdk/generator/src/contexts/SdkContextImpl.ts b/generators/typescript/sdk/generator/src/contexts/SdkContextImpl.ts index 023d2072cc1..7fb00b977a5 100644 --- a/generators/typescript/sdk/generator/src/contexts/SdkContextImpl.ts +++ b/generators/typescript/sdk/generator/src/contexts/SdkContextImpl.ts @@ -111,6 +111,7 @@ export declare namespace SdkContextImpl { retainOriginalCasing: boolean; generateOAuthClients: boolean; inlineFileProperties: boolean; + enableInlineTypes: boolean; omitUndefined: boolean; neverThrowErrors: boolean; useBigInt: boolean; @@ -203,7 +204,8 @@ export class SdkContextImpl implements SdkContext { generateOAuthClients, omitUndefined, useBigInt, - neverThrowErrors + neverThrowErrors, + enableInlineTypes }: SdkContextImpl.Init) { this.logger = logger; this.ir = ir; @@ -250,7 +252,9 @@ export class SdkContextImpl implements SdkContext { treatUnknownAsAny, includeSerdeLayer, retainOriginalCasing, - useBigInt + useBigInt, + enableInlineTypes, + context: this }); this.typeSchema = new TypeSchemaContextImpl({ sourceFile, @@ -264,7 +268,8 @@ export class SdkContextImpl implements SdkContext { treatUnknownAsAny, includeSerdeLayer, retainOriginalCasing, - useBigInt + useBigInt, + enableInlineTypes }); this.sdkError = new SdkErrorContextImpl({ sourceFile, @@ -296,7 +301,8 @@ export class SdkContextImpl implements SdkContext { importsManager, includeSerdeLayer, retainOriginalCasing, - inlineFileProperties + inlineFileProperties, + enableInlineTypes }); this.sdkInlinedRequestBodySchema = new SdkInlinedRequestBodySchemaContextImpl({ importsManager, diff --git a/generators/typescript/sdk/generator/src/contexts/base/BaseContextImpl.ts b/generators/typescript/sdk/generator/src/contexts/base/BaseContextImpl.ts index 09e3075fe3a..49cb2e6ec32 100644 --- a/generators/typescript/sdk/generator/src/contexts/base/BaseContextImpl.ts +++ b/generators/typescript/sdk/generator/src/contexts/base/BaseContextImpl.ts @@ -1,3 +1,4 @@ +import { Logger } from "@fern-api/logger"; import { Constants } from "@fern-fern/ir-sdk/api"; import { CoreUtilitiesManager, @@ -7,33 +8,50 @@ import { ImportsManager } from "@fern-typescript/commons"; import { CoreUtilities } from "@fern-typescript/commons/src/core-utilities/CoreUtilities"; -import { BaseContext } from "@fern-typescript/contexts"; +import { BaseContext, TypeContext, TypeSchemaContext } from "@fern-typescript/contexts"; import { SourceFile } from "ts-morph"; export declare namespace BaseContextImpl { export interface Init { + logger: Logger; sourceFile: SourceFile; importsManager: ImportsManager; dependencyManager: DependencyManager; coreUtilitiesManager: CoreUtilitiesManager; fernConstants: Constants; + type: TypeContext; + typeSchema: TypeSchemaContext; + includeSerdeLayer: boolean; } } export class BaseContextImpl implements BaseContext { + public readonly logger: Logger; public readonly sourceFile: SourceFile; public readonly externalDependencies: ExternalDependencies; public readonly coreUtilities: CoreUtilities; public readonly fernConstants: Constants; + public readonly type: TypeContext; + public readonly typeSchema: TypeSchemaContext; + public readonly includeSerdeLayer: boolean; constructor({ + logger, sourceFile, importsManager, dependencyManager, coreUtilitiesManager, - fernConstants + fernConstants, + type, + typeSchema, + includeSerdeLayer }: BaseContextImpl.Init) { + this.logger = logger; this.sourceFile = sourceFile; + this.fernConstants = fernConstants; + this.type = type; + this.typeSchema = typeSchema; + this.includeSerdeLayer = includeSerdeLayer; this.externalDependencies = createExternalDependencies({ dependencyManager, importsManager @@ -42,6 +60,5 @@ export class BaseContextImpl implements BaseContext { sourceFile, importsManager }); - this.fernConstants = fernConstants; } } diff --git a/generators/typescript/sdk/generator/src/contexts/request-wrapper/RequestWrapperContextImpl.ts b/generators/typescript/sdk/generator/src/contexts/request-wrapper/RequestWrapperContextImpl.ts index d8c9d9ea705..0146c4886a5 100644 --- a/generators/typescript/sdk/generator/src/contexts/request-wrapper/RequestWrapperContextImpl.ts +++ b/generators/typescript/sdk/generator/src/contexts/request-wrapper/RequestWrapperContextImpl.ts @@ -16,6 +16,7 @@ export declare namespace RequestWrapperContextImpl { includeSerdeLayer: boolean; retainOriginalCasing: boolean; inlineFileProperties: boolean; + enableInlineTypes: boolean; } } @@ -28,6 +29,7 @@ export class RequestWrapperContextImpl implements RequestWrapperContext { private includeSerdeLayer: boolean; private retainOriginalCasing: boolean; private inlineFileProperties: boolean; + private enableInlineTypes: boolean; constructor({ requestWrapperGenerator, @@ -37,7 +39,8 @@ export class RequestWrapperContextImpl implements RequestWrapperContext { sourceFile, includeSerdeLayer, retainOriginalCasing, - inlineFileProperties + inlineFileProperties, + enableInlineTypes }: RequestWrapperContextImpl.Init) { this.requestWrapperGenerator = requestWrapperGenerator; this.requestWrapperDeclarationReferencer = requestWrapperDeclarationReferencer; @@ -47,6 +50,7 @@ export class RequestWrapperContextImpl implements RequestWrapperContext { this.includeSerdeLayer = includeSerdeLayer; this.retainOriginalCasing = retainOriginalCasing; this.inlineFileProperties = inlineFileProperties; + this.enableInlineTypes = enableInlineTypes; } public getGeneratedRequestWrapper(packageId: PackageId, endpointName: Name): GeneratedRequestWrapper { @@ -67,7 +71,8 @@ export class RequestWrapperContextImpl implements RequestWrapperContext { }), includeSerdeLayer: this.includeSerdeLayer, retainOriginalCasing: this.retainOriginalCasing, - inlineFileProperties: this.inlineFileProperties + inlineFileProperties: this.inlineFileProperties, + enableInlineTypes: this.enableInlineTypes }); } diff --git a/generators/typescript/sdk/generator/src/contexts/type-schema/TypeSchemaContextImpl.ts b/generators/typescript/sdk/generator/src/contexts/type-schema/TypeSchemaContextImpl.ts index 8222e014e66..9cd2f1b1449 100644 --- a/generators/typescript/sdk/generator/src/contexts/type-schema/TypeSchemaContextImpl.ts +++ b/generators/typescript/sdk/generator/src/contexts/type-schema/TypeSchemaContextImpl.ts @@ -1,4 +1,4 @@ -import { DeclaredTypeName, ShapeType, TypeReference } from "@fern-fern/ir-sdk/api"; +import { DeclaredTypeName, ShapeType, TypeDeclaration, TypeReference } from "@fern-fern/ir-sdk/api"; import { ImportsManager, Reference, TypeReferenceNode, Zurg } from "@fern-typescript/commons"; import { CoreUtilities } from "@fern-typescript/commons/src/core-utilities/CoreUtilities"; import { GeneratedTypeSchema, TypeSchemaContext } from "@fern-typescript/contexts"; @@ -9,7 +9,7 @@ import { TypeReferenceToSchemaConverter } from "@fern-typescript/type-reference-converters"; import { TypeSchemaGenerator } from "@fern-typescript/type-schema-generator"; -import { SourceFile } from "ts-morph"; +import { ts, SourceFile } from "ts-morph"; import { TypeDeclarationReferencer } from "../../declaration-referencers/TypeDeclarationReferencer"; import { getSchemaImportStrategy } from "../getSchemaImportStrategy"; @@ -27,6 +27,7 @@ export declare namespace TypeSchemaContextImpl { includeSerdeLayer: boolean; retainOriginalCasing: boolean; useBigInt: boolean; + enableInlineTypes: boolean; } } @@ -56,17 +57,20 @@ export class TypeSchemaContextImpl implements TypeSchemaContext { treatUnknownAsAny, includeSerdeLayer, retainOriginalCasing, - useBigInt + useBigInt, + enableInlineTypes }: TypeSchemaContextImpl.Init) { this.sourceFile = sourceFile; this.coreUtilities = coreUtilities; this.importsManager = importsManager; this.typeReferenceToRawTypeNodeConverter = new TypeReferenceToRawTypeNodeConverter({ getReferenceToNamedType: (typeName) => this.getReferenceToRawNamedType(typeName).getEntityName(), + generateForInlineUnion: (typeName) => this.generateForInlineUnion(typeName), typeResolver, treatUnknownAsAny, includeSerdeLayer, - useBigInt + useBigInt, + enableInlineTypes }); this.typeReferenceToSchemaConverter = new TypeReferenceToSchemaConverter({ getSchemaOfNamedType: (typeName) => this.getSchemaOfNamedType(typeName, { isGeneratingSchema: true }), @@ -74,7 +78,8 @@ export class TypeSchemaContextImpl implements TypeSchemaContext { typeResolver, treatUnknownAsAny, includeSerdeLayer, - useBigInt + useBigInt, + enableInlineTypes }); this.typeDeclarationReferencer = typeDeclarationReferencer; this.typeSchemaDeclarationReferencer = typeSchemaDeclarationReferencer; @@ -101,10 +106,11 @@ export class TypeSchemaContextImpl implements TypeSchemaContext { docs: typeDeclaration.docs ?? undefined, examples, fernFilepath: typeDeclaration.name.fernFilepath, - typeName: this.typeDeclarationReferencer.getExportedName(typeDeclaration.name), + typeName: this.getTypeNameForDeclaration(typeDeclaration), getReferenceToSelf: (context) => context.type.getReferenceToNamedType(typeName), includeSerdeLayer: this.includeSerdeLayer, - retainOriginalCasing: this.retainOriginalCasing + retainOriginalCasing: this.retainOriginalCasing, + inline: typeDeclaration.inline ?? false }), getReferenceToGeneratedType: () => this.typeDeclarationReferencer @@ -130,8 +136,12 @@ export class TypeSchemaContextImpl implements TypeSchemaContext { }); } + private getTypeNameForDeclaration(typeDeclaration: TypeDeclaration): string { + return this.typeDeclarationReferencer.getExportedName(typeDeclaration.name); + } + public getReferenceToRawType(typeReference: TypeReference): TypeReferenceNode { - return this.typeReferenceToRawTypeNodeConverter.convert(typeReference); + return this.typeReferenceToRawTypeNodeConverter.convert({ typeReference }); } public getReferenceToRawNamedType(typeName: DeclaredTypeName): Reference { @@ -154,8 +164,12 @@ export class TypeSchemaContextImpl implements TypeSchemaContext { }); } + private generateForInlineUnion(typeName: DeclaredTypeName): ts.TypeNode { + throw new Error("Internal error; inline unions are not supported in schemas."); + } + public getSchemaOfTypeReference(typeReference: TypeReference): Zurg.Schema { - return this.typeReferenceToSchemaConverter.convert(typeReference); + return this.typeReferenceToSchemaConverter.convert({ typeReference }); } public getSchemaOfNamedType( diff --git a/generators/typescript/sdk/generator/src/contexts/type/TypeContextImpl.ts b/generators/typescript/sdk/generator/src/contexts/type/TypeContextImpl.ts index 74e3a28863d..8430bd866a1 100644 --- a/generators/typescript/sdk/generator/src/contexts/type/TypeContextImpl.ts +++ b/generators/typescript/sdk/generator/src/contexts/type/TypeContextImpl.ts @@ -1,18 +1,20 @@ import { DeclaredTypeName, ExampleTypeReference, + ObjectProperty, ResolvedTypeReference, TypeDeclaration, TypeReference } from "@fern-fern/ir-sdk/api"; import { ImportsManager, NpmPackage, Reference, TypeReferenceNode } from "@fern-typescript/commons"; -import { GeneratedType, GeneratedTypeReferenceExample, TypeContext } from "@fern-typescript/contexts"; +import { BaseContext, GeneratedType, GeneratedTypeReferenceExample, TypeContext } from "@fern-typescript/contexts"; import { TypeResolver } from "@fern-typescript/resolvers"; import { TypeGenerator } from "@fern-typescript/type-generator"; import { TypeReferenceToParsedTypeNodeConverter, TypeReferenceToStringExpressionConverter } from "@fern-typescript/type-reference-converters"; +import { ConvertTypeReferenceParams } from "@fern-typescript/type-reference-converters/src/AbstractTypeReferenceConverter"; import { TypeReferenceExampleGenerator } from "@fern-typescript/type-reference-example-generator"; import { SourceFile, ts } from "ts-morph"; import { TypeDeclarationReferencer } from "../../declaration-referencers/TypeDeclarationReferencer"; @@ -31,6 +33,8 @@ export declare namespace TypeContextImpl { includeSerdeLayer: boolean; retainOriginalCasing: boolean; useBigInt: boolean; + enableInlineTypes: boolean; + context: BaseContext; } } @@ -47,6 +51,7 @@ export class TypeContextImpl implements TypeContext { private retainOriginalCasing: boolean; private isForSnippet: boolean; private npmPackage: NpmPackage | undefined; + private context: BaseContext; constructor({ npmPackage, @@ -60,7 +65,9 @@ export class TypeContextImpl implements TypeContext { treatUnknownAsAny, includeSerdeLayer, retainOriginalCasing, - useBigInt + useBigInt, + enableInlineTypes, + context }: TypeContextImpl.Init) { this.npmPackage = npmPackage; this.isForSnippet = isForSnippet; @@ -72,24 +79,56 @@ export class TypeContextImpl implements TypeContext { this.typeReferenceExampleGenerator = typeReferenceExampleGenerator; this.includeSerdeLayer = includeSerdeLayer; this.retainOriginalCasing = retainOriginalCasing; + this.context = context; this.typeReferenceToParsedTypeNodeConverter = new TypeReferenceToParsedTypeNodeConverter({ getReferenceToNamedType: (typeName) => this.getReferenceToNamedType(typeName).getEntityName(), + generateForInlineUnion: (typeName) => this.generateForInlineUnion(typeName), typeResolver, treatUnknownAsAny, includeSerdeLayer, - useBigInt + useBigInt, + enableInlineTypes }); this.typeReferenceToStringExpressionConverter = new TypeReferenceToStringExpressionConverter({ typeResolver, treatUnknownAsAny, includeSerdeLayer, - useBigInt + useBigInt, + enableInlineTypes }); } public getReferenceToType(typeReference: TypeReference): TypeReferenceNode { - return this.typeReferenceToParsedTypeNodeConverter.convert(typeReference); + return this.typeReferenceToParsedTypeNodeConverter.convert({ typeReference }); + } + + public getReferenceToInlinePropertyType( + typeReference: TypeReference, + parentTypeName: string, + propertyName: string + ): TypeReferenceNode { + return this.typeReferenceToParsedTypeNodeConverter.convert({ + typeReference, + type: "inlinePropertyParams", + parentTypeName, + propertyName + }); + } + + public getReferenceToInlineAliasType(typeReference: TypeReference, aliasTypeName: string): TypeReferenceNode { + return this.typeReferenceToParsedTypeNodeConverter.convert({ + typeReference, + type: "inlineAliasParams", + aliasTypeName + }); + } + + public getReferenceToTypeForInlineUnion(typeReference: TypeReference): TypeReferenceNode { + return this.typeReferenceToParsedTypeNodeConverter.convert({ + typeReference, + type: "forInlineUnionParams" + }); } public getTypeDeclaration(typeName: DeclaredTypeName): TypeDeclaration { @@ -118,6 +157,11 @@ export class TypeContextImpl implements TypeContext { } } + public generateForInlineUnion(typeName: DeclaredTypeName): ts.TypeNode { + const generatedType = this.getGeneratedType(typeName); + return generatedType.generateForInlineUnion(this.context); + } + public resolveTypeReference(typeReference: TypeReference): ResolvedTypeReference { return this.typeResolver.resolveTypeReference(typeReference); } @@ -131,7 +175,7 @@ export class TypeContextImpl implements TypeContext { return this.getGeneratedType(typeDeclaration.name); } - public getGeneratedType(typeName: DeclaredTypeName): GeneratedType { + public getGeneratedType(typeName: DeclaredTypeName, typeNameOverride?: string): GeneratedType { const typeDeclaration = this.typeResolver.getTypeDeclarationFromName(typeName); const examples = typeDeclaration.userProvidedExamples; if (examples.length === 0) { @@ -140,12 +184,13 @@ export class TypeContextImpl implements TypeContext { return this.typeGenerator.generateType({ shape: typeDeclaration.shape, docs: typeDeclaration.docs ?? undefined, - typeName: this.typeDeclarationReferencer.getExportedName(typeDeclaration.name), + typeName: typeNameOverride ?? this.typeDeclarationReferencer.getExportedName(typeDeclaration.name), examples, fernFilepath: typeDeclaration.name.fernFilepath, getReferenceToSelf: (context) => context.type.getReferenceToNamedType(typeName), includeSerdeLayer: this.includeSerdeLayer, - retainOriginalCasing: this.retainOriginalCasing + retainOriginalCasing: this.retainOriginalCasing, + inline: typeDeclaration.inline ?? false }); } @@ -155,11 +200,13 @@ export class TypeContextImpl implements TypeContext { { includeNullCheckIfOptional }: { includeNullCheckIfOptional: boolean } ): ts.Expression { if (includeNullCheckIfOptional) { - return this.typeReferenceToStringExpressionConverter.convertWithNullCheckIfOptional(valueType)( - valueToStringify - ); + return this.typeReferenceToStringExpressionConverter.convertWithNullCheckIfOptional({ + typeReference: valueType + })(valueToStringify); } else { - return this.typeReferenceToStringExpressionConverter.convert(valueType)(valueToStringify); + return this.typeReferenceToStringExpressionConverter.convert({ + typeReference: valueType + })(valueToStringify); } } diff --git a/generators/typescript/sdk/generator/src/declaration-referencers/TypeDeclarationReferencer.ts b/generators/typescript/sdk/generator/src/declaration-referencers/TypeDeclarationReferencer.ts index 1f468479fb9..235f4d99453 100644 --- a/generators/typescript/sdk/generator/src/declaration-referencers/TypeDeclarationReferencer.ts +++ b/generators/typescript/sdk/generator/src/declaration-referencers/TypeDeclarationReferencer.ts @@ -1,5 +1,5 @@ import { RelativeFilePath } from "@fern-api/fs-utils"; -import { DeclaredTypeName } from "@fern-fern/ir-sdk/api"; +import { DeclaredTypeName, ObjectProperty, TypeDeclaration } from "@fern-fern/ir-sdk/api"; import { ExportedFilePath, getExportedDirectoriesForFernFilepath, Reference } from "@fern-typescript/commons"; import { AbstractDeclarationReferencer } from "./AbstractDeclarationReferencer"; import { DeclarationReferencer } from "./DeclarationReferencer"; diff --git a/generators/typescript/sdk/request-wrapper-generator/package.json b/generators/typescript/sdk/request-wrapper-generator/package.json index 4add7383b61..e4c0bd15f9b 100644 --- a/generators/typescript/sdk/request-wrapper-generator/package.json +++ b/generators/typescript/sdk/request-wrapper-generator/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@fern-api/core-utils": "workspace:*", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", "ts-morph": "^15.1.0" diff --git a/generators/typescript/sdk/request-wrapper-generator/src/GeneratedRequestWrapperImpl.ts b/generators/typescript/sdk/request-wrapper-generator/src/GeneratedRequestWrapperImpl.ts index 6c49dfa6363..c55c3c94767 100644 --- a/generators/typescript/sdk/request-wrapper-generator/src/GeneratedRequestWrapperImpl.ts +++ b/generators/typescript/sdk/request-wrapper-generator/src/GeneratedRequestWrapperImpl.ts @@ -1,7 +1,8 @@ -import { noop } from "@fern-api/core-utils"; +import { assertNever, noop } from "@fern-api/core-utils"; import { ExampleEndpointCall, FileProperty, + FileUploadRequest, FileUploadRequestProperty, HttpEndpoint, HttpHeader, @@ -10,14 +11,20 @@ import { InlinedRequestBody, InlinedRequestBodyProperty, NameAndWireValue, + NamedType, + ObjectProperty, QueryParameter, + TypeDeclaration, TypeReference } from "@fern-fern/ir-sdk/api"; import { + generateInlinePropertiesModule, getExampleEndpointCalls, getTextOfTsNode, - maybeAddDocs, + maybeAddDocsNode, + maybeAddDocsStructure, PackageId, + TypeReferenceNode, visitJavaScriptRuntime } from "@fern-typescript/commons"; import { @@ -26,7 +33,17 @@ import { RequestWrapperNonBodyProperty, SdkContext } from "@fern-typescript/contexts"; -import { OptionalKind, PropertySignatureStructure, ts } from "ts-morph"; +import { + ModuleDeclarationKind, + ModuleDeclarationStructure, + OptionalKind, + PropertySignatureStructure, + StatementStructures, + StructureKind, + ts, + TypeAliasDeclarationStructure, + WriterFunction +} from "ts-morph"; import { RequestWrapperExampleGenerator } from "./RequestWrapperExampleGenerator"; export declare namespace GeneratedRequestWrapperImpl { @@ -38,6 +55,7 @@ export declare namespace GeneratedRequestWrapperImpl { includeSerdeLayer: boolean; retainOriginalCasing: boolean; inlineFileProperties: boolean; + enableInlineTypes: boolean; } } @@ -51,6 +69,7 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { protected includeSerdeLayer: boolean; protected retainOriginalCasing: boolean; protected inlineFileProperties: boolean; + private enableInlineTypes: boolean; constructor({ service, @@ -59,7 +78,8 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { packageId, includeSerdeLayer, retainOriginalCasing, - inlineFileProperties + inlineFileProperties, + enableInlineTypes }: GeneratedRequestWrapperImpl.Init) { this.service = service; this.endpoint = endpoint; @@ -68,6 +88,7 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { this.includeSerdeLayer = includeSerdeLayer; this.retainOriginalCasing = retainOriginalCasing; this.inlineFileProperties = inlineFileProperties; + this.enableInlineTypes = enableInlineTypes; } public writeToFile(context: SdkContext): void { @@ -92,7 +113,7 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { ), hasQuestionToken: type.isOptional }); - maybeAddDocs(property, queryParameter.docs); + maybeAddDocsNode(property, queryParameter.docs); } for (const header of this.getAllNonLiteralHeaders(context)) { const type = context.type.getReferenceToType(header.valueType); @@ -101,7 +122,7 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { type: getTextOfTsNode(type.typeNodeWithoutUndefined), hasQuestionToken: type.isOptional }); - maybeAddDocs(property, header.docs); + maybeAddDocsNode(property, header.docs); } if (this.endpoint.requestBody != null) { HttpRequestBody._visit(this.endpoint.requestBody, { @@ -110,7 +131,11 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { inlinedRequestBody, context })) { - requestInterface.addProperty(this.getInlineProperty(property, context)); + requestInterface.addProperty(this.getInlineProperty(inlinedRequestBody, property, context)); + } + const iModule = this.generateModule(inlinedRequestBody, context); + if (iModule) { + context.sourceFile.addModule(iModule); } for (const extension of inlinedRequestBody.extends) { requestInterface.addExtends( @@ -125,7 +150,7 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { type: getTextOfTsNode(type.typeNodeWithoutUndefined), hasQuestionToken: type.isOptional }); - maybeAddDocs(property, referenceToRequestBody.docs); + maybeAddDocsNode(property, referenceToRequestBody.docs); }, fileUpload: (fileUploadRequest) => { for (const property of fileUploadRequest.properties) { @@ -141,7 +166,9 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { }); }, bodyProperty: (inlinedProperty) => { - requestInterface.addProperty(this.getInlineProperty(inlinedProperty, context)); + requestInterface.addProperty( + this.getInlineProperty(fileUploadRequest, inlinedProperty, context) + ); }, _other: () => { throw new Error("Unknown FileUploadRequestProperty: " + property.type); @@ -186,10 +213,11 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { } private getInlineProperty( + requestBody: InlinedRequestBody | FileUploadRequest, property: InlinedRequestBodyProperty, context: SdkContext ): OptionalKind { - const type = context.type.getReferenceToType(property.valueType); + const type = this.getTypeForBodyProperty(requestBody, property, context); return { name: `"${this.getInlinedRequestBodyPropertyKey(property)}"`, type: getTextOfTsNode(type.typeNodeWithoutUndefined), @@ -198,6 +226,36 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { }; } + private getTypeForBodyProperty( + requestBody: InlinedRequestBody | FileUploadRequest, + property: InlinedRequestBodyProperty, + context: SdkContext + ): TypeReferenceNode { + const propParentTypeName = requestBody.name.pascalCase.safeName; + const propName = property.name.name.pascalCase.safeName; + return context.type.getReferenceToInlinePropertyType(property.valueType, propParentTypeName, propName); + } + + private generateModule( + inlinedRequestBody: InlinedRequestBody, + context: SdkContext + ): ModuleDeclarationStructure | undefined { + if (!this.enableInlineTypes) { + return undefined; + } + + return generateInlinePropertiesModule({ + parentTypeName: this.wrapperName, + properties: inlinedRequestBody.properties.map((prop) => ({ + propertyName: prop.name.name.pascalCase.safeName, + typeReference: prop.valueType + })), + generateStatements: (typeName, typeNameOverride) => + context.type.getGeneratedType(typeName, typeNameOverride).generateStatements(context), + getTypeDeclaration: (namedType) => context.type.getTypeDeclaration(namedType) + }); + } + public areBodyPropertiesInlined(): boolean { return this.endpoint.requestBody != null && this.endpoint.requestBody.type === "inlinedRequestBody"; } @@ -498,3 +556,58 @@ export class GeneratedRequestWrapperImpl implements GeneratedRequestWrapper { return property.type === "fileArray" ? ts.factory.createArrayTypeNode(value) : value; } } +function generateTypeVisitor( + typeReference: TypeReference, + visitor: { + named: () => TOut; + list: () => TOut; + map: () => TOut; + set: () => TOut; + other: () => TOut; + } +): TOut { + return typeReference._visit({ + named: visitor.named, + primitive: visitor.other, + unknown: visitor.other, + container: (containerType) => + containerType._visit({ + list: visitor.list, + literal: visitor.other, + map: visitor.map, + set: visitor.set, + optional: (typeReference) => generateTypeVisitor(typeReference, visitor), + _other: visitor.other + }), + _other: visitor.other + }); +} + +function getNamedType(typeReference: TypeReference): NamedType | undefined { + switch (typeReference.type) { + case "named": + return typeReference; + case "container": + switch (typeReference.container.type) { + case "optional": + return getNamedType(typeReference.container.optional); + case "list": + return getNamedType(typeReference.container.list); + case "map": + return getNamedType(typeReference.container.valueType); + case "set": + return getNamedType(typeReference.container.set); + case "literal": + return undefined; + default: + assertNever(typeReference.container); + } + // fallthrough + case "primitive": + return undefined; + case "unknown": + return undefined; + default: + assertNever(typeReference); + } +} diff --git a/generators/typescript/sdk/request-wrapper-generator/src/RequestWrapperGenerator.ts b/generators/typescript/sdk/request-wrapper-generator/src/RequestWrapperGenerator.ts index e8e0da0f816..ec52071dcee 100644 --- a/generators/typescript/sdk/request-wrapper-generator/src/RequestWrapperGenerator.ts +++ b/generators/typescript/sdk/request-wrapper-generator/src/RequestWrapperGenerator.ts @@ -13,6 +13,7 @@ export declare namespace RequestWrapperGenerator { includeSerdeLayer: boolean; retainOriginalCasing: boolean; inlineFileProperties: boolean; + enableInlineTypes: boolean; } } } @@ -25,7 +26,8 @@ export class RequestWrapperGenerator { wrapperName, includeSerdeLayer, retainOriginalCasing, - inlineFileProperties + inlineFileProperties, + enableInlineTypes }: RequestWrapperGenerator.generateRequestWrapper.Args): GeneratedRequestWrapper { return new GeneratedRequestWrapperImpl({ packageId, @@ -34,7 +36,8 @@ export class RequestWrapperGenerator { wrapperName, includeSerdeLayer, retainOriginalCasing, - inlineFileProperties + inlineFileProperties, + enableInlineTypes }); } } diff --git a/generators/typescript/sdk/sdk-endpoint-type-schemas-generator/package.json b/generators/typescript/sdk/sdk-endpoint-type-schemas-generator/package.json index 835346fd208..5a1a40aecd3 100644 --- a/generators/typescript/sdk/sdk-endpoint-type-schemas-generator/package.json +++ b/generators/typescript/sdk/sdk-endpoint-type-schemas-generator/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@fern-api/core-utils": "workspace:*", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/abstract-schema-generator": "workspace:*", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", diff --git a/generators/typescript/sdk/sdk-error-generator/package.json b/generators/typescript/sdk/sdk-error-generator/package.json index ad385ac1098..bb35359c067 100644 --- a/generators/typescript/sdk/sdk-error-generator/package.json +++ b/generators/typescript/sdk/sdk-error-generator/package.json @@ -27,7 +27,7 @@ "depcheck": "depcheck" }, "dependencies": { - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/abstract-error-class-generator": "workspace:*", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", diff --git a/generators/typescript/sdk/sdk-error-schema-generator/package.json b/generators/typescript/sdk/sdk-error-schema-generator/package.json index 51605ff06aa..bffc0aedcb9 100644 --- a/generators/typescript/sdk/sdk-error-schema-generator/package.json +++ b/generators/typescript/sdk/sdk-error-schema-generator/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@fern-api/core-utils": "workspace:*", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/abstract-schema-generator": "workspace:*", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", diff --git a/generators/typescript/sdk/sdk-inlined-request-body-schema-generator/package.json b/generators/typescript/sdk/sdk-inlined-request-body-schema-generator/package.json index 480994c7341..f82ee155563 100644 --- a/generators/typescript/sdk/sdk-inlined-request-body-schema-generator/package.json +++ b/generators/typescript/sdk/sdk-inlined-request-body-schema-generator/package.json @@ -27,7 +27,7 @@ "depcheck": "depcheck" }, "dependencies": { - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/abstract-schema-generator": "workspace:*", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*", diff --git a/generators/typescript/utils/abstract-generator-cli/package.json b/generators/typescript/utils/abstract-generator-cli/package.json index 7fbec6d57f6..1c5701d62ba 100644 --- a/generators/typescript/utils/abstract-generator-cli/package.json +++ b/generators/typescript/utils/abstract-generator-cli/package.json @@ -31,7 +31,7 @@ "@fern-api/base-generator": "workspace:*", "@fern-api/logger": "workspace:*", "@fern-fern/generator-exec-sdk": "^0.0.898", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/commons": "workspace:*", "@fern-typescript/contexts": "workspace:*" }, diff --git a/generators/typescript/utils/commons/package.json b/generators/typescript/utils/commons/package.json index 612f7796015..0532c75b5ba 100644 --- a/generators/typescript/utils/commons/package.json +++ b/generators/typescript/utils/commons/package.json @@ -31,7 +31,7 @@ "@fern-api/fs-utils": "workspace:*", "@fern-api/logger": "workspace:*", "@fern-api/logging-execa": "workspace:*", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/fetcher": "workspace:*", "@fern-typescript/zurg": "workspace:*", "decompress": "^4.2.1", diff --git a/generators/typescript/utils/commons/src/codegen-utils/generateInlineModule.ts b/generators/typescript/utils/commons/src/codegen-utils/generateInlineModule.ts new file mode 100644 index 00000000000..af4728f0561 --- /dev/null +++ b/generators/typescript/utils/commons/src/codegen-utils/generateInlineModule.ts @@ -0,0 +1,251 @@ +import { assertNever } from "@fern-api/core-utils"; +import { TypeReference, TypeDeclaration, MapType, NamedType, DeclaredTypeName } from "@fern-fern/ir-sdk/api"; +import { + ModuleDeclarationKind, + ModuleDeclarationStructure, + StatementStructures, + StructureKind, + TypeAliasDeclarationStructure, + WriterFunction +} from "ts-morph"; +import { InlineConsts } from "./inlineConsts"; + +export function generateInlinePropertiesModule({ + generateStatements, + getTypeDeclaration, + parentTypeName, + properties +}: InlinePropertiesParams): ModuleDeclarationStructure | undefined { + const inlineProperties = getInlineProperties(properties, getTypeDeclaration); + if (inlineProperties.length === 0) { + return; + } + return { + kind: StructureKind.Module, + name: parentTypeName, + isExported: true, + hasDeclareKeyword: false, + declarationKind: ModuleDeclarationKind.Namespace, + statements: inlineProperties.flatMap( + ([propertyName, typeReference, typeDeclaration]: [string, TypeReference, TypeDeclaration]) => { + return generateTypeVisitor(typeReference, { + named: () => generateStatements(typeDeclaration.name, propertyName), + list: () => propertyListOrSetStatementGenerator(propertyName, typeDeclaration, generateStatements), + set: () => propertyListOrSetStatementGenerator(propertyName, typeDeclaration, generateStatements), + map: () => { + const statements: StatementStructures[] = []; + const mapModule: ModuleDeclarationStructure = { + kind: StructureKind.Module, + declarationKind: ModuleDeclarationKind.Namespace, + isExported: true, + hasDeclareKeyword: false, + name: propertyName, + statements: generateStatements(typeDeclaration.name, InlineConsts.MAP_VALUE_TYPE_NAME) + }; + + statements.push(mapModule); + return statements; + }, + other: () => { + throw new Error(`Only named, list, map, and set properties can be inlined. + Property: ${JSON.stringify(propertyName)}`); + } + }); + } + ) + }; +} + +function propertyListOrSetStatementGenerator( + propertyName: string, + typeDeclaration: TypeDeclaration, + generateStatements: GenerateStatements +) { + const statements: StatementStructures[] = []; + const listType: TypeAliasDeclarationStructure = { + kind: StructureKind.TypeAlias, + name: propertyName, + type: `${propertyName}.${InlineConsts.LIST_ITEM_TYPE_NAME}[]`, + isExported: true + }; + statements.push(listType); + + const listModule: ModuleDeclarationStructure = { + kind: StructureKind.Module, + declarationKind: ModuleDeclarationKind.Namespace, + isExported: true, + hasDeclareKeyword: false, + name: propertyName, + statements: generateStatements(typeDeclaration.name, InlineConsts.LIST_ITEM_TYPE_NAME) + }; + + statements.push(listModule); + return statements; +} + +export function generateInlineAliasModule({ + generateStatements, + getTypeDeclaration, + aliasTypeName, + typeReference +}: InlineAliasParams): ModuleDeclarationStructure | undefined { + const inlineModuleStatements = generateTypeVisitor(typeReference, { + list: (itemType) => aliasListOrSetStatementGenerator(itemType, generateStatements, getTypeDeclaration), + set: (itemType) => aliasListOrSetStatementGenerator(itemType, generateStatements, getTypeDeclaration), + map: (mapType: MapType) => { + const namedType = getNamedType(mapType.valueType); + if (!namedType) { + return undefined; + } + const typeDeclaration = getTypeDeclaration(namedType); + if (!typeDeclaration.inline) { + return undefined; + } + + return generateStatements(typeDeclaration.name, InlineConsts.MAP_VALUE_TYPE_NAME); + }, + named: () => undefined, + other: () => undefined + }); + if (!inlineModuleStatements) { + return undefined; + } + return { + kind: StructureKind.Module, + name: aliasTypeName, + isExported: true, + hasDeclareKeyword: false, + declarationKind: ModuleDeclarationKind.Namespace, + statements: inlineModuleStatements + }; +} + +function aliasListOrSetStatementGenerator( + listItemType: TypeReference, + generateStatements: GenerateStatements, + getTypeDeclaration: GetTypeDeclaration +): undefined | string | WriterFunction | (string | WriterFunction | StatementStructures)[] { + const namedType = getNamedType(listItemType); + if (!namedType) { + return undefined; + } + const typeDeclaration = getTypeDeclaration(namedType); + if (!typeDeclaration.inline) { + return undefined; + } + + return generateStatements(typeDeclaration.name, InlineConsts.LIST_ITEM_TYPE_NAME); +} + +function getInlineProperties( + properties: Property[], + getTypeDeclaration: GetTypeDeclaration +): [string, TypeReference, TypeDeclaration][] { + return properties + .map(({ propertyName, typeReference }): [string, TypeReference, TypeDeclaration] | undefined => { + const declaration = getInlineTypeDeclaration(typeReference, getTypeDeclaration); + if (!declaration) { + return undefined; + } + return [propertyName, typeReference, declaration]; + }) + .filter((x): x is [string, TypeReference, TypeDeclaration] => x !== undefined); +} + +function getInlineTypeDeclaration( + typeReference: TypeReference, + getTypeDeclaration: GetTypeDeclaration +): TypeDeclaration | undefined { + const namedType = getNamedType(typeReference); + if (!namedType) { + return undefined; + } + const typeDeclaration = getTypeDeclaration(namedType); + if (!typeDeclaration.inline) { + return undefined; + } + + return typeDeclaration; +} + +export interface InlinePropertiesParams { + generateStatements: GenerateStatements; + getTypeDeclaration: GetTypeDeclaration; + parentTypeName: string; + properties: Property[]; +} + +interface Property { + typeReference: TypeReference; + propertyName: string; +} + +export interface InlineAliasParams { + generateStatements: GenerateStatements; + getTypeDeclaration: GetTypeDeclaration; + typeReference: TypeReference; + aliasTypeName: string; +} + +type GenerateStatements = ( + typeName: DeclaredTypeName, + typeNameOverride?: string +) => string | WriterFunction | (string | WriterFunction | StatementStructures)[]; + +type GetTypeDeclaration = (namedType: NamedType) => TypeDeclaration; + +function generateTypeVisitor( + typeReference: TypeReference, + visitor: { + named: (namedType: NamedType) => TOut; + list: (itemType: TypeReference) => TOut; + map: (mapType: MapType) => TOut; + set: (itemType: TypeReference) => TOut; + other: () => TOut; + } +): TOut { + return typeReference._visit({ + named: visitor.named, + primitive: visitor.other, + unknown: visitor.other, + container: (containerType) => + containerType._visit({ + list: visitor.list, + literal: visitor.other, + map: visitor.map, + set: visitor.set, + optional: (typeReference) => generateTypeVisitor(typeReference, visitor), + _other: visitor.other + }), + _other: visitor.other + }); +} + +function getNamedType(typeReference: TypeReference): NamedType | undefined { + switch (typeReference.type) { + case "named": + return typeReference; + case "container": + switch (typeReference.container.type) { + case "optional": + return getNamedType(typeReference.container.optional); + case "list": + return getNamedType(typeReference.container.list); + case "map": + return getNamedType(typeReference.container.valueType); + case "set": + return getNamedType(typeReference.container.set); + case "literal": + return undefined; + default: + assertNever(typeReference.container); + } + // fallthrough + case "primitive": + return undefined; + case "unknown": + return undefined; + default: + assertNever(typeReference); + } +} diff --git a/generators/typescript/utils/commons/src/codegen-utils/inlineConsts.ts b/generators/typescript/utils/commons/src/codegen-utils/inlineConsts.ts new file mode 100644 index 00000000000..7a3a221e981 --- /dev/null +++ b/generators/typescript/utils/commons/src/codegen-utils/inlineConsts.ts @@ -0,0 +1,4 @@ +export const InlineConsts = { + MAP_VALUE_TYPE_NAME: "Value", + LIST_ITEM_TYPE_NAME: "Item" +} as const; diff --git a/generators/typescript/utils/commons/src/codegen-utils/maybeAddDocs.ts b/generators/typescript/utils/commons/src/codegen-utils/maybeAddDocs.ts index bbf8ccd6fcb..593d4f74296 100644 --- a/generators/typescript/utils/commons/src/codegen-utils/maybeAddDocs.ts +++ b/generators/typescript/utils/commons/src/codegen-utils/maybeAddDocs.ts @@ -1,8 +1,17 @@ -import { JSDocableNode } from "ts-morph"; +import { JSDocableNode, JSDocableNodeStructure } from "ts-morph"; -export function maybeAddDocs(node: JSDocableNode, docs: string | null | undefined): void { +export function maybeAddDocsNode(node: JSDocableNode, docs: string | null | undefined): void { if (docs != null) { + docs = "\n" + docs; + node.addJsDoc(docs); + } +} + +export function maybeAddDocsStructure(node: JSDocableNodeStructure, docs: string | null | undefined): void { + if (docs != null) { + docs = "\n" + docs; // add newline so ts-morph makes it a multiline comment - node.addJsDoc("\n" + docs); + node.docs = [docs]; + return; } } diff --git a/generators/typescript/utils/commons/src/codegen-utils/writerToString.ts b/generators/typescript/utils/commons/src/codegen-utils/writerToString.ts new file mode 100644 index 00000000000..e471579f852 --- /dev/null +++ b/generators/typescript/utils/commons/src/codegen-utils/writerToString.ts @@ -0,0 +1,12 @@ +import { CodeBlockWriter, WriterFunction } from "ts-morph"; + +export function writerToString(writer: WriterFunction | string): string { + if (typeof writer === "string") { + return writer; + } + // Create a minimal writer context that captures the output + const writerContext = new CodeBlockWriter(); + // Execute the writer with our context + writer(writerContext); + return writerContext.toString(); +} diff --git a/generators/typescript/utils/commons/src/index.ts b/generators/typescript/utils/commons/src/index.ts index a00948bf805..0ea330a99f7 100644 --- a/generators/typescript/utils/commons/src/index.ts +++ b/generators/typescript/utils/commons/src/index.ts @@ -3,7 +3,9 @@ export { getPropertyKey } from "./codegen-utils/getPropertyKey"; export { getSchemaOptions } from "./codegen-utils/getSchemaOptions"; export { getTextOfTsKeyword } from "./codegen-utils/getTextOfTsKeyword"; export { getTextOfTsNode } from "./codegen-utils/getTextOfTsNode"; -export { maybeAddDocs } from "./codegen-utils/maybeAddDocs"; +export { maybeAddDocsNode, maybeAddDocsStructure } from "./codegen-utils/maybeAddDocs"; +export { writerToString } from "./codegen-utils/writerToString"; +export { generateInlineAliasModule, generateInlinePropertiesModule } from "./codegen-utils/generateInlineModule"; export * from "./core-utilities"; export { type Zurg } from "./core-utilities/zurg/Zurg"; export { DependencyManager, DependencyType, type PackageDependencies } from "./dependency-manager/DependencyManager"; diff --git a/generators/typescript/utils/contexts/package.json b/generators/typescript/utils/contexts/package.json index 34f95fc84f8..2fc47911eeb 100644 --- a/generators/typescript/utils/contexts/package.json +++ b/generators/typescript/utils/contexts/package.json @@ -30,7 +30,7 @@ "@fern-api/logger": "workspace:*", "@fern-api/base-generator": "workspace:*", "@fern-fern/generator-exec-sdk": "^0.0.898", - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/commons": "workspace:*", "ts-morph": "^15.1.0" }, diff --git a/generators/typescript/utils/contexts/src/base-context/BaseContext.ts b/generators/typescript/utils/contexts/src/base-context/BaseContext.ts index 484a3ff08d8..619cbc43c02 100644 --- a/generators/typescript/utils/contexts/src/base-context/BaseContext.ts +++ b/generators/typescript/utils/contexts/src/base-context/BaseContext.ts @@ -1,11 +1,17 @@ +import { Logger } from "@fern-api/logger"; import { Constants } from "@fern-fern/ir-sdk/api"; import { ExternalDependencies } from "@fern-typescript/commons"; import { CoreUtilities } from "@fern-typescript/commons/src/core-utilities/CoreUtilities"; import { SourceFile } from "ts-morph"; +import { TypeContext, TypeSchemaContext } from "../model-context"; export interface BaseContext { + logger: Logger; sourceFile: SourceFile; externalDependencies: ExternalDependencies; coreUtilities: CoreUtilities; fernConstants: Constants; + type: TypeContext; + typeSchema: TypeSchemaContext; + includeSerdeLayer: boolean; } diff --git a/generators/typescript/utils/contexts/src/base-context/index.ts b/generators/typescript/utils/contexts/src/base-context/index.ts index fe9a97ab7b5..7e00204fc7d 100644 --- a/generators/typescript/utils/contexts/src/base-context/index.ts +++ b/generators/typescript/utils/contexts/src/base-context/index.ts @@ -1 +1,4 @@ export { type BaseContext } from "./BaseContext"; + +export * from "./type"; +export * from "./type-schema"; diff --git a/generators/typescript/utils/contexts/src/model-context/type-schema/BaseGeneratedTypeSchema.ts b/generators/typescript/utils/contexts/src/base-context/type-schema/BaseGeneratedTypeSchema.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type-schema/BaseGeneratedTypeSchema.ts rename to generators/typescript/utils/contexts/src/base-context/type-schema/BaseGeneratedTypeSchema.ts diff --git a/generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedAliasTypeSchema.ts b/generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedAliasTypeSchema.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedAliasTypeSchema.ts rename to generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedAliasTypeSchema.ts diff --git a/generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedEnumTypeSchema.ts b/generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedEnumTypeSchema.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedEnumTypeSchema.ts rename to generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedEnumTypeSchema.ts diff --git a/generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedObjectTypeSchema.ts b/generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedObjectTypeSchema.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedObjectTypeSchema.ts rename to generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedObjectTypeSchema.ts diff --git a/generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedTypeSchema.ts b/generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedTypeSchema.ts similarity index 84% rename from generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedTypeSchema.ts rename to generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedTypeSchema.ts index f1b00c475e6..55974a35891 100644 --- a/generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedTypeSchema.ts +++ b/generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedTypeSchema.ts @@ -1,11 +1,11 @@ -import { ModelContext } from "../ModelContext"; +import { BaseContext } from "../../base-context"; import { GeneratedAliasTypeSchema } from "./GeneratedAliasTypeSchema"; import { GeneratedEnumTypeSchema } from "./GeneratedEnumTypeSchema"; import { GeneratedObjectTypeSchema } from "./GeneratedObjectTypeSchema"; import { GeneratedUndiscriminatedUnionTypeSchema } from "./GeneratedUndiscriminatedUnionTypeSchema"; import { GeneratedUnionTypeSchema } from "./GeneratedUnionTypeSchema"; -export type GeneratedTypeSchema = +export type GeneratedTypeSchema = | GeneratedAliasTypeSchema | GeneratedEnumTypeSchema | GeneratedUnionTypeSchema diff --git a/generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedUndiscriminatedUnionTypeSchema.ts b/generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedUndiscriminatedUnionTypeSchema.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedUndiscriminatedUnionTypeSchema.ts rename to generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedUndiscriminatedUnionTypeSchema.ts diff --git a/generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedUnionTypeSchema.ts b/generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedUnionTypeSchema.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type-schema/GeneratedUnionTypeSchema.ts rename to generators/typescript/utils/contexts/src/base-context/type-schema/GeneratedUnionTypeSchema.ts diff --git a/generators/typescript/utils/contexts/src/model-context/type-schema/TypeSchemaContext.ts b/generators/typescript/utils/contexts/src/base-context/type-schema/TypeSchemaContext.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type-schema/TypeSchemaContext.ts rename to generators/typescript/utils/contexts/src/base-context/type-schema/TypeSchemaContext.ts diff --git a/generators/typescript/utils/contexts/src/model-context/type-schema/index.ts b/generators/typescript/utils/contexts/src/base-context/type-schema/index.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type-schema/index.ts rename to generators/typescript/utils/contexts/src/base-context/type-schema/index.ts diff --git a/generators/typescript/utils/contexts/src/base-context/type/BaseGeneratedType.ts b/generators/typescript/utils/contexts/src/base-context/type/BaseGeneratedType.ts new file mode 100644 index 00000000000..f2a69f75d11 --- /dev/null +++ b/generators/typescript/utils/contexts/src/base-context/type/BaseGeneratedType.ts @@ -0,0 +1,15 @@ +import { ExampleTypeShape } from "@fern-fern/ir-sdk/api"; +import { GetReferenceOpts } from "@fern-typescript/commons"; +import { ts } from "ts-morph"; +import { GeneratedFile } from "../../commons"; +import { GeneratedModule } from "../../commons/GeneratedModule"; +import { GeneratedStatements } from "../../commons/GeneratedStatements"; +import { GeneratedUnionInlineMemberNode } from "../../commons/GeneratedUnionInlineMemberNode"; + +export interface BaseGeneratedType + extends GeneratedFile, + GeneratedStatements, + GeneratedModule, + GeneratedUnionInlineMemberNode { + buildExample: (example: ExampleTypeShape, context: Context, opts: GetReferenceOpts) => ts.Expression; +} diff --git a/generators/typescript/utils/contexts/src/model-context/type/GeneratedAliasType.ts b/generators/typescript/utils/contexts/src/base-context/type/GeneratedAliasType.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type/GeneratedAliasType.ts rename to generators/typescript/utils/contexts/src/base-context/type/GeneratedAliasType.ts diff --git a/generators/typescript/utils/contexts/src/model-context/type/GeneratedEnumType.ts b/generators/typescript/utils/contexts/src/base-context/type/GeneratedEnumType.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type/GeneratedEnumType.ts rename to generators/typescript/utils/contexts/src/base-context/type/GeneratedEnumType.ts diff --git a/generators/typescript/utils/contexts/src/base-context/type/GeneratedObjectType.ts b/generators/typescript/utils/contexts/src/base-context/type/GeneratedObjectType.ts new file mode 100644 index 00000000000..c9bc70c056a --- /dev/null +++ b/generators/typescript/utils/contexts/src/base-context/type/GeneratedObjectType.ts @@ -0,0 +1,19 @@ +import { ExampleTypeShape, TypeReference } from "@fern-fern/ir-sdk/api"; +import { GetReferenceOpts } from "@fern-typescript/commons"; +import { InterfaceDeclarationStructure, PropertySignatureStructure, ts } from "ts-morph"; +import { BaseGeneratedType } from "./BaseGeneratedType"; + +export interface GeneratedObjectType extends BaseGeneratedType { + type: "object"; + getAllPropertiesIncludingExtensions: ( + context: Context + ) => { wireKey: string; propertyKey: string; type: TypeReference }[]; + generateInterface(context: Context): InterfaceDeclarationStructure; + generateProperties(context: Context): PropertySignatureStructure[]; + getPropertyKey: (args: { propertyWireKey: string }) => string; + buildExampleProperties: ( + example: ExampleTypeShape, + context: Context, + opts: GetReferenceOpts + ) => ts.ObjectLiteralElementLike[]; +} diff --git a/generators/typescript/utils/contexts/src/model-context/type/GeneratedType.ts b/generators/typescript/utils/contexts/src/base-context/type/GeneratedType.ts similarity index 83% rename from generators/typescript/utils/contexts/src/model-context/type/GeneratedType.ts rename to generators/typescript/utils/contexts/src/base-context/type/GeneratedType.ts index 180f96670ad..c56d430872b 100644 --- a/generators/typescript/utils/contexts/src/model-context/type/GeneratedType.ts +++ b/generators/typescript/utils/contexts/src/base-context/type/GeneratedType.ts @@ -1,11 +1,11 @@ -import { ModelContext } from "../ModelContext"; +import { BaseContext } from "../../base-context"; import { GeneratedAliasType } from "./GeneratedAliasType"; import { GeneratedEnumType } from "./GeneratedEnumType"; import { GeneratedObjectType } from "./GeneratedObjectType"; import { GeneratedUndiscriminatedUnionType } from "./GeneratedUndiscriminatedUnionType"; import { GeneratedUnionType } from "./GeneratedUnionType"; -export type GeneratedType = +export type GeneratedType = | GeneratedAliasType | GeneratedEnumType | GeneratedObjectType diff --git a/generators/typescript/utils/contexts/src/base-context/type/GeneratedTypeReferenceExample.ts b/generators/typescript/utils/contexts/src/base-context/type/GeneratedTypeReferenceExample.ts new file mode 100644 index 00000000000..9df1addf9e8 --- /dev/null +++ b/generators/typescript/utils/contexts/src/base-context/type/GeneratedTypeReferenceExample.ts @@ -0,0 +1,7 @@ +import { GetReferenceOpts } from "@fern-typescript/commons"; +import { ts } from "ts-morph"; +import { BaseContext } from "../../base-context"; + +export interface GeneratedTypeReferenceExample { + build: (context: BaseContext, opts: GetReferenceOpts) => ts.Expression; +} diff --git a/generators/typescript/utils/contexts/src/model-context/type/GeneratedUndiscriminatedUnionType.ts b/generators/typescript/utils/contexts/src/base-context/type/GeneratedUndiscriminatedUnionType.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type/GeneratedUndiscriminatedUnionType.ts rename to generators/typescript/utils/contexts/src/base-context/type/GeneratedUndiscriminatedUnionType.ts diff --git a/generators/typescript/utils/contexts/src/model-context/type/GeneratedUnionType.ts b/generators/typescript/utils/contexts/src/base-context/type/GeneratedUnionType.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type/GeneratedUnionType.ts rename to generators/typescript/utils/contexts/src/base-context/type/GeneratedUnionType.ts diff --git a/generators/typescript/utils/contexts/src/base-context/type/TypeContext.ts b/generators/typescript/utils/contexts/src/base-context/type/TypeContext.ts new file mode 100644 index 00000000000..0c7af1da023 --- /dev/null +++ b/generators/typescript/utils/contexts/src/base-context/type/TypeContext.ts @@ -0,0 +1,36 @@ +import { + DeclaredTypeName, + ExampleTypeReference, + ObjectProperty, + ResolvedTypeReference, + TypeDeclaration, + TypeId, + TypeReference +} from "@fern-fern/ir-sdk/api"; +import { Reference, TypeReferenceNode } from "@fern-typescript/commons"; +import { ts } from "ts-morph"; +import { GeneratedType } from "./GeneratedType"; +import { GeneratedTypeReferenceExample } from "./GeneratedTypeReferenceExample"; + +export interface TypeContext { + getReferenceToType: (typeReference: TypeReference) => TypeReferenceNode; + getReferenceToInlinePropertyType: ( + typeReference: TypeReference, + parentTypeName: string, + propertyName: string + ) => TypeReferenceNode; + getReferenceToInlineAliasType: (typeReference: TypeReference, aliasTypeName: string) => TypeReferenceNode; + getReferenceToTypeForInlineUnion: (typeReference: TypeReference) => TypeReferenceNode; + stringify: ( + valueToStringify: ts.Expression, + valueType: TypeReference, + opts: { includeNullCheckIfOptional: boolean } + ) => ts.Expression; + getReferenceToNamedType: (typeName: DeclaredTypeName) => Reference; + resolveTypeReference: (typeReference: TypeReference) => ResolvedTypeReference; + resolveTypeName: (typeName: DeclaredTypeName) => ResolvedTypeReference; + getTypeDeclaration: (typeName: DeclaredTypeName) => TypeDeclaration; + getGeneratedType: (typeName: DeclaredTypeName, typeNameOverride?: string) => GeneratedType; + getGeneratedTypeById: (typeId: TypeId) => GeneratedType; + getGeneratedExample: (example: ExampleTypeReference) => GeneratedTypeReferenceExample; +} diff --git a/generators/typescript/utils/contexts/src/model-context/type/index.ts b/generators/typescript/utils/contexts/src/base-context/type/index.ts similarity index 100% rename from generators/typescript/utils/contexts/src/model-context/type/index.ts rename to generators/typescript/utils/contexts/src/base-context/type/index.ts diff --git a/generators/typescript/utils/contexts/src/commons/GeneratedModule.ts b/generators/typescript/utils/contexts/src/commons/GeneratedModule.ts new file mode 100644 index 00000000000..1dc5153afc9 --- /dev/null +++ b/generators/typescript/utils/contexts/src/commons/GeneratedModule.ts @@ -0,0 +1,5 @@ +import { ModuleDeclarationStructure } from "ts-morph"; + +export interface GeneratedModule { + generateModule(context: Context): ModuleDeclarationStructure | undefined; +} diff --git a/generators/typescript/utils/contexts/src/commons/GeneratedStatements.ts b/generators/typescript/utils/contexts/src/commons/GeneratedStatements.ts new file mode 100644 index 00000000000..13fa8fd2834 --- /dev/null +++ b/generators/typescript/utils/contexts/src/commons/GeneratedStatements.ts @@ -0,0 +1,7 @@ +import { StatementStructures, WriterFunction } from "ts-morph"; + +export interface GeneratedStatements { + generateStatements: ( + context: Context + ) => string | WriterFunction | string | WriterFunction | (string | WriterFunction | StatementStructures)[]; +} diff --git a/generators/typescript/utils/contexts/src/commons/GeneratedUnion.ts b/generators/typescript/utils/contexts/src/commons/GeneratedUnion.ts index b5e8a09c5e8..6250bd6355f 100644 --- a/generators/typescript/utils/contexts/src/commons/GeneratedUnion.ts +++ b/generators/typescript/utils/contexts/src/commons/GeneratedUnion.ts @@ -1,7 +1,6 @@ import { ts } from "ts-morph"; -import { GeneratedFile } from "./GeneratedFile"; -export interface GeneratedUnion extends GeneratedFile { +export interface GeneratedUnion { discriminant: string; visitPropertyName: string; getReferenceTo: (context: Context) => ts.TypeNode; diff --git a/generators/typescript/utils/contexts/src/commons/GeneratedUnionInlineMemberNode.ts b/generators/typescript/utils/contexts/src/commons/GeneratedUnionInlineMemberNode.ts new file mode 100644 index 00000000000..19c5d2c7445 --- /dev/null +++ b/generators/typescript/utils/contexts/src/commons/GeneratedUnionInlineMemberNode.ts @@ -0,0 +1,5 @@ +import { ts } from "ts-morph"; + +export interface GeneratedUnionInlineMemberNode { + generateForInlineUnion(context: Context): ts.TypeNode; +} diff --git a/generators/typescript/utils/contexts/src/express-context/ExpressContext.ts b/generators/typescript/utils/contexts/src/express-context/ExpressContext.ts index c6a6e1abcfa..7b4d3785955 100644 --- a/generators/typescript/utils/contexts/src/express-context/ExpressContext.ts +++ b/generators/typescript/utils/contexts/src/express-context/ExpressContext.ts @@ -1,4 +1,4 @@ -import { ModelContext } from "../model-context/ModelContext"; +import { BaseContext } from "../base-context"; import { ExpressEndpointTypeSchemasContext } from "./express-endpoint-type-schemas"; import { ExpressErrorContext } from "./express-error"; import { ExpressErrorSchemaContext } from "./express-error-schema"; @@ -8,7 +8,7 @@ import { ExpressRegisterContext } from "./express-register"; import { ExpressServiceContext } from "./express-service"; import { GenericAPIExpressErrorContext } from "./generic-api-express-error"; -export interface ExpressContext extends ModelContext { +export interface ExpressContext extends BaseContext { expressEndpointTypeSchemas: ExpressEndpointTypeSchemasContext; expressError: ExpressErrorContext; expressErrorSchema: ExpressErrorSchemaContext; diff --git a/generators/typescript/utils/contexts/src/model-context/ModelContext.ts b/generators/typescript/utils/contexts/src/model-context/ModelContext.ts index f4dddef8658..ff3676aed4c 100644 --- a/generators/typescript/utils/contexts/src/model-context/ModelContext.ts +++ b/generators/typescript/utils/contexts/src/model-context/ModelContext.ts @@ -1,9 +1,3 @@ import { BaseContext } from "../base-context"; -import { TypeContext } from "./type"; -import { TypeSchemaContext } from "./type-schema"; -export interface ModelContext extends BaseContext { - type: TypeContext; - typeSchema: TypeSchemaContext; - includeSerdeLayer: boolean; -} +export interface ModelContext extends BaseContext {} diff --git a/generators/typescript/utils/contexts/src/model-context/index.ts b/generators/typescript/utils/contexts/src/model-context/index.ts index e82e43cc427..e1eba561e55 100644 --- a/generators/typescript/utils/contexts/src/model-context/index.ts +++ b/generators/typescript/utils/contexts/src/model-context/index.ts @@ -1,3 +1,4 @@ export { type ModelContext } from "./ModelContext"; -export * from "./type"; -export * from "./type-schema"; + +export * from "../base-context/type"; +export * from "../base-context/type-schema"; diff --git a/generators/typescript/utils/contexts/src/model-context/type/BaseGeneratedType.ts b/generators/typescript/utils/contexts/src/model-context/type/BaseGeneratedType.ts deleted file mode 100644 index 8dd48ce23e3..00000000000 --- a/generators/typescript/utils/contexts/src/model-context/type/BaseGeneratedType.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ExampleTypeShape } from "@fern-fern/ir-sdk/api"; -import { GetReferenceOpts } from "@fern-typescript/commons"; -import { ts } from "ts-morph"; -import { GeneratedFile } from "../../commons/GeneratedFile"; - -export interface BaseGeneratedType extends GeneratedFile { - buildExample: (example: ExampleTypeShape, context: Context, opts: GetReferenceOpts) => ts.Expression; -} diff --git a/generators/typescript/utils/contexts/src/model-context/type/GeneratedObjectType.ts b/generators/typescript/utils/contexts/src/model-context/type/GeneratedObjectType.ts deleted file mode 100644 index 3213cb7955c..00000000000 --- a/generators/typescript/utils/contexts/src/model-context/type/GeneratedObjectType.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ExampleTypeShape, TypeReference } from "@fern-fern/ir-sdk/api"; -import { GetReferenceOpts } from "@fern-typescript/commons"; -import { ts } from "ts-morph"; -import { BaseGeneratedType } from "./BaseGeneratedType"; - -export interface GeneratedObjectType extends BaseGeneratedType { - type: "object"; - getAllPropertiesIncludingExtensions: ( - context: Context - ) => { wireKey: string; propertyKey: string; type: TypeReference }[]; - getPropertyKey: (args: { propertyWireKey: string }) => string; - buildExampleProperties: ( - example: ExampleTypeShape, - context: Context, - opts: GetReferenceOpts - ) => ts.ObjectLiteralElementLike[]; -} diff --git a/generators/typescript/utils/contexts/src/model-context/type/GeneratedTypeReferenceExample.ts b/generators/typescript/utils/contexts/src/model-context/type/GeneratedTypeReferenceExample.ts deleted file mode 100644 index 9a2fe5bf073..00000000000 --- a/generators/typescript/utils/contexts/src/model-context/type/GeneratedTypeReferenceExample.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { GetReferenceOpts } from "@fern-typescript/commons"; -import { ts } from "ts-morph"; -import { ModelContext } from "../ModelContext"; - -export interface GeneratedTypeReferenceExample { - build: (context: ModelContext, opts: GetReferenceOpts) => ts.Expression; -} diff --git a/generators/typescript/utils/contexts/src/model-context/type/TypeContext.ts b/generators/typescript/utils/contexts/src/model-context/type/TypeContext.ts deleted file mode 100644 index 9b5721b019a..00000000000 --- a/generators/typescript/utils/contexts/src/model-context/type/TypeContext.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - DeclaredTypeName, - ExampleTypeReference, - ResolvedTypeReference, - TypeDeclaration, - TypeId, - TypeReference -} from "@fern-fern/ir-sdk/api"; -import { Reference, TypeReferenceNode } from "@fern-typescript/commons"; -import { ts } from "ts-morph"; -import { GeneratedType } from "./GeneratedType"; -import { GeneratedTypeReferenceExample } from "./GeneratedTypeReferenceExample"; - -export interface TypeContext { - getReferenceToType: (typeReference: TypeReference) => TypeReferenceNode; - stringify: ( - valueToStringify: ts.Expression, - valueType: TypeReference, - opts: { includeNullCheckIfOptional: boolean } - ) => ts.Expression; - getReferenceToNamedType: (typeName: DeclaredTypeName) => Reference; - resolveTypeReference: (typeReference: TypeReference) => ResolvedTypeReference; - resolveTypeName: (typeName: DeclaredTypeName) => ResolvedTypeReference; - getTypeDeclaration: (typeName: DeclaredTypeName) => TypeDeclaration; - getGeneratedType: (typeName: DeclaredTypeName) => GeneratedType; - getGeneratedTypeById: (typeId: TypeId) => GeneratedType; - getGeneratedExample: (example: ExampleTypeReference) => GeneratedTypeReferenceExample; -} diff --git a/generators/typescript/utils/contexts/src/sdk-context/SdkContext.ts b/generators/typescript/utils/contexts/src/sdk-context/SdkContext.ts index c05084ab1ef..30b31c48c44 100644 --- a/generators/typescript/utils/contexts/src/sdk-context/SdkContext.ts +++ b/generators/typescript/utils/contexts/src/sdk-context/SdkContext.ts @@ -2,7 +2,6 @@ import { FernGeneratorExec } from "@fern-fern/generator-exec-sdk"; import { IntermediateRepresentation } from "@fern-fern/ir-sdk/api"; import { JavaScriptRuntime, NpmPackage } from "@fern-typescript/commons"; import { ts } from "ts-morph"; -import { ModelContext } from "../model-context/ModelContext"; import { EndpointErrorUnionContext } from "./endpoint-error-union"; import { EnvironmentsContext } from "./environments"; import { GenericAPISdkErrorContext } from "./generic-api-sdk-error"; @@ -16,8 +15,9 @@ import { TimeoutSdkErrorContext } from "./timeout-sdk-error"; import { VersionContext } from "./version"; import { GeneratorNotificationService } from "@fern-api/base-generator"; import { Logger } from "@fern-api/logger"; +import { BaseContext } from "../base-context"; -export interface SdkContext extends ModelContext { +export interface SdkContext extends BaseContext { logger: Logger; version: string | undefined; ir: IntermediateRepresentation; diff --git a/generators/typescript/utils/resolvers/package.json b/generators/typescript/utils/resolvers/package.json index 1dfcf57c5ba..a048167788f 100644 --- a/generators/typescript/utils/resolvers/package.json +++ b/generators/typescript/utils/resolvers/package.json @@ -27,7 +27,7 @@ "depcheck": "depcheck" }, "dependencies": { - "@fern-fern/ir-sdk": "53.8.0", + "@fern-fern/ir-sdk": "53.23.0", "@fern-typescript/commons": "workspace:*" }, "devDependencies": { diff --git a/package.json b/package.json index dce7ca97635..d4bfe10df9d 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'packages/**/src/**/*.scss' --allow-empty-input --max-warnings 0", "lint:style:fix": "pnpm lint:style --fix", + "lint:staged": "lint-staged", "format": "prettier --write --ignore-unknown --ignore-path ./shared/.prettierignore \"**\"", "format:fix": "pnpm format --ignore-path ./shared/.prettierignore \"**\"", "format:check": "prettier --check --ignore-unknown --ignore-path ./shared/.prettierignore \"**\"", diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/ExampleEndpointFactory.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/ExampleEndpointFactory.ts index f8734c32635..de214f06683 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/ExampleEndpointFactory.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/ExampleEndpointFactory.ts @@ -586,6 +586,7 @@ function convertMultipartRequestToSchema(request: RequestWithExample.Multipart): groupName: undefined, additionalProperties: false, availability: undefined, - source: request.source + source: request.source, + inline: undefined }); } diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/convertSecurityScheme.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/convertSecurityScheme.ts index 5bac4362815..9fe924b0dfe 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/convertSecurityScheme.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/convertSecurityScheme.ts @@ -101,7 +101,8 @@ function getScopes(oauthSecurityScheme: OpenAPIV3.OAuth2SecurityScheme, source: wrapAsNullable: false, groupName: undefined, context: undefined, - source + source, + inline: undefined }); const schema = convertSchemaWithExampleToSchema(schemaWithExample); if (schema.type === "enum") { diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/endpoint/convertParameters.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/endpoint/convertParameters.ts index b0803ca4e08..eba3fb4b241 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/endpoint/convertParameters.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/endpoint/convertParameters.ts @@ -126,7 +126,8 @@ export function convertParameters({ }), description: undefined, availability, - groupName: undefined + groupName: undefined, + inline: undefined }); if ( resolvedParameter.in === "header" && diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/extensions/getFernTypeExtension.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/extensions/getFernTypeExtension.ts index 7555b1183b7..97f9f942c70 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/extensions/getFernTypeExtension.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/extensions/getFernTypeExtension.ts @@ -247,7 +247,8 @@ export function getSchemaFromFernType({ availability, groupName, encoding: undefined, - example: undefined + example: undefined, + inline: undefined }) : undefined, list: (itemType) => @@ -260,7 +261,8 @@ export function getSchemaFromFernType({ description, availability, groupName, - example: undefined + example: undefined, + inline: undefined }) : undefined, optional: (itemType) => @@ -272,7 +274,8 @@ export function getSchemaFromFernType({ value: itemType, description, availability, - groupName + groupName, + inline: undefined }) : undefined, set: (itemType) => @@ -285,7 +288,8 @@ export function getSchemaFromFernType({ description, availability, groupName, - example: undefined + example: undefined, + inline: undefined }) : undefined, literal: (literal) => diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertAdditionalProperties.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertAdditionalProperties.ts index 790388ebea1..c2da91f6167 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertAdditionalProperties.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertAdditionalProperties.ts @@ -1,3 +1,4 @@ +import { assertNever } from "@fern-api/core-utils"; import { Availability, Encoding, @@ -104,13 +105,21 @@ export function convertAdditionalProperties({ }), groupName: undefined }, - valueSchema: convertSchema( - additionalProperties, - context.options.optionalAdditionalProperties ? wrapAsNullable : false, - context, - [...breadcrumbs, "Value"], - source, - namespace + // Whether a type is inline is usually determined later by checking if a declaration is nested within another declaration, + // however this map is generated from the additionalProperties and thus is inline of the object (depending on the value type), + // so we allways add inline (depending on the value type). + valueSchema: addInline( + convertSchema( + additionalProperties, + context.options.optionalAdditionalProperties ? wrapAsNullable : false, + context, + [...breadcrumbs, "Value"], + source, + namespace, + undefined, + undefined, + undefined + ) ), groupName, example, @@ -118,6 +127,34 @@ export function convertAdditionalProperties({ }); } +function addInline(schema: SchemaWithExample): SchemaWithExample { + switch (schema.type) { + case "array": + case "enum": + case "map": + case "object": + schema.inline = true; + break; + case "literal": + case "primitive": + case "reference": + case "unknown": + break; + case "nullable": + case "optional": + schema.inline = true; + schema.value = addInline(schema.value); + break; + case "oneOf": + schema.value.inline = true; + break; + default: + assertNever(schema); + } + + return schema; +} + export function wrapMap({ nameOverride, generatedName, @@ -158,11 +195,13 @@ export function wrapMap({ value: valueSchema, groupName, encoding, - example + example, + inline: undefined }), description, availability, - groupName + groupName, + inline: undefined }); } return SchemaWithExample.map({ @@ -175,7 +214,8 @@ export function wrapMap({ value: valueSchema, groupName, encoding, - example + example, + inline: undefined }); } diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertArray.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertArray.ts index 8dfb49a657d..3e5acaf1f82 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertArray.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertArray.ts @@ -91,11 +91,13 @@ export function wrapArray({ description, availability, groupName, - example + example, + inline: undefined }), description, availability, - groupName + groupName, + inline: undefined }); } return SchemaWithExample.array({ @@ -106,6 +108,7 @@ export function wrapArray({ description, availability, groupName, - example + example, + inline: undefined }); } diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertDiscriminatedOneOf.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertDiscriminatedOneOf.ts index f36afe84672..c1606ce6d33 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertDiscriminatedOneOf.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertDiscriminatedOneOf.ts @@ -243,12 +243,14 @@ export function wrapDiscriminantedOneOf({ commonProperties: properties, groupName, encoding: undefined, - source + source, + inline: undefined }) ), groupName, description, - availability + availability, + inline: undefined }); } return SchemaWithExample.oneOf( @@ -263,7 +265,8 @@ export function wrapDiscriminantedOneOf({ commonProperties: properties, groupName, encoding: undefined, - source + source, + inline: undefined }) ); } diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertEnum.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertEnum.ts index a46952d5591..2127a32d556 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertEnum.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertEnum.ts @@ -23,7 +23,8 @@ export function convertEnum({ wrapAsNullable, groupName, context, - source + source, + inline }: { nameOverride: string | undefined; generatedName: string; @@ -38,6 +39,7 @@ export function convertEnum({ groupName: SdkGroupName | undefined; context: SchemaParserContext | undefined; source: Source; + inline: boolean | undefined; }): SchemaWithExample { const strippedEnumVarNames = stripCommonPrefix(enumVarNames ?? []); const uniqueValues = new Set(enumValues); @@ -80,7 +82,8 @@ export function convertEnum({ description, availability, groupName, - source + source, + inline }); } @@ -94,7 +97,8 @@ export function wrapEnum({ description, availability, groupName, - source + source, + inline }: { wrapAsNullable: boolean; nameOverride: string | undefined; @@ -106,6 +110,7 @@ export function wrapEnum({ availability: Availability | undefined; groupName: SdkGroupName | undefined; source: Source; + inline: boolean | undefined; }): SchemaWithExample { if (wrapAsNullable) { return SchemaWithExample.nullable({ @@ -122,11 +127,13 @@ export function wrapEnum({ availability, example: undefined, groupName, - source + source, + inline }), description, availability, - groupName + groupName, + inline }); } return SchemaWithExample.enum({ @@ -139,7 +146,8 @@ export function wrapEnum({ default: _default, example: undefined, groupName, - source + source, + inline }); } diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertLiteral.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertLiteral.ts index 341281bf377..3d9c34e4a74 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertLiteral.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertLiteral.ts @@ -46,7 +46,8 @@ export function convertLiteral({ }), description, availability, - groupName + groupName, + inline: undefined }); } return SchemaWithExample.literal({ diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertObject.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertObject.ts index 562df7f040f..aaabbcb1280 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertObject.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertObject.ts @@ -108,7 +108,8 @@ export function convertObject({ value: property.schema, description: undefined, availability: property.availability, - groupName: undefined + groupName: undefined, + inline: undefined }) }; } @@ -195,7 +196,8 @@ export function convertObject({ description: undefined, availability, value: convertSchema(propertySchema, false, context, propertyBreadcrumbs, source, namespace), - groupName + groupName, + inline: undefined }); const conflicts: Record = {}; @@ -304,11 +306,13 @@ export function wrapObject({ fullExamples, additionalProperties: isAdditionalPropertiesAny(additionalProperties), availability: undefined, - source + source, + inline: undefined }), description, availability, - groupName + groupName, + inline: undefined }); } return SchemaWithExample.object({ @@ -323,7 +327,8 @@ export function wrapObject({ fullExamples, additionalProperties: isAdditionalPropertiesAny(additionalProperties), availability, - source + source, + inline: undefined }); } diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertSchemas.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertSchemas.ts index 07de8a6f125..afdf1b27279 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertSchemas.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertSchemas.ts @@ -126,7 +126,8 @@ export function convertReferenceObject( value: referenceSchema, description: undefined, availability: undefined, - groupName: undefined + groupName: undefined, + inline: undefined }); } else { return referenceSchema; @@ -269,7 +270,8 @@ export function convertSchemaObject( wrapAsNullable, groupName, context, - source + source, + inline: undefined }); } @@ -299,7 +301,8 @@ export function convertSchemaObject( ), groupName, description: schema.description, - availability + availability, + inline: undefined }); } else if (secondElement === "null") { return SchemaWithExample.nullable({ @@ -323,7 +326,8 @@ export function convertSchemaObject( ), groupName, description: schema.description, - availability + availability, + inline: undefined }); } } @@ -666,7 +670,8 @@ export function convertSchemaObject( wrapAsNullable, groupName, context, - source + source, + inline: undefined }); } @@ -1000,7 +1005,8 @@ function maybeInjectDescriptionOrGroupName( value: schema.value, description, availability: schema.availability, - groupName + groupName, + inline: undefined }); } else if (schema.type === "nullable") { return SchemaWithExample.nullable({ @@ -1010,7 +1016,8 @@ function maybeInjectDescriptionOrGroupName( value: schema.value, description, availability: schema.availability, - groupName + groupName, + inline: undefined }); } return schema; @@ -1072,7 +1079,8 @@ export function wrapLiteral({ }), groupName, description, - availability + availability, + inline: undefined }); } return SchemaWithExample.literal({ @@ -1122,7 +1130,8 @@ export function wrapPrimitive({ }), groupName, description, - availability + availability, + inline: undefined }); } return SchemaWithExample.primitive({ diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertUndiscriminatedOneOf.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertUndiscriminatedOneOf.ts index 112ffd85f71..2a7392f9cb2 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertUndiscriminatedOneOf.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/convertUndiscriminatedOneOf.ts @@ -132,7 +132,8 @@ export function convertUndiscriminatedOneOf({ _default: undefined, groupName, context, - source + source, + inline: undefined }); } @@ -265,7 +266,8 @@ export function convertUndiscriminatedOneOfWithDiscriminant({ _default: undefined, groupName, context, - source + source, + inline: undefined }); } @@ -384,12 +386,14 @@ export function wrapUndiscriminantedOneOf({ schemas: subtypes, groupName, encoding, - source + source, + inline: undefined }) ), description, availability, - groupName + groupName, + inline: undefined }); } return SchemaWithExample.oneOf( @@ -402,7 +406,8 @@ export function wrapUndiscriminantedOneOf({ schemas: subtypes, groupName, encoding, - source + source, + inline: undefined }) ); } diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/convertSchemaToSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/convertSchemaToSchemaWithExample.ts index 5c15ae4f6d0..09d374a2688 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/convertSchemaToSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/convertSchemaToSchemaWithExample.ts @@ -25,7 +25,8 @@ export function convertSchemaToSchemaWithExample(schema: Schema): SchemaWithExam fullExamples: undefined, additionalProperties: schema.additionalProperties, availability: schema.availability, - source: schema.source + source: schema.source, + inline: undefined }); case "array": return SchemaWithExample.array({ @@ -36,7 +37,8 @@ export function convertSchemaToSchemaWithExample(schema: Schema): SchemaWithExam title: schema.title, nameOverride: schema.nameOverride, groupName: schema.groupName, - example: undefined + example: undefined, + inline: undefined }); case "enum": return SchemaWithExample.enum({ @@ -49,7 +51,8 @@ export function convertSchemaToSchemaWithExample(schema: Schema): SchemaWithExam default: schema.default, groupName: schema.groupName, example: undefined, - source: schema.source + source: schema.source, + inline: undefined }); case "literal": return SchemaWithExample.literal({ @@ -69,7 +72,8 @@ export function convertSchemaToSchemaWithExample(schema: Schema): SchemaWithExam description: schema.description, availability: schema.availability, value: convertSchemaToSchemaWithExample(schema.value), - groupName: schema.groupName + groupName: schema.groupName, + inline: undefined }); case "optional": return SchemaWithExample.optional({ @@ -79,7 +83,8 @@ export function convertSchemaToSchemaWithExample(schema: Schema): SchemaWithExam description: schema.description, availability: schema.availability, value: convertSchemaToSchemaWithExample(schema.value), - groupName: schema.groupName + groupName: schema.groupName, + inline: undefined }); case "primitive": return SchemaWithExample.primitive({ @@ -110,7 +115,8 @@ export function convertSchemaToSchemaWithExample(schema: Schema): SchemaWithExam title: schema.title, groupName: schema.groupName, encoding: schema.encoding, - example: undefined + example: undefined, + inline: undefined }); case "reference": return SchemaWithExample.reference({ @@ -150,7 +156,8 @@ export function convertSchemaWithExampleToOptionalSchema(schema: Schema): Schema description: undefined, availability: undefined, value: convertSchemaToSchemaWithExample(schema), - groupName: undefined + groupName: undefined, + inline: undefined }); case "object": case "array": @@ -167,7 +174,8 @@ export function convertSchemaWithExampleToOptionalSchema(schema: Schema): Schema description: undefined, availability: schema.availability, value: convertSchemaToSchemaWithExample(schema), - groupName: undefined + groupName: undefined, + inline: undefined }); case "optional": return SchemaWithExample.optional({ @@ -177,7 +185,8 @@ export function convertSchemaWithExampleToOptionalSchema(schema: Schema): Schema description: schema.description, availability: schema.availability, value: convertSchemaToSchemaWithExample(schema.value), - groupName: schema.groupName + groupName: schema.groupName, + inline: undefined }); case "oneOf": { const oneOfSchema = convertToOneOf(schema.value); @@ -188,7 +197,8 @@ export function convertSchemaWithExampleToOptionalSchema(schema: Schema): Schema description: oneOfSchema.description, availability: oneOfSchema.availability, value: SchemaWithExample.oneOf(convertToOneOf(schema.value)), - groupName: oneOfSchema.groupName + groupName: oneOfSchema.groupName, + inline: undefined }); } default: @@ -219,7 +229,8 @@ function convertToOneOf(oneOfSchema: OneOfSchema): OneOfSchemaWithExample { ), groupName: oneOfSchema.groupName, encoding: oneOfSchema.encoding, - source: oneOfSchema.source + source: oneOfSchema.source, + inline: undefined }); case "undisciminated": return OneOfSchemaWithExample.undisciminated({ @@ -231,7 +242,8 @@ function convertToOneOf(oneOfSchema: OneOfSchema): OneOfSchemaWithExample { schemas: oneOfSchema.schemas.map((oneOfSchema) => convertSchemaToSchemaWithExample(oneOfSchema)), groupName: oneOfSchema.groupName, encoding: oneOfSchema.encoding, - source: oneOfSchema.source + source: oneOfSchema.source, + inline: undefined }); default: assertNever(oneOfSchema); diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/convertSchemaWithExampleToSchema.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/convertSchemaWithExampleToSchema.ts index 108ff6b3063..5fbee12bbd0 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/convertSchemaWithExampleToSchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/schema/utils/convertSchemaWithExampleToSchema.ts @@ -24,7 +24,8 @@ export function convertSchemaWithExampleToSchema(schema: SchemaWithExample): Sch groupName: schema.groupName, additionalProperties: schema.additionalProperties, availability: schema.availability, - source: schema.source + source: schema.source, + inline: schema.inline }); case "array": return Schema.array({ @@ -34,7 +35,8 @@ export function convertSchemaWithExampleToSchema(schema: SchemaWithExample): Sch generatedName: schema.generatedName, nameOverride: schema.nameOverride, title: schema.title, - groupName: schema.groupName + groupName: schema.groupName, + inline: schema.inline }); case "enum": return Schema.enum({ @@ -46,7 +48,8 @@ export function convertSchemaWithExampleToSchema(schema: SchemaWithExample): Sch values: schema.values, default: schema.default, groupName: schema.groupName, - source: schema.source + source: schema.source, + inline: schema.inline }); case "literal": return Schema.literal({ @@ -66,7 +69,8 @@ export function convertSchemaWithExampleToSchema(schema: SchemaWithExample): Sch description: schema.description, availability: schema.availability, value: convertSchemaWithExampleToSchema(schema.value), - groupName: schema.groupName + groupName: schema.groupName, + inline: schema.inline }); case "optional": return Schema.optional({ @@ -76,7 +80,8 @@ export function convertSchemaWithExampleToSchema(schema: SchemaWithExample): Sch description: schema.description, availability: schema.availability, value: convertSchemaWithExampleToSchema(schema.value), - groupName: schema.groupName + groupName: schema.groupName, + inline: schema.inline }); case "primitive": return Schema.primitive({ @@ -106,7 +111,8 @@ export function convertSchemaWithExampleToSchema(schema: SchemaWithExample): Sch title: schema.title, nameOverride: schema.nameOverride, groupName: schema.groupName, - encoding: schema.encoding + encoding: schema.encoding, + inline: schema.inline }); case "reference": return Schema.reference({ @@ -146,7 +152,8 @@ export function convertSchemaWithExampleToOptionalSchema(schema: SchemaWithExamp description: schema.description, availability: schema.availability, value: convertSchemaWithExampleToSchema(schema), - groupName: schema.groupName + groupName: schema.groupName, + inline: undefined }); case "optional": return Schema.optional({ @@ -156,7 +163,8 @@ export function convertSchemaWithExampleToOptionalSchema(schema: SchemaWithExamp description: schema.description, availability: schema.availability, value: convertSchemaWithExampleToSchema(schema.value), - groupName: schema.groupName + groupName: schema.groupName, + inline: schema.inline }); case "oneOf": { const oneOfSchema = convertToOneOf(schema.value); @@ -167,7 +175,8 @@ export function convertSchemaWithExampleToOptionalSchema(schema: SchemaWithExamp description: oneOfSchema.description, availability: oneOfSchema.availability, value: Schema.oneOf(convertToOneOf(schema.value)), - groupName: oneOfSchema.groupName + groupName: oneOfSchema.groupName, + inline: oneOfSchema.inline }); } default: @@ -198,7 +207,8 @@ function convertToOneOf(oneOfSchema: OneOfSchemaWithExample): OneOfSchema { ), groupName: oneOfSchema.groupName, encoding: oneOfSchema.encoding, - source: oneOfSchema.source + source: oneOfSchema.source, + inline: oneOfSchema.inline }); case "undisciminated": return OneOfSchema.undisciminated({ @@ -210,7 +220,8 @@ function convertToOneOf(oneOfSchema: OneOfSchemaWithExample): OneOfSchema { schemas: oneOfSchema.schemas.map((oneOfSchema) => convertSchemaWithExampleToSchema(oneOfSchema)), groupName: oneOfSchema.groupName, encoding: oneOfSchema.encoding, - source: oneOfSchema.source + source: oneOfSchema.source, + inline: oneOfSchema.inline }); default: assertNever(oneOfSchema); diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/apiture.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/apiture.json index e53655a955b..833115b805e 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/apiture.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/apiture.json @@ -4274,6 +4274,7 @@ This error response may have one of the following `type` values: "viewCards", "manageCards", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4447,6 +4448,7 @@ Account transfers are only allowed between `internal` and `external` accounts. A "external", "outside", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4607,6 +4609,7 @@ Account transfers are only allowed between `internal` and `external` accounts. A "float", "sameDay", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4667,6 +4670,7 @@ Account transfers are only allowed between `internal` and `external` accounts. A "tel", "web", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4889,6 +4893,7 @@ Account transfers are only allowed between `internal` and `external` accounts. A "securityQuestions", "authenticatorToken", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5031,6 +5036,7 @@ Account transfers are only allowed between `internal` and `external` accounts. A "externalTransfer", "billPay", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5157,6 +5163,7 @@ The client can use this value to localize the `items[].time` values to the local "microDeposits", "manual", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5286,6 +5293,7 @@ The client can use this value to localize the `items[].time` values to the local "swiftBicCode", "ibanAccountNumber", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5592,6 +5600,7 @@ The client can use this value to localize the `items[].time` values to the local "loan", "creditCard", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5786,6 +5795,7 @@ The client can use this value to localize the `items[].time` values to the local "credit", "debit", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6008,6 +6018,7 @@ The client can use this value to localize the `items[].time` values to the local "check", "other", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6043,6 +6054,7 @@ The client can use this value to localize the `items[].time` values to the local "debit", "credit", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6206,6 +6218,7 @@ The client can use this value to localize the `items[].time` values to the local "closure", "other", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6349,6 +6362,7 @@ The response may include dates prior to requested the start date, as that is use "semiyearly", "yearly", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6450,6 +6464,7 @@ The response may include dates prior to requested the start date, as that is use "fixed", "variable", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6538,6 +6553,7 @@ For recurring transfer schedules, `endsOn`, `count`, and `amountLimit` are mutua "credit", "both", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6638,6 +6654,7 @@ For recurring transfer schedules, `endsOn`, `count`, and `amountLimit` are mutua "failed", "other", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6687,6 +6704,7 @@ For recurring transfer schedules, `endsOn`, `count`, and `amountLimit` are mutua "domesticWireTransfer", "internationalWireTransfer", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13632,6 +13650,7 @@ Optionally, an agent can access a business customer's ACH accounts when acting o "internal", "external", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/aries.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/aries.json index 7c52fb1a7d7..ad8c91902c0 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/aries.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/aries.json @@ -427,6 +427,7 @@ "value": "present-proof", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -628,6 +629,7 @@ "manual", "auto", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -644,6 +646,7 @@ "value": "didexchange/1.0", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -655,6 +658,7 @@ "multi", "static", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -667,6 +671,7 @@ "active", "error", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -679,6 +684,7 @@ "inviter", "responder", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -865,6 +871,7 @@ "allowed", "disallowed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -875,6 +882,7 @@ "allowed", "disallowed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -885,6 +893,7 @@ "allowed", "disallowed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -895,6 +904,7 @@ "required", "preferred", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -954,6 +964,7 @@ "managed", "unmanaged", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1700,6 +1711,7 @@ "ed25519", "bls12381g2", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1710,6 +1722,7 @@ "ed25519", "bls12381g2", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1721,6 +1734,7 @@ "posted", "wallet_only", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2012,6 +2026,7 @@ "USER", "ROLE_REMOVE", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2428,6 +2443,7 @@ "GE", "GT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2596,6 +2612,7 @@ "value": ">", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2919,6 +2936,7 @@ "value": ">", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3765,6 +3783,7 @@ "add", "remove", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4259,6 +4278,7 @@ "sender", "receiver", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4286,6 +4306,7 @@ "done", "deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4481,6 +4502,7 @@ "value": "goal-code", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5051,6 +5073,7 @@ "TRANSACTION_ENDORSER", "reset", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5062,6 +5085,7 @@ "TRANSACTION_ENDORSER", "reset", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5463,6 +5487,7 @@ "self", "external", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5490,6 +5515,7 @@ "holder", "issuer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5668,6 +5694,7 @@ "self", "external", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5707,6 +5734,7 @@ "prover", "verifier", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5717,6 +5745,7 @@ "true", "false", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6062,6 +6091,7 @@ "self", "external", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6130,6 +6160,7 @@ "issuer", "holder", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6177,6 +6208,7 @@ "abandoned", "deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6680,6 +6712,7 @@ "self", "external", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6715,6 +6748,7 @@ "prover", "verifier", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6750,6 +6784,7 @@ "abandoned", "deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6760,6 +6795,7 @@ "true", "false", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7042,6 +7078,7 @@ "managed", "unmanaged", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7072,6 +7109,7 @@ "required", "preferred", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7082,6 +7120,7 @@ "ISSUANCE_ON_DEMAND", "ISSUANCE_BY_DEFAULT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7116,6 +7155,7 @@ "required", "preferred", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7134,6 +7174,7 @@ "all", "pick", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7394,6 +7435,7 @@ types: - value: present-proof name: PresentProof docs: Attachment type + inline: true source: openapi: ../openapi.yml AttachmentDef: @@ -7464,6 +7506,7 @@ types: - manual - auto docs: 'Connection acceptance: manual or auto' + inline: true source: openapi: ../openapi.yml ConnRecordConnectionProtocol: @@ -7473,6 +7516,7 @@ types: - value: didexchange/1.0 name: Didexchange10 docs: Connection protocol used + inline: true source: openapi: ../openapi.yml ConnRecordInvitationMode: @@ -7481,6 +7525,7 @@ types: - multi - static docs: Invitation mode + inline: true source: openapi: ../openapi.yml ConnRecordRoutingState: @@ -7490,6 +7535,7 @@ types: - active - error docs: Routing state of connection + inline: true source: openapi: ../openapi.yml ConnRecordTheirRole: @@ -7499,6 +7545,7 @@ types: - inviter - responder docs: Their role in the connection protocol + inline: true source: openapi: ../openapi.yml ConnRecord: @@ -7675,6 +7722,7 @@ types: - required - allowed - disallowed + inline: true source: openapi: ../openapi.yml ConstraintsStatusRevoked: @@ -7682,6 +7730,7 @@ types: - required - allowed - disallowed + inline: true source: openapi: ../openapi.yml ConstraintsStatusSuspended: @@ -7689,6 +7738,7 @@ types: - required - allowed - disallowed + inline: true source: openapi: ../openapi.yml ConstraintsSubjectIsIssuer: @@ -7696,6 +7746,7 @@ types: - required - preferred docs: SubjectIsIssuer + inline: true source: openapi: ../openapi.yml Constraints: @@ -7723,6 +7774,7 @@ types: - managed - unmanaged docs: Mode regarding management of wallet key + inline: true source: openapi: ../openapi.yml CreateWalletResponseSettings: @@ -8044,6 +8096,7 @@ types: - ed25519 - bls12381g2 docs: Key type associated with the DID + inline: true source: openapi: ../openapi.yml DidPosture: @@ -8054,6 +8107,7 @@ types: docs: >- Whether DID is current public DID, posted to ledger but not current public DID, or local to the wallet + inline: true source: openapi: ../openapi.yml DID: @@ -8090,6 +8144,7 @@ types: docs: >- Key type to use for the DID keypair. Validated with the chosen DID method's supported key types. + inline: true source: openapi: ../openapi.yml DIDCreateOptions: @@ -8143,6 +8198,7 @@ types: - required - preferred docs: Preference + inline: true source: openapi: ../openapi.yml DIFField: @@ -8167,6 +8223,7 @@ types: - required - preferred docs: Preference + inline: true source: openapi: ../openapi.yml DIFHolder: @@ -8392,6 +8449,7 @@ types: - USER - ROLE_REMOVE docs: Ledger role + inline: true source: openapi: ../openapi.yml GetNymRoleResponse: @@ -8630,6 +8688,7 @@ types: - GE - GT docs: Predicate type + inline: true source: openapi: ../openapi.yml IndyGEProofPred: @@ -8716,6 +8775,7 @@ types: - value: '>' name: GreaterThan docs: Predicate type ('<', '<=', '>=', or '>') + inline: true source: openapi: ../openapi.yml IndyPresPredSpec: @@ -8884,6 +8944,7 @@ types: - value: '>' name: GreaterThan docs: Predicate type ('<', '<=', '>=', or '>') + inline: true source: openapi: ../openapi.yml IndyProofReqPredSpec: @@ -9082,6 +9143,7 @@ types: - ISSUANCE_ON_DEMAND - ISSUANCE_BY_DEFAULT docs: Issuance type + inline: true source: openapi: ../openapi.yml IndyRevRegDefValue: @@ -9428,6 +9490,7 @@ types: - add - remove docs: Action for specific key + inline: true source: openapi: ../openapi.yml KeylistUpdateRule: @@ -9721,6 +9784,7 @@ types: - sender - receiver docs: OOB Role + inline: true source: openapi: ../openapi.yml OobRecordState: @@ -9737,6 +9801,7 @@ types: - done - deleted docs: Out of band message exchange state + inline: true source: openapi: ../openapi.yml OobRecord: @@ -9893,6 +9958,7 @@ types: - value: goal-code name: GoalCode docs: feature type + inline: true source: openapi: ../openapi.yml QueryItem: @@ -10147,6 +10213,7 @@ types: - all - pick docs: Selection + inline: true source: openapi: ../openapi.yml SubmissionRequirements: @@ -10226,6 +10293,7 @@ types: - TRANSACTION_ENDORSER - reset docs: My transaction related job + inline: true source: openapi: ../openapi.yml TransactionJobsTransactionTheirJob: @@ -10234,6 +10302,7 @@ types: - TRANSACTION_ENDORSER - reset docs: Their transaction related job + inline: true source: openapi: ../openapi.yml TransactionJobs: @@ -10381,6 +10450,7 @@ types: - self - external docs: 'Issue-credential exchange initiator: self or external' + inline: true source: openapi: ../openapi.yml V10CredentialExchangeRole: @@ -10388,6 +10458,7 @@ types: - holder - issuer docs: 'Issue-credential exchange role: holder or issuer' + inline: true source: openapi: ../openapi.yml V10CredentialExchange: @@ -10536,6 +10607,7 @@ types: - self - external docs: 'Present-proof exchange initiator: self or external' + inline: true source: openapi: ../openapi.yml V10PresentationExchangeRole: @@ -10543,6 +10615,7 @@ types: - prover - verifier docs: 'Present-proof exchange role: prover or verifier' + inline: true source: openapi: ../openapi.yml V10PresentationExchangeVerified: @@ -10550,6 +10623,7 @@ types: - 'true' - 'false' docs: 'Whether presentation is verified: true or false' + inline: true source: openapi: ../openapi.yml V10PresentationExchange: @@ -10664,6 +10738,7 @@ types: - self - external docs: 'Issue-credential exchange initiator: self or external' + inline: true source: openapi: ../openapi.yml V20CredExRecordRole: @@ -10671,6 +10746,7 @@ types: - issuer - holder docs: 'Issue-credential exchange role: holder or issuer' + inline: true source: openapi: ../openapi.yml V20CredExRecordState: @@ -10697,6 +10773,7 @@ types: - abandoned - deleted docs: Issue-credential exchange state + inline: true source: openapi: ../openapi.yml V20CredExRecord: @@ -11118,6 +11195,7 @@ types: - self - external docs: 'Present-proof exchange initiator: self or external' + inline: true source: openapi: ../openapi.yml V20PresExRecordRole: @@ -11125,6 +11203,7 @@ types: - prover - verifier docs: 'Present-proof exchange role: prover or verifier' + inline: true source: openapi: ../openapi.yml V20PresExRecordState: @@ -11145,6 +11224,7 @@ types: - abandoned - deleted docs: Present-proof exchange state + inline: true source: openapi: ../openapi.yml V20PresExRecordVerified: @@ -11152,6 +11232,7 @@ types: - 'true' - 'false' docs: 'Whether presentation is verified: ''true'' or ''false''' + inline: true source: openapi: ../openapi.yml V20PresExRecord: @@ -11374,6 +11455,7 @@ types: - managed - unmanaged docs: Mode regarding management of wallet key + inline: true source: openapi: ../openapi.yml WalletRecordSettings: @@ -13036,6 +13118,7 @@ docs: Simple messaging "value": "didexchange/1.0", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13052,6 +13135,7 @@ docs: Simple messaging "active", "completed", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13063,6 +13147,7 @@ docs: Simple messaging "inviter", "responder", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16700,6 +16785,7 @@ docs: Feature discovery v2 "TRANSACTION_ENDORSER", "reset", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -18414,6 +18500,7 @@ docs: Introduction of known parties "issuer", "holder", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -18432,6 +18519,7 @@ docs: Introduction of known parties "credential_revoked", "abandoned", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20316,6 +20404,7 @@ types: "issuer", "holder", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20361,6 +20450,7 @@ types: }, "abandoned", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -21702,6 +21792,7 @@ docs: Sign and verify json-ld data "Profile", "LinkedDomains", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -21714,6 +21805,7 @@ docs: Sign and verify json-ld data "NETWORK_MONITOR", "reset", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -22787,6 +22879,7 @@ docs: Interaction with ledger "client", "server", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -22797,6 +22890,7 @@ docs: Interaction with ledger "granted", "denied", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -23724,6 +23818,7 @@ types: "both", "base", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23735,6 +23830,7 @@ types: "ARGON2I_INT", "RAW", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23746,6 +23842,7 @@ types: "in_memory", "indy", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23757,6 +23854,7 @@ types: "both", "base", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23774,6 +23872,7 @@ types: Dispatch only to webhooks associated with this wallet. base - Dispatch only to webhooks associated with the base wallet. both - Dispatch to both webhook targets. + inline: true source: openapi: ../openapi.yml CreateWalletRequestWalletKeyDerivation: @@ -23782,6 +23881,7 @@ types: - ARGON2I_INT - RAW docs: Key derivation + inline: true source: openapi: ../openapi.yml CreateWalletRequestWalletType: @@ -23790,6 +23890,7 @@ types: - in_memory - indy docs: Type of the wallet to create + inline: true source: openapi: ../openapi.yml UpdateWalletRequestWalletDispatchType: @@ -23802,6 +23903,7 @@ types: Dispatch only to webhooks associated with this wallet. base - Dispatch only to webhooks associated with the base wallet. both - Dispatch to both webhook targets. + inline: true source: openapi: ../openapi.yml imports: @@ -25546,6 +25648,7 @@ docs: Out-of-band connections "prover", "verifier", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -25562,6 +25665,7 @@ docs: Out-of-band connections "presentation_acked", "abandoned", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -26906,6 +27010,7 @@ types: "prover", "verifier", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -26939,6 +27044,7 @@ types: "done", "abandoned", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -28633,6 +28739,7 @@ docs: did resolver interface. "active", "full", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -28643,6 +28750,7 @@ docs: did resolver interface. "v1_0", "v2_0", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -28655,6 +28763,7 @@ docs: did resolver interface. "active", "full", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -29406,6 +29515,7 @@ types: - v1_0 - v2_0 docs: Specify which version of the revocation notification should be sent + inline: true source: openapi: ../openapi.yml ", @@ -30609,6 +30719,7 @@ docs: Trust-ping over connection "Profile", "LinkedDomains", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30618,6 +30729,7 @@ docs: Trust-ping over connection "ed25519", "bls12381g2", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -30627,6 +30739,7 @@ docs: Trust-ping over connection "key", "sov", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -30637,6 +30750,7 @@ docs: Trust-ping over connection "posted", "wallet_only", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -30671,6 +30785,7 @@ docs: Trust-ping over connection docs: >- Endpoint type to set (default 'Endpoint'); affects only public or posted DIDs + inline: true source: openapi: ../openapi.yml imports: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/assembly.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/assembly.json index 28cf25bd848..d0ad7a97f3b 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/assembly.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/assembly.json @@ -1294,6 +1294,7 @@ "success", "unavailable", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1737,6 +1738,7 @@ Valid values are in the range [0, 1] inclusive. "value": "us_social_security_number", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1834,6 +1836,7 @@ Can be any value between 0.0 and 1.0 inclusive. "default", "basic", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2009,6 +2012,7 @@ Can be any value between 0.0 and 1.0 inclusive. "drivers_license", "banking_information", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2096,6 +2100,7 @@ Can be any value between 0.0 and 1.0 inclusive. "NEUTRAL", "NEGATIVE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2185,6 +2190,7 @@ Can be any value between 0.0 and 1.0 inclusive. "entity_type", "hash", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2195,6 +2201,7 @@ Can be any value between 0.0 and 1.0 inclusive. "srt", "vtt", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2207,6 +2214,7 @@ Can be any value between 0.0 and 1.0 inclusive. "conversational", "catchy", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2221,6 +2229,7 @@ Can be any value between 0.0 and 1.0 inclusive. "headline", "paragraph", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2554,6 +2563,7 @@ See [Speech recognition](https://www.assemblyai.com/docs/Models/speech_recogniti "default", "high", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2641,6 +2651,7 @@ The default value is 'en_us'. "uk", "vi", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2777,6 +2788,7 @@ The default value is 'en_us'. "value": "error", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6650,6 +6662,7 @@ docs: Real-time transcription "value": "error", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/axle.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/axle.json index c894a317c7d..a70148cc961 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/axle.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/axle.json @@ -87,6 +87,7 @@ "COLL", "COMP", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -184,6 +185,7 @@ "lessor", "interest", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -275,6 +277,7 @@ - UIMPD - COLL - COMP + inline: true source: openapi: ../openapi.yml Coverage: @@ -335,6 +338,7 @@ - lessor - interest default: interest + inline: true source: openapi: ../openapi.yml ThirdParty: @@ -536,6 +540,7 @@ "auto", "motorcycle", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -575,6 +580,7 @@ types: enum: - auto - motorcycle + inline: true source: openapi: ../openapi.yml Policy: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/belvo.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/belvo.json index f53e5699ea0..fa029dd0715 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/belvo.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/belvo.json @@ -6687,6 +6687,7 @@ In our documentation example, we use `{endpoint}` as a placeholder value. In pro "SUCCEEDED", "FAILED", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7781,6 +7782,7 @@ We return one of the following enum values: "INDIVIDUAL", "BUSINESS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -7800,6 +7802,7 @@ We return one of the following enum values: "SAVINGS", "SALARY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -7817,6 +7820,7 @@ Can be either: "LOAN_ACCOUNT", "SAVINGS_ACCOUNT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -7831,6 +7835,7 @@ Can be either: "INDIVIDUAL", "BUSINESS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -7955,6 +7960,7 @@ Can be either: "INFLOW", "OUTFLOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -7968,6 +7974,7 @@ Can be either: "CPF", "CNPJ", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -7984,6 +7991,7 @@ Can be either: "TI", "NIT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8001,6 +8009,7 @@ Can be either: "INDIVIDUAL", "BUSINESS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8015,6 +8024,7 @@ Can be either: "NSS", "CURP", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8026,6 +8036,7 @@ Can be either: "EMPLOYED", "UNEMPLOYED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8048,6 +8059,7 @@ Can be either: "ABSENCE", "SICK_LEAVE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8066,6 +8078,7 @@ You can send through one of the following values: "MEDIUM", "LOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8092,6 +8105,7 @@ We return one of the following enum values: "MEDIUM", "LOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8114,6 +8128,7 @@ We return one of the following enum values: "IRREGULAR", "SINGLE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8146,6 +8161,7 @@ We return one of the following enum values: "DEPOSIT", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8159,6 +8175,7 @@ Can be either: "CHECKING_ACCOUNT", "SAVINGS_ACCOUNT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8186,6 +8203,7 @@ Can be either: "credentials", "openbanking", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8197,6 +8215,7 @@ Can be either: "healthy", "down", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8213,6 +8232,7 @@ Can be either: "fiscal", "employment", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8239,6 +8259,7 @@ We return one of the following values: "PENSION", "STOCK", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8259,6 +8280,7 @@ We return one of the following values: "PENSION", "VARIABLE_INCOME", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8288,6 +8310,7 @@ You can send through one or more of the following values: "DEPOSIT", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8333,6 +8356,7 @@ For Mexico's SAT, we return one of the following values: "Pago", "Traslado", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8363,6 +8387,7 @@ For more information, see our [Links](https://developers.belvo.com/docs/links-an "single", "recurrent", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8404,6 +8429,7 @@ We return one of the following values: "unconfirmed", "token_required", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8420,6 +8446,7 @@ We return one of the following values: "INSURANCE_FEE", "OTHERS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8434,6 +8461,7 @@ We return one of the following values: "MONTHLY", "YEARLY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8444,6 +8472,7 @@ We return one of the following values: "INDIVIDUAL", "BUSINESS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8458,6 +8487,7 @@ We return one of the following values: "PROCESSING", "FAILED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8471,6 +8501,7 @@ We return one of the following values: "open_finance", "pse", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8486,6 +8517,7 @@ We return one of the following values: "belvo", "payments_way", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8501,6 +8533,7 @@ We return one of the following values: "ACTIVE", "INACTIVE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8514,6 +8547,7 @@ We return one of the following values: "INFLOW", "OUTFLOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8529,6 +8563,7 @@ We return one of the following values: "BRA", "COL", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8543,6 +8578,7 @@ We return one of the following values: "BRL", "COP", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8566,6 +8602,7 @@ We return one of the following values: "REVERTED", "UNCATEGORIZED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8615,6 +8652,7 @@ We return one of the following values: }, "Taxes", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8637,6 +8675,7 @@ We return one of the following values: "SUBSCRIPTION", "REGULAR", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8648,6 +8687,7 @@ We return one of the following values: "NEGATIVE", "NO_OBLIGATIONS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8661,6 +8701,7 @@ We return one of the following values: "PAID", "PROVISIONED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8674,6 +8715,7 @@ We return one of the following values: "NATIONAL", "FOREIGN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8688,6 +8730,7 @@ We return one of the following values: "OUTFLOW", "INFLOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -28189,6 +28232,7 @@ types: - FAILED docs: | The current status of the charge. + inline: true source: openapi: ../openapi.yml ChargePaymentMethodDetails: @@ -58602,6 +58646,7 @@ types: "value": "-created_at", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -58611,6 +58656,7 @@ types: "ACTIVE", "INACTIVE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/deel.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/deel.json index e9696a2567f..cb2f0dfb222 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/deel.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/deel.json @@ -7396,6 +7396,7 @@ "client", "contractor", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -7614,6 +7615,7 @@ "rejected", "waiting_for_client_payment", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8042,6 +8044,7 @@ "shield_msa", "hris_direct_employee", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8057,6 +8060,7 @@ "payg_tasks", "payg_milestones", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8068,6 +8072,7 @@ "client", "contractor", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8093,6 +8098,7 @@ "total", "status", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8220,6 +8226,7 @@ "SICK_LEAVE", "OTHER", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8930,6 +8937,7 @@ "STANDARD", "SPECIFIC", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8946,6 +8954,7 @@ "value": "Part-time", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8977,6 +8986,7 @@ "Skilled", "Unskilled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9080,6 +9090,7 @@ "ALLOWED_WITH_MAXIMUM_LIMITATION", "NOT_ALLOWED", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9128,6 +9139,7 @@ "STANDARD", "SPECIFIC", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9330,6 +9342,7 @@ "LIMITED_ROLLOVER", "UNSET", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -9565,6 +9578,7 @@ "CALENDAR_DAYS", "FULL_AMOUNT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9640,6 +9654,7 @@ "value": "image/png", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -9691,6 +9706,7 @@ "CALENDAR_DAYS", "FULL_AMOUNT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9909,6 +9925,7 @@ "ENABLED", "DISABLED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10397,6 +10414,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -10418,6 +10436,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -10623,6 +10642,7 @@ "withholding_tax", "work", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10640,6 +10660,7 @@ "time_off", "vat", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10676,6 +10697,7 @@ "failed", "refunded", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10744,6 +10766,7 @@ "failed", "refunded", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10768,6 +10791,7 @@ "SHIELD_DEPOSIT", "EOR_MANAGEMENT_FEE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10832,6 +10856,7 @@ "individual", "company", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10967,6 +10992,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11005,6 +11031,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11124,6 +11151,7 @@ "value": "tasks:write", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11474,6 +11502,7 @@ "mercury_wire", "bt_pay_pal", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11510,6 +11539,7 @@ "paid", "processing", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11843,6 +11873,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11871,6 +11902,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12084,6 +12116,7 @@ "CALENDAR_DAYS", "FULL_AMOUNT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12097,6 +12130,7 @@ "hris_direct_employee", "service_account", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12231,6 +12265,7 @@ "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12413,6 +12448,7 @@ "APPROVED", "REJECTED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12423,6 +12459,7 @@ "SICK_LEAVE", "OTHER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12537,6 +12574,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12558,6 +12596,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12814,6 +12853,7 @@ "enabled", "disabled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12839,6 +12879,7 @@ "Friday", "Saturday", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12850,6 +12891,7 @@ "DAY_OF_LAST_WEEK", "DAY_OF_MONTH", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12866,6 +12908,7 @@ "value": "calendar-month", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12877,6 +12920,7 @@ "REGULAR", "WITHIN_MONTH", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12892,6 +12936,7 @@ "semimonthly", "custom", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12907,6 +12952,7 @@ "semimonthly", "custom", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -14119,6 +14165,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml TimesheetReviewsToCreate: @@ -14146,6 +14193,7 @@ - approved - declined docs: Review status. + inline: true source: openapi: ../openapi.yml PgoTaskReviewsByIdToCreate: @@ -14163,6 +14211,7 @@ - approved - declined docs: Review status. + inline: true source: openapi: ../openapi.yml PgoTaskReviewsToCreate: @@ -14180,6 +14229,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml TimesheetReviewToCreate: @@ -14487,6 +14537,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml InvoiceAdjustmentReviewsToCreate: @@ -14509,6 +14560,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml InvoiceAdjustmentReviewToCreate: @@ -15090,6 +15142,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml MilestoneReviewsToCreate: @@ -15103,6 +15156,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml MilestoneReviewToCreate: @@ -15137,6 +15191,7 @@ - CALENDAR_DAYS - FULL_AMOUNT docs: Either works days or calendar days + inline: true source: openapi: ../openapi.yml EstimateFirstPaymentCompensationDetails: @@ -15185,6 +15240,7 @@ - CALENDAR_DAYS - FULL_AMOUNT docs: Either works days or calendar days + inline: true source: openapi: ../openapi.yml ProRata: @@ -15520,6 +15576,7 @@ - CALENDAR_DAYS - FULL_AMOUNT docs: Either works days or calendar days + inline: true source: openapi: ../openapi.yml FinalPaymentCalculated: @@ -15775,6 +15832,7 @@ - value: Part-time name: PartTime docs: Is it a full-time contract or a part-time contract? + inline: true source: openapi: ../openapi.yml EorContractToCreateEmploymentTimeOffType: @@ -15785,6 +15843,7 @@ If you want to use standard number of holidays for this employee, choose "STANDARD". If you want to enter a specific number of holidays, choose "SPECIFIC" and enter the number of days in the holidays field. + inline: true source: openapi: ../openapi.yml EorContractToCreateEmployment: @@ -15888,6 +15947,7 @@ - Skilled - Unskilled docs: Type of worker. + inline: true source: openapi: ../openapi.yml EorContractToCreateQuoteAdditionalFields: @@ -16054,6 +16114,7 @@ - PRORATED - STANDARD - SPECIFIC + inline: true source: openapi: ../openapi.yml EorCountryValidationsPartTimeHoliday: @@ -16138,6 +16199,7 @@ - ALLOWED_WITHOUT_LIMITATION - ALLOWED_WITH_MAXIMUM_LIMITATION - NOT_ALLOWED + inline: true source: openapi: ../openapi.yml EorCountryValidationsDefiniteContract: @@ -16497,6 +16559,7 @@ - SICK_LEAVE - OTHER docs: Time off type. + inline: true source: openapi: ../openapi.yml CreateTimeoff: @@ -16588,6 +16651,7 @@ - enabled - disabled docs: Status of webhook. + inline: true source: openapi: ../openapi.yml WebhookItem: @@ -24517,6 +24581,7 @@ docs: The Contracts resource lets you create, amend and, retrieve Deel contracts "CALENDAR_DAYS", "FULL_AMOUNT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -31888,6 +31953,7 @@ docs: >- "enabled", "disabled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31898,6 +31964,7 @@ docs: >- "enabled", "disabled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32157,6 +32224,7 @@ types: - enabled - disabled docs: Status of webhook. + inline: true source: openapi: ../openapi.yml PatchWebhookRequestStatus: @@ -32164,6 +32232,7 @@ types: - enabled - disabled docs: Status of webhook. + inline: true source: openapi: ../openapi.yml ", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/devrev.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/devrev.json index 76ca63cecdd..aa52b714290 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/devrev.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/devrev.json @@ -3910,6 +3910,7 @@ authentication connection. "disable", "enable", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3925,6 +3926,7 @@ for each authentication connection will depend on the type value. "social", "waad", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3981,6 +3983,7 @@ token. Only applicable for application access tokens. "value": "urn:ietf:params:oauth:grant-type:token-exchange", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4025,6 +4028,7 @@ token. Only applicable for application access tokens. "value": "urn:ietf:params:oauth:token-type:jwt", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4036,6 +4040,7 @@ token. Only applicable for application access tokens. "expired", "revoked", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4072,6 +4077,7 @@ token. Only applicable for application access tokens. "value": "urn:ietf:params:oauth:token-type:jwt", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4276,6 +4282,7 @@ authentication connections have different configuration parameters. "samlp", "waad", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4380,6 +4387,7 @@ that can be updated. "samlp", "waad", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4517,6 +4525,7 @@ sort order. If not set, then no prior elements exist. "parse_error", "value_not_permitted", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4884,6 +4893,7 @@ sort order. If not set, then no prior elements exist. "p2", "p3", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4899,6 +4909,7 @@ always be returned in the specified sort-by order. "after", "before", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4943,6 +4954,7 @@ always be returned in the specified sort-by order. "staging", "test", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5032,6 +5044,7 @@ always be returned in the specified sort-by order. "feature", "product", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5559,6 +5572,7 @@ sort order. If not set, then no prior elements exist. "low", "medium", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5596,6 +5610,7 @@ will appear in the response. "snap_kit", "text", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5870,6 +5885,7 @@ default visibility. "shadow", "unassigned", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5897,6 +5913,7 @@ default visibility. "rev_user", "sys_user", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6030,6 +6047,7 @@ be set for other request types. "work_deleted", "work_updated", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6060,6 +6078,7 @@ be set for other request types. "inactive", "unverified", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6111,6 +6130,7 @@ be set for other request types. "activate", "deactivate", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6204,6 +6224,7 @@ event types. Note this is mutually exclusive with 'add' and "issue", "ticket", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/enum-casing.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/enum-casing.json index f672a171260..5cbdda8189b 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/enum-casing.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/enum-casing.json @@ -60,6 +60,7 @@ "success", "failure", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -75,6 +76,7 @@ "value": "urn:ietf:params:oauth:grant-type:token-exchange", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -109,6 +111,7 @@ types: enum: - success - failure + inline: true source: openapi: ../openapi.yml ExampleResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/flagright.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/flagright.json index a680b8cbeb5..673bc9d5613 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/flagright.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/flagright.json @@ -2157,6 +2157,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "GATHERING", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2541,6 +2542,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "RUPAY", "JCB", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2552,6 +2554,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "DEBIT", "PREPAID", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2561,6 +2564,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "VIRTUAL", "PHYSICAL", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2707,6 +2711,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "CLOSED", "HIT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2719,6 +2724,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "DOCUMENTS_COLLECTED", "OTHER", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2766,6 +2772,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "REFUND", "DECLINED", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2841,6 +2848,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "LARGE", "UNKNOWN", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3231,6 +3239,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "value": "N/A", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3511,6 +3520,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "ZMW", "ZWL", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3910,6 +3920,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "IN_PROGRESS", "MANUAL_REVIEW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4105,6 +4116,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "IP_ADDRESS", "STRING", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4115,6 +4127,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "BLACKLIST", "FLAGRIGHT_LIBRARY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4172,6 +4185,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "BusinessPayment", "PromotionPayment", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4211,6 +4225,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "WALLET", "CHECK", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4308,6 +4323,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "LOW", "VERY_LOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4341,6 +4357,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "BLOCK", "SUSPEND", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4379,6 +4396,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "ORIGIN", "DESTINATION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4410,6 +4428,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "SANCTIONS_PEP", "SANCTIONS_PEP_ADVERSE_MEDIA", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4421,6 +4440,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "CTF", "SCREENING", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4525,6 +4545,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "PAYMENT_BENEFICIARY_NAME", "BANK_NAME", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4790,6 +4811,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "REFUNDED", "SUCCESSFUL", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4803,6 +4825,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "REFUND", "OTHER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5085,6 +5108,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "F", "NB", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5154,6 +5178,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "RETAIL", "PROFESSIONAL", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5163,6 +5188,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "REGISTERED", "UNREGISTERED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5180,6 +5206,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "SUSPENDED", "BLOCKED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5290,6 +5317,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "USER_STATE_UPDATED", "ALERT_CLOSED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5381,6 +5409,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu enum: - RETAIL - PROFESSIONAL + inline: true source: openapi: ../openapi.yml UserOptional: @@ -5937,6 +5966,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - F - NB docs: Gender of the individual - Male, Female or Non-Binary + inline: true source: openapi: ../openapi.yml UserDetails: @@ -5973,6 +6003,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - LARGE - UNKNOWN docs: Segmentation of the business user + inline: true source: openapi: ../openapi.yml CompanyGeneralDetails: @@ -6139,6 +6170,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - RUPAY - JCB docs: Brand of Card + inline: true source: openapi: ../openapi.yml CardDetailsCardFunding: @@ -6147,12 +6179,14 @@ In order to make individual events retrievable, you also need to pass in a uniqu - DEBIT - PREPAID docs: Funding of Card + inline: true source: openapi: ../openapi.yml CardDetailsCardType: enum: - VIRTUAL - PHYSICAL + inline: true source: openapi: ../openapi.yml CardDetails: @@ -6334,6 +6368,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - BusinessPayment - PromotionPayment docs: Type of transaction + inline: true source: openapi: ../openapi.yml MpesaDetails: @@ -6496,6 +6531,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - CLOSED - HIT docs: Status of a case. E.g. Open, Closed etc. + inline: true source: openapi: ../openapi.yml CaseManagementEventCaseStatusReason: @@ -6507,6 +6543,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu docs: >- Case status reason. E.g. Closed & False Positive, Closed & Investigation Completed etc. + inline: true source: openapi: ../openapi.yml CaseManagementEvent: @@ -6872,6 +6909,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - CANCELED - REFUND - DECLINED + inline: true source: openapi: ../openapi.yml CheckDetails: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/flexport.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/flexport.json index 7e7d2119f2d..29bcb63a483 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/flexport.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/flexport.json @@ -1052,6 +1052,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1425,6 +1426,7 @@ "requoted_quote", "archived_quote", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1464,6 +1466,7 @@ "booked", "shipment", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1561,6 +1564,7 @@ "contained_in_equipment", "contained_in_battery_powered_vehicles", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1634,6 +1638,7 @@ "reviewed", "complete", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2034,6 +2039,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2131,6 +2137,7 @@ "contained_in_equipment", "contained_in_battery_powered_vehicles", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2380,6 +2387,7 @@ "DAP", "DDP", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2392,6 +2400,7 @@ "sub_line", "component_line", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2429,6 +2438,7 @@ "gross_volume", "volume_weight", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2441,6 +2451,7 @@ "truck", "rail", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2584,6 +2595,7 @@ "YD", "Z3", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2647,6 +2659,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2764,6 +2777,7 @@ "freight_collect", "freight_prepaid", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2783,6 +2797,7 @@ "DAP", "DDP", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2797,6 +2812,7 @@ "delivery_order", "work_order", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2808,6 +2824,7 @@ "high", "standard", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2820,6 +2837,7 @@ "cancelled", "closed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2832,6 +2850,7 @@ "truck", "rail", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2891,6 +2910,7 @@ "buyers_agent", "sellers_agent", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2937,6 +2957,7 @@ "icao", "us_cbp", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3026,6 +3047,7 @@ "prs", "dpr", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3057,6 +3079,7 @@ "collect", "prepaid", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3172,6 +3195,7 @@ "customs_hold", "pending", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3222,6 +3246,7 @@ "km", "mi", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3430,6 +3455,7 @@ "terminal", "unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3462,6 +3488,7 @@ "door_to_door", "door_to_port", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3656,6 +3683,7 @@ "additional", "capital", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3711,6 +3739,7 @@ "paid", "payment_pending", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3721,6 +3750,7 @@ "Shipment", "Client", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3817,6 +3847,7 @@ "cm", "in", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3827,6 +3858,7 @@ "cm", "in", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3864,6 +3896,7 @@ "gross_volume", "volume_weight", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4219,6 +4252,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4356,6 +4390,7 @@ "buyers_agent", "sellers_agent", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4423,6 +4458,7 @@ "value": "/ocean/port", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4707,6 +4743,7 @@ "freight_collect", "freight_prepaid", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4726,6 +4763,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4858,6 +4896,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4883,6 +4922,7 @@ "sub_line", "component_line", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4962,6 +5002,7 @@ "W", "X", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4975,6 +5016,7 @@ "delivery_order", "work_order", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4984,6 +5026,7 @@ "standard", "high", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5080,6 +5123,7 @@ "closed", "cancelled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5350,6 +5394,7 @@ "fifty_three_ft", "fifty_three_ft_hc", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5367,6 +5412,7 @@ "bulk", "special", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5398,6 +5444,7 @@ "not_applicable", "misflagged", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5455,6 +5502,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5584,6 +5632,7 @@ "standard", "high", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5643,6 +5692,7 @@ "gated_out", "final_destination", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5772,6 +5822,7 @@ "truck_intl", "warehouse_storage", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5797,6 +5848,7 @@ "collect", "prepaid", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5823,6 +5875,7 @@ "drayage", "cartage", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5884,6 +5937,7 @@ "cbm", "cbft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5946,6 +6000,7 @@ "kg", "lbs", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6585,6 +6640,7 @@ - cbm - cbft docs: unit of measurement. "cbm" for cubic meters. "cbft" for cubic feet. + inline: true source: openapi: ../openapi.yml VolumeCreate: @@ -6602,6 +6658,7 @@ - kg - lbs docs: Required. Unit of measurement. "kg" for kilograms, "lbs" for pounds + inline: true source: openapi: ../openapi.yml WeightCreate: @@ -6619,6 +6676,7 @@ - cm - in docs: Required. Unit of measurement. "cm" for centimeters. "in" for inches. + inline: true source: openapi: ../openapi.yml LengthCreate: @@ -6666,6 +6724,7 @@ - packed_with_equipment - contained_in_equipment - contained_in_battery_powered_vehicles + inline: true source: openapi: ../openapi.yml CreateCargo: @@ -6836,6 +6895,7 @@ - cm - in docs: Required. Unit of measurement. "cm" for centimeters. "in" for inches. + inline: true source: openapi: ../openapi.yml Length: @@ -6893,6 +6953,7 @@ - packed_with_equipment - contained_in_equipment - contained_in_battery_powered_vehicles + inline: true source: openapi: ../openapi.yml Cargo: @@ -7136,6 +7197,7 @@ - value: /ocean/port name: OceanPort docs: Type of the object + inline: true source: openapi: ../openapi.yml Placeport: @@ -7213,6 +7275,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml OceanBookingDetail: @@ -7244,6 +7307,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml AirBookingDetail: @@ -7263,6 +7327,7 @@ enum: - collect - prepaid + inline: true source: openapi: ../openapi.yml TruckingBookingDetail: @@ -7296,6 +7361,7 @@ - submitted - booked - shipment + inline: true source: openapi: ../openapi.yml BookingQuoteStatus: @@ -7310,6 +7376,7 @@ - rejected_quote - requoted_quote - archived_quote + inline: true source: openapi: ../openapi.yml Booking: @@ -7398,6 +7465,7 @@ - DDP - DPU docs: Always required. The Incoterm of your shipment + inline: true source: openapi: ../openapi.yml CreateOceanBooking: @@ -7462,6 +7530,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml CreateAirBooking: @@ -7545,6 +7614,7 @@ docs: >- Whether the shipper or consignee is responsible for payment of trucking freight. This can be `collect` (consignee) or `prepaid` (shipper). + inline: true source: openapi: ../openapi.yml CreateTruckingBooking: @@ -7570,6 +7640,7 @@ - km - mi docs: Required. Unit of measurement. "km" for kilometers. "mi" for miles. + inline: true source: openapi: ../openapi.yml DistanceCreate: @@ -7706,6 +7777,7 @@ Status about if the digitization process for this commercial invoice is complete. If it is not complete, then the commercial invoice should be considered a draft that can change. + inline: true source: openapi: ../openapi.yml CommercialInvoice: @@ -7770,6 +7842,7 @@ - prs - dpr docs: Required. Unit of measurement. + inline: true source: openapi: ../openapi.yml CreateQuantity: @@ -7823,6 +7896,7 @@ - customs_hold - pending docs: The release status for this entry. + inline: true source: openapi: ../openapi.yml CustomsEntry: @@ -8008,6 +8082,7 @@ - denied - not_applicable - misflagged + inline: true source: openapi: ../openapi.yml ShipmentDangerousGoods: @@ -8160,6 +8235,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml ShipmentPriority: @@ -8167,6 +8243,7 @@ - standard - high docs: The level of attention Flexport should give to this shipment + inline: true source: openapi: ../openapi.yml Shipment: @@ -8435,6 +8512,7 @@ - ftl - drayage - cartage + inline: true source: openapi: ../openapi.yml TruckingShipmentLeg: @@ -8523,6 +8601,7 @@ - ventilated - bulk - special + inline: true source: openapi: ../openapi.yml ShipmentContainerContainerSize: @@ -8533,6 +8612,7 @@ - fourty_five_ft_hc - fifty_three_ft - fifty_three_ft_hc + inline: true source: openapi: ../openapi.yml ShipmentContainer: @@ -8590,6 +8670,7 @@ - terminal - unknown docs: The main reason for the exception as an identifier. + inline: true source: openapi: ../openapi.yml Exception: @@ -8683,6 +8764,7 @@ - additional - capital docs: Category of the charge. + inline: true source: openapi: ../openapi.yml InvoiceItem: @@ -8736,6 +8818,7 @@ - paid - payment_pending docs: Status of the invoice + inline: true source: openapi: ../openapi.yml InvoiceType: @@ -8745,6 +8828,7 @@ docs: >- What the invoice is being issued for. Shipment related charges are type `Shipment` and non-shipment related charges are type `Client` + inline: true source: openapi: ../openapi.yml Invoice: @@ -8990,6 +9074,7 @@ - gross_volume - volume_weight docs: The type of measure + inline: true source: openapi: ../openapi.yml LineItemMeasurement: @@ -9011,6 +9096,7 @@ - sub_line - component_line default: main_line + inline: true source: openapi: ../openapi.yml PurchaseOrderLineItemIncoterm: @@ -9027,6 +9113,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml PurchaseOrderLineItemUnitOfMeasure: @@ -9076,6 +9163,7 @@ - TDWB - W - X + inline: true source: openapi: ../openapi.yml PurchaseOrderLineItem: @@ -9140,6 +9228,7 @@ - buyers_agent - sellers_agent docs: The role that the party has + inline: true source: openapi: ../openapi.yml PartiesContactsItem: @@ -9201,6 +9290,7 @@ because they've finished shipping), while Cancelled POs denote POs that were mistakenly uploaded or that should not be used. default: open + inline: true source: openapi: ../openapi.yml PurchaseOrderIncoterm: @@ -9217,6 +9307,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml PurchaseOrderOrderClass: @@ -9227,18 +9318,21 @@ - delivery_order - work_order docs: Class of the purchase order. + inline: true source: openapi: ../openapi.yml PurchaseOrderFreightPaymnetTerms: enum: - freight_collect - freight_prepaid + inline: true source: openapi: ../openapi.yml PurchaseOrderPriority: enum: - standard - high + inline: true source: openapi: ../openapi.yml PurchaseOrder: @@ -9317,6 +9411,7 @@ - buyers_agent - sellers_agent docs: The role that the party has + inline: true source: openapi: ../openapi.yml CreatePartyContactsItem: @@ -9364,6 +9459,7 @@ - icao - us_cbp docs: The code type of the port + inline: true source: openapi: ../openapi.yml CreatePurchaseOrderPort: @@ -9449,6 +9545,7 @@ - gross_volume - volume_weight docs: The type of measure + inline: true source: openapi: ../openapi.yml CreateLineItemMeasurement: @@ -9474,6 +9571,7 @@ - truck - rail docs: Required if there is no transportation_mode in purchase order + inline: true source: openapi: ../openapi.yml CreateLineItemIncoterm: @@ -9492,6 +9590,7 @@ docs: >- Required if there is no incoterm in the line item's purchase order. The Incoterm of your line item. + inline: true source: openapi: ../openapi.yml CreateLineItemLineType: @@ -9501,6 +9600,7 @@ - component_line docs: type of the line item default: main_line + inline: true source: openapi: ../openapi.yml CreateLineItemUnitOfMeasure: @@ -9633,6 +9733,7 @@ - Z3 docs: The measurement per unit for this line item. default: EA + inline: true source: openapi: ../openapi.yml CreateLineItem: @@ -9731,6 +9832,7 @@ because they've finished shipping), while Cancelled POs denote POs that were mistakenly uploaded or that should not be used default: open + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrderFreightPaymentTerms: @@ -9738,6 +9840,7 @@ - freight_collect - freight_prepaid docs: The freight payment term for the purchase order + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrderTransportationMode: @@ -9747,6 +9850,7 @@ - truck - rail docs: Required if there is no transportation_mode in purchase order + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrderIncoterm: @@ -9765,6 +9869,7 @@ docs: >- Required if there is no incoterm in each line item. The incoterm of your purchase order. + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrderPriority: @@ -9773,6 +9878,7 @@ - standard docs: priority of the purchase order. default: standard + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrderOrderClass: @@ -9784,6 +9890,7 @@ - work_order docs: Class of the purchase order. default: purchase_order + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrder: @@ -11518,6 +11625,7 @@ errors: "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11527,6 +11635,7 @@ errors: "booked", "submitted", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11536,6 +11645,7 @@ errors: "cargo_ready_date", "created_at", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11573,6 +11683,7 @@ errors: "no", "notsure", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11626,6 +11737,7 @@ errors: contain goods subject to export control regulations? Export Control Regulations include dual use item control, Hong Kong strategic commodity control, US and EU export control, etc. + inline: true source: openapi: ../openapi.yml BookingCreateResponse: @@ -13366,6 +13478,7 @@ docs: >- "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13799,6 +13912,7 @@ docs: >- "belly_freighter", "unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13811,6 +13925,7 @@ docs: >- "truck", "rail", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13826,6 +13941,7 @@ docs: >- "airport_transfer", "air_cartage", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13844,6 +13960,7 @@ docs: >- `truck`, or `rail`. If `transportation_mode` is `truck`, `ocean`, or `rail`, `country_code` in both `origin_address` and `destination_address` is required. + inline: true source: openapi: ../openapi.yml CreateCarbonCalculationFlightType: @@ -13855,6 +13972,7 @@ docs: >- For `transportation_mode: air`, the type of plane used. One of `freighter`, `belly_freighter`, or `unknown`. Defaults to `unknown`. default: unknown + inline: true source: openapi: ../openapi.yml CreateCarbonCalculationTruckingServiceType: @@ -13870,6 +13988,7 @@ docs: >- For `transportation_mode: truck`, the type of service used. One of `ftl`, `ltl`, `drayage`, `cartage`, `last_mile`, `airport_transfer`, or `air_cartage`. + inline: true source: openapi: ../openapi.yml CarbonCalculationCreateResponse: @@ -19886,6 +20005,7 @@ docs: Endpoints relating to Document objects "value": "/shipment_leg", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20781,6 +20901,7 @@ Other details about this invoice", "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20792,6 +20913,7 @@ Other details about this invoice", "void", "paid", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -22385,6 +22507,7 @@ docs: Endpoints relating to Location objects "roadport", "seaport", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -24398,6 +24521,7 @@ docs: Endpoints relating to Product objects "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -24417,6 +24541,7 @@ docs: Endpoints relating to Product objects "buyers_agent", "sellers_agent", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -24427,6 +24552,7 @@ docs: Endpoints relating to Product objects "closed", "cancelled", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -25649,6 +25775,7 @@ docs: >- "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -27176,6 +27303,7 @@ docs: >- "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -27189,6 +27317,7 @@ docs: >- "updated_at", "archived_at", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hathora.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hathora.json index c4e0482b4e0..88fb55154ff 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hathora.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hathora.json @@ -1126,6 +1126,7 @@ "succeeded", "failed", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1260,6 +1261,7 @@ "public", "local", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1271,6 +1273,7 @@ "rate_egress", "total_egress", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1312,6 +1315,7 @@ "medium", "large", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1390,6 +1394,7 @@ "Sydney", "Sao_Paulo", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1430,6 +1435,7 @@ "suspended", "destroyed", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1461,6 +1467,7 @@ "udp", "tls", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2109,6 +2116,7 @@ types: - running - succeeded - failed + inline: true source: openapi: ../openapi.json Build: @@ -2139,6 +2147,7 @@ types: - private - public - local + inline: true source: openapi: ../openapi.json Lobby: @@ -4482,6 +4491,7 @@ service: "private", "local", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4818,6 +4828,7 @@ types: - public - private - local + inline: true source: openapi: ../openapi.json ", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hookdeck.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hookdeck.json index a5abcd54a1c..5ddbed65787 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hookdeck.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hookdeck.json @@ -2488,6 +2488,7 @@ "each_attempt", "last_attempt", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2566,6 +2567,7 @@ "SOCKET_CLOSED", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2578,6 +2580,7 @@ "COMPLETED", "HOLD", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2590,6 +2593,7 @@ "SUCCESSFUL", "HOLD", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2603,6 +2607,7 @@ "UNPAUSE", "AUTOMATIC", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2890,6 +2895,7 @@ "info", "debug", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3142,6 +3148,7 @@ "minute", "hour", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3417,6 +3424,7 @@ "SUCCESSFUL", "FAILED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3441,6 +3449,7 @@ "path", "query", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3462,6 +3471,7 @@ "sha256", "sha512", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3484,6 +3494,7 @@ "base64", "hex", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3512,6 +3523,7 @@ "TRANSFORMATION_FAILED", "CLI_DISCONNECTED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3605,6 +3617,7 @@ "HANDSHAKE", "POLLING", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3651,6 +3664,7 @@ "pipedrive", "sendgrid", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3690,6 +3704,7 @@ "ACKNOWLEDGED", "RESOLVED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3872,6 +3887,7 @@ "first_attempt", "final_attempt", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3910,6 +3926,7 @@ "transformation", "backpressure", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3945,6 +3962,7 @@ "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4101,6 +4119,7 @@ "NORMAL", "LOW", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4129,6 +4148,7 @@ "INGESTION_FATAL", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4179,6 +4199,7 @@ "linear", "exponential", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4313,6 +4334,7 @@ "minute", "second", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4499,6 +4521,7 @@ "value": "event.successful", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4645,6 +4668,7 @@ "error", "fatal", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -7060,6 +7084,7 @@ types: enum: - base64 - hex + inline: true source: openapi: ../openapi.yml HmacIntegrationConfigs: @@ -7091,6 +7116,7 @@ types: enum: - minute - second + inline: true source: openapi: ../openapi.yml ShopifyIntegrationConfigs: @@ -7263,6 +7289,7 @@ types: - warn - info - debug + inline: true source: openapi: ../openapi.yml ConsoleLine: @@ -7456,6 +7483,7 @@ types: - NORMAL - LOW docs: The priority attributed to the request when received + inline: true source: openapi: ../openapi.yml RequestDataParsedQueryOne: @@ -8792,6 +8820,7 @@ docs: An attempt is any request that Hookdeck makes on behalf of an event. "http", "cli", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8811,6 +8840,7 @@ docs: An attempt is any request that Hookdeck makes on behalf of an event. - http - cli docs: Bookmark target + inline: true source: openapi: ../openapi.yml imports: @@ -11957,6 +11987,7 @@ docs: '' "accepted", "rejected", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11998,6 +12029,7 @@ docs: '' enum: - accepted - rejected + inline: true source: openapi: ../openapi.yml CreateRequestBulkRetryRequestQueryRejectionCauseAny: @@ -13585,6 +13617,7 @@ docs: '' "minute", "hour", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13710,6 +13743,7 @@ docs: '' "minute", "hour", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13773,6 +13807,7 @@ docs: '' - minute - hour docs: Period to rate limit attempts + inline: true source: openapi: ../openapi.yml CreateConnectionRequestDestination: @@ -13834,6 +13869,7 @@ docs: '' - minute - hour docs: Period to rate limit attempts + inline: true source: openapi: ../openapi.yml UpsertConnectionRequestDestination: @@ -15161,6 +15197,7 @@ docs: >- "minute", "hour", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15183,6 +15220,7 @@ docs: >- "minute", "hour", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15194,6 +15232,7 @@ docs: >- "minute", "hour", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15214,6 +15253,7 @@ docs: >- - minute - hour docs: Period to rate limit attempts + inline: true source: openapi: ../openapi.yml UpsertDestinationRequestRateLimitPeriod: @@ -15222,6 +15262,7 @@ docs: >- - minute - hour docs: Period to rate limit attempts + inline: true source: openapi: ../openapi.yml UpdateDestinationRequestRateLimitPeriod: @@ -15230,6 +15271,7 @@ docs: >- - minute - hour docs: Period to rate limit attempts + inline: true source: openapi: ../openapi.yml imports: @@ -18470,6 +18512,7 @@ docs: >- "ACKNOWLEDGED", "RESOLVED", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18528,6 +18571,7 @@ docs: >- - ACKNOWLEDGED - RESOLVED docs: New status + inline: true source: openapi: ../openapi.yml imports: @@ -19577,6 +19621,7 @@ docs: Notifications let your team receive alerts anytime an issue changes. "accepted", "rejected", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/humanloop.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/humanloop.json index 3776a029cf4..02e49b11501 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/humanloop.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/humanloop.json @@ -864,6 +864,7 @@ in the Evaluation Report.", "system", "tool", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1206,6 +1207,7 @@ in the inheriting classes with documentation and appropriate Field definitions." "default", "other", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1422,6 +1424,7 @@ function.", "cancelled", "failed", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1483,6 +1486,7 @@ function.", "target_free", "target_required", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1629,6 +1633,7 @@ function.", "boolean", "number", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1641,6 +1646,7 @@ function.", "text", "number", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1652,6 +1658,7 @@ function.", "active", "inactive", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1728,6 +1735,7 @@ function.", "correction", "comment", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1913,6 +1921,7 @@ function.", "low", "auto", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1974,6 +1983,7 @@ Used by a File's PAPV (Positive Action Per View) metric.", "neutral", "unset", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2559,6 +2569,7 @@ Does not have things like the signature or setup schema.", "chat", "edit", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2577,6 +2588,7 @@ Does not have things like the signature or setup schema.", "google", "groq", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2631,6 +2643,7 @@ Does not have things like the signature or setup schema.", "active", "inactive", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2697,6 +2710,7 @@ Observability is implemented by running monitoring Evaluators on Logs.", "completed", "failed", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2804,6 +2818,7 @@ Observability is implemented by running monitoring Evaluators on Logs.", "supportadmin", "user", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2815,6 +2830,7 @@ Observability is implemented by running monitoring Evaluators on Logs.", "updated_at", "name", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3481,6 +3497,7 @@ Observability is implemented by running monitoring Evaluators on Logs.", "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3539,6 +3556,7 @@ Observability is implemented by running monitoring Evaluators on Logs.", "week", "month", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3823,6 +3841,7 @@ V4 uses organization and inline. Those are deprecated and will be removed in fav "organization", "inline", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3866,6 +3885,7 @@ V4 uses organization and inline. Those are deprecated and will be removed in fav "json_schema", "get_api_call", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3877,6 +3897,7 @@ V4 uses organization and inline. Those are deprecated and will be removed in fav "add", "remove", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4060,6 +4081,7 @@ V4 uses organization and inline. Those are deprecated and will be removed in fav "committed", "deleted", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5267,6 +5289,7 @@ types: Specify the detail level of the image provided to the model. For more details see: https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding + inline: true source: openapi: ../openapi.yml ImageUrl: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hume.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hume.json index 85e3504dc4d..525c50ba481 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hume.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/hume.json @@ -255,6 +255,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "tr", "uk", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, @@ -353,6 +354,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, @@ -555,6 +557,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "utterance", "conversational_turn", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, @@ -1068,6 +1071,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "started", "ended", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, @@ -1190,6 +1194,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "COMPLETED", "FAILED", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, @@ -1270,6 +1275,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "created_before", "created_after", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/inline-path-parameters.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/inline-path-parameters.json index 8a25286f6d0..80bde1edcc0 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/inline-path-parameters.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/inline-path-parameters.json @@ -213,6 +213,7 @@ types: "private", "public", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -235,6 +236,7 @@ types: - private - public docs: Access level + inline: true source: openapi: ../openapi.yml SearchResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/intercom.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/intercom.json index 4593cee2110..dac6ff60561 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/intercom.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/intercom.json @@ -4042,6 +4042,7 @@ "upfront_email_collection_change", "welcome_message_change", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4279,6 +4280,7 @@ "comment", "note", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4320,6 +4322,7 @@ "note", "quick_reply", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4477,6 +4480,7 @@ "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4730,6 +4734,7 @@ "admin", "team", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5735,6 +5740,7 @@ "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5880,6 +5886,7 @@ }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5922,7 +5929,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6636,6 +6643,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul }, "Unstable", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6692,6 +6700,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "ticket", "conversation", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6718,6 +6727,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "AND", "OR", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6788,6 +6798,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "draft", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6914,6 +6925,7 @@ Their responses are likely to contain a pages object that hosts pagination links "value": "conversation.list", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7175,6 +7187,7 @@ Their responses are likely to contain a pages object that hosts pagination links "value": "~", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7216,6 +7229,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "cancelled", "active", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7418,7 +7432,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7495,6 +7509,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "team", "user", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7571,6 +7586,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "comment", "quick_reply", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7583,7 +7599,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7814,6 +7830,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7865,6 +7882,7 @@ You can copy the `icon` property for your ticket type from [Twemoji Cheatsheet]( }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -10497,6 +10515,7 @@ types: - temporary_expectation_change - upfront_email_collection_change - welcome_message_change + inline: true source: openapi: ../openapi.yml ActivityLog: @@ -10617,6 +10636,7 @@ types: enum: - comment - note + inline: true source: openapi: ../openapi.yml AdminReplyConversationRequest: @@ -10654,6 +10674,7 @@ types: - comment - note - quick_reply + inline: true source: openapi: ../openapi.yml AdminReplyTicketRequestReplyOptionsItem: @@ -10796,6 +10817,7 @@ types: - published - draft docs: Whether the article is `published` or is a `draft` . + inline: true source: openapi: ../openapi.yml ArticleContent: @@ -11003,6 +11025,7 @@ types: enum: - admin - team + inline: true source: openapi: ../openapi.yml AssignConversationRequest: @@ -11784,6 +11807,7 @@ types: Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. + inline: true source: openapi: ../openapi.yml CreateArticleRequest: @@ -11911,6 +11935,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml CreateTicketTypeRequest: @@ -11972,6 +11997,7 @@ types: - type: optional source: openapi: ../openapi.yml + inline: true CustomAttributes: type: map docs: >- @@ -12492,6 +12518,7 @@ types: - ticket - conversation docs: ticket or conversation + inline: true source: openapi: ../openapi.yml LinkedObject: @@ -12532,6 +12559,7 @@ types: - AND - OR docs: An operator to allow boolean inspection between multiple fields. + inline: true source: openapi: ../openapi.yml MultipleFilterSearchRequestValue: @@ -12561,6 +12589,7 @@ types: docs: >- News items will not be visible to your users in the assigned newsfeeds until they are set live. + inline: true source: openapi: ../openapi.yml NewsItemRequest: @@ -12660,6 +12689,7 @@ types: - value: conversation.list name: ConversationList docs: The type of object + inline: true source: openapi: ../openapi.yml PaginatedResponseDataItem: @@ -12832,6 +12862,7 @@ types: docs: >- The accepted operators you can use to define how you want to search for the value. + inline: true source: openapi: ../openapi.yml SingleFilterSearchRequest: @@ -12861,6 +12892,7 @@ types: - `hit`: If there’s at least one hit event in the underlying sla_events table, and no “missed” or “canceled” events for the conversation. - `missed`: If there are any missed sla_events for the conversation and no canceled events. If there’s even a single missed sla event, the status will always be missed. A missed status is not applied when the SLA expires, only the next time a teammate replies. - `active`: An SLA has been applied to a conversation, but has not yet been fulfilled. SLA status is active only if there are no “hit, “missed”, or “canceled” events. + inline: true source: openapi: ../openapi.yml SlaApplied: @@ -13019,6 +13051,7 @@ types: - type: File source: openapi: ../openapi.yml + inline: true TicketCustomAttributes: type: map docs: >- @@ -13048,6 +13081,7 @@ types: - team - user docs: The type of the author + inline: true source: openapi: ../openapi.yml TicketPartAuthor: @@ -13095,6 +13129,7 @@ types: - comment - quick_reply docs: Type of the part + inline: true source: openapi: ../openapi.yml TicketReply: @@ -13137,6 +13172,7 @@ types: - list source: openapi: ../openapi.yml + inline: true TicketRequestCustomAttributes: type: map docs: >- @@ -13292,6 +13328,7 @@ types: Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. + inline: true source: openapi: ../openapi.yml UpdateArticleRequest: @@ -13343,6 +13380,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml UpdateTicketTypeRequest: @@ -14467,6 +14505,7 @@ types: "workflow_preview", "fin_preview", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14484,6 +14523,7 @@ types: docs: >- The type of the source that triggered AI Agent involvement in the conversation. + inline: true source: openapi: ../openapi.yml AiAgent: @@ -14562,6 +14602,7 @@ imports: "content_snippet", "workflow_connector_action", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14577,6 +14618,7 @@ imports: - content_snippet - workflow_connector_action docs: The type of the content source. + inline: true source: openapi: ../openapi.yml ContentSource: @@ -17183,6 +17225,7 @@ imports: "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17231,6 +17274,7 @@ imports: "highlight", "plain", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17258,6 +17302,7 @@ imports: "highlight", "plain", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19669,6 +19714,7 @@ types: Whether the article is `published` or is a `draft`. For multilingual articles, this will be the state of the default language's content. default: draft + inline: true source: openapi: ../openapi.yml Articles: @@ -19754,6 +19800,7 @@ types: - highlight - plain docs: The type of text - `highlight` or `plain`. + inline: true source: openapi: ../openapi.yml ArticleSearchHighlightsHighlightedTitleItem: @@ -19773,6 +19820,7 @@ types: - highlight - plain docs: The type of text - `highlight` or `plain`. + inline: true source: openapi: ../openapi.yml ArticleSearchHighlightsHighlightedSummaryItemItem: @@ -28608,6 +28656,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "priority", "not_priority", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -28619,6 +28668,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "closed", "snoozed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -28653,6 +28703,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "user", "contact", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31892,6 +31943,7 @@ types: - user - contact docs: The role associated to the contact - user or lead. + inline: true source: openapi: ../openapi.yml CreateConversationRequestFrom: @@ -31972,6 +32024,7 @@ types: - closed - snoozed docs: Can be set to "open", "closed" or "snoozed". + inline: true source: openapi: ../openapi.yml ConversationPriority: @@ -31979,6 +32032,7 @@ types: - priority - not_priority docs: If marked as priority, it will return priority or else not_priority. + inline: true source: openapi: ../openapi.yml Conversation: @@ -33032,6 +33086,7 @@ You can update a data attribute. "datetime", "date", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33042,6 +33097,7 @@ You can update a data attribute. "contact", "company", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33132,6 +33188,7 @@ You can update a data attribute. "boolean", "date", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33142,6 +33199,7 @@ You can update a data attribute. "contact", "company", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33152,6 +33210,7 @@ You can update a data attribute. "company", "conversation", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -33171,6 +33230,7 @@ You can update a data attribute. - contact - company docs: The model that the data attribute belongs to. + inline: true source: openapi: ../openapi.yml CreateDataAttributeRequestDataType: @@ -33182,6 +33242,7 @@ You can update a data attribute. - datetime - date docs: The type of data stored for this attribute. + inline: true source: openapi: ../openapi.yml DataAttributeModel: @@ -33191,6 +33252,7 @@ You can update a data attribute. docs: >- Value is `contact` for user/lead attributes and `company` for company attributes. + inline: true source: openapi: ../openapi.yml DataAttributeDataType: @@ -33201,6 +33263,7 @@ You can update a data attribute. - boolean - date docs: The data type of the attribute. + inline: true source: openapi: ../openapi.yml DataAttribute: @@ -34856,6 +34919,7 @@ Your exported message data will be streamed continuously back down to you in a g "no_data", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -35047,6 +35111,7 @@ types: - no_data - canceled docs: The current state of your job. + inline: true source: openapi: ../openapi.yml DataExport: @@ -38033,6 +38098,7 @@ This will return the Message model that has been created. "facebook", "twitter", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38210,6 +38276,7 @@ types: docs: >- The type of message that was sent. Can be email, inapp, facebook or twitter. + inline: true source: openapi: ../openapi.yml Message: @@ -38837,6 +38904,7 @@ types: "draft", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -39258,6 +39326,7 @@ types: docs: >- News items will not be visible to your users in the assigned newsfeeds until they are set live. + inline: true source: openapi: ../openapi.yml NewsItem: @@ -40262,6 +40331,7 @@ types: "contact", "user", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40356,6 +40426,7 @@ types: - contact - user docs: 'Type of the contact: contact (lead) or user.' + inline: true source: openapi: ../openapi.yml Segment: @@ -40712,6 +40783,7 @@ This will return a subscription type model for the subscription type that was ad "opt_out", "opt_in", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40721,6 +40793,7 @@ This will return a subscription type model for the subscription type that was ad "email", "sms_message", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40732,6 +40805,7 @@ This will return a subscription type model for the subscription type that was ad "draft", "archived", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40945,6 +41019,7 @@ types: - draft - archived docs: The state of the subscription type. + inline: true source: openapi: ../openapi.yml SubscriptionTypeConsentType: @@ -40952,12 +41027,14 @@ types: - opt_out - opt_in docs: Describes the type of consent. + inline: true source: openapi: ../openapi.yml SubscriptionTypeContentTypesItem: enum: - email - sms_message + inline: true source: openapi: ../openapi.yml SubscriptionType: @@ -43142,6 +43219,7 @@ types: "datetime", "files", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43159,6 +43237,7 @@ types: - datetime - files docs: The data type of the attribute + inline: true source: openapi: ../openapi.yml imports: @@ -45604,6 +45683,7 @@ The table below shows the operators you can use to define how you want to search }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45676,6 +45756,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45688,6 +45769,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45700,6 +45782,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45766,6 +45849,7 @@ The table below shows the operators you can use to define how you want to search }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45794,6 +45878,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45854,6 +45939,7 @@ types: - waiting_on_customer - resolved docs: The state of the ticket. + inline: true source: openapi: ../openapi.yml UpdateTicketRequestAssignment: @@ -45876,6 +45962,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket. + inline: true source: openapi: ../openapi.yml TicketTicketState: @@ -45885,6 +45972,7 @@ types: - waiting_on_customer - resolved docs: The state the ticket is currently in + inline: true source: openapi: ../openapi.yml Ticket: @@ -45970,6 +46058,7 @@ types: - waiting_on_customer - resolved docs: The previous state of the ticket. + inline: true source: openapi: ../openapi.yml TicketPartTicketState: @@ -45979,6 +46068,7 @@ types: - waiting_on_customer - resolved docs: The state of the ticket. + inline: true source: openapi: ../openapi.yml TicketPart: @@ -46033,6 +46123,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml TicketType: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/merge.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/merge.json index 5419f90792a..5fb5fc872e9 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/merge.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/merge.json @@ -105,6 +105,7 @@ View a list of your organization's `LinkedAccount` objects.", "INCOMPLETE", "RELINK_NEEDED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -183,6 +184,7 @@ View a list of your organization's `LinkedAccount` objects.", "SAVINGS", "CHECKING", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -368,6 +370,7 @@ Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all benefits. "mktg", "filestorage", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -389,6 +392,7 @@ Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all benefits. "mktg", "filestorage", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -530,6 +534,7 @@ Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companie "STRING", "LIST_OF_STRINGS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1035,6 +1040,7 @@ Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companie "ZM", "ZW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1246,6 +1252,7 @@ Fetch from the `LIST Earnings` endpoint and filter by `ID` to show all earnings. "OVERTIME", "BONUS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2223,6 +2230,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "PENDING", "INACTIVE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2240,6 +2248,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "CONTRACTOR", "FREELANCE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2251,6 +2260,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "READ", "WRITE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2264,6 +2274,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "BASE64", "GZIP_BASE64", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2374,6 +2385,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "WHITE", "PREFER_NOT_TO_DISCLOSE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2389,6 +2401,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "NONEXEMPT", "OWNER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2409,6 +2422,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "OTHER", "PREFER_NOT_TO_DISCLOSE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2510,6 +2524,7 @@ Fetch from the `LIST Employee` endpoint and expand groups to view an employee's "BUSINESS_UNIT", "GROUP", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2571,6 +2586,7 @@ Fetch from the `LIST Employee` endpoint and expand groups to view an employee's "ONGOING", "RESOLVED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3023,6 +3039,7 @@ Fetch from the `LIST Locations` endpoint and filter by `ID` to show all office l "HOME", "WORK", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3040,6 +3057,7 @@ Fetch from the `LIST Locations` endpoint and filter by `ID` to show all office l "HEAD_OF_HOUSEHOLD", "QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3075,6 +3093,7 @@ Fetch from the `LIST Locations` endpoint and filter by `ID` to show all office l "PATCH", "DELETE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3995,6 +4014,7 @@ Create a `MultipartFormField` to define a multipart form entry.", "ZWR", "ZWL", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4023,6 +4043,7 @@ Create a `MultipartFormField` to define a multipart form entry.", "PRO_RATA", "SEMIMONTHLY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4089,6 +4110,7 @@ Fetch from the `LIST PayGroup` endpoint and filter by `ID` to show all pay group "EVERY_SIX_MONTHS", "YEAR", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4177,6 +4199,7 @@ Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all payrol "VOLUNTEER", "BEREAVEMENT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4190,6 +4213,7 @@ Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all payrol "GDPR", "OTHER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4274,6 +4298,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "XML", "MULTIPART", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4293,6 +4318,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "VOLUNTEER", "BEREAVEMENT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4304,6 +4330,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "JSON", "BASE64_GZIP", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4321,6 +4348,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "FAILED", "CLOSED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4338,6 +4366,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "TERMINATION", "SIGN_ON_BONUS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4349,6 +4378,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "IN_NEXT_SYNC", "IN_LAST_SYNC", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4389,6 +4419,7 @@ View the `SyncStatus` for an account to see how recently its models were synced. "PAUSED", "PARTIALLY_SYNCED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4782,6 +4813,7 @@ Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off "CANCELLED", "DELETED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4793,6 +4825,7 @@ Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off "HOURS", "DAYS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10270,6 +10303,7 @@ service: "CHECKING", "SAVINGS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10285,6 +10319,7 @@ service: "value": "remote_created_at", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11524,6 +11559,7 @@ service: }, "payroll_run", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11537,6 +11573,7 @@ service: }, "payroll_run", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12362,6 +12399,7 @@ service: "INACTIVE", "PENDING", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13365,6 +13403,7 @@ service: "value": "work_location,team,pay_group", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13420,6 +13459,7 @@ service: }, "marital_status", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13475,6 +13515,7 @@ service: }, "marital_status", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -14478,6 +14519,7 @@ service: "value": "work_location,team,pay_group", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -14533,6 +14575,7 @@ service: }, "marital_status", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -14588,6 +14631,7 @@ service: }, "marital_status", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16386,6 +16430,7 @@ service: }, "pay_group", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16401,6 +16446,7 @@ service: "value": "effective_date", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16456,6 +16502,7 @@ service: }, "pay_period", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16511,6 +16558,7 @@ service: }, "pay_period", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16524,6 +16572,7 @@ service: }, "pay_group", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16579,6 +16628,7 @@ service: }, "pay_period", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16634,6 +16684,7 @@ service: }, "pay_period", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -17599,6 +17650,7 @@ service: "ONGOING", "RESOLVED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -17969,6 +18021,7 @@ service: "mktg", "ticketing", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -19079,6 +19132,7 @@ service: }, "run_type", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -19091,6 +19145,7 @@ service: "SIGN_ON_BONUS", "TERMINATION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -19104,6 +19159,7 @@ service: }, "run_type", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -19117,6 +19173,7 @@ service: }, "run_type", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -19130,6 +19187,7 @@ service: }, "run_type", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20515,6 +20573,7 @@ service: "value": "employee,approver", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20541,6 +20600,7 @@ service: }, "units", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20554,6 +20614,7 @@ service: "VACATION", "VOLUNTEER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20580,6 +20641,7 @@ service: }, "units", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20592,6 +20654,7 @@ service: "DELETED", "REQUESTED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20605,6 +20668,7 @@ service: "value": "employee,approver", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20631,6 +20695,7 @@ service: }, "units", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20657,6 +20722,7 @@ service: }, "units", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -21274,6 +21340,7 @@ service: "VACATION", "VOLUNTEER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/non-alphanumeric-characters.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/non-alphanumeric-characters.json index 0e93f21bc04..205a502067b 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/non-alphanumeric-characters.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/non-alphanumeric-characters.json @@ -66,6 +66,7 @@ "value": "", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/ntropy.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/ntropy.json index 58712f5011b..20a1c1a672a 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/ntropy.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/ntropy.json @@ -685,6 +685,7 @@ "consumer", "business", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -695,6 +696,7 @@ "consumer", "business", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -714,6 +716,7 @@ "financing", "taxes", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -853,6 +856,7 @@ "invalid_bank_statement", "internal_error", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -894,6 +898,7 @@ "completed", "error", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1025,6 +1030,7 @@ enriched transactions.", "completed", "error", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1054,6 +1060,7 @@ enriched transactions.", "low", "unknown", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1111,6 +1118,7 @@ enriched transactions.", "person", "organization", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1363,6 +1371,7 @@ enriched transactions.", "ZM", "ZW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1521,6 +1530,7 @@ enriched transactions.", "ZWL", "HRK", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1548,6 +1558,7 @@ enriched transactions.", "processed", "failed", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1562,6 +1573,7 @@ enriched transactions.", "person", "transaction_type", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1664,6 +1676,7 @@ enriched transactions.", "incoming", "outgoing", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2020,6 +2033,7 @@ enriched transactions.", "delivery_service", "payment_processor", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2377,6 +2391,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "yearly", "other", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2391,6 +2406,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "value": "one off", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2451,6 +2467,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "resolved", "rejected", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2610,6 +2627,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "account_holder_not_found", "internal_error", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2782,6 +2800,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "value": "batches.error", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2855,6 +2874,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "account_holder_id", "account_holder_name", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4488,6 +4508,7 @@ types: name: BatchesCompleted - value: batches.error name: BatchesError + inline: true source: openapi: ../openapi.yml Webhook: @@ -10586,6 +10607,7 @@ sdk.webhooks.create( "value": "batches.error", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -10621,6 +10643,7 @@ sdk.webhooks.create( "value": "batches.error", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -10954,6 +10977,7 @@ types: name: BatchesCompleted - value: batches.error name: BatchesError + inline: true source: openapi: ../openapi.yml WebhookPatchEventsItem: @@ -10972,6 +10996,7 @@ types: name: BatchesCompleted - value: batches.error name: BatchesError + inline: true source: openapi: ../openapi.yml ", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/oauth.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/oauth.json index 6e76ddae20f..253a8865cc2 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/oauth.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/oauth.json @@ -123,6 +123,7 @@ "refresh_token", "client_credentials", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -152,6 +153,7 @@ - refresh_token - client_credentials docs: The type of grant to request + inline: true source: openapi: ../openapi.yml AuthGetTokenResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/only-include-referenced-schemas.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/only-include-referenced-schemas.json index 06f4b3d0bf1..30726459099 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/only-include-referenced-schemas.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/only-include-referenced-schemas.json @@ -4041,6 +4041,7 @@ "upfront_email_collection_change", "welcome_message_change", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4278,6 +4279,7 @@ "comment", "note", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4319,6 +4321,7 @@ "note", "quick_reply", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4476,6 +4479,7 @@ "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4729,6 +4733,7 @@ "admin", "team", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5703,6 +5708,7 @@ "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5831,6 +5837,7 @@ }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5873,7 +5880,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6420,6 +6427,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "ticket", "conversation", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6446,6 +6454,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "AND", "OR", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6516,6 +6525,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "draft", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6642,6 +6652,7 @@ Their responses are likely to contain a pages object that hosts pagination links "value": "conversation.list", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6903,6 +6914,7 @@ Their responses are likely to contain a pages object that hosts pagination links "value": "~", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6944,6 +6956,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "cancelled", "active", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7146,7 +7159,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7223,6 +7236,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "team", "user", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7299,6 +7313,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "comment", "quick_reply", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7311,7 +7326,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7542,6 +7557,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7593,6 +7609,7 @@ You can copy the `icon` property for your ticket type from [Twemoji Cheatsheet]( }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -10204,6 +10221,7 @@ types: - temporary_expectation_change - upfront_email_collection_change - welcome_message_change + inline: true source: openapi: ../openapi.yml ActivityLog: @@ -10324,6 +10342,7 @@ types: enum: - comment - note + inline: true source: openapi: ../openapi.yml AdminReplyConversationRequest: @@ -10361,6 +10380,7 @@ types: - comment - note - quick_reply + inline: true source: openapi: ../openapi.yml AdminReplyTicketRequestReplyOptionsItem: @@ -10503,6 +10523,7 @@ types: - published - draft docs: Whether the article is `published` or is a `draft` . + inline: true source: openapi: ../openapi.yml ArticleContent: @@ -10710,6 +10731,7 @@ types: enum: - admin - team + inline: true source: openapi: ../openapi.yml AssignConversationRequest: @@ -11466,6 +11488,7 @@ types: Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. + inline: true source: openapi: ../openapi.yml CreateArticleRequest: @@ -11586,6 +11609,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml CreateTicketTypeRequest: @@ -11647,6 +11671,7 @@ types: - type: optional source: openapi: ../openapi.yml + inline: true CustomAttributes: type: map docs: >- @@ -11993,6 +12018,7 @@ types: - ticket - conversation docs: ticket or conversation + inline: true source: openapi: ../openapi.yml LinkedObject: @@ -12033,6 +12059,7 @@ types: - AND - OR docs: An operator to allow boolean inspection between multiple fields. + inline: true source: openapi: ../openapi.yml MultipleFilterSearchRequestValue: @@ -12062,6 +12089,7 @@ types: docs: >- News items will not be visible to your users in the assigned newsfeeds until they are set live. + inline: true source: openapi: ../openapi.yml NewsItemRequest: @@ -12161,6 +12189,7 @@ types: - value: conversation.list name: ConversationList docs: The type of object + inline: true source: openapi: ../openapi.yml PaginatedResponseDataItem: @@ -12333,6 +12362,7 @@ types: docs: >- The accepted operators you can use to define how you want to search for the value. + inline: true source: openapi: ../openapi.yml SingleFilterSearchRequest: @@ -12362,6 +12392,7 @@ types: - `hit`: If there’s at least one hit event in the underlying sla_events table, and no “missed” or “canceled” events for the conversation. - `missed`: If there are any missed sla_events for the conversation and no canceled events. If there’s even a single missed sla event, the status will always be missed. A missed status is not applied when the SLA expires, only the next time a teammate replies. - `active`: An SLA has been applied to a conversation, but has not yet been fulfilled. SLA status is active only if there are no “hit, “missed”, or “canceled” events. + inline: true source: openapi: ../openapi.yml SlaApplied: @@ -12520,6 +12551,7 @@ types: - type: File source: openapi: ../openapi.yml + inline: true TicketCustomAttributes: type: map docs: >- @@ -12549,6 +12581,7 @@ types: - team - user docs: The type of the author + inline: true source: openapi: ../openapi.yml TicketPartAuthor: @@ -12596,6 +12629,7 @@ types: - comment - quick_reply docs: Type of the part + inline: true source: openapi: ../openapi.yml TicketReply: @@ -12638,6 +12672,7 @@ types: - list source: openapi: ../openapi.yml + inline: true TicketRequestCustomAttributes: type: map docs: >- @@ -12793,6 +12828,7 @@ types: Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. + inline: true source: openapi: ../openapi.yml UpdateArticleRequest: @@ -12844,6 +12880,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml UpdateTicketTypeRequest: @@ -13953,6 +13990,7 @@ types: "workflow_preview", "fin_preview", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13970,6 +14008,7 @@ types: docs: >- The type of the source that triggered AI Agent involvement in the conversation. + inline: true source: openapi: ../openapi.yml AiAgent: @@ -14048,6 +14087,7 @@ imports: "content_snippet", "workflow_connector_action", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14063,6 +14103,7 @@ imports: - content_snippet - workflow_connector_action docs: The type of the content source. + inline: true source: openapi: ../openapi.yml ContentSource: @@ -16669,6 +16710,7 @@ imports: "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16717,6 +16759,7 @@ imports: "highlight", "plain", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16744,6 +16787,7 @@ imports: "highlight", "plain", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19155,6 +19199,7 @@ types: Whether the article is `published` or is a `draft`. For multilingual articles, this will be the state of the default language's content. default: draft + inline: true source: openapi: ../openapi.yml Articles: @@ -19240,6 +19285,7 @@ types: - highlight - plain docs: The type of text - `highlight` or `plain`. + inline: true source: openapi: ../openapi.yml ArticleSearchHighlightsHighlightedTitleItem: @@ -19259,6 +19305,7 @@ types: - highlight - plain docs: The type of text - `highlight` or `plain`. + inline: true source: openapi: ../openapi.yml ArticleSearchHighlightsHighlightedSummaryItemItem: @@ -28094,6 +28141,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "priority", "not_priority", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -28105,6 +28153,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "closed", "snoozed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -28139,6 +28188,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "user", "contact", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31378,6 +31428,7 @@ types: - user - contact docs: The role associated to the contact - user or lead. + inline: true source: openapi: ../openapi.yml CreateConversationRequestFrom: @@ -31458,6 +31509,7 @@ types: - closed - snoozed docs: Can be set to "open", "closed" or "snoozed". + inline: true source: openapi: ../openapi.yml ConversationPriority: @@ -31465,6 +31517,7 @@ types: - priority - not_priority docs: If marked as priority, it will return priority or else not_priority. + inline: true source: openapi: ../openapi.yml Conversation: @@ -32518,6 +32571,7 @@ You can update a data attribute. "datetime", "date", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32528,6 +32582,7 @@ You can update a data attribute. "contact", "company", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32618,6 +32673,7 @@ You can update a data attribute. "boolean", "date", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32628,6 +32684,7 @@ You can update a data attribute. "contact", "company", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32638,6 +32695,7 @@ You can update a data attribute. "company", "conversation", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -32657,6 +32715,7 @@ You can update a data attribute. - contact - company docs: The model that the data attribute belongs to. + inline: true source: openapi: ../openapi.yml CreateDataAttributeRequestDataType: @@ -32668,6 +32727,7 @@ You can update a data attribute. - datetime - date docs: The type of data stored for this attribute. + inline: true source: openapi: ../openapi.yml DataAttributeModel: @@ -32677,6 +32737,7 @@ You can update a data attribute. docs: >- Value is `contact` for user/lead attributes and `company` for company attributes. + inline: true source: openapi: ../openapi.yml DataAttributeDataType: @@ -32687,6 +32748,7 @@ You can update a data attribute. - boolean - date docs: The data type of the attribute. + inline: true source: openapi: ../openapi.yml DataAttribute: @@ -34266,6 +34328,7 @@ Your exported message data will be streamed continuously back down to you in a g "no_data", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34457,6 +34520,7 @@ types: - no_data - canceled docs: The current state of your job. + inline: true source: openapi: ../openapi.yml DataExport: @@ -37443,6 +37507,7 @@ This will return the Message model that has been created. "facebook", "twitter", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -37620,6 +37685,7 @@ types: docs: >- The type of message that was sent. Can be email, inapp, facebook or twitter. + inline: true source: openapi: ../openapi.yml Message: @@ -38247,6 +38313,7 @@ types: "draft", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38668,6 +38735,7 @@ types: docs: >- News items will not be visible to your users in the assigned newsfeeds until they are set live. + inline: true source: openapi: ../openapi.yml NewsItem: @@ -39672,6 +39740,7 @@ types: "contact", "user", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -39766,6 +39835,7 @@ types: - contact - user docs: 'Type of the contact: contact (lead) or user.' + inline: true source: openapi: ../openapi.yml Segment: @@ -40122,6 +40192,7 @@ This will return a subscription type model for the subscription type that was ad "opt_out", "opt_in", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40131,6 +40202,7 @@ This will return a subscription type model for the subscription type that was ad "email", "sms_message", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40142,6 +40214,7 @@ This will return a subscription type model for the subscription type that was ad "draft", "archived", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40355,6 +40428,7 @@ types: - draft - archived docs: The state of the subscription type. + inline: true source: openapi: ../openapi.yml SubscriptionTypeConsentType: @@ -40362,12 +40436,14 @@ types: - opt_out - opt_in docs: Describes the type of consent. + inline: true source: openapi: ../openapi.yml SubscriptionTypeContentTypesItem: enum: - email - sms_message + inline: true source: openapi: ../openapi.yml SubscriptionType: @@ -42552,6 +42628,7 @@ types: "datetime", "files", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42569,6 +42646,7 @@ types: - datetime - files docs: The data type of the attribute + inline: true source: openapi: ../openapi.yml imports: @@ -45014,6 +45092,7 @@ The table below shows the operators you can use to define how you want to search }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45086,6 +45165,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45098,6 +45178,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45110,6 +45191,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45176,6 +45258,7 @@ The table below shows the operators you can use to define how you want to search }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45204,6 +45287,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45264,6 +45348,7 @@ types: - waiting_on_customer - resolved docs: The state of the ticket. + inline: true source: openapi: ../openapi.yml UpdateTicketRequestAssignment: @@ -45286,6 +45371,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket. + inline: true source: openapi: ../openapi.yml TicketTicketState: @@ -45295,6 +45381,7 @@ types: - waiting_on_customer - resolved docs: The state the ticket is currently in + inline: true source: openapi: ../openapi.yml Ticket: @@ -45380,6 +45467,7 @@ types: - waiting_on_customer - resolved docs: The previous state of the ticket. + inline: true source: openapi: ../openapi.yml TicketPartTicketState: @@ -45389,6 +45477,7 @@ types: - waiting_on_customer - resolved docs: The state of the ticket. + inline: true source: openapi: ../openapi.yml TicketPart: @@ -45443,6 +45532,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml TicketType: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/openapi-filter.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/openapi-filter.json index c41e115db7d..b2011874205 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/openapi-filter.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/openapi-filter.json @@ -725,6 +725,7 @@ types: "contact", "user", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -737,6 +738,7 @@ types: - contact - user docs: 'Type of the contact: contact (lead) or user.' + inline: true source: openapi: ../openapi.yml Segment: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/permit.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/permit.json index 5afedc6c120..e9acecb4488 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/permit.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/permit.json @@ -1357,6 +1357,7 @@ "array", "json", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1569,6 +1570,7 @@ "userset", "resourceset", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1953,6 +1955,7 @@ "failed", "canceled", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1978,6 +1981,7 @@ "read", "no_access", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1989,6 +1993,7 @@ "project", "env", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2005,6 +2010,7 @@ "connect_sdk", "done", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -3845,6 +3851,7 @@ The actions represents the ways you can interact with a protected resource.", "active", "pending", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -9692,6 +9699,7 @@ allowed.", "fail", "overwrite", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -10158,6 +10166,7 @@ types: Action to take when detecting a conflict when copying. Only applies to copying into an existing environment default: fail + inline: true source: openapi: ../openapi.json ", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/query-params.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/query-params.json index 7805574f7b8..5d5571cd224 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/query-params.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/query-params.json @@ -92,6 +92,7 @@ "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/readonly.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/readonly.json index 82e436f7c5a..67eee6c06eb 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/readonly.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/readonly.json @@ -143,6 +143,7 @@ "suspended", "deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -253,6 +254,7 @@ types: - active - suspended - deleted + inline: true source: openapi: ../openapi.yml UserStatsRead: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/rightbrain.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/rightbrain.json index e3c61c58e6b..2e3b71ed47c 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/rightbrain.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/rightbrain.json @@ -5966,6 +5966,7 @@ "dropbox", "sharepoint", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6329,6 +6330,7 @@ "all", "viewable", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -7811,6 +7813,7 @@ Some entities, such as Organizations, may contain members that exist without any "prompt_policy", "pii_policy", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8139,6 +8142,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "italian", "german", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8375,6 +8379,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8462,6 +8467,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "prompt_policy", "pii_policy", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8500,6 +8506,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "user_defined", "zendesk", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8543,6 +8550,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "no_size", "site", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8552,6 +8560,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "file", "dir", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8665,6 +8674,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "pending", "accepted", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8769,6 +8779,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "joinable_by_domain", "joinable_by_invite", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -9837,6 +9848,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "dropbox", "sharepoint", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9863,6 +9875,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "RETRY", "PROGRESS", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9872,6 +9885,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "unverified", "verified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -10292,6 +10306,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -10306,6 +10321,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "integer", "list", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -10394,6 +10410,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "success", "validation", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15274,6 +15291,7 @@ types: - value: gemini-pro name: GeminiPro default: gpt-3.5-turbo + inline: true source: openapi: ../openapi.yml ChatConfig: @@ -15316,6 +15334,7 @@ types: - box - dropbox - sharepoint + inline: true source: openapi: ../openapi.yml ChatDocument: @@ -15384,6 +15403,7 @@ types: - source_validation - prompt_policy - pii_policy + inline: true source: openapi: ../openapi.yml Type: @@ -15392,6 +15412,7 @@ types: - error - success - validation + inline: true source: openapi: ../openapi.yml ChatGuardrail: @@ -15408,6 +15429,7 @@ types: enum: - prompt_policy - pii_policy + inline: true source: openapi: ../openapi.yml ChatModel: @@ -15492,6 +15514,7 @@ types: - italian - german default: english_british + inline: true source: openapi: ../openapi.yml ComposeInit: @@ -15626,6 +15649,7 @@ types: enum: - unverified - verified + inline: true source: openapi: ../openapi.yml DatasourceSyncRun: @@ -15657,6 +15681,7 @@ types: - FAILURE - RETRY - PROGRESS + inline: true source: openapi: ../openapi.yml DocumentCreateTask: @@ -16333,6 +16358,7 @@ types: - box - dropbox - sharepoint + inline: true source: openapi: ../openapi.yml SourceRow: @@ -16484,6 +16510,7 @@ types: - value: gemini-pro name: GeminiPro docs: The LLM model to use for the Task. + inline: true source: openapi: ../openapi.yml TaskRevisionOutputFormatValue: @@ -16495,6 +16522,7 @@ types: - int - integer - list + inline: true source: openapi: ../openapi.yml TaskRevision: @@ -17281,6 +17309,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -17291,6 +17320,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17301,6 +17331,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17318,6 +17349,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17374,6 +17406,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17849,6 +17882,7 @@ types: - value: gemini-pro name: GeminiPro default: gpt-3.5-turbo + inline: true source: openapi: ../openapi.yml ChatIamListMembersRequestType: @@ -17863,6 +17897,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml ChatIamMemberRoleUpdateRemoveItem: @@ -17870,6 +17905,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml ChatIamPermissionTestPermissionsItem: @@ -17884,6 +17920,7 @@ types: - remove_owner - view - view_members + inline: true source: openapi: ../openapi.yml ", @@ -18753,6 +18790,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -18763,6 +18801,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18773,6 +18812,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18794,6 +18834,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19439,6 +19480,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml CollectionIamMemberRoleUpdateRemoveItem: @@ -19446,6 +19488,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml CollectionIamPermissionTestPermissionsItem: @@ -19464,6 +19507,7 @@ types: - remove_owner - view - view_members + inline: true source: openapi: ../openapi.yml ", @@ -26559,6 +26603,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -26569,6 +26614,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26579,6 +26625,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26596,6 +26643,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26612,6 +26660,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "dropbox", "sharepoint", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -26644,6 +26693,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - editor - owner - viewer + inline: true source: openapi: ../openapi.yml DocumentIamMemberRoleUpdateRemoveItem: @@ -26651,6 +26701,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - editor - owner - viewer + inline: true source: openapi: ../openapi.yml DocumentIamPermissionTestPermissionsItem: @@ -26665,6 +26716,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - remove_owner - view - view_members + inline: true source: openapi: ../openapi.yml imports: @@ -28819,6 +28871,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -28829,6 +28882,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -28839,6 +28893,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -28856,6 +28911,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -28875,6 +28931,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - editor - owner - viewer + inline: true source: openapi: ../openapi.yml OrganizationIamMemberRoleUpdateRemoveItem: @@ -28882,6 +28939,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - editor - owner - viewer + inline: true source: openapi: ../openapi.yml OrganizationIamPermissionTestPermissionsItem: @@ -28896,6 +28954,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - remove_owner - view - view_members + inline: true source: openapi: ../openapi.yml imports: @@ -30171,6 +30230,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30181,6 +30241,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -30196,6 +30257,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "task_runner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30211,6 +30273,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "task_runner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30244,6 +30307,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view_data", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30748,6 +30812,7 @@ types: - value: gemini-pro name: GeminiPro default: gpt-3.5-turbo + inline: true source: openapi: ../openapi.yml ProjectIamListMembersRequestType: @@ -30767,6 +30832,7 @@ types: - task_creator - task_runner - viewer + inline: true source: openapi: ../openapi.yml ProjectIamMemberRoleUpdateRemoveItem: @@ -30779,6 +30845,7 @@ types: - task_creator - task_runner - viewer + inline: true source: openapi: ../openapi.yml ProjectIamPermissionTestPermissionsItem: @@ -30809,6 +30876,7 @@ types: - view - view_data - view_members + inline: true source: openapi: ../openapi.yml ", @@ -32953,6 +33021,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32967,6 +33036,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "integer", "list", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32977,6 +33047,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -32987,6 +33058,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32997,6 +33069,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33014,6 +33087,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33069,6 +33143,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33083,6 +33158,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "integer", "list", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33990,6 +34066,7 @@ types: - value: gemini-pro name: GeminiPro docs: The LLM model to use for the Task. + inline: true source: openapi: ../openapi.yml TaskCreateOutputFormatValue: @@ -34001,6 +34078,7 @@ types: - int - integer - list + inline: true source: openapi: ../openapi.yml TaskUpdateLlmModel: @@ -34029,6 +34107,7 @@ types: name: Gemini15ProLatest - value: gemini-pro name: GeminiPro + inline: true source: openapi: ../openapi.yml TaskUpdateOutputFormatValue: @@ -34040,6 +34119,7 @@ types: - int - integer - list + inline: true source: openapi: ../openapi.yml TaskIamListMembersRequestType: @@ -34054,6 +34134,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml TaskIamMemberRoleUpdateRemoveItem: @@ -34061,6 +34142,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml TaskIamPermissionTestPermissionsItem: @@ -34075,6 +34157,7 @@ types: - run_task - view - view_members + inline: true source: openapi: ../openapi.yml ", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/seam.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/seam.json index 2e4e18fb434..c77b97926f3 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/seam.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/seam.json @@ -1396,6 +1396,7 @@ "removing", "unknown", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1406,6 +1407,7 @@ "time_bound", "ongoing", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1479,6 +1481,7 @@ "salto_access_group", "brivo_group", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1490,6 +1493,7 @@ "salto_access_group", "brivo_group", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1585,6 +1589,7 @@ "card", "mobile_key", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1607,6 +1612,7 @@ "hid_credential", "visionline_card", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1723,6 +1729,7 @@ "guest", "staff", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1820,6 +1827,7 @@ "value": "common (PMS)", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1841,6 +1849,7 @@ "commonDoor", "touch", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1948,6 +1957,7 @@ "assa_abloy_credential_service", "latch_building", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1968,6 +1978,7 @@ "assa_abloy_credential_service", "latch_building", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -2079,6 +2090,7 @@ "salto_site_user", "latch_user", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3782,6 +3794,7 @@ "cool", "heat_cool", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3895,6 +3908,7 @@ "single", "multiple", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3905,6 +3919,7 @@ "failed", "authorized", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4058,6 +4073,7 @@ "battery", "phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4112,6 +4128,7 @@ "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4411,6 +4428,7 @@ "good", "full", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4455,6 +4473,7 @@ "name_length", "name_must_be_unique", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4481,6 +4500,7 @@ "at_least_three_unique_digits", "cannot_contain_089", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4811,6 +4831,7 @@ "indoor", "outdoor", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4874,6 +4895,7 @@ "bridge", "doorking", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -5000,6 +5022,7 @@ "honeywell_resideo", "latch", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -5012,6 +5035,7 @@ "noise_sensors", "access_control_systems", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -5307,6 +5331,7 @@ "battery", "phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -5329,6 +5354,7 @@ "android_phone", "ios_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -5422,6 +5448,7 @@ "degraded", "down", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -5489,6 +5516,7 @@ "time_bound", "ongoing", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -5570,6 +5598,7 @@ "battery", "phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -5611,6 +5640,7 @@ "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -5757,6 +5787,7 @@ "good", "full", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -6948,6 +6979,7 @@ types: Nature of the access code. Values are "ongoing" for access codes that are active continuously until deactivated manually or "time_bound" for access codes that have a specific duration. + inline: true source: openapi: ../openapi.json AccessCodeStatus: @@ -6961,6 +6993,7 @@ types: Current status of the access code within the operational lifecycle. Values are "setting," a transitional phase that indicates that the code is being configured or activated; "set", which indicates that the code is active and operational; "unset," which indicates a deactivated or unused state, either before activation or after deliberate deactivation; "removing," which indicates a transitional period in which the code is being deleted or made inactive; and "unknown," which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. + inline: true source: openapi: ../openapi.json AccessCode: @@ -7064,6 +7097,7 @@ types: Nature of the access code. Values are "ongoing" for access codes that are active continuously until deactivated manually or "time_bound" for access codes that have a specific duration. + inline: true source: openapi: ../openapi.json UnmanagedAccessCode: @@ -8276,6 +8310,7 @@ types: - heat - cool - heat_cool + inline: true source: openapi: ../openapi.json ClimateSettingSchedule: @@ -8309,6 +8344,7 @@ types: - none - single - multiple + inline: true source: openapi: ../openapi.json ConnectWebviewStatus: @@ -8316,6 +8352,7 @@ types: - pending - failed - authorized + inline: true source: openapi: ../openapi.json ConnectWebviewCustomMetadataValue: @@ -8451,6 +8488,7 @@ types: - ios_phone - android_phone docs: Type of the device. + inline: true source: openapi: ../openapi.json DeviceCapabilitiesSupportedItem: @@ -8461,6 +8499,7 @@ types: - thermostat - battery - phone + inline: true source: openapi: ../openapi.json DevicePropertiesAccessoryKeypadBattery: @@ -8535,6 +8574,7 @@ types: - low - good - full + inline: true source: openapi: ../openapi.json DevicePropertiesBattery: @@ -8674,6 +8714,7 @@ types: enum: - indoor - outdoor + inline: true source: openapi: ../openapi.json DevicePropertiesNoiseawareMetadata: @@ -8774,6 +8815,7 @@ types: enum: - bridge - doorking + inline: true source: openapi: ../openapi.json DevicePropertiesSeamBridgeMetadata: @@ -8892,6 +8934,7 @@ types: - no_ascending_or_descending_sequence - at_least_three_unique_digits - cannot_contain_089 + inline: true source: openapi: ../openapi.json DevicePropertiesCodeConstraintsItemZero: @@ -8904,6 +8947,7 @@ types: enum: - name_length - name_must_be_unique + inline: true source: openapi: ../openapi.json DevicePropertiesCodeConstraintsItemMaxLength: @@ -9210,6 +9254,7 @@ types: - ios_phone - android_phone docs: Type of the device. + inline: true source: openapi: ../openapi.json UnmanagedDeviceCapabilitiesSupportedItem: @@ -9220,6 +9265,7 @@ types: - thermostat - battery - phone + inline: true source: openapi: ../openapi.json UnmanagedDeviceErrorsItem: @@ -9265,6 +9311,7 @@ types: - low - good - full + inline: true source: openapi: ../openapi.json UnmanagedDevicePropertiesBattery: @@ -9484,6 +9531,7 @@ types: - tedee - honeywell_resideo - latch + inline: true source: openapi: ../openapi.json DeviceProviderProviderCategoriesItem: @@ -9493,6 +9541,7 @@ types: - thermostats - noise_sensors - access_control_systems + inline: true source: openapi: ../openapi.json DeviceProvider: @@ -9568,6 +9617,7 @@ types: - healthy - degraded - down + inline: true source: openapi: ../openapi.json ServiceHealth: @@ -9614,6 +9664,7 @@ types: - visionline_system - assa_abloy_credential_service - latch_building + inline: true source: openapi: ../openapi.json AcsSystemSystemType: @@ -9632,6 +9683,7 @@ types: deprecated: use external_type --- + inline: true source: openapi: ../openapi.json AcsSystemErrorsItemSeamBridgeDisconnected: @@ -9714,6 +9766,7 @@ types: deprecated: use external_type --- + inline: true source: openapi: ../openapi.json AcsAccessGroupExternalType: @@ -9722,6 +9775,7 @@ types: - pti_access_level - salto_access_group - brivo_group + inline: true source: openapi: ../openapi.json AcsAccessGroup: @@ -9768,6 +9822,7 @@ types: - hid_credential_manager_user - salto_site_user - latch_user + inline: true source: openapi: ../openapi.json AcsUserAccessSchedule: @@ -9848,6 +9903,7 @@ types: - common - value: common (PMS) name: CommonPms + inline: true source: openapi: ../openapi.json AcsEntranceVisionlineMetadataProfilesItemVisionlineDoorProfileType: @@ -9855,6 +9911,7 @@ types: - BLE - commonDoor - touch + inline: true source: openapi: ../openapi.json AcsEntranceVisionlineMetadataProfilesItem: @@ -9938,6 +9995,7 @@ types: - code - card - mobile_key + inline: true source: openapi: ../openapi.json AcsCredentialExternalType: @@ -9946,6 +10004,7 @@ types: - brivo_credential - hid_credential - visionline_card + inline: true source: openapi: ../openapi.json AcsCredentialErrorsItem: @@ -9966,6 +10025,7 @@ types: enum: - guest - staff + inline: true source: openapi: ../openapi.json AcsCredentialVisionlineMetadata: @@ -10047,6 +10107,7 @@ types: enum: - android_phone - ios_phone + inline: true source: openapi: ../openapi.json PhoneCapabilitiesSupportedItem: @@ -10057,6 +10118,7 @@ types: - thermostat - battery - phone + inline: true source: openapi: ../openapi.json PhonePropertiesAssaAbloyCredentialServiceMetadataEndpointsItem: @@ -10977,6 +11039,7 @@ types: "throw", "create_random_code", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -11001,6 +11064,7 @@ types: "value": "1d", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -11036,6 +11100,7 @@ types: "value": "1d", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -11127,6 +11192,7 @@ types: "value": "1d", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -11136,6 +11202,7 @@ types: "ongoing", "time_bound", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -11165,6 +11232,7 @@ types: - value: 1d name: OneD default: 1hour + inline: true source: openapi: ../openapi.json AccessCodesCreateResponse: @@ -11179,6 +11247,7 @@ types: - throw - create_random_code default: throw + inline: true source: openapi: ../openapi.json AccessCodesCreateMultipleRequestMaxTimeRounding: @@ -11192,6 +11261,7 @@ types: - value: 1d name: OneD default: 1hour + inline: true source: openapi: ../openapi.json AccessCodesCreateMultipleResponse: @@ -11241,12 +11311,14 @@ types: - value: 1d name: OneD default: 1hour + inline: true source: openapi: ../openapi.json AccessCodesUpdateRequestType: enum: - ongoing - time_bound + inline: true source: openapi: ../openapi.json AccessCodesUpdateResponse: @@ -14300,6 +14372,7 @@ service: "card", "mobile_key", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -14342,6 +14415,7 @@ service: "TLCode", "rfid48", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -14352,6 +14426,7 @@ service: "guest", "staff", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -14448,12 +14523,14 @@ types: - code - card - mobile_key + inline: true source: openapi: ../openapi.json CredentialsCreateRequestVisionlineMetadataCardFormat: enum: - TLCode - rfid48 + inline: true source: openapi: ../openapi.json CredentialsCreateRequestVisionlineMetadataCardFunctionType: @@ -14461,6 +14538,7 @@ types: - guest - staff default: guest + inline: true source: openapi: ../openapi.json CredentialsCreateRequestVisionlineMetadata: @@ -18950,6 +19028,7 @@ service: "hid_cm", "google_nest", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -18982,6 +19061,7 @@ service: "single", "multiple", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -18995,6 +19075,7 @@ service: "access_control_systems", "internal_beta", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -19063,6 +19144,7 @@ service: - none - single - multiple + inline: true source: openapi: ../openapi.json ConnectWebviewsCreateRequestAcceptedProvidersItem: @@ -19107,6 +19189,7 @@ service: - yale_access - hid_cm - google_nest + inline: true source: openapi: ../openapi.json ConnectWebviewsCreateRequestProviderCategory: @@ -19117,6 +19200,7 @@ service: - noise_sensors - access_control_systems - internal_beta + inline: true source: openapi: ../openapi.json ConnectWebviewsCreateRequestCustomMetadataValue: @@ -20645,6 +20729,7 @@ service: "noise_sensors", "access_control_systems", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -20709,6 +20794,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -20749,6 +20835,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -20763,6 +20850,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -20777,6 +20865,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -20818,6 +20907,7 @@ service: "tedee", "honeywell_resideo", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -20924,6 +21014,7 @@ service: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json DevicesListRequestDeviceTypesItem: @@ -20961,6 +21052,7 @@ service: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json DevicesListRequestManufacturer: @@ -20999,6 +21091,7 @@ service: - dormakaba_oracode - tedee - honeywell_resideo + inline: true source: openapi: ../openapi.json DevicesListRequestCustomMetadataHasValue: @@ -21018,6 +21111,7 @@ service: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json DevicesListRequestExcludeIfItem: @@ -21029,6 +21123,7 @@ service: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json DevicesListResponse: @@ -21044,6 +21139,7 @@ service: - thermostats - noise_sensors - access_control_systems + inline: true source: openapi: ../openapi.json DevicesListDeviceProvidersResponse: @@ -22139,6 +22235,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -22179,6 +22276,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -22193,6 +22291,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -22207,6 +22306,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -22248,6 +22348,7 @@ service: "tedee", "honeywell_resideo", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -22319,6 +22420,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json UnmanagedListRequestDeviceTypesItem: @@ -22356,6 +22458,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json UnmanagedListRequestManufacturer: @@ -22394,6 +22497,7 @@ types: - dormakaba_oracode - tedee - honeywell_resideo + inline: true source: openapi: ../openapi.json UnmanagedListRequestCustomMetadataHasValue: @@ -22413,6 +22517,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json UnmanagedListRequestExcludeIfItem: @@ -22424,6 +22529,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json UnmanagedListResponse: @@ -23062,6 +23168,7 @@ service: "value": "action_attempt.unlock_door.failed", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -23301,6 +23408,7 @@ service: "value": "action_attempt.unlock_door.failed", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -23454,6 +23562,7 @@ types: name: ActionAttemptUnlockDoorSucceeded - value: action_attempt.unlock_door.failed name: ActionAttemptUnlockDoorFailed + inline: true source: openapi: ../openapi.json EventsListRequestEventTypesItem: @@ -23574,6 +23683,7 @@ types: name: ActionAttemptUnlockDoorSucceeded - value: action_attempt.unlock_door.failed name: ActionAttemptUnlockDoorFailed + inline: true source: openapi: ../openapi.json EventsListResponse: @@ -24625,6 +24735,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -24665,6 +24776,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -24679,6 +24791,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -24693,6 +24806,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -24734,6 +24848,7 @@ service: "tedee", "honeywell_resideo", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -24819,6 +24934,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json LocksListRequestDeviceTypesItem: @@ -24856,6 +24972,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json LocksListRequestManufacturer: @@ -24894,6 +25011,7 @@ types: - dormakaba_oracode - tedee - honeywell_resideo + inline: true source: openapi: ../openapi.json LocksListRequestCustomMetadataHasValue: @@ -24913,6 +25031,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json LocksListRequestExcludeIfItem: @@ -24924,6 +25043,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json LocksListResponse: @@ -27057,6 +27177,7 @@ service: "android", "ios", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -27080,6 +27201,7 @@ service: - android - ios default: android + inline: true source: openapi: ../openapi.json SimulateCreateSandboxPhoneRequestPhoneMetadata: @@ -28118,6 +28240,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -28158,6 +28281,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -28172,6 +28296,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -28186,6 +28311,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -28227,6 +28353,7 @@ service: "tedee", "honeywell_resideo", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -28258,6 +28385,7 @@ service: "auto", "on", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -28267,6 +28395,7 @@ service: "auto", "on", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -28306,6 +28435,7 @@ service: "cool", "heat_cool", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -28384,6 +28514,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json ThermostatsListRequestDeviceTypesItem: @@ -28421,6 +28552,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json ThermostatsListRequestManufacturer: @@ -28459,6 +28591,7 @@ types: - dormakaba_oracode - tedee - honeywell_resideo + inline: true source: openapi: ../openapi.json ThermostatsListRequestCustomMetadataHasValue: @@ -28478,6 +28611,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json ThermostatsListRequestExcludeIfItem: @@ -28489,6 +28623,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json ThermostatsListResponse: @@ -28507,12 +28642,14 @@ types: enum: - auto - 'on' + inline: true source: openapi: ../openapi.json ThermostatsSetFanModeRequestFanModeSetting: enum: - auto - 'on' + inline: true source: openapi: ../openapi.json ThermostatsSetFanModeResponse: @@ -28527,6 +28664,7 @@ types: - heat - cool - heat_cool + inline: true source: openapi: ../openapi.json ThermostatsUpdateRequestDefaultClimateSetting: @@ -29480,6 +29618,7 @@ service: "cool", "heat_cool", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -29534,6 +29673,7 @@ service: "cool", "heat_cool", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -29558,6 +29698,7 @@ service: - heat - cool - heat_cool + inline: true source: openapi: ../openapi.json ClimateSettingSchedulesCreateResponse: @@ -29589,6 +29730,7 @@ service: - heat - cool - heat_cool + inline: true source: openapi: ../openapi.json ClimateSettingSchedulesUpdateResponse: @@ -32811,6 +32953,7 @@ service: "circle", "square", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -32866,6 +33009,7 @@ service: enum: - circle - square + inline: true source: openapi: ../openapi.json WorkspacesCreateResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/squidex.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/squidex.json index a0153219d83..247a8055f29 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/squidex.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/squidex.json @@ -5435,6 +5435,7 @@ "User", "Group", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -5878,6 +5879,7 @@ "Path", "Items", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -5926,6 +5928,7 @@ "Image", "FileName", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -5982,6 +5985,7 @@ "Audio", "Video", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -6219,6 +6223,7 @@ "Checkbox", "Toggle", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -6281,6 +6286,7 @@ "Move", "Delete", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -6345,6 +6351,7 @@ "Update", "Validate", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -6962,6 +6969,7 @@ "Now", "Today", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -6972,6 +6980,7 @@ "Date", "DateTime", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -7519,6 +7528,7 @@ "Hide", "Require", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -7612,6 +7622,7 @@ "TIFF", "WEBP", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -7624,6 +7635,7 @@ "Completed", "Failed", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -7830,6 +7842,7 @@ "Dropdown", "Stars", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -8054,6 +8067,7 @@ "NoPermission", "ManagedByTeam", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -8135,6 +8149,7 @@ "Checkboxes", "Input", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -8220,6 +8235,7 @@ "Min", "Stretch", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -8618,6 +8634,7 @@ "TextArea", "Url", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -8631,6 +8648,7 @@ "Failed", "Cancelled", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -8643,6 +8661,7 @@ "Failed", "Timeout", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -8930,6 +8949,7 @@ "Singleton", "Component", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -9003,6 +9023,7 @@ "Rule", "Schema", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -9146,6 +9167,7 @@ "WrongEvent", "WrongEventForTrigger", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -9196,6 +9218,7 @@ "Ascending", "Descending", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -9251,6 +9274,7 @@ "Html", "Markdown", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -9269,6 +9293,7 @@ "StockPhoto", "TextArea", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -9365,6 +9390,7 @@ "Checkboxes", "Dropdown", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -9529,6 +9555,7 @@ "Unauthorized", "Failed", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -9940,6 +9967,7 @@ "DELETE", "PATCH", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/suger.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/suger.json index 72124106e57..d8bf6e9ae50 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/suger.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/suger.json @@ -509,6 +509,7 @@ "Monthly", "Annual", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -533,6 +534,7 @@ "Engineering", "ChannelManager", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -607,6 +609,7 @@ "StopSelling", "Terminated", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -729,6 +732,7 @@ "cspCustomer", "billingGroup", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -775,6 +779,7 @@ "percentage", "absolute", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -785,6 +790,7 @@ "FLAT_RATE", "PER_USER", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -794,6 +800,7 @@ "customerPromotion", "cspPromotion", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -816,6 +823,7 @@ "withdrawn", "deleted", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -825,6 +833,7 @@ "pendingAcceptance", "accepted", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -850,6 +859,7 @@ "month", "year", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -884,6 +894,7 @@ "resourceNotFound", "schemaValidationError", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -893,6 +904,7 @@ "informational", "warning", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -943,6 +955,7 @@ "perMarket", "usd", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1007,6 +1020,7 @@ "perMarket", "usd", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1027,6 +1041,7 @@ "Month", "Year", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1050,6 +1065,7 @@ "Recurring", "Usage", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1073,6 +1089,7 @@ "sharedcore", "transactions", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1162,6 +1179,7 @@ "Public", "Private", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1219,6 +1237,7 @@ "ListingImage", "ListingVideo", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1231,6 +1250,7 @@ "Processed", "ProcessFailed", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1305,6 +1325,7 @@ "value": "contact-me", }, ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1314,6 +1335,7 @@ "ListingOnly", "ListAndSell", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1344,6 +1366,7 @@ "Inprogress", "Published", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1359,6 +1382,7 @@ "Published", "InStore", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1428,6 +1452,7 @@ "AzureSkuVariant", "AzureTestDriveVariant", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1437,6 +1462,7 @@ "InActive", "Active", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1460,6 +1486,7 @@ "Days", "Months", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1471,6 +1498,7 @@ "TimedUsage", "Unlimited", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1667,6 +1695,7 @@ This member is required.", "InvalidQuantity", "BadArgument", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2168,6 +2197,7 @@ in the google.rpc.Status.details field, or localized by the client.", "CONFIRMED", "PENDING_CONFIRMATION", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2283,6 +2313,7 @@ in the google.rpc.Status.details field, or localized by the client.", "Update", "Delete", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -2292,6 +2323,7 @@ in the google.rpc.Status.details field, or localized by the client.", "None", "Csp", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -2301,6 +2333,7 @@ in the google.rpc.Status.details field, or localized by the client.", "None", "DryRun", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -2313,6 +2346,7 @@ in the google.rpc.Status.details field, or localized by the client.", "Suspended", "Unsubscribed", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2434,6 +2468,7 @@ in the google.rpc.Status.details field, or localized by the client.", "MONTH", "YEAR", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2443,6 +2478,7 @@ in the google.rpc.Status.details field, or localized by the client.", "FLAT_RATE", "PER_USER", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2567,6 +2603,7 @@ in the google.rpc.Status.details field, or localized by the client.", "QuantityChange", "Signup", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2593,6 +2630,7 @@ in the google.rpc.Status.details field, or localized by the client.", "ENTITLEMENT_TERM", "INTEGRATION", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2609,6 +2647,7 @@ in the google.rpc.Status.details field, or localized by the client.", "ISV", "CURRENT", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2714,6 +2753,7 @@ in the google.rpc.Status.details field, or localized by the client.", "USAGE", "SUBSCRIPTION_PLUS_USAGE", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3069,6 +3109,7 @@ This field is present only if the product has usage-based billing configured.", "value": "ENTITLEMENT_SUSPENDED", }, ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3138,6 +3179,7 @@ This field is present only if the product has usage-based billing configured.", "APPROVED", "REJECTED", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3153,6 +3195,7 @@ This field is present only if the product has usage-based billing configured.", "value": "ACCOUNT_ACTIVE", }, ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3273,6 +3316,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3301,6 +3345,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3311,6 +3356,7 @@ This field is present only if the product has usage-based billing configured.", "VERIFIED", "NOT_VERIFIED", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3589,6 +3635,7 @@ This field is present only if the product has usage-based billing configured.", "NOTIFY_CONTACTS", "TEST", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3604,6 +3651,7 @@ This field is present only if the product has usage-based billing configured.", "DONE", "FAILED", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3671,6 +3719,7 @@ This field is present only if the product has usage-based billing configured.", "PRIVATE", "PUBLIC", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3863,6 +3912,7 @@ This field is present only if the product has usage-based billing configured.", "CollectableAmount", "DisbursedAmount", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3984,6 +4034,7 @@ This field is present only if the product has usage-based billing configured.", "DISTRIBUTION", "MONEY", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -4025,6 +4076,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -4037,6 +4089,7 @@ This field is present only if the product has usage-based billing configured.", "PENDING_START", "UNKNOWN", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -4076,6 +4129,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -4123,6 +4177,7 @@ This field is present only if the product has usage-based billing configured.", "PRIVATE", "UNKNOWN", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -4133,6 +4188,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -4150,6 +4206,7 @@ This field is present only if the product has usage-based billing configured.", "CANCEL_FAILED", "CANCEL_SUCCESS", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -4183,6 +4240,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -4196,6 +4254,7 @@ This field is present only if the product has usage-based billing configured.", "PER_USER", "USAGE_BASED", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -4409,6 +4468,7 @@ the same customer, dimension, and time, but a different quantity.", "CustomerNotSubscribed", "DuplicateRecord", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -4738,6 +4798,7 @@ types: enum: - Monthly - Annual + inline: true source: openapi: ../swagger.json AzureIncludedBaseQuantity: @@ -4752,6 +4813,7 @@ types: - CustomerSupport - Engineering - ChannelManager + inline: true source: openapi: ../swagger.json AzureListingContact: @@ -4797,6 +4859,7 @@ types: - Enabled - StopSelling - Terminated + inline: true source: openapi: ../swagger.json AzureMarketState: @@ -4823,6 +4886,7 @@ types: enum: - customerPromotion - cspPromotion + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOfferState: @@ -4831,12 +4895,14 @@ types: - live - withdrawn - deleted + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOfferSubState: enum: - pendingAcceptance - accepted + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOffer: @@ -4905,6 +4971,7 @@ types: enum: - cspCustomer - billingGroup + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOfferBeneficiaryRecipient: @@ -4917,6 +4984,7 @@ types: enum: - percentage - absolute + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOfferPricingPlanType: @@ -4924,6 +4992,7 @@ types: - FLAT_RATE - PER_USER docs: The type of the plan, FLAT_RATE or PER_USER. + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOfferPricing: @@ -4964,6 +5033,7 @@ types: - week - month - year + inline: true source: openapi: ../swagger.json AzureMarketplaceTerm: @@ -4989,12 +5059,14 @@ types: - productLocked - resourceNotFound - schemaValidationError + inline: true source: openapi: ../swagger.json AzureMarketplaceValidationLevel: enum: - informational - warning + inline: true source: openapi: ../swagger.json AzureMarketplaceValidation: @@ -5026,6 +5098,7 @@ types: - perMarket - usd docs: default "usd" + inline: true source: openapi: ../swagger.json AzurePriceAndAvailabilityPrivateOfferCustomMeters: @@ -5059,6 +5132,7 @@ types: - perMarket - usd docs: default "usd" + inline: true source: openapi: ../swagger.json AzurePriceAndAvailabilityRecurrentPrice: @@ -5081,6 +5155,7 @@ types: enum: - Month - Year + inline: true source: openapi: ../swagger.json AzurePriceCadence: @@ -5094,6 +5169,7 @@ types: - Flat - Recurring - Usage + inline: true source: openapi: ../swagger.json AzurePriceSchedule: @@ -5108,6 +5184,7 @@ types: enum: - sharedcore - transactions + inline: true source: openapi: ../swagger.json AzurePricingUnit: @@ -5163,6 +5240,7 @@ types: enum: - Public - Private + inline: true source: openapi: ../swagger.json AzureProductFeatureAvailability: @@ -5210,6 +5288,7 @@ types: - ListingAsset - ListingImage - ListingVideo + inline: true source: openapi: ../swagger.json AzureProductListingAssetState: @@ -5219,6 +5298,7 @@ types: - InProcessing - Processed - ProcessFailed + inline: true source: openapi: ../swagger.json AzureProductListingAsset: @@ -5274,12 +5354,14 @@ types: name: FreeTrial - value: contact-me name: ContactMe + inline: true source: openapi: ../swagger.json AzureProductSetupSellingOption: enum: - ListingOnly - ListAndSell + inline: true source: openapi: ../swagger.json AzureProductSetup: @@ -5297,6 +5379,7 @@ types: enum: - Inprogress - Published + inline: true source: openapi: ../swagger.json AzureProductSubmissionSubState: @@ -5309,6 +5392,7 @@ types: - Publishing - Published - InStore + inline: true source: openapi: ../swagger.json AzureProductSubmission: @@ -5331,12 +5415,14 @@ types: enum: - AzureSkuVariant - AzureTestDriveVariant + inline: true source: openapi: ../swagger.json AzureProductVariantState: enum: - InActive - Active + inline: true source: openapi: ../swagger.json AzureProductVariant: @@ -5386,6 +5472,7 @@ types: - Minute - Days - Months + inline: true source: openapi: ../swagger.json AzureProductVariantTrialType: @@ -5394,6 +5481,7 @@ types: - TimedAccess - TimedUsage - Unlimited + inline: true source: openapi: ../swagger.json AzureProductVariantTrial: @@ -5992,18 +6080,21 @@ types: - Read - Update - Delete + inline: true source: openapi: ../swagger.json SharedAzureMarketplaceSubscriptionSandboxType: enum: - None - Csp + inline: true source: openapi: ../swagger.json SharedAzureMarketplaceSubscriptionSessionMode: enum: - None - DryRun + inline: true source: openapi: ../swagger.json SharedAzureMarketplaceSubscription: @@ -6787,6 +6878,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedIdentityBuyer: @@ -6807,6 +6899,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedIdentityIntegrationStatus: @@ -6814,6 +6907,7 @@ types: - CREATED - VERIFIED - NOT_VERIFIED + inline: true source: openapi: ../swagger.json SharedIdentityIntegration: @@ -7050,6 +7144,7 @@ types: - PRIVATE - PUBLIC docs: The default visibility of offer is PRIVATE. + inline: true source: openapi: ../swagger.json SharedOfferInfo: @@ -7340,6 +7435,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedWorkloadEntitlementStatus: @@ -7349,6 +7445,7 @@ types: - SUSPENDED - PENDING_START - UNKNOWN + inline: true source: openapi: ../swagger.json SharedWorkloadEntitlement: @@ -7381,6 +7478,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedWorkloadEntitlementTerm: @@ -7416,6 +7514,7 @@ types: - PER_USER - PRIVATE - UNKNOWN + inline: true source: openapi: ../swagger.json SharedWorkloadOfferPartner: @@ -7423,6 +7522,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedWorkloadOfferStatus: @@ -7437,6 +7537,7 @@ types: - PENDING_CANCEL - CANCEL_FAILED - CANCEL_SUCCESS + inline: true source: openapi: ../swagger.json SharedWorkloadOffer: @@ -7469,6 +7570,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedWorkloadProductProductType: @@ -7479,6 +7581,7 @@ types: - FLAT_RATE - PER_USER - USAGE_BASED + inline: true source: openapi: ../swagger.json SharedWorkloadProduct: @@ -8996,6 +9099,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -10480,6 +10584,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -10489,6 +10594,7 @@ service: "MARKETPLACE", "CRM", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -10499,6 +10605,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -10508,6 +10615,7 @@ service: "MARKETPLACE", "CRM", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -10518,6 +10626,7 @@ service: "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -10528,6 +10637,7 @@ service: "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -10538,6 +10648,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -10547,6 +10658,7 @@ service: "MARKETPLACE", "CRM", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -10557,6 +10669,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -10566,6 +10679,7 @@ service: "MARKETPLACE", "CRM", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -10985,6 +11099,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json GetIntegrationRequestPartner: @@ -11031,6 +11146,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json VerifyIntegrationRequestPartner: @@ -13146,6 +13262,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -14465,6 +14582,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -15210,6 +15328,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -15220,6 +15339,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -15231,6 +15351,7 @@ service: "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -15258,6 +15379,7 @@ service: - AZURE - GCP docs: Required. + inline: true source: openapi: ../swagger.json imports: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/switchboard.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/switchboard.json index a1ceab6b0ca..df185a8d563 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/switchboard.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/switchboard.json @@ -203,6 +203,7 @@ "partial_success", "failure", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -648,6 +649,7 @@ "running", "ended", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -815,6 +817,7 @@ types: - success - partial_success - failure + inline: true source: openapi: ../openapi.yml ExternalSessionAiResponseMetadata: @@ -1098,6 +1101,7 @@ types: - running - ended docs: Status of the session + inline: true source: openapi: ../openapi.yml StatusMessage: @@ -2484,6 +2488,7 @@ service: "running", "ended", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/uploadcare.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/uploadcare.json index d7619a2c760..6869002d6b3 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/uploadcare.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/uploadcare.json @@ -1505,6 +1505,7 @@ that are tool old (or that have not been created at all). "HSV", "LAB", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1838,6 +1839,7 @@ See [docs](https://uploadcare.com/docs/file-metadata/) and [REST API v0.7](/api- "HSV", "LAB", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1916,6 +1918,7 @@ change the value to `auto`. }, "auto", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2641,6 +2644,7 @@ change the value to `auto`. - HSV - LAB docs: Image color mode. + inline: true source: openapi: ../openapi.json ImageInfoGeoLocation: @@ -2765,6 +2769,7 @@ change the value to `auto`. - HSV - LAB docs: Image color mode. + inline: true source: openapi: ../openapi.json SchemasImageInfoGeoLocation: @@ -6177,6 +6182,7 @@ this request will return information about the already uploaded file. "value": "1", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -6196,6 +6202,7 @@ to the value of the `check_URL_duplicates` parameter. "value": "1", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -6289,6 +6296,7 @@ types: this request will return information about the already uploaded file. default: '0' + inline: true source: openapi: ../openapi.json FromUrlUploadRequestSaveUrlDuplicates: @@ -6301,6 +6309,7 @@ types: Determines if the requested `source_url` should be kept in the history of fetched/uploaded URLs. If the value is not defined explicitly, it is set to the value of the `check_URL_duplicates` parameter. + inline: true source: openapi: ../openapi.json FromUrlUploadResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/valtown.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/valtown.json index 9fe9e1bf06a..98f13da2cd0 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/valtown.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/valtown.json @@ -215,6 +215,7 @@ "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -230,6 +231,7 @@ "rpc", "httpnext", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -422,6 +424,7 @@ "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -437,6 +440,7 @@ "rpc", "httpnext", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -728,6 +732,7 @@ This value is not specified if the SQL statement was not an INSERT or if the tab docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml ExtendedValType: @@ -743,6 +748,7 @@ This value is not specified if the SQL statement was not an INSERT or if the tab The type of a val. HTTP can receive web requests, Email can receive emails, Cron runs periodically, and Script can be used for libraries or one-off calculations + inline: true source: openapi: ../openapi.yml ExtendedValLinks: @@ -841,6 +847,7 @@ This value is not specified if the SQL statement was not an INSERT or if the tab docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml BasicValType: @@ -856,6 +863,7 @@ This value is not specified if the SQL statement was not an INSERT or if the tab The type of a val. HTTP can receive web requests, Email can receive emails, Cron runs periodically, and Script can be used for libraries or one-off calculations + inline: true source: openapi: ../openapi.yml BasicValLinks: @@ -1277,6 +1285,7 @@ API endpoints", "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1292,6 +1301,7 @@ API endpoints", "rpc", "httpnext", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1390,6 +1400,7 @@ types: docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml AliasValResponseType: @@ -1405,6 +1416,7 @@ types: The type of a val. HTTP can receive web requests, Email can receive emails, Cron runs periodically, and Script can be used for libraries or one-off calculations + inline: true source: openapi: ../openapi.yml AliasValResponseLinks: @@ -2358,6 +2370,7 @@ give access to details and data from the requesting user.", "received", "given", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2484,6 +2497,7 @@ give access to details and data from the requesting user.", "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2569,6 +2583,7 @@ give access to details and data from the requesting user.", "free", "pro", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2705,6 +2720,7 @@ give access to details and data from the requesting user.", - free - pro docs: Your account tier + inline: true source: openapi: ../openapi.yml MeGetResponse: @@ -2775,6 +2791,7 @@ give access to details and data from the requesting user.", docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml MeCommentsResponseDataItemValAuthor: @@ -3471,6 +3488,7 @@ docs: Search "read", "deferred", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3608,6 +3626,7 @@ docs: Search - write - read - deferred + inline: true source: openapi: ../openapi.yml imports: @@ -4855,6 +4874,7 @@ let you get, create, and run vals.", "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4867,6 +4887,7 @@ let you get, create, and run vals.", "script", "email", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4878,6 +4899,7 @@ let you get, create, and run vals.", "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4890,6 +4912,7 @@ let you get, create, and run vals.", "script", "email", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4943,6 +4966,7 @@ let you get, create, and run vals.", "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4954,6 +4978,7 @@ let you get, create, and run vals.", "script", "email", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4989,6 +5014,7 @@ let you get, create, and run vals.", docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml ValsCreateRequestType: @@ -5000,6 +5026,7 @@ let you get, create, and run vals.", The type of the val you want to create. Note that this does not include interval vals, because they cannot be created through the API yet. default: script + inline: true source: openapi: ../openapi.yml ValsUpdateRequestPrivacy: @@ -5010,6 +5037,7 @@ let you get, create, and run vals.", docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml ValsUpdateRequestType: @@ -5020,6 +5048,7 @@ let you get, create, and run vals.", docs: >- The type of the val you want to update. Note that this does not include interval vals, because they cannot be created through the API yet. + inline: true source: openapi: ../openapi.yml ValsListResponseDataItem: @@ -5053,6 +5082,7 @@ let you get, create, and run vals.", docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml ValsCreateVersionRequestType: @@ -5064,6 +5094,7 @@ let you get, create, and run vals.", The type of the val you want to create. Note that this does not include interval vals, because they cannot be created through the API yet. default: script + inline: true source: openapi: ../openapi.yml ValsCancelResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/vellum.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/vellum.json index 55d38ec4f57..d76118da1db 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/vellum.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/vellum.json @@ -755,6 +755,7 @@ Used to submit feedback regarding the quality of previously generated completion "JINJA", "FUNCTION_DEFINITION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -792,6 +793,7 @@ Used to submit feedback regarding the quality of previously generated completion "USER", "FUNCTION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -823,6 +825,7 @@ Used to submit feedback regarding the quality of previously generated completion "STRING", "JSON", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -922,6 +925,7 @@ Used to submit feedback regarding the quality of previously generated completion "INACTIVE", "ARCHIVED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1069,6 +1073,7 @@ Used to submit feedback regarding the quality of previously generated completion "ACTIVE", "ARCHIVED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1126,6 +1131,7 @@ Used to submit feedback regarding the quality of previously generated completion "STAGING", "PRODUCTION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1165,6 +1171,7 @@ Used to submit feedback regarding the quality of previously generated completion "STOP", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1321,6 +1328,7 @@ Used to submit feedback regarding the quality of previously generated completion "INDEXED", "FAILED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1332,6 +1340,7 @@ Used to submit feedback regarding the quality of previously generated completion "ALL", "NONE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1343,6 +1352,7 @@ Used to submit feedback regarding the quality of previously generated completion "GENERATE", "CLASSIFY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1524,6 +1534,7 @@ Used to submit feedback regarding the quality of previously generated completion "CREATION_FAILED", "DISABLED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1625,6 +1636,7 @@ Used to submit feedback regarding the quality of previously generated completion "PROCESSED", "FAILED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1812,6 +1824,7 @@ Used to submit feedback regarding the quality of previously generated completion "OPENAI", "PYQ", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2083,6 +2096,7 @@ Used to submit feedback regarding the quality of previously generated completion "TEXT", "CHAT_HISTORY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2506,6 +2520,7 @@ Used to submit feedback regarding the quality of previously generated completion "WORKFLOW_INITIALIZATION", "NODE_EXECUTION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2579,6 +2594,7 @@ Used to submit feedback regarding the quality of previously generated completion "FULFILLED", "REJECTED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/webflow.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/webflow.json index 990b700a52c..4b4d4e67bf2 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/webflow.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/webflow.json @@ -4095,6 +4095,7 @@ "value": "site_config:write", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8919,6 +8920,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "value": "-CreatedOn", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11313,6 +11315,7 @@ service: "Color", "ExtFileRef", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11408,6 +11411,7 @@ service: "Color", "ExtFileRef", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11510,6 +11514,7 @@ service: - Color - ExtFileRef docs: Choose these appropriate field type for your collection data + inline: true source: openapi: ../openapi.yml CollectionsCreateResponseFieldsItem: @@ -11585,6 +11590,7 @@ service: - Color - ExtFileRef docs: Choose these appropriate field type for your collection data + inline: true source: openapi: ../openapi.yml CollectionsGetResponseFieldsItem: @@ -12042,6 +12048,7 @@ service: "Color", "File", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12100,6 +12107,7 @@ service: "Color", "ExtFileRef", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12158,6 +12166,7 @@ service: "Color", "ExtFileRef", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12181,6 +12190,7 @@ service: - Color - File docs: Choose these appropriate field type for your collection data + inline: true source: openapi: ../openapi.yml FieldsCreateResponseType: @@ -12199,6 +12209,7 @@ service: - Color - ExtFileRef docs: Choose these appropriate field type for your collection data + inline: true source: openapi: ../openapi.yml FieldsCreateResponse: @@ -12245,6 +12256,7 @@ service: - Color - ExtFileRef docs: Choose these appropriate field type for your collection data + inline: true source: openapi: ../openapi.yml FieldsUpdateResponse: @@ -13737,6 +13749,7 @@ service: "name", "slug", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13746,6 +13759,7 @@ service: "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13852,6 +13866,7 @@ service: "name", "slug", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13861,6 +13876,7 @@ service: "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16147,6 +16163,7 @@ service: "Phone", "Number", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16314,6 +16331,7 @@ service: "Phone", "Number", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16533,6 +16551,7 @@ service: - Phone - Number docs: The field type + inline: true source: openapi: ../openapi.yml FormsListResponseFormsItemFieldsValue: @@ -16645,6 +16664,7 @@ service: - Phone - Number docs: The field type + inline: true source: openapi: ../openapi.yml FormsGetResponseFieldsValue: @@ -17363,6 +17383,7 @@ Required scope | `ecommerce:write` "infinite", "finite", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17394,6 +17415,7 @@ Required scope | `ecommerce:write` "infinite", "finite", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17404,6 +17426,7 @@ Required scope | `ecommerce:write` "infinite", "finite", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17435,6 +17458,7 @@ Required scope | `ecommerce:write` "infinite", "finite", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17468,6 +17492,7 @@ Required scope | `ecommerce:write` - infinite - finite docs: infinite or finite + inline: true source: openapi: ../openapi.yml InventoryListResponse: @@ -17491,6 +17516,7 @@ Required scope | `ecommerce:write` - infinite - finite docs: infinite or finite + inline: true source: openapi: ../openapi.yml InventoryUpdateResponseInventoryType: @@ -17498,6 +17524,7 @@ Required scope | `ecommerce:write` - infinite - finite docs: infinite or finite + inline: true source: openapi: ../openapi.yml InventoryUpdateResponse: @@ -17521,6 +17548,7 @@ Required scope | `ecommerce:write` - infinite - finite docs: infinite or finite + inline: true source: openapi: ../openapi.yml EcommInventoryChangedPayload: @@ -20253,6 +20281,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20263,6 +20292,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20339,6 +20369,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20349,6 +20380,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20410,6 +20442,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20753,6 +20786,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20763,6 +20797,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20781,6 +20816,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20828,6 +20864,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20968,6 +21005,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21219,6 +21257,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21229,6 +21268,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21305,6 +21345,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21315,6 +21356,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21376,6 +21418,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21719,6 +21762,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21729,6 +21773,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21747,6 +21792,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21794,6 +21840,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21934,6 +21981,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22185,6 +22233,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22195,6 +22244,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22271,6 +22321,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22281,6 +22332,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22342,6 +22394,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22685,6 +22738,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22695,6 +22749,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22713,6 +22768,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22760,6 +22816,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22900,6 +22957,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22958,6 +23016,7 @@ Required scope | `ecommerce:write` "disputed", "unfulfilled", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -23184,6 +23243,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23194,6 +23254,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23270,6 +23331,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23280,6 +23342,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23341,6 +23404,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23684,6 +23748,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23694,6 +23759,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23712,6 +23778,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23759,6 +23826,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23899,6 +23967,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23973,6 +24042,7 @@ Required scope | `ecommerce:write` "fraudulent", "requested", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -24182,6 +24252,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -24192,6 +24263,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -24268,6 +24340,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -24278,6 +24351,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -24339,6 +24413,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -24682,6 +24757,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -24692,6 +24768,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -24710,6 +24787,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -24757,6 +24835,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -24897,6 +24976,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -25148,6 +25228,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -25158,6 +25239,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -25234,6 +25316,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -25244,6 +25327,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -25305,6 +25389,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -25648,6 +25733,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -25658,6 +25744,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -25676,6 +25763,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -25723,6 +25811,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -25863,6 +25952,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26114,6 +26204,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26124,6 +26215,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26200,6 +26292,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26210,6 +26303,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26271,6 +26365,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26614,6 +26709,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26624,6 +26720,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26642,6 +26739,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26689,6 +26787,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26829,6 +26928,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -27080,6 +27180,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -27090,6 +27191,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -27166,6 +27268,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -27176,6 +27279,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -27237,6 +27341,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -27580,6 +27685,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -27590,6 +27696,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -27608,6 +27715,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -27655,6 +27763,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -27795,6 +27904,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -28320,6 +28430,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemDisputeLastStatus: @@ -28335,6 +28446,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemCustomerPaid: @@ -28387,6 +28499,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemAllAddressesItemJapanType: @@ -28396,6 +28509,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemAllAddressesItem: @@ -28438,6 +28552,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemShippingAddressJapanType: @@ -28447,6 +28562,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemShippingAddress: @@ -28489,6 +28605,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemBillingAddressJapanType: @@ -28498,6 +28615,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemBillingAddress: @@ -28730,6 +28848,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemStripeCardExpires: @@ -28816,6 +28935,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemTotalsExtrasItemPrice: @@ -29071,6 +29191,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersGetResponseDisputeLastStatus: @@ -29086,6 +29207,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersGetResponseCustomerPaid: @@ -29138,6 +29260,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersGetResponseAllAddressesItemJapanType: @@ -29147,6 +29270,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersGetResponseAllAddressesItem: @@ -29189,6 +29313,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersGetResponseShippingAddressJapanType: @@ -29198,6 +29323,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersGetResponseShippingAddress: @@ -29240,6 +29366,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersGetResponseBillingAddressJapanType: @@ -29249,6 +29376,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersGetResponseBillingAddress: @@ -29481,6 +29609,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersGetResponseStripeCardExpires: @@ -29567,6 +29696,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersGetResponseTotalsExtrasItemPrice: @@ -29795,6 +29925,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseDisputeLastStatus: @@ -29810,6 +29941,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseCustomerPaid: @@ -29862,6 +29994,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseAllAddressesItemJapanType: @@ -29871,6 +30004,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseAllAddressesItem: @@ -29913,6 +30047,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseShippingAddressJapanType: @@ -29922,6 +30057,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseShippingAddress: @@ -29964,6 +30100,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseBillingAddressJapanType: @@ -29973,6 +30110,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseBillingAddress: @@ -30205,6 +30343,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseStripeCardExpires: @@ -30291,6 +30430,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseTotalsExtrasItemPrice: @@ -30519,6 +30659,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseDisputeLastStatus: @@ -30534,6 +30675,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseCustomerPaid: @@ -30586,6 +30728,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseAllAddressesItemJapanType: @@ -30595,6 +30738,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseAllAddressesItem: @@ -30637,6 +30781,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseShippingAddressJapanType: @@ -30646,6 +30791,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseShippingAddress: @@ -30688,6 +30834,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseBillingAddressJapanType: @@ -30697,6 +30844,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseBillingAddress: @@ -30929,6 +31077,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseStripeCardExpires: @@ -31015,6 +31164,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseTotalsExtrasItemPrice: @@ -31243,6 +31393,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseDisputeLastStatus: @@ -31258,6 +31409,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseCustomerPaid: @@ -31310,6 +31462,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseAllAddressesItemJapanType: @@ -31319,6 +31472,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseAllAddressesItem: @@ -31361,6 +31515,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseShippingAddressJapanType: @@ -31370,6 +31525,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseShippingAddress: @@ -31412,6 +31568,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseBillingAddressJapanType: @@ -31421,6 +31578,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseBillingAddress: @@ -31654,6 +31812,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseStripeCardExpires: @@ -31740,6 +31899,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseTotalsExtrasItemPrice: @@ -31963,6 +32123,7 @@ Required scope | `ecommerce:write` - fraudulent - requested docs: The reason for the refund + inline: true source: openapi: ../openapi.yml OrdersRefundResponseStatus: @@ -31976,6 +32137,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersRefundResponseDisputeLastStatus: @@ -31991,6 +32153,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersRefundResponseCustomerPaid: @@ -32043,6 +32206,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersRefundResponseAllAddressesItemJapanType: @@ -32052,6 +32216,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersRefundResponseAllAddressesItem: @@ -32094,6 +32259,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersRefundResponseShippingAddressJapanType: @@ -32103,6 +32269,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersRefundResponseShippingAddress: @@ -32145,6 +32312,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersRefundResponseBillingAddressJapanType: @@ -32154,6 +32322,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersRefundResponseBillingAddress: @@ -32386,6 +32555,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersRefundResponseStripeCardExpires: @@ -32472,6 +32642,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersRefundResponseTotalsExtrasItemPrice: @@ -32700,6 +32871,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadDisputeLastStatus: @@ -32715,6 +32887,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadCustomerPaid: @@ -32767,6 +32940,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadAllAddressesItemJapanType: @@ -32776,6 +32950,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadAllAddressesItem: @@ -32818,6 +32993,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadShippingAddressJapanType: @@ -32827,6 +33003,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadShippingAddress: @@ -32869,6 +33046,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadBillingAddressJapanType: @@ -32878,6 +33056,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadBillingAddress: @@ -33110,6 +33289,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadStripeCardExpires: @@ -33196,6 +33376,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadTotalsExtrasItemPrice: @@ -33424,6 +33605,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadDisputeLastStatus: @@ -33439,6 +33621,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadCustomerPaid: @@ -33491,6 +33674,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadAllAddressesItemJapanType: @@ -33500,6 +33684,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadAllAddressesItem: @@ -33542,6 +33727,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadShippingAddressJapanType: @@ -33551,6 +33737,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadShippingAddress: @@ -33593,6 +33780,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadBillingAddressJapanType: @@ -33602,6 +33790,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadBillingAddress: @@ -33834,6 +34023,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadStripeCardExpires: @@ -33920,6 +34110,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadTotalsExtrasItemPrice: @@ -36650,6 +36841,7 @@ Required scope | `pages:write` "text", "image", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -37578,6 +37770,7 @@ Required scope | `pages:write` enum: - text - image + inline: true source: openapi: ../openapi.yml PagesGetContentResponseNodesItemText: @@ -38445,6 +38638,7 @@ webhooks: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38482,6 +38676,7 @@ webhooks: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38540,6 +38735,7 @@ webhooks: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38555,6 +38751,7 @@ webhooks: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsGetCustomCodeResponseScriptsItem: @@ -38600,6 +38797,7 @@ webhooks: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsUpsertCustomCodeRequestScriptsItem: @@ -38632,6 +38830,7 @@ webhooks: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsUpsertCustomCodeResponseScriptsItem: @@ -39685,6 +39884,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -39848,6 +40048,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -39859,6 +40060,7 @@ Required scope | `ecommerce:write` "staging", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -39962,6 +40164,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -39996,6 +40199,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40028,6 +40232,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40162,6 +40367,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40325,6 +40531,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40428,6 +40635,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40462,6 +40670,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40494,6 +40703,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40522,6 +40732,7 @@ Required scope | `ecommerce:write` "staging", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40625,6 +40836,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40659,6 +40871,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40691,6 +40904,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40821,6 +41035,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40855,6 +41070,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40887,6 +41103,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41021,6 +41238,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41184,6 +41402,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41287,6 +41506,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41321,6 +41541,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41353,6 +41574,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41504,6 +41726,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41667,6 +41890,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41770,6 +41994,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41804,6 +42029,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41836,6 +42062,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41974,6 +42201,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42137,6 +42365,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42148,6 +42377,7 @@ Required scope | `ecommerce:write` "staging", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42251,6 +42481,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42285,6 +42516,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42317,6 +42549,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42434,6 +42667,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42597,6 +42831,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42608,6 +42843,7 @@ Required scope | `ecommerce:write` "staging", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42711,6 +42947,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42745,6 +42982,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42777,6 +43015,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42897,6 +43136,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42931,6 +43171,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42963,6 +43204,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43080,6 +43322,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsListResponseItemsItemProductFieldDataEcProductType: @@ -43093,6 +43336,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsListResponseItemsItemProductFieldData: @@ -43200,6 +43444,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsListResponseItemsItemSkusItemFieldDataEcSkuSubscriptionPlanInterval: @@ -43209,6 +43454,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsListResponseItemsItemSkusItemFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -43217,6 +43463,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsListResponseItemsItemSkusItemFieldDataEcSkuSubscriptionPlanPlansItem: @@ -43357,6 +43604,7 @@ Required scope | `ecommerce:write` - live docs: Indicate whether your Product should be set as "staging" or "live" default: staging + inline: true source: openapi: ../openapi.yml ProductsCreateRequestProductFieldDataSkuPropertiesItemEnumItem: @@ -43451,6 +43699,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsCreateRequestProductFieldDataEcProductType: @@ -43464,6 +43713,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsCreateRequestProductFieldData: @@ -43547,6 +43797,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsCreateRequestSkuFieldDataEcSkuSubscriptionPlanInterval: @@ -43556,6 +43807,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsCreateRequestSkuFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -43564,6 +43816,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsCreateRequestSkuFieldDataEcSkuSubscriptionPlanPlansItem: @@ -43748,6 +44001,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsCreateResponseProductFieldDataEcProductType: @@ -43761,6 +44015,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsCreateResponseProductFieldData: @@ -43868,6 +44123,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsCreateResponseSkusItemFieldDataEcSkuSubscriptionPlanInterval: @@ -43877,6 +44133,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsCreateResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -43885,6 +44142,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsCreateResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItem: @@ -44080,6 +44338,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsGetResponseProductFieldDataEcProductType: @@ -44093,6 +44352,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsGetResponseProductFieldData: @@ -44199,6 +44459,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsGetResponseSkusItemFieldDataEcSkuSubscriptionPlanInterval: @@ -44208,6 +44469,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsGetResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -44216,6 +44478,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsGetResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItem: @@ -44325,6 +44588,7 @@ Required scope | `ecommerce:write` - live docs: Indicate whether your Product should be set as "staging" or "live" default: staging + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestProductFieldDataSkuPropertiesItemEnumItem: @@ -44419,6 +44683,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestProductFieldDataEcProductType: @@ -44432,6 +44697,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestProductFieldData: @@ -44538,6 +44804,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestSkuFieldDataEcSkuSubscriptionPlanInterval: @@ -44547,6 +44814,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestSkuFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -44555,6 +44823,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestSkuFieldDataEcSkuSubscriptionPlanPlansItem: @@ -44739,6 +45008,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsUpdateResponseFieldDataEcProductType: @@ -44752,6 +45022,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsUpdateResponseFieldData: @@ -44834,6 +45105,7 @@ Required scope | `ecommerce:write` - live docs: Indicate whether your Product should be set as "staging" or "live" default: staging + inline: true source: openapi: ../openapi.yml ProductsCreateSkuRequestSkusItemFieldDataPrice: @@ -44865,6 +45137,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsCreateSkuRequestSkusItemFieldDataEcSkuSubscriptionPlanInterval: @@ -44874,6 +45147,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsCreateSkuRequestSkusItemFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -44882,6 +45156,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsCreateSkuRequestSkusItemFieldDataEcSkuSubscriptionPlanPlansItem: @@ -45003,6 +45278,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsCreateSkuResponseSkusItemFieldDataEcSkuSubscriptionPlanInterval: @@ -45012,6 +45288,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsCreateSkuResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -45020,6 +45297,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsCreateSkuResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItem: @@ -45124,6 +45402,7 @@ Required scope | `ecommerce:write` - live docs: Indicate whether your Product should be set as "staging" or "live" default: staging + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuRequestSkuFieldDataPrice: @@ -45155,6 +45434,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuRequestSkuFieldDataEcSkuSubscriptionPlanInterval: @@ -45164,6 +45444,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuRequestSkuFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -45172,6 +45453,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuRequestSkuFieldDataEcSkuSubscriptionPlanPlansItem: @@ -45293,6 +45575,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuResponseFieldDataEcSkuSubscriptionPlanInterval: @@ -45302,6 +45585,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuResponseFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -45310,6 +45594,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuResponseFieldDataEcSkuSubscriptionPlanPlansItem: @@ -48347,6 +48632,7 @@ webhooks: "UNPUBLISHED", "DELETED", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -48393,6 +48679,7 @@ webhooks: - PUBLISHED - UNPUBLISHED - DELETED + inline: true source: openapi: ../openapi.yml ActivityLogsListResponseItemsItemUser: @@ -48859,6 +49146,7 @@ service: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -48943,6 +49231,7 @@ service: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -48953,6 +49242,7 @@ service: "page", "site", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -49011,6 +49301,7 @@ service: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -49069,6 +49360,7 @@ service: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -49084,6 +49376,7 @@ service: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsGetCustomCodeResponseScriptsItem: @@ -49129,6 +49422,7 @@ service: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsUpsertCustomCodeRequestScriptsItem: @@ -49161,6 +49455,7 @@ service: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsUpsertCustomCodeResponseScriptsItem: @@ -49203,6 +49498,7 @@ service: - page - site docs: Whether the Custom Code script is applied at the Site-level or Page-level + inline: true source: openapi: ../openapi.yml ScriptsListCustomCodeBlocksResponseBlocksItemScriptsItemLocation: @@ -49213,6 +49509,7 @@ service: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsListCustomCodeBlocksResponseBlocksItemScriptsItem: @@ -50395,6 +50692,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50449,6 +50747,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50460,6 +50759,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "user_account_updated", "user_account_deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50557,6 +50857,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50611,6 +50912,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50622,6 +50924,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "user_account_updated", "user_account_deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50719,6 +51022,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50773,6 +51077,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50784,6 +51089,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "user_account_updated", "user_account_deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50863,6 +51169,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50917,6 +51224,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -50996,6 +51304,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -51050,6 +51359,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -51107,6 +51417,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "value": "-UpdatedOn", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -51217,6 +51528,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -51271,6 +51583,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -51374,6 +51687,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -51428,6 +51742,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -51564,6 +51879,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UsersListResponseUsersItemAccessGroupsItemType: @@ -51574,6 +51890,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UsersListResponseUsersItemAccessGroupsItem: @@ -51687,6 +52004,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UsersGetResponseAccessGroupsItemType: @@ -51697,6 +52015,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UsersGetResponseAccessGroupsItem: @@ -51804,6 +52123,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UsersUpdateResponseAccessGroupsItemType: @@ -51814,6 +52134,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UsersUpdateResponseAccessGroupsItem: @@ -51904,6 +52225,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UsersInviteResponseAccessGroupsItemType: @@ -51914,6 +52236,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UsersInviteResponseAccessGroupsItem: @@ -52004,6 +52327,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - user_account_updated - user_account_deleted docs: The type of event that triggered the request + inline: true source: openapi: ../openapi.yml UserAccountAddedPayloadPayloadStatus: @@ -52012,6 +52336,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UserAccountAddedPayloadPayloadAccessGroupsItemType: @@ -52022,6 +52347,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UserAccountAddedPayloadPayloadAccessGroupsItem: @@ -52127,6 +52453,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - user_account_updated - user_account_deleted docs: The type of event that triggered the request + inline: true source: openapi: ../openapi.yml UserAccountUpdatedPayloadPayloadStatus: @@ -52135,6 +52462,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UserAccountUpdatedPayloadPayloadAccessGroupsItemType: @@ -52145,6 +52473,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UserAccountUpdatedPayloadPayloadAccessGroupsItem: @@ -52250,6 +52579,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - user_account_updated - user_account_deleted docs: The type of event that triggered the request + inline: true source: openapi: ../openapi.yml UserAccountDeletedPayloadPayloadStatus: @@ -52258,6 +52588,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UserAccountDeletedPayloadPayloadAccessGroupsItemType: @@ -52268,6 +52599,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UserAccountDeletedPayloadPayloadAccessGroupsItem: @@ -53061,6 +53393,7 @@ webhooks: "collection_item_deleted", "collection_item_unpublished", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -53168,6 +53501,7 @@ webhooks: "collection_item_deleted", "collection_item_unpublished", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -53275,6 +53609,7 @@ webhooks: "collection_item_deleted", "collection_item_unpublished", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -53417,6 +53752,7 @@ webhooks: "collection_item_deleted", "collection_item_unpublished", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -53497,6 +53833,7 @@ webhooks: * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + inline: true source: openapi: ../openapi.yml WebhooksListResponseWebhooksItemFilter: @@ -53648,6 +53985,7 @@ webhooks: * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + inline: true source: openapi: ../openapi.yml WebhooksCreateRequestFilter: @@ -53719,6 +54057,7 @@ webhooks: * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + inline: true source: openapi: ../openapi.yml WebhooksCreateResponseFilter: @@ -53861,6 +54200,7 @@ webhooks: * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + inline: true source: openapi: ../openapi.yml WebhooksGetResponseFilter: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/x-fern-enum.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/x-fern-enum.json index b6cb815d795..dcd5420c5fe 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/x-fern-enum.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/x-fern-enum.json @@ -21,6 +21,7 @@ "value": "nano", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/aries.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/aries.json index 5ee55eba7f8..63573024fb3 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/aries.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/aries.json @@ -35699,6 +35699,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "AttributeMimeTypesResultResults", @@ -35958,6 +35959,7 @@ }, "generatedName": "ClearPendingRevocationsRequestPurgeValue", "groupName": [], + "inline": true, "type": "array" }, "generatedName": "ClearPendingRevocationsRequestPurge", @@ -45478,6 +45480,7 @@ }, "type": "reference" }, + "inline": true, "type": "nullable" }, "generatedName": "IndyProofRequestedProofRevealedAttrGroups", @@ -45526,6 +45529,7 @@ }, "type": "reference" }, + "inline": true, "type": "nullable" }, "generatedName": "IndyProofRequestedProofRevealedAttrs", @@ -51490,6 +51494,7 @@ }, "generatedName": "PublishRevocationsRrid2CridValue", "groupName": [], + "inline": true, "type": "array" }, "generatedName": "PublishRevocationsRrid2Crid", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/hookdeck.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/hookdeck.json index 21b37f8e33c..fd3a67d6a9a 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/hookdeck.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/hookdeck.json @@ -46649,6 +46649,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -47005,6 +47006,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -47595,6 +47597,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -58278,6 +58281,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "ShortEventDataHeadersOne", @@ -58975,6 +58979,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "EventDataHeadersOne", @@ -63839,6 +63844,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "RequestDataHeadersOne", @@ -64953,6 +64959,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "TransformFullTransformationEnv", @@ -65935,6 +65942,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "TransformationEnv", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/humanloop.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/humanloop.json index 2ab84606370..ea010171e65 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/humanloop.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/humanloop.json @@ -22747,6 +22747,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -23250,6 +23251,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/intercom.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/intercom.json index 4c43c812008..b3060c64067 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/intercom.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/intercom.json @@ -112612,6 +112612,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -121748,6 +121749,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -122781,6 +122783,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/only-include-referenced-schemas.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/only-include-referenced-schemas.json index 4c43c812008..b3060c64067 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/only-include-referenced-schemas.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/only-include-referenced-schemas.json @@ -112612,6 +112612,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -121748,6 +121749,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -122781,6 +122783,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/openapi-filter.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/openapi-filter.json index 88993758965..220a30a0b66 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/openapi-filter.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/openapi-filter.json @@ -15737,6 +15737,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -24903,6 +24904,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -25936,6 +25938,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/permit.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/permit.json index 0f11f45968c..9262d97444e 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/permit.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/permit.json @@ -40004,6 +40004,7 @@ }, "generatedName": "ResourceReadActionGroupsValue", "groupName": [], + "inline": true, "type": "array" }, "generatedName": "ResourceReadActionGroups", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/rightbrain.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/rightbrain.json index 26612f200cc..6e3aafa9769 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/rightbrain.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/rightbrain.json @@ -63871,6 +63871,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "enum" }, "generatedName": "TaskCreateOutputFormat", @@ -65058,6 +65059,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "enum" }, "generatedName": "TaskRevisionOutputFormat", @@ -65581,9 +65583,11 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "enum" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "TaskUpdateOutputFormat", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/seam.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/seam.json index 34a3f589b69..7a1800dd90a 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/seam.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/seam.json @@ -6766,11 +6766,13 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "ConnectWebviewsCreateRequestCustomMetadata", @@ -7692,6 +7694,7 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -8634,6 +8637,7 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -9000,11 +9004,13 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "ConnectedAccountsUpdateRequestCustomMetadata", @@ -11724,6 +11730,7 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -12672,11 +12679,13 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "DevicesUpdateRequestCustomMetadata", @@ -17795,6 +17804,7 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -23131,6 +23141,7 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -43301,6 +43312,7 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -55706,6 +55718,7 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -56057,6 +56070,7 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -60427,6 +60441,7 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" @@ -65391,6 +65406,7 @@ "file": "../openapi.json", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/squidex.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/squidex.json index c05c1557606..95adb961406 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/squidex.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/squidex.json @@ -71861,6 +71861,7 @@ }, "generatedName": "LocalizedValueOfReadonlyListOfStringValue", "groupName": [], + "inline": true, "type": "array" }, "generatedName": "LocalizedValueOfReadonlyListOfString", @@ -72013,6 +72014,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "LocalizedValueOfNullableBoolean", @@ -72413,6 +72415,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "LocalizedValueOfNullableInstant", @@ -72756,6 +72759,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "LocalizedValueOfNullableDouble", @@ -76468,6 +76472,7 @@ }, "generatedName": "CallsUsageDtoDtoDetailsValue", "groupName": [], + "inline": true, "type": "array" }, "generatedName": "CallsUsageDtoDtoDetails", @@ -78139,6 +78144,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "UpsertSchemaDtoPreviewUrls", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/valtown.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/valtown.json index 1e4f165c4ee..9a5ac1c0a99 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/valtown.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/valtown.json @@ -3821,11 +3821,13 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "SqliteExecuteRequestStatementArgsArgsOne", @@ -4311,11 +4313,13 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "undisciminated" }, "type": "oneOf" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "SqliteBatchRequestStatementsItemArgsArgsOne", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/vellum.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/vellum.json index 20685688475..1a6d2e09c3c 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/vellum.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/vellum.json @@ -6993,6 +6993,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "ModelVersionExecConfigParametersLogitBias", @@ -7471,6 +7472,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "NormalizedTokenLogProbsTopLogprobs", @@ -8707,6 +8709,7 @@ "type": "primitive" }, "groupName": [], + "inline": true, "type": "nullable" }, "generatedName": "RegisterPromptModelParametersRequestLogitBias", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/webflow.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/webflow.json index 9099d13f527..772b95cafa5 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/webflow.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-ir/webflow.json @@ -37937,6 +37937,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "object" }, "generatedName": "FormsListResponseFormsItemFields", @@ -39159,6 +39160,7 @@ "file": "../openapi.yml", "type": "openapi" }, + "inline": true, "type": "object" }, "generatedName": "FormsGetResponseFields", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/apiture.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/apiture.json index a8837830bb1..f190a039609 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/apiture.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/apiture.json @@ -557,6 +557,7 @@ This error response may have one of the following `type` values: "viewCards", "manageCards", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -730,6 +731,7 @@ Account transfers are only allowed between `internal` and `external` accounts. A "external", "outside", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -890,6 +892,7 @@ Account transfers are only allowed between `internal` and `external` accounts. A "float", "sameDay", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -950,6 +953,7 @@ Account transfers are only allowed between `internal` and `external` accounts. A "tel", "web", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1172,6 +1176,7 @@ Account transfers are only allowed between `internal` and `external` accounts. A "securityQuestions", "authenticatorToken", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1314,6 +1319,7 @@ Account transfers are only allowed between `internal` and `external` accounts. A "externalTransfer", "billPay", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1440,6 +1446,7 @@ The client can use this value to localize the `items[].time` values to the local "microDeposits", "manual", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1569,6 +1576,7 @@ The client can use this value to localize the `items[].time` values to the local "swiftBicCode", "ibanAccountNumber", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1875,6 +1883,7 @@ The client can use this value to localize the `items[].time` values to the local "loan", "creditCard", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2069,6 +2078,7 @@ The client can use this value to localize the `items[].time` values to the local "credit", "debit", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2291,6 +2301,7 @@ The client can use this value to localize the `items[].time` values to the local "check", "other", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2326,6 +2337,7 @@ The client can use this value to localize the `items[].time` values to the local "debit", "credit", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2489,6 +2501,7 @@ The client can use this value to localize the `items[].time` values to the local "closure", "other", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2632,6 +2645,7 @@ The response may include dates prior to requested the start date, as that is use "semiyearly", "yearly", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2733,6 +2747,7 @@ The response may include dates prior to requested the start date, as that is use "fixed", "variable", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2821,6 +2836,7 @@ For recurring transfer schedules, `endsOn`, `count`, and `amountLimit` are mutua "credit", "both", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2921,6 +2937,7 @@ For recurring transfer schedules, `endsOn`, `count`, and `amountLimit` are mutua "failed", "other", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2970,6 +2987,7 @@ For recurring transfer schedules, `endsOn`, `count`, and `amountLimit` are mutua "domesticWireTransfer", "internationalWireTransfer", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6254,6 +6272,7 @@ Optionally, an agent can access a business customer's ACH accounts when acting o "internal", "external", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/aries.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/aries.json index 7c52fb1a7d7..ad8c91902c0 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/aries.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/aries.json @@ -427,6 +427,7 @@ "value": "present-proof", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -628,6 +629,7 @@ "manual", "auto", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -644,6 +646,7 @@ "value": "didexchange/1.0", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -655,6 +658,7 @@ "multi", "static", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -667,6 +671,7 @@ "active", "error", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -679,6 +684,7 @@ "inviter", "responder", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -865,6 +871,7 @@ "allowed", "disallowed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -875,6 +882,7 @@ "allowed", "disallowed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -885,6 +893,7 @@ "allowed", "disallowed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -895,6 +904,7 @@ "required", "preferred", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -954,6 +964,7 @@ "managed", "unmanaged", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1700,6 +1711,7 @@ "ed25519", "bls12381g2", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1710,6 +1722,7 @@ "ed25519", "bls12381g2", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1721,6 +1734,7 @@ "posted", "wallet_only", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2012,6 +2026,7 @@ "USER", "ROLE_REMOVE", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2428,6 +2443,7 @@ "GE", "GT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2596,6 +2612,7 @@ "value": ">", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2919,6 +2936,7 @@ "value": ">", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3765,6 +3783,7 @@ "add", "remove", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4259,6 +4278,7 @@ "sender", "receiver", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4286,6 +4306,7 @@ "done", "deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4481,6 +4502,7 @@ "value": "goal-code", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5051,6 +5073,7 @@ "TRANSACTION_ENDORSER", "reset", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5062,6 +5085,7 @@ "TRANSACTION_ENDORSER", "reset", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5463,6 +5487,7 @@ "self", "external", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5490,6 +5515,7 @@ "holder", "issuer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5668,6 +5694,7 @@ "self", "external", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5707,6 +5734,7 @@ "prover", "verifier", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5717,6 +5745,7 @@ "true", "false", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6062,6 +6091,7 @@ "self", "external", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6130,6 +6160,7 @@ "issuer", "holder", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6177,6 +6208,7 @@ "abandoned", "deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6680,6 +6712,7 @@ "self", "external", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6715,6 +6748,7 @@ "prover", "verifier", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6750,6 +6784,7 @@ "abandoned", "deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6760,6 +6795,7 @@ "true", "false", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7042,6 +7078,7 @@ "managed", "unmanaged", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7072,6 +7109,7 @@ "required", "preferred", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7082,6 +7120,7 @@ "ISSUANCE_ON_DEMAND", "ISSUANCE_BY_DEFAULT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7116,6 +7155,7 @@ "required", "preferred", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7134,6 +7174,7 @@ "all", "pick", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -7394,6 +7435,7 @@ types: - value: present-proof name: PresentProof docs: Attachment type + inline: true source: openapi: ../openapi.yml AttachmentDef: @@ -7464,6 +7506,7 @@ types: - manual - auto docs: 'Connection acceptance: manual or auto' + inline: true source: openapi: ../openapi.yml ConnRecordConnectionProtocol: @@ -7473,6 +7516,7 @@ types: - value: didexchange/1.0 name: Didexchange10 docs: Connection protocol used + inline: true source: openapi: ../openapi.yml ConnRecordInvitationMode: @@ -7481,6 +7525,7 @@ types: - multi - static docs: Invitation mode + inline: true source: openapi: ../openapi.yml ConnRecordRoutingState: @@ -7490,6 +7535,7 @@ types: - active - error docs: Routing state of connection + inline: true source: openapi: ../openapi.yml ConnRecordTheirRole: @@ -7499,6 +7545,7 @@ types: - inviter - responder docs: Their role in the connection protocol + inline: true source: openapi: ../openapi.yml ConnRecord: @@ -7675,6 +7722,7 @@ types: - required - allowed - disallowed + inline: true source: openapi: ../openapi.yml ConstraintsStatusRevoked: @@ -7682,6 +7730,7 @@ types: - required - allowed - disallowed + inline: true source: openapi: ../openapi.yml ConstraintsStatusSuspended: @@ -7689,6 +7738,7 @@ types: - required - allowed - disallowed + inline: true source: openapi: ../openapi.yml ConstraintsSubjectIsIssuer: @@ -7696,6 +7746,7 @@ types: - required - preferred docs: SubjectIsIssuer + inline: true source: openapi: ../openapi.yml Constraints: @@ -7723,6 +7774,7 @@ types: - managed - unmanaged docs: Mode regarding management of wallet key + inline: true source: openapi: ../openapi.yml CreateWalletResponseSettings: @@ -8044,6 +8096,7 @@ types: - ed25519 - bls12381g2 docs: Key type associated with the DID + inline: true source: openapi: ../openapi.yml DidPosture: @@ -8054,6 +8107,7 @@ types: docs: >- Whether DID is current public DID, posted to ledger but not current public DID, or local to the wallet + inline: true source: openapi: ../openapi.yml DID: @@ -8090,6 +8144,7 @@ types: docs: >- Key type to use for the DID keypair. Validated with the chosen DID method's supported key types. + inline: true source: openapi: ../openapi.yml DIDCreateOptions: @@ -8143,6 +8198,7 @@ types: - required - preferred docs: Preference + inline: true source: openapi: ../openapi.yml DIFField: @@ -8167,6 +8223,7 @@ types: - required - preferred docs: Preference + inline: true source: openapi: ../openapi.yml DIFHolder: @@ -8392,6 +8449,7 @@ types: - USER - ROLE_REMOVE docs: Ledger role + inline: true source: openapi: ../openapi.yml GetNymRoleResponse: @@ -8630,6 +8688,7 @@ types: - GE - GT docs: Predicate type + inline: true source: openapi: ../openapi.yml IndyGEProofPred: @@ -8716,6 +8775,7 @@ types: - value: '>' name: GreaterThan docs: Predicate type ('<', '<=', '>=', or '>') + inline: true source: openapi: ../openapi.yml IndyPresPredSpec: @@ -8884,6 +8944,7 @@ types: - value: '>' name: GreaterThan docs: Predicate type ('<', '<=', '>=', or '>') + inline: true source: openapi: ../openapi.yml IndyProofReqPredSpec: @@ -9082,6 +9143,7 @@ types: - ISSUANCE_ON_DEMAND - ISSUANCE_BY_DEFAULT docs: Issuance type + inline: true source: openapi: ../openapi.yml IndyRevRegDefValue: @@ -9428,6 +9490,7 @@ types: - add - remove docs: Action for specific key + inline: true source: openapi: ../openapi.yml KeylistUpdateRule: @@ -9721,6 +9784,7 @@ types: - sender - receiver docs: OOB Role + inline: true source: openapi: ../openapi.yml OobRecordState: @@ -9737,6 +9801,7 @@ types: - done - deleted docs: Out of band message exchange state + inline: true source: openapi: ../openapi.yml OobRecord: @@ -9893,6 +9958,7 @@ types: - value: goal-code name: GoalCode docs: feature type + inline: true source: openapi: ../openapi.yml QueryItem: @@ -10147,6 +10213,7 @@ types: - all - pick docs: Selection + inline: true source: openapi: ../openapi.yml SubmissionRequirements: @@ -10226,6 +10293,7 @@ types: - TRANSACTION_ENDORSER - reset docs: My transaction related job + inline: true source: openapi: ../openapi.yml TransactionJobsTransactionTheirJob: @@ -10234,6 +10302,7 @@ types: - TRANSACTION_ENDORSER - reset docs: Their transaction related job + inline: true source: openapi: ../openapi.yml TransactionJobs: @@ -10381,6 +10450,7 @@ types: - self - external docs: 'Issue-credential exchange initiator: self or external' + inline: true source: openapi: ../openapi.yml V10CredentialExchangeRole: @@ -10388,6 +10458,7 @@ types: - holder - issuer docs: 'Issue-credential exchange role: holder or issuer' + inline: true source: openapi: ../openapi.yml V10CredentialExchange: @@ -10536,6 +10607,7 @@ types: - self - external docs: 'Present-proof exchange initiator: self or external' + inline: true source: openapi: ../openapi.yml V10PresentationExchangeRole: @@ -10543,6 +10615,7 @@ types: - prover - verifier docs: 'Present-proof exchange role: prover or verifier' + inline: true source: openapi: ../openapi.yml V10PresentationExchangeVerified: @@ -10550,6 +10623,7 @@ types: - 'true' - 'false' docs: 'Whether presentation is verified: true or false' + inline: true source: openapi: ../openapi.yml V10PresentationExchange: @@ -10664,6 +10738,7 @@ types: - self - external docs: 'Issue-credential exchange initiator: self or external' + inline: true source: openapi: ../openapi.yml V20CredExRecordRole: @@ -10671,6 +10746,7 @@ types: - issuer - holder docs: 'Issue-credential exchange role: holder or issuer' + inline: true source: openapi: ../openapi.yml V20CredExRecordState: @@ -10697,6 +10773,7 @@ types: - abandoned - deleted docs: Issue-credential exchange state + inline: true source: openapi: ../openapi.yml V20CredExRecord: @@ -11118,6 +11195,7 @@ types: - self - external docs: 'Present-proof exchange initiator: self or external' + inline: true source: openapi: ../openapi.yml V20PresExRecordRole: @@ -11125,6 +11203,7 @@ types: - prover - verifier docs: 'Present-proof exchange role: prover or verifier' + inline: true source: openapi: ../openapi.yml V20PresExRecordState: @@ -11145,6 +11224,7 @@ types: - abandoned - deleted docs: Present-proof exchange state + inline: true source: openapi: ../openapi.yml V20PresExRecordVerified: @@ -11152,6 +11232,7 @@ types: - 'true' - 'false' docs: 'Whether presentation is verified: ''true'' or ''false''' + inline: true source: openapi: ../openapi.yml V20PresExRecord: @@ -11374,6 +11455,7 @@ types: - managed - unmanaged docs: Mode regarding management of wallet key + inline: true source: openapi: ../openapi.yml WalletRecordSettings: @@ -13036,6 +13118,7 @@ docs: Simple messaging "value": "didexchange/1.0", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13052,6 +13135,7 @@ docs: Simple messaging "active", "completed", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13063,6 +13147,7 @@ docs: Simple messaging "inviter", "responder", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16700,6 +16785,7 @@ docs: Feature discovery v2 "TRANSACTION_ENDORSER", "reset", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -18414,6 +18500,7 @@ docs: Introduction of known parties "issuer", "holder", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -18432,6 +18519,7 @@ docs: Introduction of known parties "credential_revoked", "abandoned", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20316,6 +20404,7 @@ types: "issuer", "holder", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20361,6 +20450,7 @@ types: }, "abandoned", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -21702,6 +21792,7 @@ docs: Sign and verify json-ld data "Profile", "LinkedDomains", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -21714,6 +21805,7 @@ docs: Sign and verify json-ld data "NETWORK_MONITOR", "reset", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -22787,6 +22879,7 @@ docs: Interaction with ledger "client", "server", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -22797,6 +22890,7 @@ docs: Interaction with ledger "granted", "denied", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -23724,6 +23818,7 @@ types: "both", "base", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23735,6 +23830,7 @@ types: "ARGON2I_INT", "RAW", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23746,6 +23842,7 @@ types: "in_memory", "indy", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23757,6 +23854,7 @@ types: "both", "base", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -23774,6 +23872,7 @@ types: Dispatch only to webhooks associated with this wallet. base - Dispatch only to webhooks associated with the base wallet. both - Dispatch to both webhook targets. + inline: true source: openapi: ../openapi.yml CreateWalletRequestWalletKeyDerivation: @@ -23782,6 +23881,7 @@ types: - ARGON2I_INT - RAW docs: Key derivation + inline: true source: openapi: ../openapi.yml CreateWalletRequestWalletType: @@ -23790,6 +23890,7 @@ types: - in_memory - indy docs: Type of the wallet to create + inline: true source: openapi: ../openapi.yml UpdateWalletRequestWalletDispatchType: @@ -23802,6 +23903,7 @@ types: Dispatch only to webhooks associated with this wallet. base - Dispatch only to webhooks associated with the base wallet. both - Dispatch to both webhook targets. + inline: true source: openapi: ../openapi.yml imports: @@ -25546,6 +25648,7 @@ docs: Out-of-band connections "prover", "verifier", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -25562,6 +25665,7 @@ docs: Out-of-band connections "presentation_acked", "abandoned", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -26906,6 +27010,7 @@ types: "prover", "verifier", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -26939,6 +27044,7 @@ types: "done", "abandoned", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -28633,6 +28739,7 @@ docs: did resolver interface. "active", "full", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -28643,6 +28750,7 @@ docs: did resolver interface. "v1_0", "v2_0", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -28655,6 +28763,7 @@ docs: did resolver interface. "active", "full", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -29406,6 +29515,7 @@ types: - v1_0 - v2_0 docs: Specify which version of the revocation notification should be sent + inline: true source: openapi: ../openapi.yml ", @@ -30609,6 +30719,7 @@ docs: Trust-ping over connection "Profile", "LinkedDomains", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30618,6 +30729,7 @@ docs: Trust-ping over connection "ed25519", "bls12381g2", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -30627,6 +30739,7 @@ docs: Trust-ping over connection "key", "sov", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -30637,6 +30750,7 @@ docs: Trust-ping over connection "posted", "wallet_only", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -30671,6 +30785,7 @@ docs: Trust-ping over connection docs: >- Endpoint type to set (default 'Endpoint'); affects only public or posted DIDs + inline: true source: openapi: ../openapi.yml imports: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/assembly.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/assembly.json index 08c5dad13a5..de5fe617b31 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/assembly.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/assembly.json @@ -94,6 +94,7 @@ "success", "unavailable", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -537,6 +538,7 @@ Valid values are in the range [0, 1] inclusive. "value": "us_social_security_number", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -634,6 +636,7 @@ Can be any value between 0.0 and 1.0 inclusive. "default", "basic", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -809,6 +812,7 @@ Can be any value between 0.0 and 1.0 inclusive. "drivers_license", "banking_information", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -896,6 +900,7 @@ Can be any value between 0.0 and 1.0 inclusive. "NEUTRAL", "NEGATIVE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -985,6 +990,7 @@ Can be any value between 0.0 and 1.0 inclusive. "entity_type", "hash", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -995,6 +1001,7 @@ Can be any value between 0.0 and 1.0 inclusive. "srt", "vtt", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1007,6 +1014,7 @@ Can be any value between 0.0 and 1.0 inclusive. "conversational", "catchy", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1021,6 +1029,7 @@ Can be any value between 0.0 and 1.0 inclusive. "headline", "paragraph", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1354,6 +1363,7 @@ See [Speech recognition](https://www.assemblyai.com/docs/Models/speech_recogniti "default", "high", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1441,6 +1451,7 @@ The default value is 'en_us'. "uk", "vi", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1577,6 +1588,7 @@ The default value is 'en_us'. "value": "error", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4805,6 +4817,7 @@ docs: Real-time transcription "value": "error", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/axle.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/axle.json index c894a317c7d..a70148cc961 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/axle.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/axle.json @@ -87,6 +87,7 @@ "COLL", "COMP", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -184,6 +185,7 @@ "lessor", "interest", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -275,6 +277,7 @@ - UIMPD - COLL - COMP + inline: true source: openapi: ../openapi.yml Coverage: @@ -335,6 +338,7 @@ - lessor - interest default: interest + inline: true source: openapi: ../openapi.yml ThirdParty: @@ -536,6 +540,7 @@ "auto", "motorcycle", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -575,6 +580,7 @@ types: enum: - auto - motorcycle + inline: true source: openapi: ../openapi.yml Policy: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/belvo.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/belvo.json index 39e9371429b..95073e80807 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/belvo.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/belvo.json @@ -1668,6 +1668,7 @@ In our documentation example, we use `{endpoint}` as a placeholder value. In pro "SUCCEEDED", "FAILED", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2762,6 +2763,7 @@ We return one of the following enum values: "INDIVIDUAL", "BUSINESS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2781,6 +2783,7 @@ We return one of the following enum values: "SAVINGS", "SALARY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2798,6 +2801,7 @@ Can be either: "LOAN_ACCOUNT", "SAVINGS_ACCOUNT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2812,6 +2816,7 @@ Can be either: "INDIVIDUAL", "BUSINESS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2936,6 +2941,7 @@ Can be either: "INFLOW", "OUTFLOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2949,6 +2955,7 @@ Can be either: "CPF", "CNPJ", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2965,6 +2972,7 @@ Can be either: "TI", "NIT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2982,6 +2990,7 @@ Can be either: "INDIVIDUAL", "BUSINESS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2996,6 +3005,7 @@ Can be either: "NSS", "CURP", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3007,6 +3017,7 @@ Can be either: "EMPLOYED", "UNEMPLOYED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3029,6 +3040,7 @@ Can be either: "ABSENCE", "SICK_LEAVE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3047,6 +3059,7 @@ You can send through one of the following values: "MEDIUM", "LOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3073,6 +3086,7 @@ We return one of the following enum values: "MEDIUM", "LOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3095,6 +3109,7 @@ We return one of the following enum values: "IRREGULAR", "SINGLE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3127,6 +3142,7 @@ We return one of the following enum values: "DEPOSIT", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3140,6 +3156,7 @@ Can be either: "CHECKING_ACCOUNT", "SAVINGS_ACCOUNT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3167,6 +3184,7 @@ Can be either: "credentials", "openbanking", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3178,6 +3196,7 @@ Can be either: "healthy", "down", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3194,6 +3213,7 @@ Can be either: "fiscal", "employment", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3220,6 +3240,7 @@ We return one of the following values: "PENSION", "STOCK", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3240,6 +3261,7 @@ We return one of the following values: "PENSION", "VARIABLE_INCOME", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3269,6 +3291,7 @@ You can send through one or more of the following values: "DEPOSIT", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3314,6 +3337,7 @@ For Mexico's SAT, we return one of the following values: "Pago", "Traslado", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3344,6 +3368,7 @@ For more information, see our [Links](https://developers.belvo.com/docs/links-an "single", "recurrent", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3385,6 +3410,7 @@ We return one of the following values: "unconfirmed", "token_required", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3401,6 +3427,7 @@ We return one of the following values: "INSURANCE_FEE", "OTHERS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3415,6 +3442,7 @@ We return one of the following values: "MONTHLY", "YEARLY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3425,6 +3453,7 @@ We return one of the following values: "INDIVIDUAL", "BUSINESS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3439,6 +3468,7 @@ We return one of the following values: "PROCESSING", "FAILED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3452,6 +3482,7 @@ We return one of the following values: "open_finance", "pse", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3467,6 +3498,7 @@ We return one of the following values: "belvo", "payments_way", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3482,6 +3514,7 @@ We return one of the following values: "ACTIVE", "INACTIVE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3495,6 +3528,7 @@ We return one of the following values: "INFLOW", "OUTFLOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3510,6 +3544,7 @@ We return one of the following values: "BRA", "COL", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3524,6 +3559,7 @@ We return one of the following values: "BRL", "COP", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3547,6 +3583,7 @@ We return one of the following values: "REVERTED", "UNCATEGORIZED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3596,6 +3633,7 @@ We return one of the following values: }, "Taxes", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3618,6 +3656,7 @@ We return one of the following values: "SUBSCRIPTION", "REGULAR", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3629,6 +3668,7 @@ We return one of the following values: "NEGATIVE", "NO_OBLIGATIONS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3642,6 +3682,7 @@ We return one of the following values: "PAID", "PROVISIONED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3655,6 +3696,7 @@ We return one of the following values: "NATIONAL", "FOREIGN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3669,6 +3711,7 @@ We return one of the following values: "OUTFLOW", "INFLOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20424,6 +20467,7 @@ types: - FAILED docs: | The current status of the charge. + inline: true source: openapi: ../openapi.yml ChargePaymentMethodDetails: @@ -50837,6 +50881,7 @@ types: "value": "-created_at", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -50846,6 +50891,7 @@ types: "ACTIVE", "INACTIVE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/deel.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/deel.json index 13cfb2c3ff7..b647ec7ea96 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/deel.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/deel.json @@ -976,6 +976,7 @@ "client", "contractor", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1194,6 +1195,7 @@ "rejected", "waiting_for_client_payment", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1622,6 +1624,7 @@ "shield_msa", "hris_direct_employee", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1637,6 +1640,7 @@ "payg_tasks", "payg_milestones", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1648,6 +1652,7 @@ "client", "contractor", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1673,6 +1678,7 @@ "total", "status", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1800,6 +1806,7 @@ "SICK_LEAVE", "OTHER", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2510,6 +2517,7 @@ "STANDARD", "SPECIFIC", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2526,6 +2534,7 @@ "value": "Part-time", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2557,6 +2566,7 @@ "Skilled", "Unskilled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2660,6 +2670,7 @@ "ALLOWED_WITH_MAXIMUM_LIMITATION", "NOT_ALLOWED", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2708,6 +2719,7 @@ "STANDARD", "SPECIFIC", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2910,6 +2922,7 @@ "LIMITED_ROLLOVER", "UNSET", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3145,6 +3158,7 @@ "CALENDAR_DAYS", "FULL_AMOUNT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3220,6 +3234,7 @@ "value": "image/png", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3271,6 +3286,7 @@ "CALENDAR_DAYS", "FULL_AMOUNT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3489,6 +3505,7 @@ "ENABLED", "DISABLED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3977,6 +3994,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3998,6 +4016,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4203,6 +4222,7 @@ "withholding_tax", "work", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4220,6 +4240,7 @@ "time_off", "vat", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4256,6 +4277,7 @@ "failed", "refunded", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4324,6 +4346,7 @@ "failed", "refunded", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4348,6 +4371,7 @@ "SHIELD_DEPOSIT", "EOR_MANAGEMENT_FEE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4412,6 +4436,7 @@ "individual", "company", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4547,6 +4572,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4585,6 +4611,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4704,6 +4731,7 @@ "value": "tasks:write", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5054,6 +5082,7 @@ "mercury_wire", "bt_pay_pal", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5090,6 +5119,7 @@ "paid", "processing", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5423,6 +5453,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5451,6 +5482,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5664,6 +5696,7 @@ "CALENDAR_DAYS", "FULL_AMOUNT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5677,6 +5710,7 @@ "hris_direct_employee", "service_account", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5811,6 +5845,7 @@ "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5993,6 +6028,7 @@ "APPROVED", "REJECTED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6003,6 +6039,7 @@ "SICK_LEAVE", "OTHER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6117,6 +6154,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6138,6 +6176,7 @@ "approved", "declined", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6394,6 +6433,7 @@ "enabled", "disabled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6419,6 +6459,7 @@ "Friday", "Saturday", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6430,6 +6471,7 @@ "DAY_OF_LAST_WEEK", "DAY_OF_MONTH", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6446,6 +6488,7 @@ "value": "calendar-month", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6457,6 +6500,7 @@ "REGULAR", "WITHIN_MONTH", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6472,6 +6516,7 @@ "semimonthly", "custom", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6487,6 +6532,7 @@ "semimonthly", "custom", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -7699,6 +7745,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml TimesheetReviewsToCreate: @@ -7726,6 +7773,7 @@ - approved - declined docs: Review status. + inline: true source: openapi: ../openapi.yml PgoTaskReviewsByIdToCreate: @@ -7743,6 +7791,7 @@ - approved - declined docs: Review status. + inline: true source: openapi: ../openapi.yml PgoTaskReviewsToCreate: @@ -7760,6 +7809,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml TimesheetReviewToCreate: @@ -8067,6 +8117,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml InvoiceAdjustmentReviewsToCreate: @@ -8089,6 +8140,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml InvoiceAdjustmentReviewToCreate: @@ -8670,6 +8722,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml MilestoneReviewsToCreate: @@ -8683,6 +8736,7 @@ enum: - approved - declined + inline: true source: openapi: ../openapi.yml MilestoneReviewToCreate: @@ -8717,6 +8771,7 @@ - CALENDAR_DAYS - FULL_AMOUNT docs: Either works days or calendar days + inline: true source: openapi: ../openapi.yml EstimateFirstPaymentCompensationDetails: @@ -8765,6 +8820,7 @@ - CALENDAR_DAYS - FULL_AMOUNT docs: Either works days or calendar days + inline: true source: openapi: ../openapi.yml ProRata: @@ -9100,6 +9156,7 @@ - CALENDAR_DAYS - FULL_AMOUNT docs: Either works days or calendar days + inline: true source: openapi: ../openapi.yml FinalPaymentCalculated: @@ -9355,6 +9412,7 @@ - value: Part-time name: PartTime docs: Is it a full-time contract or a part-time contract? + inline: true source: openapi: ../openapi.yml EorContractToCreateEmploymentTimeOffType: @@ -9365,6 +9423,7 @@ If you want to use standard number of holidays for this employee, choose "STANDARD". If you want to enter a specific number of holidays, choose "SPECIFIC" and enter the number of days in the holidays field. + inline: true source: openapi: ../openapi.yml EorContractToCreateEmployment: @@ -9468,6 +9527,7 @@ - Skilled - Unskilled docs: Type of worker. + inline: true source: openapi: ../openapi.yml EorContractToCreateQuoteAdditionalFields: @@ -9634,6 +9694,7 @@ - PRORATED - STANDARD - SPECIFIC + inline: true source: openapi: ../openapi.yml EorCountryValidationsPartTimeHoliday: @@ -9718,6 +9779,7 @@ - ALLOWED_WITHOUT_LIMITATION - ALLOWED_WITH_MAXIMUM_LIMITATION - NOT_ALLOWED + inline: true source: openapi: ../openapi.yml EorCountryValidationsDefiniteContract: @@ -10077,6 +10139,7 @@ - SICK_LEAVE - OTHER docs: Time off type. + inline: true source: openapi: ../openapi.yml CreateTimeoff: @@ -10168,6 +10231,7 @@ - enabled - disabled docs: Status of webhook. + inline: true source: openapi: ../openapi.yml WebhookItem: @@ -14887,6 +14951,7 @@ docs: The Contracts resource lets you create, amend and, retrieve Deel contracts "CALENDAR_DAYS", "FULL_AMOUNT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -22258,6 +22323,7 @@ docs: >- "enabled", "disabled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22268,6 +22334,7 @@ docs: >- "enabled", "disabled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -22527,6 +22594,7 @@ types: - enabled - disabled docs: Status of webhook. + inline: true source: openapi: ../openapi.yml PatchWebhookRequestStatus: @@ -22534,6 +22602,7 @@ types: - enabled - disabled docs: Status of webhook. + inline: true source: openapi: ../openapi.yml ", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/devrev.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/devrev.json index 5d4a3ddaf8a..05ceeda8758 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/devrev.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/devrev.json @@ -346,6 +346,7 @@ authentication connection. "disable", "enable", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -361,6 +362,7 @@ for each authentication connection will depend on the type value. "social", "waad", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -417,6 +419,7 @@ token. Only applicable for application access tokens. "value": "urn:ietf:params:oauth:grant-type:token-exchange", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -461,6 +464,7 @@ token. Only applicable for application access tokens. "value": "urn:ietf:params:oauth:token-type:jwt", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -472,6 +476,7 @@ token. Only applicable for application access tokens. "expired", "revoked", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -508,6 +513,7 @@ token. Only applicable for application access tokens. "value": "urn:ietf:params:oauth:token-type:jwt", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -712,6 +718,7 @@ authentication connections have different configuration parameters. "samlp", "waad", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -816,6 +823,7 @@ that can be updated. "samlp", "waad", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -953,6 +961,7 @@ sort order. If not set, then no prior elements exist. "parse_error", "value_not_permitted", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1320,6 +1329,7 @@ sort order. If not set, then no prior elements exist. "p2", "p3", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1335,6 +1345,7 @@ always be returned in the specified sort-by order. "after", "before", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1379,6 +1390,7 @@ always be returned in the specified sort-by order. "staging", "test", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1468,6 +1480,7 @@ always be returned in the specified sort-by order. "feature", "product", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1995,6 +2008,7 @@ sort order. If not set, then no prior elements exist. "low", "medium", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2032,6 +2046,7 @@ will appear in the response. "snap_kit", "text", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2306,6 +2321,7 @@ default visibility. "shadow", "unassigned", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2333,6 +2349,7 @@ default visibility. "rev_user", "sys_user", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2466,6 +2483,7 @@ be set for other request types. "work_deleted", "work_updated", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2496,6 +2514,7 @@ be set for other request types. "inactive", "unverified", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2547,6 +2566,7 @@ be set for other request types. "activate", "deactivate", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2640,6 +2660,7 @@ event types. Note this is mutually exclusive with 'add' and "issue", "ticket", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/enum-casing.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/enum-casing.json index f672a171260..5cbdda8189b 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/enum-casing.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/enum-casing.json @@ -60,6 +60,7 @@ "success", "failure", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -75,6 +76,7 @@ "value": "urn:ietf:params:oauth:grant-type:token-exchange", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -109,6 +111,7 @@ types: enum: - success - failure + inline: true source: openapi: ../openapi.yml ExampleResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/flagright.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/flagright.json index c0257a814df..42785e8dcc3 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/flagright.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/flagright.json @@ -2052,6 +2052,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "GATHERING", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2436,6 +2437,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "RUPAY", "JCB", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2447,6 +2449,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "DEBIT", "PREPAID", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2456,6 +2459,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "VIRTUAL", "PHYSICAL", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2602,6 +2606,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "CLOSED", "HIT", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2614,6 +2619,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "DOCUMENTS_COLLECTED", "OTHER", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2661,6 +2667,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "REFUND", "DECLINED", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2736,6 +2743,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "LARGE", "UNKNOWN", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3126,6 +3134,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "value": "N/A", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3406,6 +3415,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "ZMW", "ZWL", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3805,6 +3815,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "IN_PROGRESS", "MANUAL_REVIEW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4000,6 +4011,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "IP_ADDRESS", "STRING", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4010,6 +4022,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "BLACKLIST", "FLAGRIGHT_LIBRARY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4067,6 +4080,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "BusinessPayment", "PromotionPayment", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4106,6 +4120,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "WALLET", "CHECK", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4203,6 +4218,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "LOW", "VERY_LOW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4236,6 +4252,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "BLOCK", "SUSPEND", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4274,6 +4291,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "ORIGIN", "DESTINATION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4305,6 +4323,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "SANCTIONS_PEP", "SANCTIONS_PEP_ADVERSE_MEDIA", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4316,6 +4335,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "CTF", "SCREENING", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4420,6 +4440,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "PAYMENT_BENEFICIARY_NAME", "BANK_NAME", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4685,6 +4706,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "REFUNDED", "SUCCESSFUL", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4698,6 +4720,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "REFUND", "OTHER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4980,6 +5003,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "F", "NB", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5049,6 +5073,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "RETAIL", "PROFESSIONAL", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5058,6 +5083,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "REGISTERED", "UNREGISTERED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5075,6 +5101,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "SUSPENDED", "BLOCKED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5185,6 +5212,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu "USER_STATE_UPDATED", "ALERT_CLOSED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5276,6 +5304,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu enum: - RETAIL - PROFESSIONAL + inline: true source: openapi: ../openapi.yml UserOptional: @@ -5832,6 +5861,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - F - NB docs: Gender of the individual - Male, Female or Non-Binary + inline: true source: openapi: ../openapi.yml UserDetails: @@ -5868,6 +5898,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - LARGE - UNKNOWN docs: Segmentation of the business user + inline: true source: openapi: ../openapi.yml CompanyGeneralDetails: @@ -6034,6 +6065,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - RUPAY - JCB docs: Brand of Card + inline: true source: openapi: ../openapi.yml CardDetailsCardFunding: @@ -6042,12 +6074,14 @@ In order to make individual events retrievable, you also need to pass in a uniqu - DEBIT - PREPAID docs: Funding of Card + inline: true source: openapi: ../openapi.yml CardDetailsCardType: enum: - VIRTUAL - PHYSICAL + inline: true source: openapi: ../openapi.yml CardDetails: @@ -6229,6 +6263,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - BusinessPayment - PromotionPayment docs: Type of transaction + inline: true source: openapi: ../openapi.yml MpesaDetails: @@ -6391,6 +6426,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - CLOSED - HIT docs: Status of a case. E.g. Open, Closed etc. + inline: true source: openapi: ../openapi.yml CaseManagementEventCaseStatusReason: @@ -6402,6 +6438,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu docs: >- Case status reason. E.g. Closed & False Positive, Closed & Investigation Completed etc. + inline: true source: openapi: ../openapi.yml CaseManagementEvent: @@ -6767,6 +6804,7 @@ In order to make individual events retrievable, you also need to pass in a uniqu - CANCELED - REFUND - DECLINED + inline: true source: openapi: ../openapi.yml CheckDetails: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/flexport.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/flexport.json index 55d47ede3f2..590decba284 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/flexport.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/flexport.json @@ -509,6 +509,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -826,6 +827,7 @@ "requoted_quote", "archived_quote", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -851,6 +853,7 @@ "booked", "shipment", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -920,6 +923,7 @@ "contained_in_equipment", "contained_in_battery_powered_vehicles", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -993,6 +997,7 @@ "reviewed", "complete", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1309,6 +1314,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1406,6 +1412,7 @@ "contained_in_equipment", "contained_in_battery_powered_vehicles", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1655,6 +1662,7 @@ "DAP", "DDP", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1667,6 +1675,7 @@ "sub_line", "component_line", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1704,6 +1713,7 @@ "gross_volume", "volume_weight", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1716,6 +1726,7 @@ "truck", "rail", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1859,6 +1870,7 @@ "YD", "Z3", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1922,6 +1934,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2039,6 +2052,7 @@ "freight_collect", "freight_prepaid", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2058,6 +2072,7 @@ "DAP", "DDP", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2072,6 +2087,7 @@ "delivery_order", "work_order", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2083,6 +2099,7 @@ "high", "standard", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2095,6 +2112,7 @@ "cancelled", "closed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2107,6 +2125,7 @@ "truck", "rail", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2166,6 +2185,7 @@ "buyers_agent", "sellers_agent", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2212,6 +2232,7 @@ "icao", "us_cbp", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2301,6 +2322,7 @@ "prs", "dpr", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2332,6 +2354,7 @@ "collect", "prepaid", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2419,6 +2442,7 @@ "customs_hold", "pending", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2469,6 +2493,7 @@ "km", "mi", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2593,6 +2618,7 @@ "terminal", "unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2625,6 +2651,7 @@ "door_to_door", "door_to_port", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2805,6 +2832,7 @@ "additional", "capital", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2860,6 +2888,7 @@ "paid", "payment_pending", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2870,6 +2899,7 @@ "Shipment", "Client", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2952,6 +2982,7 @@ "cm", "in", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2962,6 +2993,7 @@ "cm", "in", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2999,6 +3031,7 @@ "gross_volume", "volume_weight", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3144,6 +3177,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3253,6 +3287,7 @@ "buyers_agent", "sellers_agent", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3320,6 +3355,7 @@ "value": "/ocean/port", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3520,6 +3556,7 @@ "freight_collect", "freight_prepaid", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3539,6 +3576,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3657,6 +3695,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3668,6 +3707,7 @@ "sub_line", "component_line", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3733,6 +3773,7 @@ "W", "X", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3746,6 +3787,7 @@ "delivery_order", "work_order", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3755,6 +3797,7 @@ "standard", "high", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3837,6 +3880,7 @@ "closed", "cancelled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4093,6 +4137,7 @@ "fifty_three_ft", "fifty_three_ft_hc", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4110,6 +4155,7 @@ "bulk", "special", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4141,6 +4187,7 @@ "not_applicable", "misflagged", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4198,6 +4245,7 @@ "DDP", "DPU", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4285,6 +4333,7 @@ "standard", "high", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4330,6 +4379,7 @@ "gated_out", "final_destination", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4431,6 +4481,7 @@ "truck_intl", "warehouse_storage", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4456,6 +4507,7 @@ "collect", "prepaid", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4482,6 +4534,7 @@ "drayage", "cartage", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4543,6 +4596,7 @@ "cbm", "cbft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4605,6 +4659,7 @@ "kg", "lbs", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4731,6 +4786,7 @@ - cbm - cbft docs: unit of measurement. "cbm" for cubic meters. "cbft" for cubic feet. + inline: true source: openapi: ../openapi.yml VolumeCreate: @@ -4748,6 +4804,7 @@ - kg - lbs docs: Required. Unit of measurement. "kg" for kilograms, "lbs" for pounds + inline: true source: openapi: ../openapi.yml WeightCreate: @@ -4765,6 +4822,7 @@ - cm - in docs: Required. Unit of measurement. "cm" for centimeters. "in" for inches. + inline: true source: openapi: ../openapi.yml LengthCreate: @@ -4812,6 +4870,7 @@ - packed_with_equipment - contained_in_equipment - contained_in_battery_powered_vehicles + inline: true source: openapi: ../openapi.yml CreateCargo: @@ -4982,6 +5041,7 @@ - cm - in docs: Required. Unit of measurement. "cm" for centimeters. "in" for inches. + inline: true source: openapi: ../openapi.yml Length: @@ -5039,6 +5099,7 @@ - packed_with_equipment - contained_in_equipment - contained_in_battery_powered_vehicles + inline: true source: openapi: ../openapi.yml Cargo: @@ -5282,6 +5343,7 @@ - value: /ocean/port name: OceanPort docs: Type of the object + inline: true source: openapi: ../openapi.yml Placeport: @@ -5359,6 +5421,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml OceanBookingDetail: @@ -5390,6 +5453,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml AirBookingDetail: @@ -5409,6 +5473,7 @@ enum: - collect - prepaid + inline: true source: openapi: ../openapi.yml TruckingBookingDetail: @@ -5442,6 +5507,7 @@ - submitted - booked - shipment + inline: true source: openapi: ../openapi.yml BookingQuoteStatus: @@ -5456,6 +5522,7 @@ - rejected_quote - requoted_quote - archived_quote + inline: true source: openapi: ../openapi.yml Booking: @@ -5544,6 +5611,7 @@ - DDP - DPU docs: Always required. The Incoterm of your shipment + inline: true source: openapi: ../openapi.yml CreateOceanBooking: @@ -5608,6 +5676,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml CreateAirBooking: @@ -5691,6 +5760,7 @@ docs: >- Whether the shipper or consignee is responsible for payment of trucking freight. This can be `collect` (consignee) or `prepaid` (shipper). + inline: true source: openapi: ../openapi.yml CreateTruckingBooking: @@ -5716,6 +5786,7 @@ - km - mi docs: Required. Unit of measurement. "km" for kilometers. "mi" for miles. + inline: true source: openapi: ../openapi.yml DistanceCreate: @@ -5852,6 +5923,7 @@ Status about if the digitization process for this commercial invoice is complete. If it is not complete, then the commercial invoice should be considered a draft that can change. + inline: true source: openapi: ../openapi.yml CommercialInvoice: @@ -5916,6 +5988,7 @@ - prs - dpr docs: Required. Unit of measurement. + inline: true source: openapi: ../openapi.yml CreateQuantity: @@ -5969,6 +6042,7 @@ - customs_hold - pending docs: The release status for this entry. + inline: true source: openapi: ../openapi.yml CustomsEntry: @@ -6154,6 +6228,7 @@ - denied - not_applicable - misflagged + inline: true source: openapi: ../openapi.yml ShipmentDangerousGoods: @@ -6306,6 +6381,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml ShipmentPriority: @@ -6313,6 +6389,7 @@ - standard - high docs: The level of attention Flexport should give to this shipment + inline: true source: openapi: ../openapi.yml Shipment: @@ -6581,6 +6658,7 @@ - ftl - drayage - cartage + inline: true source: openapi: ../openapi.yml TruckingShipmentLeg: @@ -6669,6 +6747,7 @@ - ventilated - bulk - special + inline: true source: openapi: ../openapi.yml ShipmentContainerContainerSize: @@ -6679,6 +6758,7 @@ - fourty_five_ft_hc - fifty_three_ft - fifty_three_ft_hc + inline: true source: openapi: ../openapi.yml ShipmentContainer: @@ -6736,6 +6816,7 @@ - terminal - unknown docs: The main reason for the exception as an identifier. + inline: true source: openapi: ../openapi.yml Exception: @@ -6829,6 +6910,7 @@ - additional - capital docs: Category of the charge. + inline: true source: openapi: ../openapi.yml InvoiceItem: @@ -6882,6 +6964,7 @@ - paid - payment_pending docs: Status of the invoice + inline: true source: openapi: ../openapi.yml InvoiceType: @@ -6891,6 +6974,7 @@ docs: >- What the invoice is being issued for. Shipment related charges are type `Shipment` and non-shipment related charges are type `Client` + inline: true source: openapi: ../openapi.yml Invoice: @@ -7136,6 +7220,7 @@ - gross_volume - volume_weight docs: The type of measure + inline: true source: openapi: ../openapi.yml LineItemMeasurement: @@ -7157,6 +7242,7 @@ - sub_line - component_line default: main_line + inline: true source: openapi: ../openapi.yml PurchaseOrderLineItemIncoterm: @@ -7173,6 +7259,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml PurchaseOrderLineItemUnitOfMeasure: @@ -7222,6 +7309,7 @@ - TDWB - W - X + inline: true source: openapi: ../openapi.yml PurchaseOrderLineItem: @@ -7286,6 +7374,7 @@ - buyers_agent - sellers_agent docs: The role that the party has + inline: true source: openapi: ../openapi.yml PartiesContactsItem: @@ -7347,6 +7436,7 @@ because they've finished shipping), while Cancelled POs denote POs that were mistakenly uploaded or that should not be used. default: open + inline: true source: openapi: ../openapi.yml PurchaseOrderIncoterm: @@ -7363,6 +7453,7 @@ - DAP - DDP - DPU + inline: true source: openapi: ../openapi.yml PurchaseOrderOrderClass: @@ -7373,18 +7464,21 @@ - delivery_order - work_order docs: Class of the purchase order. + inline: true source: openapi: ../openapi.yml PurchaseOrderFreightPaymnetTerms: enum: - freight_collect - freight_prepaid + inline: true source: openapi: ../openapi.yml PurchaseOrderPriority: enum: - standard - high + inline: true source: openapi: ../openapi.yml PurchaseOrder: @@ -7463,6 +7557,7 @@ - buyers_agent - sellers_agent docs: The role that the party has + inline: true source: openapi: ../openapi.yml CreatePartyContactsItem: @@ -7510,6 +7605,7 @@ - icao - us_cbp docs: The code type of the port + inline: true source: openapi: ../openapi.yml CreatePurchaseOrderPort: @@ -7595,6 +7691,7 @@ - gross_volume - volume_weight docs: The type of measure + inline: true source: openapi: ../openapi.yml CreateLineItemMeasurement: @@ -7620,6 +7717,7 @@ - truck - rail docs: Required if there is no transportation_mode in purchase order + inline: true source: openapi: ../openapi.yml CreateLineItemIncoterm: @@ -7638,6 +7736,7 @@ docs: >- Required if there is no incoterm in the line item's purchase order. The Incoterm of your line item. + inline: true source: openapi: ../openapi.yml CreateLineItemLineType: @@ -7647,6 +7746,7 @@ - component_line docs: type of the line item default: main_line + inline: true source: openapi: ../openapi.yml CreateLineItemUnitOfMeasure: @@ -7779,6 +7879,7 @@ - Z3 docs: The measurement per unit for this line item. default: EA + inline: true source: openapi: ../openapi.yml CreateLineItem: @@ -7877,6 +7978,7 @@ because they've finished shipping), while Cancelled POs denote POs that were mistakenly uploaded or that should not be used default: open + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrderFreightPaymentTerms: @@ -7884,6 +7986,7 @@ - freight_collect - freight_prepaid docs: The freight payment term for the purchase order + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrderTransportationMode: @@ -7893,6 +7996,7 @@ - truck - rail docs: Required if there is no transportation_mode in purchase order + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrderIncoterm: @@ -7911,6 +8015,7 @@ docs: >- Required if there is no incoterm in each line item. The incoterm of your purchase order. + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrderPriority: @@ -7919,6 +8024,7 @@ - standard docs: priority of the purchase order. default: standard + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrderOrderClass: @@ -7930,6 +8036,7 @@ - work_order docs: Class of the purchase order. default: purchase_order + inline: true source: openapi: ../openapi.yml CreateOrUpdatePurchaseOrder: @@ -9315,6 +9422,7 @@ errors: "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -9324,6 +9432,7 @@ errors: "booked", "submitted", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -9333,6 +9442,7 @@ errors: "cargo_ready_date", "created_at", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -9370,6 +9480,7 @@ errors: "no", "notsure", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9423,6 +9534,7 @@ errors: contain goods subject to export control regulations? Export Control Regulations include dual use item control, Hong Kong strategic commodity control, US and EU export control, etc. + inline: true source: openapi: ../openapi.yml BookingCreateResponse: @@ -11163,6 +11275,7 @@ docs: >- "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11596,6 +11709,7 @@ docs: >- "belly_freighter", "unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11608,6 +11722,7 @@ docs: >- "truck", "rail", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11623,6 +11738,7 @@ docs: >- "airport_transfer", "air_cartage", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11641,6 +11757,7 @@ docs: >- `truck`, or `rail`. If `transportation_mode` is `truck`, `ocean`, or `rail`, `country_code` in both `origin_address` and `destination_address` is required. + inline: true source: openapi: ../openapi.yml CreateCarbonCalculationFlightType: @@ -11652,6 +11769,7 @@ docs: >- For `transportation_mode: air`, the type of plane used. One of `freighter`, `belly_freighter`, or `unknown`. Defaults to `unknown`. default: unknown + inline: true source: openapi: ../openapi.yml CreateCarbonCalculationTruckingServiceType: @@ -11667,6 +11785,7 @@ docs: >- For `transportation_mode: truck`, the type of service used. One of `ftl`, `ltl`, `drayage`, `cartage`, `last_mile`, `airport_transfer`, or `air_cartage`. + inline: true source: openapi: ../openapi.yml CarbonCalculationCreateResponse: @@ -17683,6 +17802,7 @@ docs: Endpoints relating to Document objects "value": "/shipment_leg", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -18578,6 +18698,7 @@ Other details about this invoice", "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -18589,6 +18710,7 @@ Other details about this invoice", "void", "paid", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20182,6 +20304,7 @@ docs: Endpoints relating to Location objects "roadport", "seaport", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -22195,6 +22318,7 @@ docs: Endpoints relating to Product objects "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -22214,6 +22338,7 @@ docs: Endpoints relating to Product objects "buyers_agent", "sellers_agent", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -22224,6 +22349,7 @@ docs: Endpoints relating to Product objects "closed", "cancelled", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -23446,6 +23572,7 @@ docs: >- "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -24973,6 +25100,7 @@ docs: >- "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -24986,6 +25114,7 @@ docs: >- "updated_at", "archived_at", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hathora.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hathora.json index 183a789bdf1..29948defae3 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hathora.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hathora.json @@ -226,6 +226,7 @@ "succeeded", "failed", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -360,6 +361,7 @@ "public", "local", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -371,6 +373,7 @@ "rate_egress", "total_egress", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -412,6 +415,7 @@ "medium", "large", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -490,6 +494,7 @@ "Sydney", "Sao_Paulo", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -530,6 +535,7 @@ "suspended", "destroyed", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -561,6 +567,7 @@ "udp", "tls", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -759,6 +766,7 @@ types: - running - succeeded - failed + inline: true source: openapi: ../openapi.json Build: @@ -789,6 +797,7 @@ types: - private - public - local + inline: true source: openapi: ../openapi.json Lobby: @@ -3132,6 +3141,7 @@ service: "private", "local", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3468,6 +3478,7 @@ types: - public - private - local + inline: true source: openapi: ../openapi.json ", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hookdeck.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hookdeck.json index 4fbbe7da936..f0273d5c611 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hookdeck.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hookdeck.json @@ -72,6 +72,7 @@ "each_attempt", "last_attempt", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -150,6 +151,7 @@ "SOCKET_CLOSED", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -162,6 +164,7 @@ "COMPLETED", "HOLD", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -174,6 +177,7 @@ "SUCCESSFUL", "HOLD", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -187,6 +191,7 @@ "UNPAUSE", "AUTOMATIC", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -474,6 +479,7 @@ "info", "debug", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -726,6 +732,7 @@ "minute", "hour", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1001,6 +1008,7 @@ "SUCCESSFUL", "FAILED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1025,6 +1033,7 @@ "path", "query", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1046,6 +1055,7 @@ "sha256", "sha512", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1068,6 +1078,7 @@ "base64", "hex", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1096,6 +1107,7 @@ "TRANSFORMATION_FAILED", "CLI_DISCONNECTED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1189,6 +1201,7 @@ "HANDSHAKE", "POLLING", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1235,6 +1248,7 @@ "pipedrive", "sendgrid", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1274,6 +1288,7 @@ "ACKNOWLEDGED", "RESOLVED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1456,6 +1471,7 @@ "first_attempt", "final_attempt", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1494,6 +1510,7 @@ "transformation", "backpressure", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1529,6 +1546,7 @@ "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1685,6 +1703,7 @@ "NORMAL", "LOW", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1713,6 +1732,7 @@ "INGESTION_FATAL", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1763,6 +1783,7 @@ "linear", "exponential", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1897,6 +1918,7 @@ "minute", "second", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2083,6 +2105,7 @@ "value": "event.successful", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2229,6 +2252,7 @@ "error", "fatal", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3285,6 +3309,7 @@ types: enum: - base64 - hex + inline: true source: openapi: ../openapi.yml HmacIntegrationConfigs: @@ -3316,6 +3341,7 @@ types: enum: - minute - second + inline: true source: openapi: ../openapi.yml ShopifyIntegrationConfigs: @@ -3488,6 +3514,7 @@ types: - warn - info - debug + inline: true source: openapi: ../openapi.yml ConsoleLine: @@ -3681,6 +3708,7 @@ types: - NORMAL - LOW docs: The priority attributed to the request when received + inline: true source: openapi: ../openapi.yml RequestDataParsedQueryOne: @@ -5017,6 +5045,7 @@ docs: An attempt is any request that Hookdeck makes on behalf of an event. "http", "cli", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5036,6 +5065,7 @@ docs: An attempt is any request that Hookdeck makes on behalf of an event. - http - cli docs: Bookmark target + inline: true source: openapi: ../openapi.yml imports: @@ -8182,6 +8212,7 @@ docs: '' "accepted", "rejected", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8223,6 +8254,7 @@ docs: '' enum: - accepted - rejected + inline: true source: openapi: ../openapi.yml CreateRequestBulkRetryRequestQueryRejectionCauseAny: @@ -9810,6 +9842,7 @@ docs: '' "minute", "hour", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9935,6 +9968,7 @@ docs: '' "minute", "hour", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9998,6 +10032,7 @@ docs: '' - minute - hour docs: Period to rate limit attempts + inline: true source: openapi: ../openapi.yml CreateConnectionRequestDestination: @@ -10059,6 +10094,7 @@ docs: '' - minute - hour docs: Period to rate limit attempts + inline: true source: openapi: ../openapi.yml UpsertConnectionRequestDestination: @@ -11386,6 +11422,7 @@ docs: >- "minute", "hour", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11408,6 +11445,7 @@ docs: >- "minute", "hour", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11419,6 +11457,7 @@ docs: >- "minute", "hour", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11439,6 +11478,7 @@ docs: >- - minute - hour docs: Period to rate limit attempts + inline: true source: openapi: ../openapi.yml UpsertDestinationRequestRateLimitPeriod: @@ -11447,6 +11487,7 @@ docs: >- - minute - hour docs: Period to rate limit attempts + inline: true source: openapi: ../openapi.yml UpdateDestinationRequestRateLimitPeriod: @@ -11455,6 +11496,7 @@ docs: >- - minute - hour docs: Period to rate limit attempts + inline: true source: openapi: ../openapi.yml imports: @@ -14695,6 +14737,7 @@ docs: >- "ACKNOWLEDGED", "RESOLVED", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14753,6 +14796,7 @@ docs: >- - ACKNOWLEDGED - RESOLVED docs: New status + inline: true source: openapi: ../openapi.yml imports: @@ -15802,6 +15846,7 @@ docs: Notifications let your team receive alerts anytime an issue changes. "accepted", "rejected", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/humanloop.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/humanloop.json index 0b640f69072..368be829217 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/humanloop.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/humanloop.json @@ -228,6 +228,7 @@ in the Evaluation Report.", "system", "tool", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -570,6 +571,7 @@ in the inheriting classes with documentation and appropriate Field definitions." "default", "other", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -786,6 +788,7 @@ function.", "cancelled", "failed", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -847,6 +850,7 @@ function.", "target_free", "target_required", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -993,6 +997,7 @@ function.", "boolean", "number", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1005,6 +1010,7 @@ function.", "text", "number", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1016,6 +1022,7 @@ function.", "active", "inactive", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1092,6 +1099,7 @@ function.", "correction", "comment", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1277,6 +1285,7 @@ function.", "low", "auto", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1338,6 +1347,7 @@ Used by a File's PAPV (Positive Action Per View) metric.", "neutral", "unset", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1923,6 +1933,7 @@ Does not have things like the signature or setup schema.", "chat", "edit", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1941,6 +1952,7 @@ Does not have things like the signature or setup schema.", "google", "groq", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1995,6 +2007,7 @@ Does not have things like the signature or setup schema.", "active", "inactive", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2061,6 +2074,7 @@ Observability is implemented by running monitoring Evaluators on Logs.", "completed", "failed", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2168,6 +2182,7 @@ Observability is implemented by running monitoring Evaluators on Logs.", "supportadmin", "user", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2179,6 +2194,7 @@ Observability is implemented by running monitoring Evaluators on Logs.", "updated_at", "name", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2845,6 +2861,7 @@ Observability is implemented by running monitoring Evaluators on Logs.", "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2903,6 +2920,7 @@ Observability is implemented by running monitoring Evaluators on Logs.", "week", "month", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3187,6 +3205,7 @@ V4 uses organization and inline. Those are deprecated and will be removed in fav "organization", "inline", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3230,6 +3249,7 @@ V4 uses organization and inline. Those are deprecated and will be removed in fav "json_schema", "get_api_call", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3241,6 +3261,7 @@ V4 uses organization and inline. Those are deprecated and will be removed in fav "add", "remove", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3424,6 +3445,7 @@ V4 uses organization and inline. Those are deprecated and will be removed in fav "committed", "deleted", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4313,6 +4335,7 @@ types: Specify the detail level of the image provided to the model. For more details see: https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding + inline: true source: openapi: ../openapi.yml ImageUrl: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hume.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hume.json index 85e3504dc4d..525c50ba481 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hume.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/hume.json @@ -255,6 +255,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "tr", "uk", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, @@ -353,6 +354,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, @@ -555,6 +557,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "utterance", "conversational_turn", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, @@ -1068,6 +1071,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "started", "ended", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, @@ -1190,6 +1194,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "COMPLETED", "FAILED", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, @@ -1270,6 +1275,7 @@ If you wish to supply more than 100 URLs, consider providing them as an archive "created_before", "created_after", ], + "inline": undefined, "source": { "openapi": "../openapi.yaml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/inline-path-parameters.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/inline-path-parameters.json index 8a25286f6d0..80bde1edcc0 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/inline-path-parameters.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/inline-path-parameters.json @@ -213,6 +213,7 @@ types: "private", "public", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -235,6 +236,7 @@ types: - private - public docs: Access level + inline: true source: openapi: ../openapi.yml SearchResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/intercom.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/intercom.json index 344d1c9115e..d8df318af39 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/intercom.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/intercom.json @@ -2845,6 +2845,7 @@ "upfront_email_collection_change", "welcome_message_change", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3082,6 +3083,7 @@ "comment", "note", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3123,6 +3125,7 @@ "note", "quick_reply", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3280,6 +3283,7 @@ "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3533,6 +3537,7 @@ "admin", "team", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4538,6 +4543,7 @@ "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4683,6 +4689,7 @@ }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4725,7 +4732,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5439,6 +5446,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul }, "Unstable", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5495,6 +5503,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "ticket", "conversation", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5521,6 +5530,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "AND", "OR", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5591,6 +5601,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "draft", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5717,6 +5728,7 @@ Their responses are likely to contain a pages object that hosts pagination links "value": "conversation.list", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5978,6 +5990,7 @@ Their responses are likely to contain a pages object that hosts pagination links "value": "~", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6019,6 +6032,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "cancelled", "active", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6221,7 +6235,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6298,6 +6312,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "team", "user", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6374,6 +6389,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "comment", "quick_reply", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6386,7 +6402,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6617,6 +6633,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6668,6 +6685,7 @@ You can copy the `icon` property for your ticket type from [Twemoji Cheatsheet]( }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8445,6 +8463,7 @@ types: - temporary_expectation_change - upfront_email_collection_change - welcome_message_change + inline: true source: openapi: ../openapi.yml ActivityLog: @@ -8565,6 +8584,7 @@ types: enum: - comment - note + inline: true source: openapi: ../openapi.yml AdminReplyConversationRequest: @@ -8602,6 +8622,7 @@ types: - comment - note - quick_reply + inline: true source: openapi: ../openapi.yml AdminReplyTicketRequestReplyOptionsItem: @@ -8744,6 +8765,7 @@ types: - published - draft docs: Whether the article is `published` or is a `draft` . + inline: true source: openapi: ../openapi.yml ArticleContent: @@ -8951,6 +8973,7 @@ types: enum: - admin - team + inline: true source: openapi: ../openapi.yml AssignConversationRequest: @@ -9732,6 +9755,7 @@ types: Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. + inline: true source: openapi: ../openapi.yml CreateArticleRequest: @@ -9859,6 +9883,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml CreateTicketTypeRequest: @@ -9920,6 +9945,7 @@ types: - type: optional source: openapi: ../openapi.yml + inline: true CustomAttributes: type: map docs: >- @@ -10440,6 +10466,7 @@ types: - ticket - conversation docs: ticket or conversation + inline: true source: openapi: ../openapi.yml LinkedObject: @@ -10480,6 +10507,7 @@ types: - AND - OR docs: An operator to allow boolean inspection between multiple fields. + inline: true source: openapi: ../openapi.yml MultipleFilterSearchRequestValue: @@ -10509,6 +10537,7 @@ types: docs: >- News items will not be visible to your users in the assigned newsfeeds until they are set live. + inline: true source: openapi: ../openapi.yml NewsItemRequest: @@ -10608,6 +10637,7 @@ types: - value: conversation.list name: ConversationList docs: The type of object + inline: true source: openapi: ../openapi.yml PaginatedResponseDataItem: @@ -10780,6 +10810,7 @@ types: docs: >- The accepted operators you can use to define how you want to search for the value. + inline: true source: openapi: ../openapi.yml SingleFilterSearchRequest: @@ -10809,6 +10840,7 @@ types: - `hit`: If there’s at least one hit event in the underlying sla_events table, and no “missed” or “canceled” events for the conversation. - `missed`: If there are any missed sla_events for the conversation and no canceled events. If there’s even a single missed sla event, the status will always be missed. A missed status is not applied when the SLA expires, only the next time a teammate replies. - `active`: An SLA has been applied to a conversation, but has not yet been fulfilled. SLA status is active only if there are no “hit, “missed”, or “canceled” events. + inline: true source: openapi: ../openapi.yml SlaApplied: @@ -10967,6 +10999,7 @@ types: - type: File source: openapi: ../openapi.yml + inline: true TicketCustomAttributes: type: map docs: >- @@ -10996,6 +11029,7 @@ types: - team - user docs: The type of the author + inline: true source: openapi: ../openapi.yml TicketPartAuthor: @@ -11043,6 +11077,7 @@ types: - comment - quick_reply docs: Type of the part + inline: true source: openapi: ../openapi.yml TicketReply: @@ -11085,6 +11120,7 @@ types: - list source: openapi: ../openapi.yml + inline: true TicketRequestCustomAttributes: type: map docs: >- @@ -11240,6 +11276,7 @@ types: Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. + inline: true source: openapi: ../openapi.yml UpdateArticleRequest: @@ -11291,6 +11328,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml UpdateTicketTypeRequest: @@ -12415,6 +12453,7 @@ types: "workflow_preview", "fin_preview", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12432,6 +12471,7 @@ types: docs: >- The type of the source that triggered AI Agent involvement in the conversation. + inline: true source: openapi: ../openapi.yml AiAgent: @@ -12510,6 +12550,7 @@ imports: "content_snippet", "workflow_connector_action", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12525,6 +12566,7 @@ imports: - content_snippet - workflow_connector_action docs: The type of the content source. + inline: true source: openapi: ../openapi.yml ContentSource: @@ -15131,6 +15173,7 @@ imports: "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15179,6 +15222,7 @@ imports: "highlight", "plain", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15206,6 +15250,7 @@ imports: "highlight", "plain", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17617,6 +17662,7 @@ types: Whether the article is `published` or is a `draft`. For multilingual articles, this will be the state of the default language's content. default: draft + inline: true source: openapi: ../openapi.yml Articles: @@ -17702,6 +17748,7 @@ types: - highlight - plain docs: The type of text - `highlight` or `plain`. + inline: true source: openapi: ../openapi.yml ArticleSearchHighlightsHighlightedTitleItem: @@ -17721,6 +17768,7 @@ types: - highlight - plain docs: The type of text - `highlight` or `plain`. + inline: true source: openapi: ../openapi.yml ArticleSearchHighlightsHighlightedSummaryItemItem: @@ -26556,6 +26604,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "priority", "not_priority", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26567,6 +26616,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "closed", "snoozed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26601,6 +26651,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "user", "contact", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -29840,6 +29891,7 @@ types: - user - contact docs: The role associated to the contact - user or lead. + inline: true source: openapi: ../openapi.yml CreateConversationRequestFrom: @@ -29920,6 +29972,7 @@ types: - closed - snoozed docs: Can be set to "open", "closed" or "snoozed". + inline: true source: openapi: ../openapi.yml ConversationPriority: @@ -29927,6 +29980,7 @@ types: - priority - not_priority docs: If marked as priority, it will return priority or else not_priority. + inline: true source: openapi: ../openapi.yml Conversation: @@ -30980,6 +31034,7 @@ You can update a data attribute. "datetime", "date", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30990,6 +31045,7 @@ You can update a data attribute. "contact", "company", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31080,6 +31136,7 @@ You can update a data attribute. "boolean", "date", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31090,6 +31147,7 @@ You can update a data attribute. "contact", "company", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31100,6 +31158,7 @@ You can update a data attribute. "company", "conversation", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -31119,6 +31178,7 @@ You can update a data attribute. - contact - company docs: The model that the data attribute belongs to. + inline: true source: openapi: ../openapi.yml CreateDataAttributeRequestDataType: @@ -31130,6 +31190,7 @@ You can update a data attribute. - datetime - date docs: The type of data stored for this attribute. + inline: true source: openapi: ../openapi.yml DataAttributeModel: @@ -31139,6 +31200,7 @@ You can update a data attribute. docs: >- Value is `contact` for user/lead attributes and `company` for company attributes. + inline: true source: openapi: ../openapi.yml DataAttributeDataType: @@ -31149,6 +31211,7 @@ You can update a data attribute. - boolean - date docs: The data type of the attribute. + inline: true source: openapi: ../openapi.yml DataAttribute: @@ -32804,6 +32867,7 @@ Your exported message data will be streamed continuously back down to you in a g "no_data", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32995,6 +33059,7 @@ types: - no_data - canceled docs: The current state of your job. + inline: true source: openapi: ../openapi.yml DataExport: @@ -35981,6 +36046,7 @@ This will return the Message model that has been created. "facebook", "twitter", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -36158,6 +36224,7 @@ types: docs: >- The type of message that was sent. Can be email, inapp, facebook or twitter. + inline: true source: openapi: ../openapi.yml Message: @@ -36785,6 +36852,7 @@ types: "draft", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -37206,6 +37274,7 @@ types: docs: >- News items will not be visible to your users in the assigned newsfeeds until they are set live. + inline: true source: openapi: ../openapi.yml NewsItem: @@ -38210,6 +38279,7 @@ types: "contact", "user", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38304,6 +38374,7 @@ types: - contact - user docs: 'Type of the contact: contact (lead) or user.' + inline: true source: openapi: ../openapi.yml Segment: @@ -38660,6 +38731,7 @@ This will return a subscription type model for the subscription type that was ad "opt_out", "opt_in", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38669,6 +38741,7 @@ This will return a subscription type model for the subscription type that was ad "email", "sms_message", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38680,6 +38753,7 @@ This will return a subscription type model for the subscription type that was ad "draft", "archived", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38893,6 +38967,7 @@ types: - draft - archived docs: The state of the subscription type. + inline: true source: openapi: ../openapi.yml SubscriptionTypeConsentType: @@ -38900,12 +38975,14 @@ types: - opt_out - opt_in docs: Describes the type of consent. + inline: true source: openapi: ../openapi.yml SubscriptionTypeContentTypesItem: enum: - email - sms_message + inline: true source: openapi: ../openapi.yml SubscriptionType: @@ -41090,6 +41167,7 @@ types: "datetime", "files", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -41107,6 +41185,7 @@ types: - datetime - files docs: The data type of the attribute + inline: true source: openapi: ../openapi.yml imports: @@ -43552,6 +43631,7 @@ The table below shows the operators you can use to define how you want to search }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43624,6 +43704,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43636,6 +43717,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43648,6 +43730,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43714,6 +43797,7 @@ The table below shows the operators you can use to define how you want to search }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43742,6 +43826,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43802,6 +43887,7 @@ types: - waiting_on_customer - resolved docs: The state of the ticket. + inline: true source: openapi: ../openapi.yml UpdateTicketRequestAssignment: @@ -43824,6 +43910,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket. + inline: true source: openapi: ../openapi.yml TicketTicketState: @@ -43833,6 +43920,7 @@ types: - waiting_on_customer - resolved docs: The state the ticket is currently in + inline: true source: openapi: ../openapi.yml Ticket: @@ -43918,6 +44006,7 @@ types: - waiting_on_customer - resolved docs: The previous state of the ticket. + inline: true source: openapi: ../openapi.yml TicketPartTicketState: @@ -43927,6 +44016,7 @@ types: - waiting_on_customer - resolved docs: The state of the ticket. + inline: true source: openapi: ../openapi.yml TicketPart: @@ -43981,6 +44071,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml TicketType: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/merge.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/merge.json index 5419f90792a..5fb5fc872e9 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/merge.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/merge.json @@ -105,6 +105,7 @@ View a list of your organization's `LinkedAccount` objects.", "INCOMPLETE", "RELINK_NEEDED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -183,6 +184,7 @@ View a list of your organization's `LinkedAccount` objects.", "SAVINGS", "CHECKING", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -368,6 +370,7 @@ Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all benefits. "mktg", "filestorage", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -389,6 +392,7 @@ Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all benefits. "mktg", "filestorage", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -530,6 +534,7 @@ Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companie "STRING", "LIST_OF_STRINGS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1035,6 +1040,7 @@ Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companie "ZM", "ZW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1246,6 +1252,7 @@ Fetch from the `LIST Earnings` endpoint and filter by `ID` to show all earnings. "OVERTIME", "BONUS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2223,6 +2230,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "PENDING", "INACTIVE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2240,6 +2248,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "CONTRACTOR", "FREELANCE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2251,6 +2260,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "READ", "WRITE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2264,6 +2274,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "BASE64", "GZIP_BASE64", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2374,6 +2385,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "WHITE", "PREFER_NOT_TO_DISCLOSE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2389,6 +2401,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "NONEXEMPT", "OWNER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2409,6 +2422,7 @@ Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employ "OTHER", "PREFER_NOT_TO_DISCLOSE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2510,6 +2524,7 @@ Fetch from the `LIST Employee` endpoint and expand groups to view an employee's "BUSINESS_UNIT", "GROUP", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2571,6 +2586,7 @@ Fetch from the `LIST Employee` endpoint and expand groups to view an employee's "ONGOING", "RESOLVED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3023,6 +3039,7 @@ Fetch from the `LIST Locations` endpoint and filter by `ID` to show all office l "HOME", "WORK", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3040,6 +3057,7 @@ Fetch from the `LIST Locations` endpoint and filter by `ID` to show all office l "HEAD_OF_HOUSEHOLD", "QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3075,6 +3093,7 @@ Fetch from the `LIST Locations` endpoint and filter by `ID` to show all office l "PATCH", "DELETE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3995,6 +4014,7 @@ Create a `MultipartFormField` to define a multipart form entry.", "ZWR", "ZWL", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4023,6 +4043,7 @@ Create a `MultipartFormField` to define a multipart form entry.", "PRO_RATA", "SEMIMONTHLY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4089,6 +4110,7 @@ Fetch from the `LIST PayGroup` endpoint and filter by `ID` to show all pay group "EVERY_SIX_MONTHS", "YEAR", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4177,6 +4199,7 @@ Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all payrol "VOLUNTEER", "BEREAVEMENT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4190,6 +4213,7 @@ Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all payrol "GDPR", "OTHER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4274,6 +4298,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "XML", "MULTIPART", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4293,6 +4318,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "VOLUNTEER", "BEREAVEMENT", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4304,6 +4330,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "JSON", "BASE64_GZIP", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4321,6 +4348,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "FAILED", "CLOSED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4338,6 +4366,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "TERMINATION", "SIGN_ON_BONUS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4349,6 +4378,7 @@ View the `RemoteResponse` returned from your `DataPassthrough`.", "IN_NEXT_SYNC", "IN_LAST_SYNC", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4389,6 +4419,7 @@ View the `SyncStatus` for an account to see how recently its models were synced. "PAUSED", "PARTIALLY_SYNCED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4782,6 +4813,7 @@ Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off "CANCELLED", "DELETED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4793,6 +4825,7 @@ Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off "HOURS", "DAYS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10270,6 +10303,7 @@ service: "CHECKING", "SAVINGS", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -10285,6 +10319,7 @@ service: "value": "remote_created_at", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11524,6 +11559,7 @@ service: }, "payroll_run", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -11537,6 +11573,7 @@ service: }, "payroll_run", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -12362,6 +12399,7 @@ service: "INACTIVE", "PENDING", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13365,6 +13403,7 @@ service: "value": "work_location,team,pay_group", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13420,6 +13459,7 @@ service: }, "marital_status", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13475,6 +13515,7 @@ service: }, "marital_status", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -14478,6 +14519,7 @@ service: "value": "work_location,team,pay_group", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -14533,6 +14575,7 @@ service: }, "marital_status", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -14588,6 +14631,7 @@ service: }, "marital_status", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16386,6 +16430,7 @@ service: }, "pay_group", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16401,6 +16446,7 @@ service: "value": "effective_date", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16456,6 +16502,7 @@ service: }, "pay_period", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16511,6 +16558,7 @@ service: }, "pay_period", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16524,6 +16572,7 @@ service: }, "pay_group", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16579,6 +16628,7 @@ service: }, "pay_period", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16634,6 +16684,7 @@ service: }, "pay_period", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -17599,6 +17650,7 @@ service: "ONGOING", "RESOLVED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -17969,6 +18021,7 @@ service: "mktg", "ticketing", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -19079,6 +19132,7 @@ service: }, "run_type", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -19091,6 +19145,7 @@ service: "SIGN_ON_BONUS", "TERMINATION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -19104,6 +19159,7 @@ service: }, "run_type", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -19117,6 +19173,7 @@ service: }, "run_type", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -19130,6 +19187,7 @@ service: }, "run_type", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20515,6 +20573,7 @@ service: "value": "employee,approver", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20541,6 +20600,7 @@ service: }, "units", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20554,6 +20614,7 @@ service: "VACATION", "VOLUNTEER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20580,6 +20641,7 @@ service: }, "units", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20592,6 +20654,7 @@ service: "DELETED", "REQUESTED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20605,6 +20668,7 @@ service: "value": "employee,approver", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20631,6 +20695,7 @@ service: }, "units", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20657,6 +20722,7 @@ service: }, "units", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -21274,6 +21340,7 @@ service: "VACATION", "VOLUNTEER", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/non-alphanumeric-characters.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/non-alphanumeric-characters.json index 0e93f21bc04..205a502067b 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/non-alphanumeric-characters.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/non-alphanumeric-characters.json @@ -66,6 +66,7 @@ "value": "", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/ntropy.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/ntropy.json index 1234b194890..eca84e8fbf6 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/ntropy.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/ntropy.json @@ -119,6 +119,7 @@ "consumer", "business", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -129,6 +130,7 @@ "consumer", "business", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -148,6 +150,7 @@ "financing", "taxes", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -287,6 +290,7 @@ "invalid_bank_statement", "internal_error", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -328,6 +332,7 @@ "completed", "error", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -459,6 +464,7 @@ enriched transactions.", "completed", "error", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -488,6 +494,7 @@ enriched transactions.", "low", "unknown", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -545,6 +552,7 @@ enriched transactions.", "person", "organization", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -797,6 +805,7 @@ enriched transactions.", "ZM", "ZW", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -955,6 +964,7 @@ enriched transactions.", "ZWL", "HRK", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -982,6 +992,7 @@ enriched transactions.", "processed", "failed", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -996,6 +1007,7 @@ enriched transactions.", "person", "transaction_type", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1098,6 +1110,7 @@ enriched transactions.", "incoming", "outgoing", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1454,6 +1467,7 @@ enriched transactions.", "delivery_service", "payment_processor", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1811,6 +1825,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "yearly", "other", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1825,6 +1840,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "value": "one off", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1885,6 +1901,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "resolved", "rejected", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2044,6 +2061,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "account_holder_not_found", "internal_error", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2216,6 +2234,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "value": "batches.error", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2289,6 +2308,7 @@ whether a transaction is a one-time event or a part of a recurring series.", "account_holder_id", "account_holder_name", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3606,6 +3626,7 @@ types: name: BatchesCompleted - value: batches.error name: BatchesError + inline: true source: openapi: ../openapi.yml Webhook: @@ -9684,6 +9705,7 @@ sdk.webhooks.create( "value": "batches.error", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9719,6 +9741,7 @@ sdk.webhooks.create( "value": "batches.error", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -10052,6 +10075,7 @@ types: name: BatchesCompleted - value: batches.error name: BatchesError + inline: true source: openapi: ../openapi.yml WebhookPatchEventsItem: @@ -10070,6 +10094,7 @@ types: name: BatchesCompleted - value: batches.error name: BatchesError + inline: true source: openapi: ../openapi.yml ", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/oauth.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/oauth.json index 4fa557b7ba4..319dfb66338 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/oauth.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/oauth.json @@ -123,6 +123,7 @@ "refresh_token", "client_credentials", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -152,6 +153,7 @@ - refresh_token - client_credentials docs: The type of grant to request + inline: true source: openapi: ../openapi.yml AuthGetTokenResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/only-include-referenced-schemas.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/only-include-referenced-schemas.json index a5fd6fe7cb1..2b7438636ca 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/only-include-referenced-schemas.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/only-include-referenced-schemas.json @@ -2844,6 +2844,7 @@ "upfront_email_collection_change", "welcome_message_change", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3081,6 +3082,7 @@ "comment", "note", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3122,6 +3124,7 @@ "note", "quick_reply", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3279,6 +3282,7 @@ "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3532,6 +3536,7 @@ "admin", "team", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4506,6 +4511,7 @@ "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4634,6 +4640,7 @@ }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4676,7 +4683,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5223,6 +5230,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "ticket", "conversation", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5249,6 +5257,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "AND", "OR", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5319,6 +5328,7 @@ A "cursor" or pointer is used to keep track of the current position in the resul "draft", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5445,6 +5455,7 @@ Their responses are likely to contain a pages object that hosts pagination links "value": "conversation.list", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5706,6 +5717,7 @@ Their responses are likely to contain a pages object that hosts pagination links "value": "~", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5747,6 +5759,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "cancelled", "active", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5949,7 +5962,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6026,6 +6039,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "team", "user", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6102,6 +6116,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "comment", "quick_reply", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6114,7 +6129,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "discriminated": false, "docs": undefined, "encoding": undefined, - "inline": undefined, + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6345,6 +6360,7 @@ Important: if there are any canceled sla_events for the conversation - meaning a "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6396,6 +6412,7 @@ You can copy the `icon` property for your ticket type from [Twemoji Cheatsheet]( }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8152,6 +8169,7 @@ types: - temporary_expectation_change - upfront_email_collection_change - welcome_message_change + inline: true source: openapi: ../openapi.yml ActivityLog: @@ -8272,6 +8290,7 @@ types: enum: - comment - note + inline: true source: openapi: ../openapi.yml AdminReplyConversationRequest: @@ -8309,6 +8328,7 @@ types: - comment - note - quick_reply + inline: true source: openapi: ../openapi.yml AdminReplyTicketRequestReplyOptionsItem: @@ -8451,6 +8471,7 @@ types: - published - draft docs: Whether the article is `published` or is a `draft` . + inline: true source: openapi: ../openapi.yml ArticleContent: @@ -8658,6 +8679,7 @@ types: enum: - admin - team + inline: true source: openapi: ../openapi.yml AssignConversationRequest: @@ -9414,6 +9436,7 @@ types: Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. + inline: true source: openapi: ../openapi.yml CreateArticleRequest: @@ -9534,6 +9557,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml CreateTicketTypeRequest: @@ -9595,6 +9619,7 @@ types: - type: optional source: openapi: ../openapi.yml + inline: true CustomAttributes: type: map docs: >- @@ -9941,6 +9966,7 @@ types: - ticket - conversation docs: ticket or conversation + inline: true source: openapi: ../openapi.yml LinkedObject: @@ -9981,6 +10007,7 @@ types: - AND - OR docs: An operator to allow boolean inspection between multiple fields. + inline: true source: openapi: ../openapi.yml MultipleFilterSearchRequestValue: @@ -10010,6 +10037,7 @@ types: docs: >- News items will not be visible to your users in the assigned newsfeeds until they are set live. + inline: true source: openapi: ../openapi.yml NewsItemRequest: @@ -10109,6 +10137,7 @@ types: - value: conversation.list name: ConversationList docs: The type of object + inline: true source: openapi: ../openapi.yml PaginatedResponseDataItem: @@ -10281,6 +10310,7 @@ types: docs: >- The accepted operators you can use to define how you want to search for the value. + inline: true source: openapi: ../openapi.yml SingleFilterSearchRequest: @@ -10310,6 +10340,7 @@ types: - `hit`: If there’s at least one hit event in the underlying sla_events table, and no “missed” or “canceled” events for the conversation. - `missed`: If there are any missed sla_events for the conversation and no canceled events. If there’s even a single missed sla event, the status will always be missed. A missed status is not applied when the SLA expires, only the next time a teammate replies. - `active`: An SLA has been applied to a conversation, but has not yet been fulfilled. SLA status is active only if there are no “hit, “missed”, or “canceled” events. + inline: true source: openapi: ../openapi.yml SlaApplied: @@ -10468,6 +10499,7 @@ types: - type: File source: openapi: ../openapi.yml + inline: true TicketCustomAttributes: type: map docs: >- @@ -10497,6 +10529,7 @@ types: - team - user docs: The type of the author + inline: true source: openapi: ../openapi.yml TicketPartAuthor: @@ -10544,6 +10577,7 @@ types: - comment - quick_reply docs: Type of the part + inline: true source: openapi: ../openapi.yml TicketReply: @@ -10586,6 +10620,7 @@ types: - list source: openapi: ../openapi.yml + inline: true TicketRequestCustomAttributes: type: map docs: >- @@ -10741,6 +10776,7 @@ types: Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. + inline: true source: openapi: ../openapi.yml UpdateArticleRequest: @@ -10792,6 +10828,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml UpdateTicketTypeRequest: @@ -11901,6 +11938,7 @@ types: "workflow_preview", "fin_preview", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -11918,6 +11956,7 @@ types: docs: >- The type of the source that triggered AI Agent involvement in the conversation. + inline: true source: openapi: ../openapi.yml AiAgent: @@ -11996,6 +12035,7 @@ imports: "content_snippet", "workflow_connector_action", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12011,6 +12051,7 @@ imports: - content_snippet - workflow_connector_action docs: The type of the content source. + inline: true source: openapi: ../openapi.yml ContentSource: @@ -14617,6 +14658,7 @@ imports: "published", "draft", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14665,6 +14707,7 @@ imports: "highlight", "plain", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14692,6 +14735,7 @@ imports: "highlight", "plain", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17103,6 +17147,7 @@ types: Whether the article is `published` or is a `draft`. For multilingual articles, this will be the state of the default language's content. default: draft + inline: true source: openapi: ../openapi.yml Articles: @@ -17188,6 +17233,7 @@ types: - highlight - plain docs: The type of text - `highlight` or `plain`. + inline: true source: openapi: ../openapi.yml ArticleSearchHighlightsHighlightedTitleItem: @@ -17207,6 +17253,7 @@ types: - highlight - plain docs: The type of text - `highlight` or `plain`. + inline: true source: openapi: ../openapi.yml ArticleSearchHighlightsHighlightedSummaryItemItem: @@ -26042,6 +26089,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "priority", "not_priority", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26053,6 +26101,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "closed", "snoozed", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -26087,6 +26136,7 @@ If you want to reply to a coveration or take an action such as assign, unassign, "user", "contact", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -29326,6 +29376,7 @@ types: - user - contact docs: The role associated to the contact - user or lead. + inline: true source: openapi: ../openapi.yml CreateConversationRequestFrom: @@ -29406,6 +29457,7 @@ types: - closed - snoozed docs: Can be set to "open", "closed" or "snoozed". + inline: true source: openapi: ../openapi.yml ConversationPriority: @@ -29413,6 +29465,7 @@ types: - priority - not_priority docs: If marked as priority, it will return priority or else not_priority. + inline: true source: openapi: ../openapi.yml Conversation: @@ -30466,6 +30519,7 @@ You can update a data attribute. "datetime", "date", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30476,6 +30530,7 @@ You can update a data attribute. "contact", "company", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30566,6 +30621,7 @@ You can update a data attribute. "boolean", "date", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30576,6 +30632,7 @@ You can update a data attribute. "contact", "company", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30586,6 +30643,7 @@ You can update a data attribute. "company", "conversation", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -30605,6 +30663,7 @@ You can update a data attribute. - contact - company docs: The model that the data attribute belongs to. + inline: true source: openapi: ../openapi.yml CreateDataAttributeRequestDataType: @@ -30616,6 +30675,7 @@ You can update a data attribute. - datetime - date docs: The type of data stored for this attribute. + inline: true source: openapi: ../openapi.yml DataAttributeModel: @@ -30625,6 +30685,7 @@ You can update a data attribute. docs: >- Value is `contact` for user/lead attributes and `company` for company attributes. + inline: true source: openapi: ../openapi.yml DataAttributeDataType: @@ -30635,6 +30696,7 @@ You can update a data attribute. - boolean - date docs: The data type of the attribute. + inline: true source: openapi: ../openapi.yml DataAttribute: @@ -32214,6 +32276,7 @@ Your exported message data will be streamed continuously back down to you in a g "no_data", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32405,6 +32468,7 @@ types: - no_data - canceled docs: The current state of your job. + inline: true source: openapi: ../openapi.yml DataExport: @@ -35391,6 +35455,7 @@ This will return the Message model that has been created. "facebook", "twitter", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -35568,6 +35633,7 @@ types: docs: >- The type of message that was sent. Can be email, inapp, facebook or twitter. + inline: true source: openapi: ../openapi.yml Message: @@ -36195,6 +36261,7 @@ types: "draft", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -36616,6 +36683,7 @@ types: docs: >- News items will not be visible to your users in the assigned newsfeeds until they are set live. + inline: true source: openapi: ../openapi.yml NewsItem: @@ -37620,6 +37688,7 @@ types: "contact", "user", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -37714,6 +37783,7 @@ types: - contact - user docs: 'Type of the contact: contact (lead) or user.' + inline: true source: openapi: ../openapi.yml Segment: @@ -38070,6 +38140,7 @@ This will return a subscription type model for the subscription type that was ad "opt_out", "opt_in", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38079,6 +38150,7 @@ This will return a subscription type model for the subscription type that was ad "email", "sms_message", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38090,6 +38162,7 @@ This will return a subscription type model for the subscription type that was ad "draft", "archived", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -38303,6 +38376,7 @@ types: - draft - archived docs: The state of the subscription type. + inline: true source: openapi: ../openapi.yml SubscriptionTypeConsentType: @@ -38310,12 +38384,14 @@ types: - opt_out - opt_in docs: Describes the type of consent. + inline: true source: openapi: ../openapi.yml SubscriptionTypeContentTypesItem: enum: - email - sms_message + inline: true source: openapi: ../openapi.yml SubscriptionType: @@ -40500,6 +40576,7 @@ types: "datetime", "files", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40517,6 +40594,7 @@ types: - datetime - files docs: The data type of the attribute + inline: true source: openapi: ../openapi.yml imports: @@ -42962,6 +43040,7 @@ The table below shows the operators you can use to define how you want to search }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43034,6 +43113,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43046,6 +43126,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43058,6 +43139,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43124,6 +43206,7 @@ The table below shows the operators you can use to define how you want to search }, "Tracker", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43152,6 +43235,7 @@ The table below shows the operators you can use to define how you want to search "waiting_on_customer", "resolved", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43212,6 +43296,7 @@ types: - waiting_on_customer - resolved docs: The state of the ticket. + inline: true source: openapi: ../openapi.yml UpdateTicketRequestAssignment: @@ -43234,6 +43319,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket. + inline: true source: openapi: ../openapi.yml TicketTicketState: @@ -43243,6 +43329,7 @@ types: - waiting_on_customer - resolved docs: The state the ticket is currently in + inline: true source: openapi: ../openapi.yml Ticket: @@ -43328,6 +43415,7 @@ types: - waiting_on_customer - resolved docs: The previous state of the ticket. + inline: true source: openapi: ../openapi.yml TicketPartTicketState: @@ -43337,6 +43425,7 @@ types: - waiting_on_customer - resolved docs: The state of the ticket. + inline: true source: openapi: ../openapi.yml TicketPart: @@ -43391,6 +43480,7 @@ types: name: BackOffice - Tracker docs: Category of the Ticket Type. + inline: true source: openapi: ../openapi.yml TicketType: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/openapi-filter.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/openapi-filter.json index dc1231b4ea9..0cde222d73d 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/openapi-filter.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/openapi-filter.json @@ -725,6 +725,7 @@ types: "contact", "user", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -737,6 +738,7 @@ types: - contact - user docs: 'Type of the contact: contact (lead) or user.' + inline: true source: openapi: ../openapi.yml Segment: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/permit.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/permit.json index 61a8144055b..51cebc15e77 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/permit.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/permit.json @@ -145,6 +145,7 @@ "array", "json", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -357,6 +358,7 @@ "userset", "resourceset", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -741,6 +743,7 @@ "failed", "canceled", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -766,6 +769,7 @@ "read", "no_access", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -777,6 +781,7 @@ "project", "env", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -793,6 +798,7 @@ "connect_sdk", "done", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2633,6 +2639,7 @@ The actions represents the ways you can interact with a protected resource.", "active", "pending", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -7874,6 +7881,7 @@ allowed.", "fail", "overwrite", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -8340,6 +8348,7 @@ types: Action to take when detecting a conflict when copying. Only applies to copying into an existing environment default: fail + inline: true source: openapi: ../openapi.json ", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/query-params.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/query-params.json index 7805574f7b8..5d5571cd224 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/query-params.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/query-params.json @@ -92,6 +92,7 @@ "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/readonly.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/readonly.json index 82e436f7c5a..67eee6c06eb 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/readonly.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/readonly.json @@ -143,6 +143,7 @@ "suspended", "deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -253,6 +254,7 @@ types: - active - suspended - deleted + inline: true source: openapi: ../openapi.yml UserStatsRead: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/rightbrain.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/rightbrain.json index 3b35a54d507..2c2554129aa 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/rightbrain.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/rightbrain.json @@ -477,6 +477,7 @@ "dropbox", "sharepoint", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -573,6 +574,7 @@ "all", "viewable", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1053,6 +1055,7 @@ Some entities, such as Organizations, may contain members that exist without any "prompt_policy", "pii_policy", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1363,6 +1366,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "italian", "german", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1419,6 +1423,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1506,6 +1511,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "prompt_policy", "pii_policy", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1544,6 +1550,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "user_defined", "zendesk", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1587,6 +1594,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "no_size", "site", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1596,6 +1604,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "file", "dir", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1637,6 +1646,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "pending", "accepted", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1648,6 +1658,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "joinable_by_domain", "joinable_by_invite", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2164,6 +2175,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "dropbox", "sharepoint", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2190,6 +2202,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "RETRY", "PROGRESS", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2199,6 +2212,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "unverified", "verified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2496,6 +2510,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2510,6 +2525,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "integer", "list", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2562,6 +2578,7 @@ https://github.com/ory/kratos/blob/master/selfservice/hook/web_hook.go", "success", "validation", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2830,6 +2847,7 @@ types: - value: gemini-pro name: GeminiPro default: gpt-3.5-turbo + inline: true source: openapi: ../openapi.yml ChatConfig: @@ -2872,6 +2890,7 @@ types: - box - dropbox - sharepoint + inline: true source: openapi: ../openapi.yml ChatDocument: @@ -2940,6 +2959,7 @@ types: - source_validation - prompt_policy - pii_policy + inline: true source: openapi: ../openapi.yml Type: @@ -2948,6 +2968,7 @@ types: - error - success - validation + inline: true source: openapi: ../openapi.yml ChatGuardrail: @@ -2964,6 +2985,7 @@ types: enum: - prompt_policy - pii_policy + inline: true source: openapi: ../openapi.yml ChatModel: @@ -3048,6 +3070,7 @@ types: - italian - german default: english_british + inline: true source: openapi: ../openapi.yml ComposeInit: @@ -3182,6 +3205,7 @@ types: enum: - unverified - verified + inline: true source: openapi: ../openapi.yml DatasourceSyncRun: @@ -3213,6 +3237,7 @@ types: - FAILURE - RETRY - PROGRESS + inline: true source: openapi: ../openapi.yml DocumentCreateTask: @@ -3889,6 +3914,7 @@ types: - box - dropbox - sharepoint + inline: true source: openapi: ../openapi.yml SourceRow: @@ -4040,6 +4066,7 @@ types: - value: gemini-pro name: GeminiPro docs: The LLM model to use for the Task. + inline: true source: openapi: ../openapi.yml TaskRevisionOutputFormatValue: @@ -4051,6 +4078,7 @@ types: - int - integer - list + inline: true source: openapi: ../openapi.yml TaskRevision: @@ -4837,6 +4865,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -4847,6 +4876,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4857,6 +4887,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4874,6 +4905,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4930,6 +4962,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -5405,6 +5438,7 @@ types: - value: gemini-pro name: GeminiPro default: gpt-3.5-turbo + inline: true source: openapi: ../openapi.yml ChatIamListMembersRequestType: @@ -5419,6 +5453,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml ChatIamMemberRoleUpdateRemoveItem: @@ -5426,6 +5461,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml ChatIamPermissionTestPermissionsItem: @@ -5440,6 +5476,7 @@ types: - remove_owner - view - view_members + inline: true source: openapi: ../openapi.yml ", @@ -6309,6 +6346,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -6319,6 +6357,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6329,6 +6368,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6350,6 +6390,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -6965,6 +7006,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml CollectionIamMemberRoleUpdateRemoveItem: @@ -6972,6 +7014,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml CollectionIamPermissionTestPermissionsItem: @@ -6990,6 +7033,7 @@ types: - remove_owner - view - view_members + inline: true source: openapi: ../openapi.yml ", @@ -13924,6 +13968,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -13934,6 +13979,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13944,6 +13990,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13961,6 +14008,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13977,6 +14025,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "dropbox", "sharepoint", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -14009,6 +14058,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - editor - owner - viewer + inline: true source: openapi: ../openapi.yml DocumentIamMemberRoleUpdateRemoveItem: @@ -14016,6 +14066,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - editor - owner - viewer + inline: true source: openapi: ../openapi.yml DocumentIamPermissionTestPermissionsItem: @@ -14030,6 +14081,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - remove_owner - view - view_members + inline: true source: openapi: ../openapi.yml imports: @@ -16149,6 +16201,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -16159,6 +16212,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16169,6 +16223,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16186,6 +16241,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16205,6 +16261,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - editor - owner - viewer + inline: true source: openapi: ../openapi.yml OrganizationIamMemberRoleUpdateRemoveItem: @@ -16212,6 +16269,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - editor - owner - viewer + inline: true source: openapi: ../openapi.yml OrganizationIamPermissionTestPermissionsItem: @@ -16226,6 +16284,7 @@ This may be combined with `remove_all` to replace the member's entire role list. - remove_owner - view - view_members + inline: true source: openapi: ../openapi.yml imports: @@ -17496,6 +17555,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17506,6 +17566,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -17521,6 +17582,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "task_runner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17536,6 +17598,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "task_runner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17569,6 +17632,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view_data", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18064,6 +18128,7 @@ types: - value: gemini-pro name: GeminiPro default: gpt-3.5-turbo + inline: true source: openapi: ../openapi.yml ProjectIamListMembersRequestType: @@ -18083,6 +18148,7 @@ types: - task_creator - task_runner - viewer + inline: true source: openapi: ../openapi.yml ProjectIamMemberRoleUpdateRemoveItem: @@ -18095,6 +18161,7 @@ types: - task_creator - task_runner - viewer + inline: true source: openapi: ../openapi.yml ProjectIamPermissionTestPermissionsItem: @@ -18125,6 +18192,7 @@ types: - view - view_data - view_members + inline: true source: openapi: ../openapi.yml ", @@ -20265,6 +20333,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20279,6 +20348,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "integer", "list", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20289,6 +20359,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "organization", "project", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -20299,6 +20370,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20309,6 +20381,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "owner", "viewer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20326,6 +20399,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "view", "view_members", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20381,6 +20455,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "value": "gemini-pro", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20395,6 +20470,7 @@ This may be combined with `remove_all` to replace the member's entire role list. "integer", "list", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -21302,6 +21378,7 @@ types: - value: gemini-pro name: GeminiPro docs: The LLM model to use for the Task. + inline: true source: openapi: ../openapi.yml TaskCreateOutputFormatValue: @@ -21313,6 +21390,7 @@ types: - int - integer - list + inline: true source: openapi: ../openapi.yml TaskUpdateLlmModel: @@ -21341,6 +21419,7 @@ types: name: Gemini15ProLatest - value: gemini-pro name: GeminiPro + inline: true source: openapi: ../openapi.yml TaskUpdateOutputFormatValue: @@ -21352,6 +21431,7 @@ types: - int - integer - list + inline: true source: openapi: ../openapi.yml TaskIamListMembersRequestType: @@ -21366,6 +21446,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml TaskIamMemberRoleUpdateRemoveItem: @@ -21373,6 +21454,7 @@ types: - editor - owner - viewer + inline: true source: openapi: ../openapi.yml TaskIamPermissionTestPermissionsItem: @@ -21387,6 +21469,7 @@ types: - run_task - view - view_members + inline: true source: openapi: ../openapi.yml ", diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/seam.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/seam.json index ab1cf1a0152..83e53b61395 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/seam.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/seam.json @@ -136,6 +136,7 @@ "removing", "unknown", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -146,6 +147,7 @@ "time_bound", "ongoing", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -219,6 +221,7 @@ "salto_access_group", "brivo_group", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -230,6 +233,7 @@ "salto_access_group", "brivo_group", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -325,6 +329,7 @@ "card", "mobile_key", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -347,6 +352,7 @@ "hid_credential", "visionline_card", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -463,6 +469,7 @@ "guest", "staff", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -560,6 +567,7 @@ "value": "common (PMS)", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -581,6 +589,7 @@ "commonDoor", "touch", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -688,6 +697,7 @@ "assa_abloy_credential_service", "latch_building", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -708,6 +718,7 @@ "assa_abloy_credential_service", "latch_building", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -819,6 +830,7 @@ "salto_site_user", "latch_user", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -2522,6 +2534,7 @@ "cool", "heat_cool", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -2635,6 +2648,7 @@ "single", "multiple", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -2645,6 +2659,7 @@ "failed", "authorized", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -2798,6 +2813,7 @@ "battery", "phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -2852,6 +2868,7 @@ "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3151,6 +3168,7 @@ "good", "full", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3195,6 +3213,7 @@ "name_length", "name_must_be_unique", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3221,6 +3240,7 @@ "at_least_three_unique_digits", "cannot_contain_089", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3551,6 +3571,7 @@ "indoor", "outdoor", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3614,6 +3635,7 @@ "bridge", "doorking", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3740,6 +3762,7 @@ "honeywell_resideo", "latch", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -3752,6 +3775,7 @@ "noise_sensors", "access_control_systems", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4047,6 +4071,7 @@ "battery", "phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4069,6 +4094,7 @@ "android_phone", "ios_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4162,6 +4188,7 @@ "degraded", "down", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4229,6 +4256,7 @@ "time_bound", "ongoing", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4310,6 +4338,7 @@ "battery", "phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4351,6 +4380,7 @@ "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4497,6 +4527,7 @@ "good", "full", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4680,6 +4711,7 @@ types: Nature of the access code. Values are "ongoing" for access codes that are active continuously until deactivated manually or "time_bound" for access codes that have a specific duration. + inline: true source: openapi: ../openapi.json AccessCodeStatus: @@ -4693,6 +4725,7 @@ types: Current status of the access code within the operational lifecycle. Values are "setting," a transitional phase that indicates that the code is being configured or activated; "set", which indicates that the code is active and operational; "unset," which indicates a deactivated or unused state, either before activation or after deliberate deactivation; "removing," which indicates a transitional period in which the code is being deleted or made inactive; and "unknown," which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. + inline: true source: openapi: ../openapi.json AccessCode: @@ -4796,6 +4829,7 @@ types: Nature of the access code. Values are "ongoing" for access codes that are active continuously until deactivated manually or "time_bound" for access codes that have a specific duration. + inline: true source: openapi: ../openapi.json UnmanagedAccessCode: @@ -6008,6 +6042,7 @@ types: - heat - cool - heat_cool + inline: true source: openapi: ../openapi.json ClimateSettingSchedule: @@ -6041,6 +6076,7 @@ types: - none - single - multiple + inline: true source: openapi: ../openapi.json ConnectWebviewStatus: @@ -6048,6 +6084,7 @@ types: - pending - failed - authorized + inline: true source: openapi: ../openapi.json ConnectWebviewCustomMetadataValue: @@ -6183,6 +6220,7 @@ types: - ios_phone - android_phone docs: Type of the device. + inline: true source: openapi: ../openapi.json DeviceCapabilitiesSupportedItem: @@ -6193,6 +6231,7 @@ types: - thermostat - battery - phone + inline: true source: openapi: ../openapi.json DevicePropertiesAccessoryKeypadBattery: @@ -6267,6 +6306,7 @@ types: - low - good - full + inline: true source: openapi: ../openapi.json DevicePropertiesBattery: @@ -6406,6 +6446,7 @@ types: enum: - indoor - outdoor + inline: true source: openapi: ../openapi.json DevicePropertiesNoiseawareMetadata: @@ -6506,6 +6547,7 @@ types: enum: - bridge - doorking + inline: true source: openapi: ../openapi.json DevicePropertiesSeamBridgeMetadata: @@ -6624,6 +6666,7 @@ types: - no_ascending_or_descending_sequence - at_least_three_unique_digits - cannot_contain_089 + inline: true source: openapi: ../openapi.json DevicePropertiesCodeConstraintsItemZero: @@ -6636,6 +6679,7 @@ types: enum: - name_length - name_must_be_unique + inline: true source: openapi: ../openapi.json DevicePropertiesCodeConstraintsItemMaxLength: @@ -6942,6 +6986,7 @@ types: - ios_phone - android_phone docs: Type of the device. + inline: true source: openapi: ../openapi.json UnmanagedDeviceCapabilitiesSupportedItem: @@ -6952,6 +6997,7 @@ types: - thermostat - battery - phone + inline: true source: openapi: ../openapi.json UnmanagedDeviceErrorsItem: @@ -6997,6 +7043,7 @@ types: - low - good - full + inline: true source: openapi: ../openapi.json UnmanagedDevicePropertiesBattery: @@ -7216,6 +7263,7 @@ types: - tedee - honeywell_resideo - latch + inline: true source: openapi: ../openapi.json DeviceProviderProviderCategoriesItem: @@ -7225,6 +7273,7 @@ types: - thermostats - noise_sensors - access_control_systems + inline: true source: openapi: ../openapi.json DeviceProvider: @@ -7300,6 +7349,7 @@ types: - healthy - degraded - down + inline: true source: openapi: ../openapi.json ServiceHealth: @@ -7346,6 +7396,7 @@ types: - visionline_system - assa_abloy_credential_service - latch_building + inline: true source: openapi: ../openapi.json AcsSystemSystemType: @@ -7364,6 +7415,7 @@ types: deprecated: use external_type --- + inline: true source: openapi: ../openapi.json AcsSystemErrorsItemSeamBridgeDisconnected: @@ -7446,6 +7498,7 @@ types: deprecated: use external_type --- + inline: true source: openapi: ../openapi.json AcsAccessGroupExternalType: @@ -7454,6 +7507,7 @@ types: - pti_access_level - salto_access_group - brivo_group + inline: true source: openapi: ../openapi.json AcsAccessGroup: @@ -7500,6 +7554,7 @@ types: - hid_credential_manager_user - salto_site_user - latch_user + inline: true source: openapi: ../openapi.json AcsUserAccessSchedule: @@ -7580,6 +7635,7 @@ types: - common - value: common (PMS) name: CommonPms + inline: true source: openapi: ../openapi.json AcsEntranceVisionlineMetadataProfilesItemVisionlineDoorProfileType: @@ -7587,6 +7643,7 @@ types: - BLE - commonDoor - touch + inline: true source: openapi: ../openapi.json AcsEntranceVisionlineMetadataProfilesItem: @@ -7670,6 +7727,7 @@ types: - code - card - mobile_key + inline: true source: openapi: ../openapi.json AcsCredentialExternalType: @@ -7678,6 +7736,7 @@ types: - brivo_credential - hid_credential - visionline_card + inline: true source: openapi: ../openapi.json AcsCredentialErrorsItem: @@ -7698,6 +7757,7 @@ types: enum: - guest - staff + inline: true source: openapi: ../openapi.json AcsCredentialVisionlineMetadata: @@ -7779,6 +7839,7 @@ types: enum: - android_phone - ios_phone + inline: true source: openapi: ../openapi.json PhoneCapabilitiesSupportedItem: @@ -7789,6 +7850,7 @@ types: - thermostat - battery - phone + inline: true source: openapi: ../openapi.json PhonePropertiesAssaAbloyCredentialServiceMetadataEndpointsItem: @@ -8709,6 +8771,7 @@ types: "throw", "create_random_code", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -8733,6 +8796,7 @@ types: "value": "1d", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -8768,6 +8832,7 @@ types: "value": "1d", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -8859,6 +8924,7 @@ types: "value": "1d", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -8868,6 +8934,7 @@ types: "ongoing", "time_bound", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -8897,6 +8964,7 @@ types: - value: 1d name: OneD default: 1hour + inline: true source: openapi: ../openapi.json AccessCodesCreateResponse: @@ -8911,6 +8979,7 @@ types: - throw - create_random_code default: throw + inline: true source: openapi: ../openapi.json AccessCodesCreateMultipleRequestMaxTimeRounding: @@ -8924,6 +8993,7 @@ types: - value: 1d name: OneD default: 1hour + inline: true source: openapi: ../openapi.json AccessCodesCreateMultipleResponse: @@ -8973,12 +9043,14 @@ types: - value: 1d name: OneD default: 1hour + inline: true source: openapi: ../openapi.json AccessCodesUpdateRequestType: enum: - ongoing - time_bound + inline: true source: openapi: ../openapi.json AccessCodesUpdateResponse: @@ -12032,6 +12104,7 @@ service: "card", "mobile_key", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -12074,6 +12147,7 @@ service: "TLCode", "rfid48", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -12084,6 +12158,7 @@ service: "guest", "staff", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -12180,12 +12255,14 @@ types: - code - card - mobile_key + inline: true source: openapi: ../openapi.json CredentialsCreateRequestVisionlineMetadataCardFormat: enum: - TLCode - rfid48 + inline: true source: openapi: ../openapi.json CredentialsCreateRequestVisionlineMetadataCardFunctionType: @@ -12193,6 +12270,7 @@ types: - guest - staff default: guest + inline: true source: openapi: ../openapi.json CredentialsCreateRequestVisionlineMetadata: @@ -16680,6 +16758,7 @@ service: "hid_cm", "google_nest", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -16712,6 +16791,7 @@ service: "single", "multiple", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -16725,6 +16805,7 @@ service: "access_control_systems", "internal_beta", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -16793,6 +16874,7 @@ service: - none - single - multiple + inline: true source: openapi: ../openapi.json ConnectWebviewsCreateRequestAcceptedProvidersItem: @@ -16837,6 +16919,7 @@ service: - yale_access - hid_cm - google_nest + inline: true source: openapi: ../openapi.json ConnectWebviewsCreateRequestProviderCategory: @@ -16847,6 +16930,7 @@ service: - noise_sensors - access_control_systems - internal_beta + inline: true source: openapi: ../openapi.json ConnectWebviewsCreateRequestCustomMetadataValue: @@ -18375,6 +18459,7 @@ service: "noise_sensors", "access_control_systems", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -18439,6 +18524,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -18479,6 +18565,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -18493,6 +18580,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -18507,6 +18595,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -18548,6 +18637,7 @@ service: "tedee", "honeywell_resideo", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -18654,6 +18744,7 @@ service: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json DevicesListRequestDeviceTypesItem: @@ -18691,6 +18782,7 @@ service: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json DevicesListRequestManufacturer: @@ -18729,6 +18821,7 @@ service: - dormakaba_oracode - tedee - honeywell_resideo + inline: true source: openapi: ../openapi.json DevicesListRequestCustomMetadataHasValue: @@ -18748,6 +18841,7 @@ service: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json DevicesListRequestExcludeIfItem: @@ -18759,6 +18853,7 @@ service: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json DevicesListResponse: @@ -18774,6 +18869,7 @@ service: - thermostats - noise_sensors - access_control_systems + inline: true source: openapi: ../openapi.json DevicesListDeviceProvidersResponse: @@ -19869,6 +19965,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -19909,6 +20006,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -19923,6 +20021,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -19937,6 +20036,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -19978,6 +20078,7 @@ service: "tedee", "honeywell_resideo", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -20049,6 +20150,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json UnmanagedListRequestDeviceTypesItem: @@ -20086,6 +20188,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json UnmanagedListRequestManufacturer: @@ -20124,6 +20227,7 @@ types: - dormakaba_oracode - tedee - honeywell_resideo + inline: true source: openapi: ../openapi.json UnmanagedListRequestCustomMetadataHasValue: @@ -20143,6 +20247,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json UnmanagedListRequestExcludeIfItem: @@ -20154,6 +20259,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json UnmanagedListResponse: @@ -20792,6 +20898,7 @@ service: "value": "action_attempt.unlock_door.failed", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -21031,6 +21138,7 @@ service: "value": "action_attempt.unlock_door.failed", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -21184,6 +21292,7 @@ types: name: ActionAttemptUnlockDoorSucceeded - value: action_attempt.unlock_door.failed name: ActionAttemptUnlockDoorFailed + inline: true source: openapi: ../openapi.json EventsListRequestEventTypesItem: @@ -21304,6 +21413,7 @@ types: name: ActionAttemptUnlockDoorSucceeded - value: action_attempt.unlock_door.failed name: ActionAttemptUnlockDoorFailed + inline: true source: openapi: ../openapi.json EventsListResponse: @@ -22355,6 +22465,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -22395,6 +22506,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -22409,6 +22521,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -22423,6 +22536,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -22464,6 +22578,7 @@ service: "tedee", "honeywell_resideo", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -22549,6 +22664,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json LocksListRequestDeviceTypesItem: @@ -22586,6 +22702,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json LocksListRequestManufacturer: @@ -22624,6 +22741,7 @@ types: - dormakaba_oracode - tedee - honeywell_resideo + inline: true source: openapi: ../openapi.json LocksListRequestCustomMetadataHasValue: @@ -22643,6 +22761,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json LocksListRequestExcludeIfItem: @@ -22654,6 +22773,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json LocksListResponse: @@ -24787,6 +24907,7 @@ service: "android", "ios", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -24810,6 +24931,7 @@ service: - android - ios default: android + inline: true source: openapi: ../openapi.json SimulateCreateSandboxPhoneRequestPhoneMetadata: @@ -25848,6 +25970,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -25888,6 +26011,7 @@ service: "ios_phone", "android_phone", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -25902,6 +26026,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -25916,6 +26041,7 @@ service: "can_simulate_connection", "can_simulate_disconnection", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -25957,6 +26083,7 @@ service: "tedee", "honeywell_resideo", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -25988,6 +26115,7 @@ service: "auto", "on", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -25997,6 +26125,7 @@ service: "auto", "on", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -26036,6 +26165,7 @@ service: "cool", "heat_cool", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -26114,6 +26244,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json ThermostatsListRequestDeviceTypesItem: @@ -26151,6 +26282,7 @@ types: - honeywell_resideo_thermostat - ios_phone - android_phone + inline: true source: openapi: ../openapi.json ThermostatsListRequestManufacturer: @@ -26189,6 +26321,7 @@ types: - dormakaba_oracode - tedee - honeywell_resideo + inline: true source: openapi: ../openapi.json ThermostatsListRequestCustomMetadataHasValue: @@ -26208,6 +26341,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json ThermostatsListRequestExcludeIfItem: @@ -26219,6 +26353,7 @@ types: - can_simulate_removal - can_simulate_connection - can_simulate_disconnection + inline: true source: openapi: ../openapi.json ThermostatsListResponse: @@ -26237,12 +26372,14 @@ types: enum: - auto - 'on' + inline: true source: openapi: ../openapi.json ThermostatsSetFanModeRequestFanModeSetting: enum: - auto - 'on' + inline: true source: openapi: ../openapi.json ThermostatsSetFanModeResponse: @@ -26257,6 +26394,7 @@ types: - heat - cool - heat_cool + inline: true source: openapi: ../openapi.json ThermostatsUpdateRequestDefaultClimateSetting: @@ -27210,6 +27348,7 @@ service: "cool", "heat_cool", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -27264,6 +27403,7 @@ service: "cool", "heat_cool", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -27288,6 +27428,7 @@ service: - heat - cool - heat_cool + inline: true source: openapi: ../openapi.json ClimateSettingSchedulesCreateResponse: @@ -27319,6 +27460,7 @@ service: - heat - cool - heat_cool + inline: true source: openapi: ../openapi.json ClimateSettingSchedulesUpdateResponse: @@ -30541,6 +30683,7 @@ service: "circle", "square", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -30596,6 +30739,7 @@ service: enum: - circle - square + inline: true source: openapi: ../openapi.json WorkspacesCreateResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/squidex.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/squidex.json index f7f8a90af90..6336c86a9ef 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/squidex.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/squidex.json @@ -110,6 +110,7 @@ "User", "Group", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -553,6 +554,7 @@ "Path", "Items", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -601,6 +603,7 @@ "Image", "FileName", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -657,6 +660,7 @@ "Audio", "Video", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -894,6 +898,7 @@ "Checkbox", "Toggle", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -956,6 +961,7 @@ "Move", "Delete", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1020,6 +1026,7 @@ "Update", "Validate", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1637,6 +1644,7 @@ "Now", "Today", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1647,6 +1655,7 @@ "Date", "DateTime", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2194,6 +2203,7 @@ "Hide", "Require", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2287,6 +2297,7 @@ "TIFF", "WEBP", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2299,6 +2310,7 @@ "Completed", "Failed", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2505,6 +2517,7 @@ "Dropdown", "Stars", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2729,6 +2742,7 @@ "NoPermission", "ManagedByTeam", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2810,6 +2824,7 @@ "Checkboxes", "Input", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -2895,6 +2910,7 @@ "Min", "Stretch", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -3293,6 +3309,7 @@ "TextArea", "Url", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -3306,6 +3323,7 @@ "Failed", "Cancelled", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -3318,6 +3336,7 @@ "Failed", "Timeout", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -3605,6 +3624,7 @@ "Singleton", "Component", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -3678,6 +3698,7 @@ "Rule", "Schema", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -3821,6 +3842,7 @@ "WrongEvent", "WrongEventForTrigger", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -3871,6 +3893,7 @@ "Ascending", "Descending", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -3926,6 +3949,7 @@ "Html", "Markdown", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -3944,6 +3968,7 @@ "StockPhoto", "TextArea", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -4040,6 +4065,7 @@ "Checkboxes", "Dropdown", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -4204,6 +4230,7 @@ "Unauthorized", "Failed", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -4615,6 +4642,7 @@ "DELETE", "PATCH", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/suger.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/suger.json index fa49fbb7b64..eb600804380 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/suger.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/suger.json @@ -96,6 +96,7 @@ "Monthly", "Annual", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -120,6 +121,7 @@ "Engineering", "ChannelManager", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -194,6 +196,7 @@ "StopSelling", "Terminated", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -316,6 +319,7 @@ "cspCustomer", "billingGroup", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -362,6 +366,7 @@ "percentage", "absolute", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -372,6 +377,7 @@ "FLAT_RATE", "PER_USER", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -381,6 +387,7 @@ "customerPromotion", "cspPromotion", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -403,6 +410,7 @@ "withdrawn", "deleted", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -412,6 +420,7 @@ "pendingAcceptance", "accepted", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -437,6 +446,7 @@ "month", "year", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -471,6 +481,7 @@ "resourceNotFound", "schemaValidationError", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -480,6 +491,7 @@ "informational", "warning", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -530,6 +542,7 @@ "perMarket", "usd", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -594,6 +607,7 @@ "perMarket", "usd", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -614,6 +628,7 @@ "Month", "Year", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -637,6 +652,7 @@ "Recurring", "Usage", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -660,6 +676,7 @@ "sharedcore", "transactions", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -749,6 +766,7 @@ "Public", "Private", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -806,6 +824,7 @@ "ListingImage", "ListingVideo", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -818,6 +837,7 @@ "Processed", "ProcessFailed", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -892,6 +912,7 @@ "value": "contact-me", }, ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -901,6 +922,7 @@ "ListingOnly", "ListAndSell", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -931,6 +953,7 @@ "Inprogress", "Published", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -946,6 +969,7 @@ "Published", "InStore", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1015,6 +1039,7 @@ "AzureSkuVariant", "AzureTestDriveVariant", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1024,6 +1049,7 @@ "InActive", "Active", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1047,6 +1073,7 @@ "Days", "Months", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1058,6 +1085,7 @@ "TimedUsage", "Unlimited", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1254,6 +1282,7 @@ This member is required.", "InvalidQuantity", "BadArgument", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -1755,6 +1784,7 @@ in the google.rpc.Status.details field, or localized by the client.", "CONFIRMED", "PENDING_CONFIRMATION", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -1870,6 +1900,7 @@ in the google.rpc.Status.details field, or localized by the client.", "Update", "Delete", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1879,6 +1910,7 @@ in the google.rpc.Status.details field, or localized by the client.", "None", "Csp", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1888,6 +1920,7 @@ in the google.rpc.Status.details field, or localized by the client.", "None", "DryRun", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -1900,6 +1933,7 @@ in the google.rpc.Status.details field, or localized by the client.", "Suspended", "Unsubscribed", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2021,6 +2055,7 @@ in the google.rpc.Status.details field, or localized by the client.", "MONTH", "YEAR", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2030,6 +2065,7 @@ in the google.rpc.Status.details field, or localized by the client.", "FLAT_RATE", "PER_USER", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2154,6 +2190,7 @@ in the google.rpc.Status.details field, or localized by the client.", "QuantityChange", "Signup", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2180,6 +2217,7 @@ in the google.rpc.Status.details field, or localized by the client.", "ENTITLEMENT_TERM", "INTEGRATION", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2196,6 +2234,7 @@ in the google.rpc.Status.details field, or localized by the client.", "ISV", "CURRENT", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2301,6 +2340,7 @@ in the google.rpc.Status.details field, or localized by the client.", "USAGE", "SUBSCRIPTION_PLUS_USAGE", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2656,6 +2696,7 @@ This field is present only if the product has usage-based billing configured.", "value": "ENTITLEMENT_SUSPENDED", }, ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2725,6 +2766,7 @@ This field is present only if the product has usage-based billing configured.", "APPROVED", "REJECTED", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2740,6 +2782,7 @@ This field is present only if the product has usage-based billing configured.", "value": "ACCOUNT_ACTIVE", }, ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -2860,6 +2903,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -2888,6 +2932,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -2898,6 +2943,7 @@ This field is present only if the product has usage-based billing configured.", "VERIFIED", "NOT_VERIFIED", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3176,6 +3222,7 @@ This field is present only if the product has usage-based billing configured.", "NOTIFY_CONTACTS", "TEST", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3191,6 +3238,7 @@ This field is present only if the product has usage-based billing configured.", "DONE", "FAILED", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3258,6 +3306,7 @@ This field is present only if the product has usage-based billing configured.", "PRIVATE", "PUBLIC", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3450,6 +3499,7 @@ This field is present only if the product has usage-based billing configured.", "CollectableAmount", "DisbursedAmount", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3571,6 +3621,7 @@ This field is present only if the product has usage-based billing configured.", "DISTRIBUTION", "MONEY", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -3612,6 +3663,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3624,6 +3676,7 @@ This field is present only if the product has usage-based billing configured.", "PENDING_START", "UNKNOWN", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3663,6 +3716,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3710,6 +3764,7 @@ This field is present only if the product has usage-based billing configured.", "PRIVATE", "UNKNOWN", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3720,6 +3775,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3737,6 +3793,7 @@ This field is present only if the product has usage-based billing configured.", "CANCEL_FAILED", "CANCEL_SUCCESS", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3770,6 +3827,7 @@ This field is present only if the product has usage-based billing configured.", "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3783,6 +3841,7 @@ This field is present only if the product has usage-based billing configured.", "PER_USER", "USAGE_BASED", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -3996,6 +4055,7 @@ the same customer, dimension, and time, but a different quantity.", "CustomerNotSubscribed", "DuplicateRecord", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -4045,6 +4105,7 @@ types: enum: - Monthly - Annual + inline: true source: openapi: ../swagger.json AzureIncludedBaseQuantity: @@ -4059,6 +4120,7 @@ types: - CustomerSupport - Engineering - ChannelManager + inline: true source: openapi: ../swagger.json AzureListingContact: @@ -4104,6 +4166,7 @@ types: - Enabled - StopSelling - Terminated + inline: true source: openapi: ../swagger.json AzureMarketState: @@ -4130,6 +4193,7 @@ types: enum: - customerPromotion - cspPromotion + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOfferState: @@ -4138,12 +4202,14 @@ types: - live - withdrawn - deleted + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOfferSubState: enum: - pendingAcceptance - accepted + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOffer: @@ -4212,6 +4278,7 @@ types: enum: - cspCustomer - billingGroup + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOfferBeneficiaryRecipient: @@ -4224,6 +4291,7 @@ types: enum: - percentage - absolute + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOfferPricingPlanType: @@ -4231,6 +4299,7 @@ types: - FLAT_RATE - PER_USER docs: The type of the plan, FLAT_RATE or PER_USER. + inline: true source: openapi: ../swagger.json AzureMarketplacePrivateOfferPricing: @@ -4271,6 +4340,7 @@ types: - week - month - year + inline: true source: openapi: ../swagger.json AzureMarketplaceTerm: @@ -4296,12 +4366,14 @@ types: - productLocked - resourceNotFound - schemaValidationError + inline: true source: openapi: ../swagger.json AzureMarketplaceValidationLevel: enum: - informational - warning + inline: true source: openapi: ../swagger.json AzureMarketplaceValidation: @@ -4333,6 +4405,7 @@ types: - perMarket - usd docs: default "usd" + inline: true source: openapi: ../swagger.json AzurePriceAndAvailabilityPrivateOfferCustomMeters: @@ -4366,6 +4439,7 @@ types: - perMarket - usd docs: default "usd" + inline: true source: openapi: ../swagger.json AzurePriceAndAvailabilityRecurrentPrice: @@ -4388,6 +4462,7 @@ types: enum: - Month - Year + inline: true source: openapi: ../swagger.json AzurePriceCadence: @@ -4401,6 +4476,7 @@ types: - Flat - Recurring - Usage + inline: true source: openapi: ../swagger.json AzurePriceSchedule: @@ -4415,6 +4491,7 @@ types: enum: - sharedcore - transactions + inline: true source: openapi: ../swagger.json AzurePricingUnit: @@ -4470,6 +4547,7 @@ types: enum: - Public - Private + inline: true source: openapi: ../swagger.json AzureProductFeatureAvailability: @@ -4517,6 +4595,7 @@ types: - ListingAsset - ListingImage - ListingVideo + inline: true source: openapi: ../swagger.json AzureProductListingAssetState: @@ -4526,6 +4605,7 @@ types: - InProcessing - Processed - ProcessFailed + inline: true source: openapi: ../swagger.json AzureProductListingAsset: @@ -4581,12 +4661,14 @@ types: name: FreeTrial - value: contact-me name: ContactMe + inline: true source: openapi: ../swagger.json AzureProductSetupSellingOption: enum: - ListingOnly - ListAndSell + inline: true source: openapi: ../swagger.json AzureProductSetup: @@ -4604,6 +4686,7 @@ types: enum: - Inprogress - Published + inline: true source: openapi: ../swagger.json AzureProductSubmissionSubState: @@ -4616,6 +4699,7 @@ types: - Publishing - Published - InStore + inline: true source: openapi: ../swagger.json AzureProductSubmission: @@ -4638,12 +4722,14 @@ types: enum: - AzureSkuVariant - AzureTestDriveVariant + inline: true source: openapi: ../swagger.json AzureProductVariantState: enum: - InActive - Active + inline: true source: openapi: ../swagger.json AzureProductVariant: @@ -4693,6 +4779,7 @@ types: - Minute - Days - Months + inline: true source: openapi: ../swagger.json AzureProductVariantTrialType: @@ -4701,6 +4788,7 @@ types: - TimedAccess - TimedUsage - Unlimited + inline: true source: openapi: ../swagger.json AzureProductVariantTrial: @@ -5299,18 +5387,21 @@ types: - Read - Update - Delete + inline: true source: openapi: ../swagger.json SharedAzureMarketplaceSubscriptionSandboxType: enum: - None - Csp + inline: true source: openapi: ../swagger.json SharedAzureMarketplaceSubscriptionSessionMode: enum: - None - DryRun + inline: true source: openapi: ../swagger.json SharedAzureMarketplaceSubscription: @@ -6094,6 +6185,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedIdentityBuyer: @@ -6114,6 +6206,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedIdentityIntegrationStatus: @@ -6121,6 +6214,7 @@ types: - CREATED - VERIFIED - NOT_VERIFIED + inline: true source: openapi: ../swagger.json SharedIdentityIntegration: @@ -6357,6 +6451,7 @@ types: - PRIVATE - PUBLIC docs: The default visibility of offer is PRIVATE. + inline: true source: openapi: ../swagger.json SharedOfferInfo: @@ -6647,6 +6742,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedWorkloadEntitlementStatus: @@ -6656,6 +6752,7 @@ types: - SUSPENDED - PENDING_START - UNKNOWN + inline: true source: openapi: ../swagger.json SharedWorkloadEntitlement: @@ -6688,6 +6785,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedWorkloadEntitlementTerm: @@ -6723,6 +6821,7 @@ types: - PER_USER - PRIVATE - UNKNOWN + inline: true source: openapi: ../swagger.json SharedWorkloadOfferPartner: @@ -6730,6 +6829,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedWorkloadOfferStatus: @@ -6744,6 +6844,7 @@ types: - PENDING_CANCEL - CANCEL_FAILED - CANCEL_SUCCESS + inline: true source: openapi: ../swagger.json SharedWorkloadOffer: @@ -6776,6 +6877,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json SharedWorkloadProductProductType: @@ -6786,6 +6888,7 @@ types: - FLAT_RATE - PER_USER - USAGE_BASED + inline: true source: openapi: ../swagger.json SharedWorkloadProduct: @@ -8303,6 +8406,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -9787,6 +9891,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -9796,6 +9901,7 @@ service: "MARKETPLACE", "CRM", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -9806,6 +9912,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -9815,6 +9922,7 @@ service: "MARKETPLACE", "CRM", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -9825,6 +9933,7 @@ service: "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -9835,6 +9944,7 @@ service: "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -9845,6 +9955,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -9854,6 +9965,7 @@ service: "MARKETPLACE", "CRM", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -9864,6 +9976,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -9873,6 +9986,7 @@ service: "MARKETPLACE", "CRM", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -10292,6 +10406,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json GetIntegrationRequestPartner: @@ -10338,6 +10453,7 @@ types: - AWS - AZURE - GCP + inline: true source: openapi: ../swagger.json VerifyIntegrationRequestPartner: @@ -12453,6 +12569,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -13772,6 +13889,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -14517,6 +14635,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -14527,6 +14646,7 @@ service: "AZURE", "GCP", ], + "inline": undefined, "source": { "openapi": "../swagger.json", }, @@ -14538,6 +14658,7 @@ service: "AZURE", "GCP", ], + "inline": true, "source": { "openapi": "../swagger.json", }, @@ -14565,6 +14686,7 @@ service: - AZURE - GCP docs: Required. + inline: true source: openapi: ../swagger.json imports: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/switchboard.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/switchboard.json index 8a2e8f12e83..6eb7e548a62 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/switchboard.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/switchboard.json @@ -143,6 +143,7 @@ "partial_success", "failure", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -588,6 +589,7 @@ "running", "ended", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -707,6 +709,7 @@ types: - success - partial_success - failure + inline: true source: openapi: ../openapi.yml ExternalSessionAiResponseMetadata: @@ -990,6 +993,7 @@ types: - running - ended docs: Status of the session + inline: true source: openapi: ../openapi.yml StatusMessage: @@ -2376,6 +2380,7 @@ service: "running", "ended", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/uploadcare.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/uploadcare.json index 0227feb3f08..d0c1bfd6e63 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/uploadcare.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/uploadcare.json @@ -829,6 +829,7 @@ that are tool old (or that have not been created at all). "HSV", "LAB", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1074,6 +1075,7 @@ See [docs](https://uploadcare.com/docs/file-metadata/) and [REST API v0.7](/api- "HSV", "LAB", ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -1152,6 +1154,7 @@ change the value to `auto`. }, "auto", ], + "inline": undefined, "source": { "openapi": "../openapi.json", }, @@ -1689,6 +1692,7 @@ change the value to `auto`. - HSV - LAB docs: Image color mode. + inline: true source: openapi: ../openapi.json ImageInfoGeoLocation: @@ -1813,6 +1817,7 @@ change the value to `auto`. - HSV - LAB docs: Image color mode. + inline: true source: openapi: ../openapi.json SchemasImageInfoGeoLocation: @@ -4976,6 +4981,7 @@ this request will return information about the already uploaded file. "value": "1", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -4995,6 +5001,7 @@ to the value of the `check_URL_duplicates` parameter. "value": "1", }, ], + "inline": true, "source": { "openapi": "../openapi.json", }, @@ -5088,6 +5095,7 @@ types: this request will return information about the already uploaded file. default: '0' + inline: true source: openapi: ../openapi.json FromUrlUploadRequestSaveUrlDuplicates: @@ -5100,6 +5108,7 @@ types: Determines if the requested `source_url` should be kept in the history of fetched/uploaded URLs. If the value is not defined explicitly, it is set to the value of the `check_URL_duplicates` parameter. + inline: true source: openapi: ../openapi.json FromUrlUploadResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/valtown.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/valtown.json index 2f216262394..7ba3f68a848 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/valtown.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/valtown.json @@ -201,6 +201,7 @@ "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -216,6 +217,7 @@ "rpc", "httpnext", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -376,6 +378,7 @@ "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -391,6 +394,7 @@ "rpc", "httpnext", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -686,6 +690,7 @@ This value is not specified if the SQL statement was not an INSERT or if the tab docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml ExtendedValType: @@ -701,6 +706,7 @@ This value is not specified if the SQL statement was not an INSERT or if the tab The type of a val. HTTP can receive web requests, Email can receive emails, Cron runs periodically, and Script can be used for libraries or one-off calculations + inline: true source: openapi: ../openapi.yml ExtendedValLinks: @@ -799,6 +805,7 @@ This value is not specified if the SQL statement was not an INSERT or if the tab docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml BasicValType: @@ -814,6 +821,7 @@ This value is not specified if the SQL statement was not an INSERT or if the tab The type of a val. HTTP can receive web requests, Email can receive emails, Cron runs periodically, and Script can be used for libraries or one-off calculations + inline: true source: openapi: ../openapi.yml BasicValLinks: @@ -1219,6 +1227,7 @@ API endpoints", "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1234,6 +1243,7 @@ API endpoints", "rpc", "httpnext", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -1332,6 +1342,7 @@ types: docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml AliasValResponseType: @@ -1347,6 +1358,7 @@ types: The type of a val. HTTP can receive web requests, Email can receive emails, Cron runs periodically, and Script can be used for libraries or one-off calculations + inline: true source: openapi: ../openapi.yml AliasValResponseLinks: @@ -2300,6 +2312,7 @@ give access to details and data from the requesting user.", "received", "given", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2426,6 +2439,7 @@ give access to details and data from the requesting user.", "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2511,6 +2525,7 @@ give access to details and data from the requesting user.", "free", "pro", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -2647,6 +2662,7 @@ give access to details and data from the requesting user.", - free - pro docs: Your account tier + inline: true source: openapi: ../openapi.yml MeGetResponse: @@ -2717,6 +2733,7 @@ give access to details and data from the requesting user.", docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml MeCommentsResponseDataItemValAuthor: @@ -3413,6 +3430,7 @@ docs: Search "read", "deferred", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3550,6 +3568,7 @@ docs: Search - write - read - deferred + inline: true source: openapi: ../openapi.yml imports: @@ -4797,6 +4816,7 @@ let you get, create, and run vals.", "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4809,6 +4829,7 @@ let you get, create, and run vals.", "script", "email", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4820,6 +4841,7 @@ let you get, create, and run vals.", "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4832,6 +4854,7 @@ let you get, create, and run vals.", "script", "email", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4885,6 +4908,7 @@ let you get, create, and run vals.", "unlisted", "private", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4896,6 +4920,7 @@ let you get, create, and run vals.", "script", "email", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4931,6 +4956,7 @@ let you get, create, and run vals.", docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml ValsCreateRequestType: @@ -4942,6 +4968,7 @@ let you get, create, and run vals.", The type of the val you want to create. Note that this does not include interval vals, because they cannot be created through the API yet. default: script + inline: true source: openapi: ../openapi.yml ValsUpdateRequestPrivacy: @@ -4952,6 +4979,7 @@ let you get, create, and run vals.", docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml ValsUpdateRequestType: @@ -4962,6 +4990,7 @@ let you get, create, and run vals.", docs: >- The type of the val you want to update. Note that this does not include interval vals, because they cannot be created through the API yet. + inline: true source: openapi: ../openapi.yml ValsListResponseDataItem: @@ -4995,6 +5024,7 @@ let you get, create, and run vals.", docs: >- This val’s privacy setting. Unlisted vals do not appear on profile pages or elsewhere, but you can link to them. + inline: true source: openapi: ../openapi.yml ValsCreateVersionRequestType: @@ -5006,6 +5036,7 @@ let you get, create, and run vals.", The type of the val you want to create. Note that this does not include interval vals, because they cannot be created through the API yet. default: script + inline: true source: openapi: ../openapi.yml ValsCancelResponse: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/vellum.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/vellum.json index cd87a10eac3..2f7fb492392 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/vellum.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/vellum.json @@ -573,6 +573,7 @@ Used to submit feedback regarding the quality of previously generated completion "JINJA", "FUNCTION_DEFINITION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -610,6 +611,7 @@ Used to submit feedback regarding the quality of previously generated completion "USER", "FUNCTION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -641,6 +643,7 @@ Used to submit feedback regarding the quality of previously generated completion "STRING", "JSON", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -740,6 +743,7 @@ Used to submit feedback regarding the quality of previously generated completion "INACTIVE", "ARCHIVED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -887,6 +891,7 @@ Used to submit feedback regarding the quality of previously generated completion "ACTIVE", "ARCHIVED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -944,6 +949,7 @@ Used to submit feedback regarding the quality of previously generated completion "STAGING", "PRODUCTION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -983,6 +989,7 @@ Used to submit feedback regarding the quality of previously generated completion "STOP", "UNKNOWN", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1139,6 +1146,7 @@ Used to submit feedback regarding the quality of previously generated completion "INDEXED", "FAILED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1150,6 +1158,7 @@ Used to submit feedback regarding the quality of previously generated completion "ALL", "NONE", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1161,6 +1170,7 @@ Used to submit feedback regarding the quality of previously generated completion "GENERATE", "CLASSIFY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1342,6 +1352,7 @@ Used to submit feedback regarding the quality of previously generated completion "CREATION_FAILED", "DISABLED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1443,6 +1454,7 @@ Used to submit feedback regarding the quality of previously generated completion "PROCESSED", "FAILED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1630,6 +1642,7 @@ Used to submit feedback regarding the quality of previously generated completion "OPENAI", "PYQ", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -1901,6 +1914,7 @@ Used to submit feedback regarding the quality of previously generated completion "TEXT", "CHAT_HISTORY", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2324,6 +2338,7 @@ Used to submit feedback regarding the quality of previously generated completion "WORKFLOW_INITIALIZATION", "NODE_EXECUTION", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -2397,6 +2412,7 @@ Used to submit feedback regarding the quality of previously generated completion "FULFILLED", "REJECTED", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/webflow.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/webflow.json index 5fd90a8fa32..a94d307cdd9 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/webflow.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/webflow.json @@ -409,6 +409,7 @@ "value": "site_config:write", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -802,6 +803,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "value": "-CreatedOn", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -3196,6 +3198,7 @@ service: "Color", "ExtFileRef", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3291,6 +3294,7 @@ service: "Color", "ExtFileRef", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3393,6 +3397,7 @@ service: - Color - ExtFileRef docs: Choose these appropriate field type for your collection data + inline: true source: openapi: ../openapi.yml CollectionsCreateResponseFieldsItem: @@ -3468,6 +3473,7 @@ service: - Color - ExtFileRef docs: Choose these appropriate field type for your collection data + inline: true source: openapi: ../openapi.yml CollectionsGetResponseFieldsItem: @@ -3925,6 +3931,7 @@ service: "Color", "File", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -3983,6 +3990,7 @@ service: "Color", "ExtFileRef", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4041,6 +4049,7 @@ service: "Color", "ExtFileRef", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -4064,6 +4073,7 @@ service: - Color - File docs: Choose these appropriate field type for your collection data + inline: true source: openapi: ../openapi.yml FieldsCreateResponseType: @@ -4082,6 +4092,7 @@ service: - Color - ExtFileRef docs: Choose these appropriate field type for your collection data + inline: true source: openapi: ../openapi.yml FieldsCreateResponse: @@ -4128,6 +4139,7 @@ service: - Color - ExtFileRef docs: Choose these appropriate field type for your collection data + inline: true source: openapi: ../openapi.yml FieldsUpdateResponse: @@ -5620,6 +5632,7 @@ service: "name", "slug", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5629,6 +5642,7 @@ service: "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5735,6 +5749,7 @@ service: "name", "slug", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -5744,6 +5759,7 @@ service: "asc", "desc", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -8030,6 +8046,7 @@ service: "Phone", "Number", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8197,6 +8214,7 @@ service: "Phone", "Number", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -8416,6 +8434,7 @@ service: - Phone - Number docs: The field type + inline: true source: openapi: ../openapi.yml FormsListResponseFormsItemFieldsValue: @@ -8528,6 +8547,7 @@ service: - Phone - Number docs: The field type + inline: true source: openapi: ../openapi.yml FormsGetResponseFieldsValue: @@ -9246,6 +9266,7 @@ Required scope | `ecommerce:write` "infinite", "finite", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9277,6 +9298,7 @@ Required scope | `ecommerce:write` "infinite", "finite", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9287,6 +9309,7 @@ Required scope | `ecommerce:write` "infinite", "finite", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9318,6 +9341,7 @@ Required scope | `ecommerce:write` "infinite", "finite", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -9351,6 +9375,7 @@ Required scope | `ecommerce:write` - infinite - finite docs: infinite or finite + inline: true source: openapi: ../openapi.yml InventoryListResponse: @@ -9374,6 +9399,7 @@ Required scope | `ecommerce:write` - infinite - finite docs: infinite or finite + inline: true source: openapi: ../openapi.yml InventoryUpdateResponseInventoryType: @@ -9381,6 +9407,7 @@ Required scope | `ecommerce:write` - infinite - finite docs: infinite or finite + inline: true source: openapi: ../openapi.yml InventoryUpdateResponse: @@ -9404,6 +9431,7 @@ Required scope | `ecommerce:write` - infinite - finite docs: infinite or finite + inline: true source: openapi: ../openapi.yml EcommInventoryChangedPayload: @@ -12136,6 +12164,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12146,6 +12175,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12222,6 +12252,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12232,6 +12263,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12293,6 +12325,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12636,6 +12669,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12646,6 +12680,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12664,6 +12699,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12711,6 +12747,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -12851,6 +12888,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13102,6 +13140,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13112,6 +13151,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13188,6 +13228,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13198,6 +13239,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13259,6 +13301,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13602,6 +13645,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13612,6 +13656,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13630,6 +13675,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13677,6 +13723,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -13817,6 +13864,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14068,6 +14116,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14078,6 +14127,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14154,6 +14204,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14164,6 +14215,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14225,6 +14277,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14568,6 +14621,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14578,6 +14632,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14596,6 +14651,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14643,6 +14699,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14783,6 +14840,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -14841,6 +14899,7 @@ Required scope | `ecommerce:write` "disputed", "unfulfilled", ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -15067,6 +15126,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15077,6 +15137,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15153,6 +15214,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15163,6 +15225,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15224,6 +15287,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15567,6 +15631,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15577,6 +15642,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15595,6 +15661,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15642,6 +15709,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15782,6 +15850,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -15856,6 +15925,7 @@ Required scope | `ecommerce:write` "fraudulent", "requested", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16065,6 +16135,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16075,6 +16146,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16151,6 +16223,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16161,6 +16234,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16222,6 +16296,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16565,6 +16640,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16575,6 +16651,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16593,6 +16670,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16640,6 +16718,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -16780,6 +16859,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17031,6 +17111,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17041,6 +17122,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17117,6 +17199,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17127,6 +17210,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17188,6 +17272,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17531,6 +17616,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17541,6 +17627,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17559,6 +17646,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17606,6 +17694,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17746,6 +17835,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -17997,6 +18087,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18007,6 +18098,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18083,6 +18175,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18093,6 +18186,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18154,6 +18248,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18497,6 +18592,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18507,6 +18603,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18525,6 +18622,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18572,6 +18670,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18712,6 +18811,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18963,6 +19063,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -18973,6 +19074,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19049,6 +19151,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19059,6 +19162,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19120,6 +19224,7 @@ Required scope | `ecommerce:write` "won", "lost", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19463,6 +19568,7 @@ Required scope | `ecommerce:write` "kana", "kanji", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19473,6 +19579,7 @@ Required scope | `ecommerce:write` "shipping", "billing", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19491,6 +19598,7 @@ Required scope | `ecommerce:write` }, "refunded", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19538,6 +19646,7 @@ Required scope | `ecommerce:write` }, "Unknown", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -19678,6 +19787,7 @@ Required scope | `ecommerce:write` "shipping", "tax", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -20203,6 +20313,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemDisputeLastStatus: @@ -20218,6 +20329,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemCustomerPaid: @@ -20270,6 +20382,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemAllAddressesItemJapanType: @@ -20279,6 +20392,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemAllAddressesItem: @@ -20321,6 +20435,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemShippingAddressJapanType: @@ -20330,6 +20445,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemShippingAddress: @@ -20372,6 +20488,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemBillingAddressJapanType: @@ -20381,6 +20498,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemBillingAddress: @@ -20613,6 +20731,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemStripeCardExpires: @@ -20699,6 +20818,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersListResponseOrdersItemTotalsExtrasItemPrice: @@ -20954,6 +21074,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersGetResponseDisputeLastStatus: @@ -20969,6 +21090,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersGetResponseCustomerPaid: @@ -21021,6 +21143,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersGetResponseAllAddressesItemJapanType: @@ -21030,6 +21153,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersGetResponseAllAddressesItem: @@ -21072,6 +21196,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersGetResponseShippingAddressJapanType: @@ -21081,6 +21206,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersGetResponseShippingAddress: @@ -21123,6 +21249,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersGetResponseBillingAddressJapanType: @@ -21132,6 +21259,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersGetResponseBillingAddress: @@ -21364,6 +21492,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersGetResponseStripeCardExpires: @@ -21450,6 +21579,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersGetResponseTotalsExtrasItemPrice: @@ -21678,6 +21808,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseDisputeLastStatus: @@ -21693,6 +21824,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseCustomerPaid: @@ -21745,6 +21877,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseAllAddressesItemJapanType: @@ -21754,6 +21887,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseAllAddressesItem: @@ -21796,6 +21930,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseShippingAddressJapanType: @@ -21805,6 +21940,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseShippingAddress: @@ -21847,6 +21983,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseBillingAddressJapanType: @@ -21856,6 +21993,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseBillingAddress: @@ -22088,6 +22226,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseStripeCardExpires: @@ -22174,6 +22313,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersUpdateResponseTotalsExtrasItemPrice: @@ -22402,6 +22542,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseDisputeLastStatus: @@ -22417,6 +22558,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseCustomerPaid: @@ -22469,6 +22611,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseAllAddressesItemJapanType: @@ -22478,6 +22621,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseAllAddressesItem: @@ -22520,6 +22664,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseShippingAddressJapanType: @@ -22529,6 +22674,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseShippingAddress: @@ -22571,6 +22717,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseBillingAddressJapanType: @@ -22580,6 +22727,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseBillingAddress: @@ -22812,6 +22960,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseStripeCardExpires: @@ -22898,6 +23047,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersUpdateFulfillResponseTotalsExtrasItemPrice: @@ -23126,6 +23276,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseDisputeLastStatus: @@ -23141,6 +23292,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseCustomerPaid: @@ -23193,6 +23345,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseAllAddressesItemJapanType: @@ -23202,6 +23355,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseAllAddressesItem: @@ -23244,6 +23398,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseShippingAddressJapanType: @@ -23253,6 +23408,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseShippingAddress: @@ -23295,6 +23451,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseBillingAddressJapanType: @@ -23304,6 +23461,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseBillingAddress: @@ -23537,6 +23695,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseStripeCardExpires: @@ -23623,6 +23782,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersUpdateUnfulfillResponseTotalsExtrasItemPrice: @@ -23846,6 +24006,7 @@ Required scope | `ecommerce:write` - fraudulent - requested docs: The reason for the refund + inline: true source: openapi: ../openapi.yml OrdersRefundResponseStatus: @@ -23859,6 +24020,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml OrdersRefundResponseDisputeLastStatus: @@ -23874,6 +24036,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml OrdersRefundResponseCustomerPaid: @@ -23926,6 +24089,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersRefundResponseAllAddressesItemJapanType: @@ -23935,6 +24099,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersRefundResponseAllAddressesItem: @@ -23977,6 +24142,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersRefundResponseShippingAddressJapanType: @@ -23986,6 +24152,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersRefundResponseShippingAddress: @@ -24028,6 +24195,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml OrdersRefundResponseBillingAddressJapanType: @@ -24037,6 +24205,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml OrdersRefundResponseBillingAddress: @@ -24269,6 +24438,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml OrdersRefundResponseStripeCardExpires: @@ -24355,6 +24525,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml OrdersRefundResponseTotalsExtrasItemPrice: @@ -24583,6 +24754,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadDisputeLastStatus: @@ -24598,6 +24770,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadCustomerPaid: @@ -24650,6 +24823,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadAllAddressesItemJapanType: @@ -24659,6 +24833,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadAllAddressesItem: @@ -24701,6 +24876,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadShippingAddressJapanType: @@ -24710,6 +24886,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadShippingAddress: @@ -24752,6 +24929,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadBillingAddressJapanType: @@ -24761,6 +24939,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadBillingAddress: @@ -24993,6 +25172,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadStripeCardExpires: @@ -25079,6 +25259,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml EcommNewOrderPayloadTotalsExtrasItemPrice: @@ -25307,6 +25488,7 @@ Required scope | `ecommerce:write` - refunded docs: | The status of the Order + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadDisputeLastStatus: @@ -25322,6 +25504,7 @@ Required scope | `ecommerce:write` docs: > If an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status). + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadCustomerPaid: @@ -25374,6 +25557,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadAllAddressesItemJapanType: @@ -25383,6 +25567,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadAllAddressesItem: @@ -25425,6 +25610,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadShippingAddressJapanType: @@ -25434,6 +25620,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadShippingAddress: @@ -25476,6 +25663,7 @@ Required scope | `ecommerce:write` - shipping - billing docs: The type of the order address (billing or shipping) + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadBillingAddressJapanType: @@ -25485,6 +25673,7 @@ Required scope | `ecommerce:write` docs: >- Represents a Japan-only address format. This field will only appear on orders placed from Japan. + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadBillingAddress: @@ -25717,6 +25906,7 @@ Required scope | `ecommerce:write` name: DinersClub - Unknown docs: The card's brand (ie. credit card network) + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadStripeCardExpires: @@ -25803,6 +25993,7 @@ Required scope | `ecommerce:write` - shipping - tax docs: The type of extra item this is. + inline: true source: openapi: ../openapi.yml EcommOrderChangedPayloadTotalsExtrasItemPrice: @@ -28533,6 +28724,7 @@ Required scope | `pages:write` "text", "image", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -29461,6 +29653,7 @@ Required scope | `pages:write` enum: - text - image + inline: true source: openapi: ../openapi.yml PagesGetContentResponseNodesItemText: @@ -30328,6 +30521,7 @@ webhooks: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30365,6 +30559,7 @@ webhooks: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30423,6 +30618,7 @@ webhooks: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -30438,6 +30634,7 @@ webhooks: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsGetCustomCodeResponseScriptsItem: @@ -30483,6 +30680,7 @@ webhooks: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsUpsertCustomCodeRequestScriptsItem: @@ -30515,6 +30713,7 @@ webhooks: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsUpsertCustomCodeResponseScriptsItem: @@ -31568,6 +31767,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31731,6 +31931,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31742,6 +31943,7 @@ Required scope | `ecommerce:write` "staging", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31845,6 +32047,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31879,6 +32082,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -31911,6 +32115,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32045,6 +32250,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32208,6 +32414,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32311,6 +32518,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32345,6 +32553,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32377,6 +32586,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32405,6 +32615,7 @@ Required scope | `ecommerce:write` "staging", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32508,6 +32719,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32542,6 +32754,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32574,6 +32787,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32704,6 +32918,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32738,6 +32953,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32770,6 +32986,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -32904,6 +33121,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33067,6 +33285,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33170,6 +33389,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33204,6 +33424,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33236,6 +33457,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33387,6 +33609,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33550,6 +33773,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33653,6 +33877,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33687,6 +33912,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33719,6 +33945,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -33857,6 +34084,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34020,6 +34248,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34031,6 +34260,7 @@ Required scope | `ecommerce:write` "staging", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34134,6 +34364,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34168,6 +34399,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34200,6 +34432,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34317,6 +34550,7 @@ Required scope | `ecommerce:write` "c599e43b1a1c34d5a323aedf75d3adf6", "b6ccc1830db4b1babeb06a9ac5f6dd76", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34480,6 +34714,7 @@ Required scope | `ecommerce:write` "value": "service-training", }, ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34491,6 +34726,7 @@ Required scope | `ecommerce:write` "staging", "live", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34594,6 +34830,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34628,6 +34865,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34660,6 +34898,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34780,6 +35019,7 @@ Required scope | `ecommerce:write` }, "subscription", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34814,6 +35054,7 @@ Required scope | `ecommerce:write` "month", "year", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34846,6 +35087,7 @@ Required scope | `ecommerce:write` "inactive", "canceled", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -34963,6 +35205,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsListResponseItemsItemProductFieldDataEcProductType: @@ -34976,6 +35219,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsListResponseItemsItemProductFieldData: @@ -35083,6 +35327,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsListResponseItemsItemSkusItemFieldDataEcSkuSubscriptionPlanInterval: @@ -35092,6 +35337,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsListResponseItemsItemSkusItemFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -35100,6 +35346,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsListResponseItemsItemSkusItemFieldDataEcSkuSubscriptionPlanPlansItem: @@ -35240,6 +35487,7 @@ Required scope | `ecommerce:write` - live docs: Indicate whether your Product should be set as "staging" or "live" default: staging + inline: true source: openapi: ../openapi.yml ProductsCreateRequestProductFieldDataSkuPropertiesItemEnumItem: @@ -35334,6 +35582,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsCreateRequestProductFieldDataEcProductType: @@ -35347,6 +35596,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsCreateRequestProductFieldData: @@ -35430,6 +35680,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsCreateRequestSkuFieldDataEcSkuSubscriptionPlanInterval: @@ -35439,6 +35690,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsCreateRequestSkuFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -35447,6 +35699,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsCreateRequestSkuFieldDataEcSkuSubscriptionPlanPlansItem: @@ -35631,6 +35884,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsCreateResponseProductFieldDataEcProductType: @@ -35644,6 +35898,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsCreateResponseProductFieldData: @@ -35751,6 +36006,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsCreateResponseSkusItemFieldDataEcSkuSubscriptionPlanInterval: @@ -35760,6 +36016,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsCreateResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -35768,6 +36025,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsCreateResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItem: @@ -35963,6 +36221,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsGetResponseProductFieldDataEcProductType: @@ -35976,6 +36235,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsGetResponseProductFieldData: @@ -36082,6 +36342,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsGetResponseSkusItemFieldDataEcSkuSubscriptionPlanInterval: @@ -36091,6 +36352,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsGetResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -36099,6 +36361,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsGetResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItem: @@ -36208,6 +36471,7 @@ Required scope | `ecommerce:write` - live docs: Indicate whether your Product should be set as "staging" or "live" default: staging + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestProductFieldDataSkuPropertiesItemEnumItem: @@ -36302,6 +36566,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestProductFieldDataEcProductType: @@ -36315,6 +36580,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestProductFieldData: @@ -36421,6 +36687,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestSkuFieldDataEcSkuSubscriptionPlanInterval: @@ -36430,6 +36697,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestSkuFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -36438,6 +36706,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsUpdateRequestSkuFieldDataEcSkuSubscriptionPlanPlansItem: @@ -36622,6 +36891,7 @@ Required scope | `ecommerce:write` - value: service-training name: ServiceTraining docs: Product tax class + inline: true source: openapi: ../openapi.yml ProductsUpdateResponseFieldDataEcProductType: @@ -36635,6 +36905,7 @@ Required scope | `ecommerce:write` href="https://university.webflow.com/lesson/add-and-manage-products-and-categories?topics=ecommerce#how-to-understand-product-types">Product types. Enums reflect the following values in order: Physical, Digital, Service, Advanced" + inline: true source: openapi: ../openapi.yml ProductsUpdateResponseFieldData: @@ -36717,6 +36988,7 @@ Required scope | `ecommerce:write` - live docs: Indicate whether your Product should be set as "staging" or "live" default: staging + inline: true source: openapi: ../openapi.yml ProductsCreateSkuRequestSkusItemFieldDataPrice: @@ -36748,6 +37020,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsCreateSkuRequestSkusItemFieldDataEcSkuSubscriptionPlanInterval: @@ -36757,6 +37030,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsCreateSkuRequestSkusItemFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -36765,6 +37039,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsCreateSkuRequestSkusItemFieldDataEcSkuSubscriptionPlanPlansItem: @@ -36886,6 +37161,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsCreateSkuResponseSkusItemFieldDataEcSkuSubscriptionPlanInterval: @@ -36895,6 +37171,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsCreateSkuResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -36903,6 +37180,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsCreateSkuResponseSkusItemFieldDataEcSkuSubscriptionPlanPlansItem: @@ -37007,6 +37285,7 @@ Required scope | `ecommerce:write` - live docs: Indicate whether your Product should be set as "staging" or "live" default: staging + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuRequestSkuFieldDataPrice: @@ -37038,6 +37317,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuRequestSkuFieldDataEcSkuSubscriptionPlanInterval: @@ -37047,6 +37327,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuRequestSkuFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -37055,6 +37336,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuRequestSkuFieldDataEcSkuSubscriptionPlanPlansItem: @@ -37176,6 +37458,7 @@ Required scope | `ecommerce:write` - value: one-time name: OneTime - subscription + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuResponseFieldDataEcSkuSubscriptionPlanInterval: @@ -37185,6 +37468,7 @@ Required scope | `ecommerce:write` - month - year docs: Interval of subscription renewal + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuResponseFieldDataEcSkuSubscriptionPlanPlansItemStatus: @@ -37193,6 +37477,7 @@ Required scope | `ecommerce:write` - inactive - canceled docs: The status of the plan + inline: true source: openapi: ../openapi.yml ProductsUpdateSkuResponseFieldDataEcSkuSubscriptionPlanPlansItem: @@ -40230,6 +40515,7 @@ webhooks: "UNPUBLISHED", "DELETED", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40276,6 +40562,7 @@ webhooks: - PUBLISHED - UNPUBLISHED - DELETED + inline: true source: openapi: ../openapi.yml ActivityLogsListResponseItemsItemUser: @@ -40742,6 +41029,7 @@ service: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40826,6 +41114,7 @@ service: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40836,6 +41125,7 @@ service: "page", "site", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40894,6 +41184,7 @@ service: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40952,6 +41243,7 @@ service: "header", "footer", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -40967,6 +41259,7 @@ service: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsGetCustomCodeResponseScriptsItem: @@ -41012,6 +41305,7 @@ service: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsUpsertCustomCodeRequestScriptsItem: @@ -41044,6 +41338,7 @@ service: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsUpsertCustomCodeResponseScriptsItem: @@ -41086,6 +41381,7 @@ service: - page - site docs: Whether the Custom Code script is applied at the Site-level or Page-level + inline: true source: openapi: ../openapi.yml ScriptsListCustomCodeBlocksResponseBlocksItemScriptsItemLocation: @@ -41096,6 +41392,7 @@ service: Location of the script, either in the header or footer of the published site default: header + inline: true source: openapi: ../openapi.yml ScriptsListCustomCodeBlocksResponseBlocksItemScriptsItem: @@ -42278,6 +42575,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42332,6 +42630,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42343,6 +42642,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "user_account_updated", "user_account_deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42440,6 +42740,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42494,6 +42795,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42505,6 +42807,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "user_account_updated", "user_account_deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42602,6 +42905,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42656,6 +42960,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42667,6 +42972,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "user_account_updated", "user_account_deleted", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42746,6 +43052,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42800,6 +43107,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42879,6 +43187,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42933,6 +43242,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -42990,6 +43300,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "value": "-UpdatedOn", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, @@ -43100,6 +43411,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43154,6 +43466,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43257,6 +43570,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "admin", "ecommerce", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43311,6 +43625,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) "verified", "unverified", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -43447,6 +43762,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UsersListResponseUsersItemAccessGroupsItemType: @@ -43457,6 +43773,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UsersListResponseUsersItemAccessGroupsItem: @@ -43570,6 +43887,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UsersGetResponseAccessGroupsItemType: @@ -43580,6 +43898,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UsersGetResponseAccessGroupsItem: @@ -43687,6 +44006,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UsersUpdateResponseAccessGroupsItemType: @@ -43697,6 +44017,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UsersUpdateResponseAccessGroupsItem: @@ -43787,6 +44108,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UsersInviteResponseAccessGroupsItemType: @@ -43797,6 +44119,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UsersInviteResponseAccessGroupsItem: @@ -43887,6 +44210,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - user_account_updated - user_account_deleted docs: The type of event that triggered the request + inline: true source: openapi: ../openapi.yml UserAccountAddedPayloadPayloadStatus: @@ -43895,6 +44219,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UserAccountAddedPayloadPayloadAccessGroupsItemType: @@ -43905,6 +44230,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UserAccountAddedPayloadPayloadAccessGroupsItem: @@ -44010,6 +44336,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - user_account_updated - user_account_deleted docs: The type of event that triggered the request + inline: true source: openapi: ../openapi.yml UserAccountUpdatedPayloadPayloadStatus: @@ -44018,6 +44345,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UserAccountUpdatedPayloadPayloadAccessGroupsItemType: @@ -44028,6 +44356,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UserAccountUpdatedPayloadPayloadAccessGroupsItem: @@ -44133,6 +44462,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - user_account_updated - user_account_deleted docs: The type of event that triggered the request + inline: true source: openapi: ../openapi.yml UserAccountDeletedPayloadPayloadStatus: @@ -44141,6 +44471,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) - verified - unverified docs: The status of the user + inline: true source: openapi: ../openapi.yml UserAccountDeletedPayloadPayloadAccessGroupsItemType: @@ -44151,6 +44482,7 @@ Can be prefixed with a `-` to reverse the sort (ex. `-CreatedOn`) The type of access group based on how it was assigned to the user. * `admin` - Assigned to the user via API or in the designer * `ecommerce` - Assigned to the user via an ecommerce purchase + inline: true source: openapi: ../openapi.yml UserAccountDeletedPayloadPayloadAccessGroupsItem: @@ -44944,6 +45276,7 @@ webhooks: "collection_item_deleted", "collection_item_unpublished", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45051,6 +45384,7 @@ webhooks: "collection_item_deleted", "collection_item_unpublished", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45158,6 +45492,7 @@ webhooks: "collection_item_deleted", "collection_item_unpublished", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45300,6 +45635,7 @@ webhooks: "collection_item_deleted", "collection_item_unpublished", ], + "inline": true, "source": { "openapi": "../openapi.yml", }, @@ -45380,6 +45716,7 @@ webhooks: * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + inline: true source: openapi: ../openapi.yml WebhooksListResponseWebhooksItemFilter: @@ -45531,6 +45868,7 @@ webhooks: * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + inline: true source: openapi: ../openapi.yml WebhooksCreateRequestFilter: @@ -45602,6 +45940,7 @@ webhooks: * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + inline: true source: openapi: ../openapi.yml WebhooksCreateResponseFilter: @@ -45744,6 +46083,7 @@ webhooks: * `collection_item_unpublished` - Sends the [collection_item_unpublished](#collection_item_unpublished) event + inline: true source: openapi: ../openapi.yml WebhooksGetResponseFilter: diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/x-fern-enum.json b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/x-fern-enum.json index b6cb815d795..dcd5420c5fe 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/x-fern-enum.json +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi/x-fern-enum.json @@ -21,6 +21,7 @@ "value": "nano", }, ], + "inline": undefined, "source": { "openapi": "../openapi.yml", }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildQueryParameter.ts b/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildQueryParameter.ts index d0042f2966e..26eaf22881f 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildQueryParameter.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildQueryParameter.ts @@ -108,7 +108,8 @@ function getQueryParameterTypeReference({ value: resolvedSchema.value, description: schema.description ?? resolvedSchema.description, availability: schema.availability, - groupName: undefined + groupName: undefined, + inline: undefined }), context, declarationFile: RelativeFilePath.of(FERN_PACKAGE_MARKER_FILENAME), @@ -161,7 +162,8 @@ function getQueryParameterTypeReference({ value: secondSchema, description: schema.description, availability: schema.availability, - groupName: undefined + groupName: undefined, + inline: undefined }), context, fileContainingReference, @@ -185,7 +187,8 @@ function getQueryParameterTypeReference({ value: firstSchema, description: schema.description, availability: schema.availability, - groupName: undefined + groupName: undefined, + inline: undefined }), context, fileContainingReference, @@ -236,7 +239,8 @@ function getQueryParameterTypeReference({ value: resolvedSchema.value, description: schema.description ?? resolvedSchema.description, availability: schema.availability, - groupName: undefined + groupName: undefined, + inline: schema.inline }), context, fileContainingReference, @@ -270,7 +274,8 @@ function getQueryParameterTypeReference({ value: schema.value.value, description: schema.description, availability: schema.availability, - groupName: undefined + groupName: undefined, + inline: schema.inline }), context, fileContainingReference, @@ -322,7 +327,8 @@ function getQueryParameterTypeReference({ value: secondSchema, description: schema.description, availability: schema.availability, - groupName: undefined + groupName: undefined, + inline: schema.inline }), context, fileContainingReference, @@ -346,7 +352,8 @@ function getQueryParameterTypeReference({ value: firstSchema, description: schema.description, availability: schema.availability, - groupName: undefined + groupName: undefined, + inline: schema.inline }), context, fileContainingReference, @@ -368,7 +375,8 @@ function getQueryParameterTypeReference({ value: oneOfSchema, description: undefined, availability: schema.availability, - groupName: undefined + groupName: undefined, + inline: schema.inline }), context, fileContainingReference, @@ -413,7 +421,8 @@ function getQueryParameterTypeReference({ value: schema.value, description: schema.description, availability: schema.availability, - groupName: undefined + groupName: undefined, + inline: schema.inline }), context, fileContainingReference, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildTypeDeclaration.ts b/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildTypeDeclaration.ts index 9403bf2d56b..7643c919b10 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildTypeDeclaration.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildTypeDeclaration.ts @@ -13,7 +13,8 @@ import { PrimitiveSchema, ReferencedSchema, Schema, - SchemaId + SchemaId, + WithInline } from "@fern-api/openapi-ir"; import { RawSchemas } from "@fern-api/fern-definition-schema"; import { @@ -52,37 +53,73 @@ export function buildTypeDeclaration({ namespace: string | undefined; declarationDepth: number; }): ConvertedTypeDeclaration { + let typeDeclaration: ConvertedTypeDeclaration; switch (schema.type) { case "primitive": - return buildPrimitiveTypeDeclaration(schema); + typeDeclaration = buildPrimitiveTypeDeclaration(schema); + break; case "array": - return buildArrayTypeDeclaration({ schema, context, declarationFile, namespace, declarationDepth }); + typeDeclaration = buildArrayTypeDeclaration({ + schema, + context, + declarationFile, + namespace, + declarationDepth + }); + break; case "map": - return buildMapTypeDeclaration({ schema, context, declarationFile, namespace, declarationDepth }); + typeDeclaration = buildMapTypeDeclaration({ + schema, + context, + declarationFile, + namespace, + declarationDepth + }); + break; case "reference": - return buildReferenceTypeDeclaration({ schema, context, declarationFile, namespace }); + typeDeclaration = buildReferenceTypeDeclaration({ schema, context, declarationFile, namespace }); + break; case "unknown": - return buildUnknownTypeDeclaration(schema.nameOverride, schema.generatedName); + typeDeclaration = buildUnknownTypeDeclaration(schema.nameOverride, schema.generatedName); + break; case "optional": case "nullable": - return buildOptionalTypeDeclaration({ schema, context, declarationFile, namespace, declarationDepth }); + typeDeclaration = buildOptionalTypeDeclaration({ + schema, + context, + declarationFile, + namespace, + declarationDepth + }); + break; case "enum": - return buildEnumTypeDeclaration(schema, declarationDepth); + typeDeclaration = buildEnumTypeDeclaration(schema, declarationDepth); + break; case "literal": - return buildLiteralTypeDeclaration(schema, schema.nameOverride, schema.generatedName); + typeDeclaration = buildLiteralTypeDeclaration(schema, schema.nameOverride, schema.generatedName); + break; case "object": - return buildObjectTypeDeclaration({ schema, context, declarationFile, namespace, declarationDepth }); + typeDeclaration = buildObjectTypeDeclaration({ + schema, + context, + declarationFile, + namespace, + declarationDepth + }); + break; case "oneOf": - return buildOneOfTypeDeclaration({ + typeDeclaration = buildOneOfTypeDeclaration({ schema: schema.value, context, declarationFile, namespace, declarationDepth }); + break; default: assertNever(schema); } + return typeDeclaration; } export function buildObjectTypeDeclaration({ @@ -249,7 +286,7 @@ export function buildObjectTypeDeclaration({ objectTypeDeclaration.source = convertToSourceSchema(schema.source); } - objectTypeDeclaration.inline = getInline(declarationDepth); + objectTypeDeclaration.inline = getInline(schema, declarationDepth); const name = schema.nameOverride ?? schema.generatedName; return { @@ -442,6 +479,7 @@ export function buildEnumTypeDeclaration(schema: EnumSchema, declarationDepth: n if (schema.default != null) { enumSchema.default = schema.default.value; } + enumSchema.inline = getInline(schema, declarationDepth); const uniqueEnumName = new Set(); const uniqueEnumSchema: RawSchemas.EnumSchema = { ...enumSchema, @@ -455,7 +493,6 @@ export function buildEnumTypeDeclaration(schema: EnumSchema, declarationDepth: n uniqueEnumName.add(name.toLowerCase()); } // TODO: log a warning if the name is not unique } - enumSchema.inline = getInline(declarationDepth); return { name: schema.nameOverride ?? schema.generatedName, @@ -601,7 +638,7 @@ export function buildOneOfTypeDeclaration({ union, encoding, source: schema.source != null ? convertToSourceSchema(schema.source) : undefined, - inline: getInline(declarationDepth) + inline: getInline(schema, declarationDepth) } }; } @@ -659,6 +696,9 @@ function convertPropertyTypeReferenceToTypeDefinition({ * @param declarationDepth Keeps track of how nested the declaration is. * @returns `true` if the declaration should be inlined, `undefined` otherwise. */ -function getInline(declarationDepth: number): boolean | undefined { +function getInline(schema: WithInline, declarationDepth: number): boolean | undefined { + if (schema.inline === true) { + return true; + } return declarationDepth > 0 ? true : undefined; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/fern/definition/commons.yml b/packages/cli/api-importers/openapi/openapi-ir/fern/definition/commons.yml index a15a3064fdc..63fb2aea670 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/fern/definition/commons.yml +++ b/packages/cli/api-importers/openapi/openapi-ir/fern/definition/commons.yml @@ -35,6 +35,14 @@ types: [MyType -> propA -> propB] will turn into MyTypePropAPropB [MyType] will turn into MyType + WithInline: + properties: + inline: + docs: | + Whether a type should be inlined. If true, it should be inlined. + If false, it may still become inlined in a later stage. + type: optional + Source: union: openapi: OpenAPISource @@ -43,7 +51,7 @@ types: OpenAPISource: properties: file: string - + ProtobufSource: properties: file: string diff --git a/packages/cli/api-importers/openapi/openapi-ir/fern/definition/finalIr.yml b/packages/cli/api-importers/openapi/openapi-ir/fern/definition/finalIr.yml index ee66d73bdaf..2aed07940f3 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/fern/definition/finalIr.yml +++ b/packages/cli/api-importers/openapi/openapi-ir/fern/definition/finalIr.yml @@ -572,6 +572,7 @@ types: - commons.WithAvailability - commons.WithSource - commons.WithTitle + - commons.WithInline properties: allOf: list properties: list @@ -622,6 +623,7 @@ types: - commons.WithSdkGroupName - commons.WithAvailability - commons.WithTitle + - commons.WithInline properties: value: Schema @@ -633,6 +635,7 @@ types: - commons.WithAvailability - commons.WithEncoding - commons.WithTitle + - commons.WithInline properties: key: PrimitiveSchema value: Schema @@ -644,6 +647,7 @@ types: - commons.WithSdkGroupName - commons.WithAvailability - commons.WithTitle + - commons.WithInline properties: value: Schema @@ -654,6 +658,7 @@ types: - commons.WithSdkGroupName - commons.WithAvailability - commons.WithTitle + - commons.WithInline properties: value: Schema @@ -665,6 +670,7 @@ types: - commons.WithAvailability - commons.WithSource - commons.WithTitle + - commons.WithInline properties: default: optional values: list @@ -717,6 +723,7 @@ types: - commons.WithEncoding - commons.WithSource - commons.WithTitle + - commons.WithInline properties: discriminantProperty: string commonProperties: list @@ -736,5 +743,6 @@ types: - commons.WithEncoding - commons.WithSource - commons.WithTitle + - commons.WithInline properties: schemas: list diff --git a/packages/cli/api-importers/openapi/openapi-ir/fern/definition/parseIr.yml b/packages/cli/api-importers/openapi/openapi-ir/fern/definition/parseIr.yml index f5d974fc73a..09ec060d9c8 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/fern/definition/parseIr.yml +++ b/packages/cli/api-importers/openapi/openapi-ir/fern/definition/parseIr.yml @@ -189,6 +189,7 @@ types: - commons.WithDescription - commons.WithAvailability - commons.WithTitle + - commons.WithInline properties: value: SchemaWithExample example: optional> @@ -201,6 +202,7 @@ types: - commons.WithAvailability - commons.WithEncoding - commons.WithTitle + - commons.WithInline properties: key: PrimitiveSchemaWithExample value: SchemaWithExample @@ -213,6 +215,7 @@ types: - commons.WithDescription - commons.WithAvailability - commons.WithTitle + - commons.WithInline properties: value: SchemaWithExample @@ -223,6 +226,7 @@ types: - commons.WithDescription - commons.WithAvailability - commons.WithTitle + - commons.WithInline properties: value: SchemaWithExample @@ -234,6 +238,7 @@ types: - commons.WithAvailability - commons.WithSource - commons.WithTitle + - commons.WithInline properties: default: optional values: list @@ -257,6 +262,7 @@ types: - commons.WithAvailability - commons.WithSource - commons.WithTitle + - commons.WithInline properties: allOf: list properties: list @@ -298,6 +304,7 @@ types: - commons.WithEncoding - commons.WithSource - commons.WithTitle + - commons.WithInline properties: discriminantProperty: string commonProperties: list @@ -317,6 +324,7 @@ types: - commons.WithEncoding - commons.WithSource - commons.WithTitle + - commons.WithInline properties: schemas: list diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/commons/types/WithInline.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/commons/types/WithInline.ts new file mode 100644 index 00000000000..a8471d506a6 --- /dev/null +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/commons/types/WithInline.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface WithInline { + /** + * Whether a type should be inlined. If true, it should be inlined. + * If false, it may still become inlined in a later stage. + */ + inline: boolean | undefined; +} diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/commons/types/index.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/commons/types/index.ts index 82808c1b649..1eb29983878 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/commons/types/index.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/commons/types/index.ts @@ -4,6 +4,7 @@ export * from "./WithEncoding"; export * from "./WithDescription"; export * from "./WithAvailability"; export * from "./WithName"; +export * from "./WithInline"; export * from "./Source"; export * from "./OpenApiSource"; export * from "./ProtobufSource"; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/ArraySchema.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/ArraySchema.ts index 133d405d0d1..222d26ea51c 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/ArraySchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/ArraySchema.ts @@ -9,6 +9,7 @@ export interface ArraySchema FernOpenapiIr.WithName, FernOpenapiIr.WithSdkGroupName, FernOpenapiIr.WithAvailability, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { value: FernOpenapiIr.Schema; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/DiscriminatedOneOfSchema.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/DiscriminatedOneOfSchema.ts index b6a2e54b6ae..dc3db92e9a5 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/DiscriminatedOneOfSchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/DiscriminatedOneOfSchema.ts @@ -11,7 +11,8 @@ export interface DiscriminatedOneOfSchema FernOpenapiIr.WithAvailability, FernOpenapiIr.WithEncoding, FernOpenapiIr.WithSource, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { discriminantProperty: string; commonProperties: FernOpenapiIr.CommonProperty[]; schemas: Record; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/EnumSchema.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/EnumSchema.ts index a57870fca1c..b84d06717c6 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/EnumSchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/EnumSchema.ts @@ -10,7 +10,8 @@ export interface EnumSchema FernOpenapiIr.WithSdkGroupName, FernOpenapiIr.WithAvailability, FernOpenapiIr.WithSource, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { default: FernOpenapiIr.EnumValue | undefined; values: FernOpenapiIr.EnumValue[]; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/MapSchema.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/MapSchema.ts index 595e204e94a..a6ec11473d2 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/MapSchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/MapSchema.ts @@ -10,7 +10,8 @@ export interface MapSchema FernOpenapiIr.WithSdkGroupName, FernOpenapiIr.WithAvailability, FernOpenapiIr.WithEncoding, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { key: FernOpenapiIr.PrimitiveSchema; value: FernOpenapiIr.Schema; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/NullableSchema.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/NullableSchema.ts index 00464dce653..3c0ad122ca5 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/NullableSchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/NullableSchema.ts @@ -9,6 +9,7 @@ export interface NullableSchema FernOpenapiIr.WithName, FernOpenapiIr.WithSdkGroupName, FernOpenapiIr.WithAvailability, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { value: FernOpenapiIr.Schema; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/ObjectSchema.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/ObjectSchema.ts index aa29bffc44b..39090356ba3 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/ObjectSchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/ObjectSchema.ts @@ -10,7 +10,8 @@ export interface ObjectSchema FernOpenapiIr.WithSdkGroupName, FernOpenapiIr.WithAvailability, FernOpenapiIr.WithSource, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { allOf: FernOpenapiIr.ReferencedSchema[]; properties: FernOpenapiIr.ObjectProperty[]; allOfPropertyConflicts: FernOpenapiIr.AllOfPropertyConflict[]; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/OptionalSchema.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/OptionalSchema.ts index eac5cf61807..7f13af6a5cf 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/OptionalSchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/OptionalSchema.ts @@ -9,6 +9,7 @@ export interface OptionalSchema FernOpenapiIr.WithName, FernOpenapiIr.WithSdkGroupName, FernOpenapiIr.WithAvailability, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { value: FernOpenapiIr.Schema; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/UnDiscriminatedOneOfSchema.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/UnDiscriminatedOneOfSchema.ts index 43a77daba6c..dd277986008 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/UnDiscriminatedOneOfSchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/finalIr/types/UnDiscriminatedOneOfSchema.ts @@ -11,6 +11,7 @@ export interface UnDiscriminatedOneOfSchema FernOpenapiIr.WithAvailability, FernOpenapiIr.WithEncoding, FernOpenapiIr.WithSource, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { schemas: FernOpenapiIr.Schema[]; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/ArraySchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/ArraySchemaWithExample.ts index 78eadb1038d..9d13ce0ffba 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/ArraySchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/ArraySchemaWithExample.ts @@ -9,7 +9,8 @@ export interface ArraySchemaWithExample FernOpenapiIr.WithName, FernOpenapiIr.WithDescription, FernOpenapiIr.WithAvailability, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { value: FernOpenapiIr.SchemaWithExample; example: unknown[] | undefined; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/DiscriminatedOneOfSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/DiscriminatedOneOfSchemaWithExample.ts index cf18f13a54e..ebc2ed604e4 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/DiscriminatedOneOfSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/DiscriminatedOneOfSchemaWithExample.ts @@ -11,7 +11,8 @@ export interface DiscriminatedOneOfSchemaWithExample FernOpenapiIr.WithAvailability, FernOpenapiIr.WithEncoding, FernOpenapiIr.WithSource, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { discriminantProperty: string; commonProperties: FernOpenapiIr.CommonPropertyWithExample[]; schemas: Record; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/EnumSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/EnumSchemaWithExample.ts index 70621d0a72f..0a0fbcb8c5c 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/EnumSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/EnumSchemaWithExample.ts @@ -10,7 +10,8 @@ export interface EnumSchemaWithExample FernOpenapiIr.WithSdkGroupName, FernOpenapiIr.WithAvailability, FernOpenapiIr.WithSource, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { default: FernOpenapiIr.EnumValue | undefined; values: FernOpenapiIr.EnumValue[]; example: string | undefined; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/MapSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/MapSchemaWithExample.ts index f749e41e975..43146dc3ed9 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/MapSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/MapSchemaWithExample.ts @@ -10,7 +10,8 @@ export interface MapSchemaWithExample FernOpenapiIr.WithDescription, FernOpenapiIr.WithAvailability, FernOpenapiIr.WithEncoding, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { key: FernOpenapiIr.PrimitiveSchemaWithExample; value: FernOpenapiIr.SchemaWithExample; example: unknown | undefined; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/NullableSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/NullableSchemaWithExample.ts index 689eae93af8..0f34bdda5fd 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/NullableSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/NullableSchemaWithExample.ts @@ -9,6 +9,7 @@ export interface NullableSchemaWithExample FernOpenapiIr.WithName, FernOpenapiIr.WithDescription, FernOpenapiIr.WithAvailability, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { value: FernOpenapiIr.SchemaWithExample; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/ObjectSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/ObjectSchemaWithExample.ts index 465c42ee616..2f2e3c0a5af 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/ObjectSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/ObjectSchemaWithExample.ts @@ -10,7 +10,8 @@ export interface ObjectSchemaWithExample FernOpenapiIr.WithSdkGroupName, FernOpenapiIr.WithAvailability, FernOpenapiIr.WithSource, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { allOf: FernOpenapiIr.ReferencedSchema[]; properties: FernOpenapiIr.ObjectPropertyWithExample[]; allOfPropertyConflicts: FernOpenapiIr.AllOfPropertyConflict[]; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/OptionalSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/OptionalSchemaWithExample.ts index 5e41d462529..e8574df954f 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/OptionalSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/OptionalSchemaWithExample.ts @@ -9,6 +9,7 @@ export interface OptionalSchemaWithExample FernOpenapiIr.WithName, FernOpenapiIr.WithDescription, FernOpenapiIr.WithAvailability, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { value: FernOpenapiIr.SchemaWithExample; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/UnDiscriminatedOneOfSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/UnDiscriminatedOneOfSchemaWithExample.ts index 734e15a24f6..f206bea92b7 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/UnDiscriminatedOneOfSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/api/resources/parseIr/types/UnDiscriminatedOneOfSchemaWithExample.ts @@ -11,6 +11,7 @@ export interface UnDiscriminatedOneOfSchemaWithExample FernOpenapiIr.WithAvailability, FernOpenapiIr.WithEncoding, FernOpenapiIr.WithSource, - FernOpenapiIr.WithTitle { + FernOpenapiIr.WithTitle, + FernOpenapiIr.WithInline { schemas: FernOpenapiIr.SchemaWithExample[]; } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/commons/types/WithInline.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/commons/types/WithInline.ts new file mode 100644 index 00000000000..c435488139d --- /dev/null +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/commons/types/WithInline.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as FernOpenapiIr from "../../../../api/index"; +import * as core from "../../../../core"; + +export const WithInline: core.serialization.ObjectSchema = + core.serialization.objectWithoutOptionalProperties({ + inline: core.serialization.boolean().optional(), + }); + +export declare namespace WithInline { + interface Raw { + inline?: boolean | null; + } +} diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/commons/types/index.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/commons/types/index.ts index 82808c1b649..1eb29983878 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/commons/types/index.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/commons/types/index.ts @@ -4,6 +4,7 @@ export * from "./WithEncoding"; export * from "./WithDescription"; export * from "./WithAvailability"; export * from "./WithName"; +export * from "./WithInline"; export * from "./Source"; export * from "./OpenApiSource"; export * from "./ProtobufSource"; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/finalIr/types/ArraySchema.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/finalIr/types/ArraySchema.ts index 0d53d50d031..b06d2c178ed 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/finalIr/types/ArraySchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/finalIr/types/ArraySchema.ts @@ -10,6 +10,7 @@ import { WithName } from "../../commons/types/WithName"; import { WithSdkGroupName } from "../../commons/types/WithSdkGroupName"; import { WithAvailability } from "../../commons/types/WithAvailability"; import { WithTitle } from "../../commons/types/WithTitle"; +import { WithInline } from "../../commons/types/WithInline"; export const ArraySchema: core.serialization.ObjectSchema = core.serialization @@ -20,10 +21,17 @@ export const ArraySchema: core.serialization.ObjectSchema; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/finalIr/types/EnumSchema.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/finalIr/types/EnumSchema.ts index efdf0107738..7a44bfc0eb4 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/finalIr/types/EnumSchema.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/finalIr/types/EnumSchema.ts @@ -12,6 +12,7 @@ import { WithSdkGroupName } from "../../commons/types/WithSdkGroupName"; import { WithAvailability } from "../../commons/types/WithAvailability"; import { WithSource } from "../../commons/types/WithSource"; import { WithTitle } from "../../commons/types/WithTitle"; +import { WithInline } from "../../commons/types/WithInline"; export const EnumSchema: core.serialization.ObjectSchema = core.serialization @@ -24,7 +25,8 @@ export const EnumSchema: core.serialization.ObjectSchema = core.serialization @@ -24,7 +25,8 @@ export const MapSchema: core.serialization.ObjectSchema = core.serialization @@ -27,7 +28,8 @@ export const ObjectSchema: core.serialization.ObjectSchema; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/EnumSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/EnumSchemaWithExample.ts index d76495b66da..112253b0f31 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/EnumSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/EnumSchemaWithExample.ts @@ -12,6 +12,7 @@ import { WithSdkGroupName } from "../../commons/types/WithSdkGroupName"; import { WithAvailability } from "../../commons/types/WithAvailability"; import { WithSource } from "../../commons/types/WithSource"; import { WithTitle } from "../../commons/types/WithTitle"; +import { WithInline } from "../../commons/types/WithInline"; export const EnumSchemaWithExample: core.serialization.ObjectSchema< serializers.EnumSchemaWithExample.Raw, @@ -27,7 +28,8 @@ export const EnumSchemaWithExample: core.serialization.ObjectSchema< .extend(WithSdkGroupName) .extend(WithAvailability) .extend(WithSource) - .extend(WithTitle); + .extend(WithTitle) + .extend(WithInline); export declare namespace EnumSchemaWithExample { interface Raw @@ -36,7 +38,8 @@ export declare namespace EnumSchemaWithExample { WithSdkGroupName.Raw, WithAvailability.Raw, WithSource.Raw, - WithTitle.Raw { + WithTitle.Raw, + WithInline.Raw { default?: EnumValue.Raw | null; values: EnumValue.Raw[]; example?: string | null; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/MapSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/MapSchemaWithExample.ts index 88cdb3bc712..a0850a26ca7 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/MapSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/MapSchemaWithExample.ts @@ -12,6 +12,7 @@ import { WithDescription } from "../../commons/types/WithDescription"; import { WithAvailability } from "../../commons/types/WithAvailability"; import { WithEncoding } from "../../commons/types/WithEncoding"; import { WithTitle } from "../../commons/types/WithTitle"; +import { WithInline } from "../../commons/types/WithInline"; export const MapSchemaWithExample: core.serialization.ObjectSchema< serializers.MapSchemaWithExample.Raw, @@ -27,7 +28,8 @@ export const MapSchemaWithExample: core.serialization.ObjectSchema< .extend(WithDescription) .extend(WithAvailability) .extend(WithEncoding) - .extend(WithTitle); + .extend(WithTitle) + .extend(WithInline); export declare namespace MapSchemaWithExample { interface Raw @@ -36,7 +38,8 @@ export declare namespace MapSchemaWithExample { WithDescription.Raw, WithAvailability.Raw, WithEncoding.Raw, - WithTitle.Raw { + WithTitle.Raw, + WithInline.Raw { key: PrimitiveSchemaWithExample.Raw; value: serializers.SchemaWithExample.Raw; example?: unknown | null; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/NullableSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/NullableSchemaWithExample.ts index 9e1a5565687..203e26a8fc3 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/NullableSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/NullableSchemaWithExample.ts @@ -10,6 +10,7 @@ import { WithName } from "../../commons/types/WithName"; import { WithDescription } from "../../commons/types/WithDescription"; import { WithAvailability } from "../../commons/types/WithAvailability"; import { WithTitle } from "../../commons/types/WithTitle"; +import { WithInline } from "../../commons/types/WithInline"; export const NullableSchemaWithExample: core.serialization.ObjectSchema< serializers.NullableSchemaWithExample.Raw, @@ -22,10 +23,17 @@ export const NullableSchemaWithExample: core.serialization.ObjectSchema< .extend(WithName) .extend(WithDescription) .extend(WithAvailability) - .extend(WithTitle); + .extend(WithTitle) + .extend(WithInline); export declare namespace NullableSchemaWithExample { - interface Raw extends WithSdkGroupName.Raw, WithName.Raw, WithDescription.Raw, WithAvailability.Raw, WithTitle.Raw { + interface Raw + extends WithSdkGroupName.Raw, + WithName.Raw, + WithDescription.Raw, + WithAvailability.Raw, + WithTitle.Raw, + WithInline.Raw { value: serializers.SchemaWithExample.Raw; } } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/ObjectSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/ObjectSchemaWithExample.ts index cd9bcf4af59..47e441c623a 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/ObjectSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/ObjectSchemaWithExample.ts @@ -14,6 +14,7 @@ import { WithSdkGroupName } from "../../commons/types/WithSdkGroupName"; import { WithAvailability } from "../../commons/types/WithAvailability"; import { WithSource } from "../../commons/types/WithSource"; import { WithTitle } from "../../commons/types/WithTitle"; +import { WithInline } from "../../commons/types/WithInline"; export const ObjectSchemaWithExample: core.serialization.ObjectSchema< serializers.ObjectSchemaWithExample.Raw, @@ -31,7 +32,8 @@ export const ObjectSchemaWithExample: core.serialization.ObjectSchema< .extend(WithSdkGroupName) .extend(WithAvailability) .extend(WithSource) - .extend(WithTitle); + .extend(WithTitle) + .extend(WithInline); export declare namespace ObjectSchemaWithExample { interface Raw @@ -40,7 +42,8 @@ export declare namespace ObjectSchemaWithExample { WithSdkGroupName.Raw, WithAvailability.Raw, WithSource.Raw, - WithTitle.Raw { + WithTitle.Raw, + WithInline.Raw { allOf: ReferencedSchema.Raw[]; properties: serializers.ObjectPropertyWithExample.Raw[]; allOfPropertyConflicts: AllOfPropertyConflict.Raw[]; diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/OptionalSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/OptionalSchemaWithExample.ts index cc6395fff41..b97404c2db8 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/OptionalSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/OptionalSchemaWithExample.ts @@ -10,6 +10,7 @@ import { WithName } from "../../commons/types/WithName"; import { WithDescription } from "../../commons/types/WithDescription"; import { WithAvailability } from "../../commons/types/WithAvailability"; import { WithTitle } from "../../commons/types/WithTitle"; +import { WithInline } from "../../commons/types/WithInline"; export const OptionalSchemaWithExample: core.serialization.ObjectSchema< serializers.OptionalSchemaWithExample.Raw, @@ -22,10 +23,17 @@ export const OptionalSchemaWithExample: core.serialization.ObjectSchema< .extend(WithName) .extend(WithDescription) .extend(WithAvailability) - .extend(WithTitle); + .extend(WithTitle) + .extend(WithInline); export declare namespace OptionalSchemaWithExample { - interface Raw extends WithSdkGroupName.Raw, WithName.Raw, WithDescription.Raw, WithAvailability.Raw, WithTitle.Raw { + interface Raw + extends WithSdkGroupName.Raw, + WithName.Raw, + WithDescription.Raw, + WithAvailability.Raw, + WithTitle.Raw, + WithInline.Raw { value: serializers.SchemaWithExample.Raw; } } diff --git a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/UnDiscriminatedOneOfSchemaWithExample.ts b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/UnDiscriminatedOneOfSchemaWithExample.ts index d1869b759c2..65cf5bd1f9a 100644 --- a/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/UnDiscriminatedOneOfSchemaWithExample.ts +++ b/packages/cli/api-importers/openapi/openapi-ir/src/sdk/serialization/resources/parseIr/types/UnDiscriminatedOneOfSchemaWithExample.ts @@ -12,6 +12,7 @@ import { WithAvailability } from "../../commons/types/WithAvailability"; import { WithEncoding } from "../../commons/types/WithEncoding"; import { WithSource } from "../../commons/types/WithSource"; import { WithTitle } from "../../commons/types/WithTitle"; +import { WithInline } from "../../commons/types/WithInline"; export const UnDiscriminatedOneOfSchemaWithExample: core.serialization.ObjectSchema< serializers.UnDiscriminatedOneOfSchemaWithExample.Raw, @@ -26,7 +27,8 @@ export const UnDiscriminatedOneOfSchemaWithExample: core.serialization.ObjectSch .extend(WithAvailability) .extend(WithEncoding) .extend(WithSource) - .extend(WithTitle); + .extend(WithTitle) + .extend(WithInline); export declare namespace UnDiscriminatedOneOfSchemaWithExample { interface Raw @@ -36,7 +38,8 @@ export declare namespace UnDiscriminatedOneOfSchemaWithExample { WithAvailability.Raw, WithEncoding.Raw, WithSource.Raw, - WithTitle.Raw { + WithTitle.Raw, + WithInline.Raw { schemas: serializers.SchemaWithExample.Raw[]; } } diff --git a/packages/cli/cli/package.json b/packages/cli/cli/package.json index d262e217fa3..5b25a9f2d41 100644 --- a/packages/cli/cli/package.json +++ b/packages/cli/cli/package.json @@ -46,9 +46,10 @@ "@fern-api/configuration-loader": "workspace:*", "@fern-api/core": "workspace:*", "@fern-api/core-utils": "workspace:*", + "@fern-api/docs-parsers": "^0.0.10", "@fern-api/docs-preview": "workspace:*", "@fern-api/docs-resolver": "workspace:*", - "@fern-api/docs-validator": "workspace:*", + "@fern-api/docs-validator": "workspace:*", "@fern-api/fern-definition-formatter": "workspace:*", "@fern-api/fern-definition-schema": "workspace:*", "@fern-api/fern-definition-validator": "workspace:*", @@ -105,6 +106,7 @@ "js-yaml": "^4.1.0", "latest-version": "^9.0.0", "lodash-es": "^4.17.21", + "openapi-types": "^12.1.3", "ora": "^7.0.1", "organize-imports-cli": "^0.10.0", "prettier": "^2.7.1", diff --git a/packages/cli/cli/src/cli.ts b/packages/cli/cli/src/cli.ts index 7e2329b4371..a015859b267 100644 --- a/packages/cli/cli/src/cli.ts +++ b/packages/cli/cli/src/cli.ts @@ -47,6 +47,7 @@ import { generateJsonschemaForWorkspaces } from "./commands/jsonschema/generateJ import { generateDynamicIrForWorkspaces } from "./commands/generate-dynamic-ir/generateDynamicIrForWorkspaces"; import { writeDocsDefinitionForProject } from "./commands/write-docs-definition/writeDocsDefinitionForProject"; import { RUNTIME } from "@fern-typescript/fetcher"; +import { generateOpenApiToFdrApiDefinitionForWorkspaces } from "./commands/generate-openapi-fdr/generateOpenApiToFdrApiDefinitionForWorkspaces"; void runCli(); @@ -611,17 +612,32 @@ function addFdrCommand(cli: Argv, cliContext: CliContext) { string: true, default: new Array(), description: "Filter the FDR API definition for certain audiences" + }) + .option("v2", { + boolean: true, + description: "Use v2 format" }), async (argv) => { - await generateFdrApiDefinitionForWorkspaces({ - project: await loadProjectAndRegisterWorkspacesWithContext(cliContext, { - commandLineApiWorkspace: argv.api, - defaultToAllApiWorkspaces: false - }), - outputFilepath: resolve(cwd(), argv.pathToOutput), - cliContext, - audiences: argv.audience.length > 0 ? { type: "select", audiences: argv.audience } : { type: "all" } - }); + if (argv.v2) { + await generateOpenApiToFdrApiDefinitionForWorkspaces({ + project: await loadProjectAndRegisterWorkspacesWithContext(cliContext, { + commandLineApiWorkspace: argv.api, + defaultToAllApiWorkspaces: false + }), + outputFilepath: resolve(cwd(), argv.pathToOutput), + cliContext + }); + } else { + await generateFdrApiDefinitionForWorkspaces({ + project: await loadProjectAndRegisterWorkspacesWithContext(cliContext, { + commandLineApiWorkspace: argv.api, + defaultToAllApiWorkspaces: false + }), + outputFilepath: resolve(cwd(), argv.pathToOutput), + cliContext, + audiences: argv.audience.length > 0 ? { type: "select", audiences: argv.audience } : { type: "all" } + }); + } } ); } diff --git a/packages/cli/cli/src/commands/generate-openapi-fdr/generateOpenApiToFdrApiDefinitionForWorkspaces.ts b/packages/cli/cli/src/commands/generate-openapi-fdr/generateOpenApiToFdrApiDefinitionForWorkspaces.ts new file mode 100644 index 00000000000..e6ad2db29b9 --- /dev/null +++ b/packages/cli/cli/src/commands/generate-openapi-fdr/generateOpenApiToFdrApiDefinitionForWorkspaces.ts @@ -0,0 +1,81 @@ +import { AbsoluteFilePath, stringifyLargeObject } from "@fern-api/fs-utils"; +import { Project } from "@fern-api/project-loader"; +import { writeFile } from "fs/promises"; +import path from "path"; +import { CliContext } from "../../cli-context/CliContext"; +import { getAllOpenAPISpecs, LazyFernWorkspace, OSSWorkspace } from "@fern-api/lazy-fern-workspace"; +// TODO: clean up imports +import { OpenApiDocumentConverterNode } from "@fern-api/docs-parsers"; +import { ErrorCollector } from "@fern-api/docs-parsers"; +import fs from "fs"; +import yaml from "js-yaml"; +import { BaseOpenApiV3_1ConverterNodeContext } from "@fern-api/docs-parsers"; +import { OpenAPIV3_1 } from "openapi-types"; + +export async function generateOpenApiToFdrApiDefinitionForWorkspaces({ + project, + outputFilepath, + cliContext +}: { + project: Project; + outputFilepath: AbsoluteFilePath; + cliContext: CliContext; +}): Promise { + await Promise.all( + project.apiWorkspaces.map(async (workspace) => { + await cliContext.runTaskForWorkspace(workspace, async (context) => { + await cliContext.runTaskForWorkspace(workspace, async (context) => { + if (workspace instanceof LazyFernWorkspace) { + context.logger.info("Skipping, API is specified as a Fern Definition."); + return; + } else if (!(workspace instanceof OSSWorkspace)) { + return; + } + const openApiSpecs = await getAllOpenAPISpecs({ context, specs: workspace.specs }); + + if (openApiSpecs.length === 0) { + context.logger.error("No OpenAPI specs found in the workspace"); + return; + } + + if (openApiSpecs.length > 1) { + context.logger.error("Found multiple OpenAPI specs in the workspace."); + return; + } + + const openApi = openApiSpecs[0]; + + if (openApi != null) { + const input = yaml.load( + fs.readFileSync(openApi.absoluteFilepath, "utf8") + ) as OpenAPIV3_1.Document; + + const oasContext: BaseOpenApiV3_1ConverterNodeContext = { + document: input, + logger: context.logger, + errors: new ErrorCollector() + }; + + const openApiFdrJson = new OpenApiDocumentConverterNode({ + input, + context: oasContext, + accessPath: [], + pathId: workspace.workspaceName ?? "openapi parser" + }); + + const fdrApiDefinition = openApiFdrJson.convert(); + + const resolvedOutputFilePath = path.resolve(outputFilepath); + await writeFile( + resolvedOutputFilePath, + await stringifyLargeObject(fdrApiDefinition, { pretty: true }) + ); + context.logger.info(`Wrote FDR API definition to ${resolvedOutputFilePath}`); + } else { + context.logger.error("No OpenAPI spec found in the workspace"); + } + }); + }); + }) + ); +} diff --git a/packages/cli/cli/versions.yml b/packages/cli/cli/versions.yml index e0f8259d0c6..f289eff7a57 100644 --- a/packages/cli/cli/versions.yml +++ b/packages/cli/cli/versions.yml @@ -1,3 +1,52 @@ +- changelogEntry: + - summary: | + Add support for setting the `User-Agent` header value for Go generators. + type: fix + irVersion: 53 + version: 0.46.1 + +- changelogEntry: + - summary: | + No changes; promote `0.46.0-rc1` release candidate to minor version. + type: internal + irVersion: 53 + version: 0.46.0 + +- changelogEntry: + - summary: | + * Set `inline: true` for inline enums imported from OpenAPI. + * Set `inline: true` for maps generated from OpenAPI additionalProperties. + type: fix + irVersion: 53 + version: 0.46.0-rc1 + +- changelogEntry: + - summary: | + The Fern Definition now supports `bytes` as a response type. + + ```yml service.yml + endpoints: + download: + response: bytes + ``` + type: feat + irVersion: 53 + version: 0.46.0-rc0 + +- changelogEntry: + - summary: | + Defaults are no longer set on datetimes when converting to docs shapes. + type: fix + irVersion: 53 + version: 0.45.4 + +- changelogEntry: + - summary: | + Unknown schemas are no longer incorrectly marked as `additionalProperties: true`. + type: chore + irVersion: 53 + version: 0.45.4-rc1 + - changelogEntry: - summary: | The CLI prompts the user to confirm output directory overwrites on fern generate. @@ -7,7 +56,7 @@ - changelogEntry: - summary: | - Unknown schemas are no longer incorrectly marked as `additionalProperties: true`. + Unknown schemas are no longer incorrectly marked as `additionalProperties: true`. type: fix irVersion: 53 version: 0.45.3 @@ -16,7 +65,7 @@ - summary: | Example generation now respects read-only schemas when generating request examples. type: fix - irVersion: 53 + irVersion: 53 version: 0.45.2 - changelogEntry: @@ -41,7 +90,6 @@ irVersion: 53 version: 0.45.0 - - changelogEntry: - summary: | Docs generation now preserves original model schema names. diff --git a/packages/cli/configuration-loader/src/generators-yml/convertGeneratorsConfiguration.ts b/packages/cli/configuration-loader/src/generators-yml/convertGeneratorsConfiguration.ts index 67ccd8eb3e0..b1aa6f620ff 100644 --- a/packages/cli/configuration-loader/src/generators-yml/convertGeneratorsConfiguration.ts +++ b/packages/cli/configuration-loader/src/generators-yml/convertGeneratorsConfiguration.ts @@ -752,6 +752,7 @@ async function getGithubLicense({ }); } +// TODO: This is where we should add support for Go and PHP. function getGithubPublishInfo( output: generatorsYml.GeneratorOutputSchema, maybeGroupLevelMetadata: OutputMetadata | undefined, diff --git a/packages/cli/configuration/src/generators-yml/GeneratorsConfiguration.ts b/packages/cli/configuration/src/generators-yml/GeneratorsConfiguration.ts index 9aeae957b7c..2b28aca9bc3 100644 --- a/packages/cli/configuration/src/generators-yml/GeneratorsConfiguration.ts +++ b/packages/cli/configuration/src/generators-yml/GeneratorsConfiguration.ts @@ -137,6 +137,9 @@ export function getPackageName({ }: { generatorInvocation: GeneratorInvocation; }): string | undefined { + if (generatorInvocation.language === "go") { + return getGoPackageName(generatorInvocation); + } return generatorInvocation.outputMode._visit({ downloadFiles: () => undefined, github: (val) => @@ -164,3 +167,18 @@ export function getPackageName({ _other: () => undefined }); } + +/** + * Go doesn't use a central package manager; the Go Module Proxy simply uses the name + * of the GitHub repository. + */ +function getGoPackageName(generatorInvocation: GeneratorInvocation): string | undefined { + return generatorInvocation.outputMode._visit({ + downloadFiles: () => undefined, + github: (val) => `github.com/${val.owner}/${val.repo}`, + githubV2: (val) => `github.com/${val.owner}/${val.repo}`, + publish: () => undefined, + publishV2: () => undefined, + _other: () => undefined + }); +} diff --git a/packages/cli/ete-tests/package.json b/packages/cli/ete-tests/package.json index 199b00ca898..a67311c1f82 100644 --- a/packages/cli/ete-tests/package.json +++ b/packages/cli/ete-tests/package.json @@ -34,12 +34,15 @@ "@fern-api/logging-execa": "workspace:*", "@fern-typescript/fetcher": "workspace:*", "execa": "^5.1.1", + "express": "^4.20.0", "js-yaml": "^4.1.0", "node-fetch": "2.7.0", + "openapi-types": "^12.1.3", "strip-ansi": "^7.1.0", "tmp-promise": "^3.0.3" }, "devDependencies": { + "@types/express": "^4.17.21", "@types/jest": "^29.5.12", "@types/js-yaml": "^4.0.8", "@types/node": "18.7.18", diff --git a/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap b/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap index e942f452681..4862fdf1fc3 100644 --- a/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap +++ b/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap @@ -1,5 +1,5 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`dependencies > correctly incorporates dependencies 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"dependent","camelCase":{"unsafeName":"dependent","safeName":"dependent"},"snakeCase":{"unsafeName":"dependent","safeName":"dependent"},"screamingSnakeCase":{"unsafeName":"DEPENDENT","safeName":"DEPENDENT"},"pascalCase":{"unsafeName":"Dependent","safeName":"Dependent"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_imported:RootString":{"inline":null,"name":{"name":{"originalName":"RootString","camelCase":{"unsafeName":"rootString","safeName":"rootString"},"snakeCase":{"unsafeName":"root_string","safeName":"root_string"},"screamingSnakeCase":{"unsafeName":"ROOT_STRING","safeName":"ROOT_STRING"},"pascalCase":{"unsafeName":"RootString","safeName":"RootString"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":null},"typeId":"type_imported:RootString"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_y:IntegerAlias":{"inline":null,"name":{"name":{"originalName":"IntegerAlias","camelCase":{"unsafeName":"integerAlias","safeName":"integerAlias"},"snakeCase":{"unsafeName":"integer_alias","safeName":"integer_alias"},"screamingSnakeCase":{"unsafeName":"INTEGER_ALIAS","safeName":"INTEGER_ALIAS"},"pascalCase":{"unsafeName":"IntegerAlias","safeName":"IntegerAlias"}},"fernFilepath":{"allParts":[{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}],"packagePath":[],"file":{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}},"typeId":"type_y:IntegerAlias"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imported/x:StringAlias":{"inline":null,"name":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}},{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}},"typeId":"type_imported/x:StringAlias"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{},"services":{"service_imported":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":null}},"displayName":null,"basePath":{"head":"/","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_imported.rootEndpoint","name":{"originalName":"rootEndpoint","camelCase":{"unsafeName":"rootEndpoint","safeName":"rootEndpoint"},"snakeCase":{"unsafeName":"root_endpoint","safeName":"root_endpoint"},"screamingSnakeCase":{"unsafeName":"ROOT_ENDPOINT","safeName":"ROOT_ENDPOINT"},"pascalCase":{"unsafeName":"RootEndpoint","safeName":"RootEndpoint"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"GET","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"980dd56c","url":"","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":["type_imported:RootString","type_y:IntegerAlias","type_imported/x:StringAlias"]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_imported:RootString":{"type":"alias","declaration":{"name":{"originalName":"RootString","camelCase":{"unsafeName":"rootString","safeName":"rootString"},"snakeCase":{"unsafeName":"root_string","safeName":"root_string"},"screamingSnakeCase":{"unsafeName":"ROOT_STRING","safeName":"ROOT_STRING"},"pascalCase":{"unsafeName":"RootString","safeName":"RootString"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":null}},"typeReference":{"type":"primitive","value":"STRING"}},"type_y:IntegerAlias":{"type":"alias","declaration":{"name":{"originalName":"IntegerAlias","camelCase":{"unsafeName":"integerAlias","safeName":"integerAlias"},"snakeCase":{"unsafeName":"integer_alias","safeName":"integer_alias"},"screamingSnakeCase":{"unsafeName":"INTEGER_ALIAS","safeName":"INTEGER_ALIAS"},"pascalCase":{"unsafeName":"IntegerAlias","safeName":"IntegerAlias"}},"fernFilepath":{"allParts":[{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}],"packagePath":[],"file":{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}}},"typeReference":{"type":"primitive","value":"INTEGER"}},"type_imported/x:StringAlias":{"type":"alias","declaration":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}},{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}}},"typeReference":{"type":"primitive","value":"STRING"}}},"headers":[],"endpoints":{"endpoint_imported.rootEndpoint":{"auth":null,"declaration":{"name":{"originalName":"rootEndpoint","camelCase":{"unsafeName":"rootEndpoint","safeName":"rootEndpoint"},"snakeCase":{"unsafeName":"root_endpoint","safeName":"root_endpoint"},"screamingSnakeCase":{"unsafeName":"ROOT_ENDPOINT","safeName":"ROOT_ENDPOINT"},"pascalCase":{"unsafeName":"RootEndpoint","safeName":"RootEndpoint"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":null}},"location":{"method":"GET","path":"/"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}}}},"subpackages":{"subpackage_imported":{"name":{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":null},"service":"service_imported","types":["type_imported:RootString"],"errors":[],"subpackages":["subpackage_imported/x"],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null},"subpackage_y":{"name":{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}},"fernFilepath":{"allParts":[{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}],"packagePath":[],"file":{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}},"service":null,"types":["type_y:IntegerAlias"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_imported/x":{"name":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}},{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}},"service":null,"types":["type_imported/x:StringAlias"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_imported","subpackage_y"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`dependencies > correctly incorporates dependencies 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"dependent","camelCase":{"unsafeName":"dependent","safeName":"dependent"},"snakeCase":{"unsafeName":"dependent","safeName":"dependent"},"screamingSnakeCase":{"unsafeName":"DEPENDENT","safeName":"DEPENDENT"},"pascalCase":{"unsafeName":"Dependent","safeName":"Dependent"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_imported:RootString":{"inline":null,"name":{"name":{"originalName":"RootString","camelCase":{"unsafeName":"rootString","safeName":"rootString"},"snakeCase":{"unsafeName":"root_string","safeName":"root_string"},"screamingSnakeCase":{"unsafeName":"ROOT_STRING","safeName":"ROOT_STRING"},"pascalCase":{"unsafeName":"RootString","safeName":"RootString"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":null},"typeId":"type_imported:RootString"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_y:IntegerAlias":{"inline":null,"name":{"name":{"originalName":"IntegerAlias","camelCase":{"unsafeName":"integerAlias","safeName":"integerAlias"},"snakeCase":{"unsafeName":"integer_alias","safeName":"integer_alias"},"screamingSnakeCase":{"unsafeName":"INTEGER_ALIAS","safeName":"INTEGER_ALIAS"},"pascalCase":{"unsafeName":"IntegerAlias","safeName":"IntegerAlias"}},"fernFilepath":{"allParts":[{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}],"packagePath":[],"file":{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}},"typeId":"type_y:IntegerAlias"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imported/x:StringAlias":{"inline":null,"name":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}},{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}},"typeId":"type_imported/x:StringAlias"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{},"services":{"service_imported":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":null}},"displayName":null,"basePath":{"head":"/","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_imported.rootEndpoint","name":{"originalName":"rootEndpoint","camelCase":{"unsafeName":"rootEndpoint","safeName":"rootEndpoint"},"snakeCase":{"unsafeName":"root_endpoint","safeName":"root_endpoint"},"screamingSnakeCase":{"unsafeName":"ROOT_ENDPOINT","safeName":"ROOT_ENDPOINT"},"pascalCase":{"unsafeName":"RootEndpoint","safeName":"RootEndpoint"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"GET","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"980dd56c","url":"","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":["type_imported:RootString","type_y:IntegerAlias","type_imported/x:StringAlias"]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_imported:RootString":{"type":"alias","declaration":{"name":{"originalName":"RootString","camelCase":{"unsafeName":"rootString","safeName":"rootString"},"snakeCase":{"unsafeName":"root_string","safeName":"root_string"},"screamingSnakeCase":{"unsafeName":"ROOT_STRING","safeName":"ROOT_STRING"},"pascalCase":{"unsafeName":"RootString","safeName":"RootString"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":null}},"typeReference":{"type":"primitive","value":"STRING"}},"type_y:IntegerAlias":{"type":"alias","declaration":{"name":{"originalName":"IntegerAlias","camelCase":{"unsafeName":"integerAlias","safeName":"integerAlias"},"snakeCase":{"unsafeName":"integer_alias","safeName":"integer_alias"},"screamingSnakeCase":{"unsafeName":"INTEGER_ALIAS","safeName":"INTEGER_ALIAS"},"pascalCase":{"unsafeName":"IntegerAlias","safeName":"IntegerAlias"}},"fernFilepath":{"allParts":[{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}],"packagePath":[],"file":{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}}},"typeReference":{"type":"primitive","value":"INTEGER"}},"type_imported/x:StringAlias":{"type":"alias","declaration":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}},{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}}},"typeReference":{"type":"primitive","value":"STRING"}}},"headers":[],"endpoints":{"endpoint_imported.rootEndpoint":{"auth":null,"declaration":{"name":{"originalName":"rootEndpoint","camelCase":{"unsafeName":"rootEndpoint","safeName":"rootEndpoint"},"snakeCase":{"unsafeName":"root_endpoint","safeName":"root_endpoint"},"screamingSnakeCase":{"unsafeName":"ROOT_ENDPOINT","safeName":"ROOT_ENDPOINT"},"pascalCase":{"unsafeName":"RootEndpoint","safeName":"RootEndpoint"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":null}},"location":{"method":"GET","path":"/"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}}},"environments":null},"subpackages":{"subpackage_imported":{"name":{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":null},"service":"service_imported","types":["type_imported:RootString"],"errors":[],"subpackages":["subpackage_imported/x"],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null},"subpackage_y":{"name":{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}},"fernFilepath":{"allParts":[{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}],"packagePath":[],"file":{"originalName":"y","camelCase":{"unsafeName":"y","safeName":"y"},"snakeCase":{"unsafeName":"y","safeName":"y"},"screamingSnakeCase":{"unsafeName":"Y","safeName":"Y"},"pascalCase":{"unsafeName":"Y","safeName":"Y"}}},"service":null,"types":["type_y:IntegerAlias"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_imported/x":{"name":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}},"fernFilepath":{"allParts":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}},{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}],"packagePath":[{"originalName":"imported","camelCase":{"unsafeName":"imported","safeName":"imported"},"snakeCase":{"unsafeName":"imported","safeName":"imported"},"screamingSnakeCase":{"unsafeName":"IMPORTED","safeName":"IMPORTED"},"pascalCase":{"unsafeName":"Imported","safeName":"Imported"}}],"file":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}},"service":null,"types":["type_imported/x:StringAlias"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_imported","subpackage_y"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`dependencies > file dependencies 1`] = `704061`; +exports[`dependencies > file dependencies 1`] = `704081`; diff --git a/packages/cli/ete-tests/src/tests/generate/generate.test.ts b/packages/cli/ete-tests/src/tests/generate/generate.test.ts index f144caa6c08..1ec0985eae4 100644 --- a/packages/cli/ete-tests/src/tests/generate/generate.test.ts +++ b/packages/cli/ete-tests/src/tests/generate/generate.test.ts @@ -3,10 +3,8 @@ import stripAnsi from "strip-ansi"; import { runFernCli } from "../../utils/runFernCli"; import { init } from "../init/init"; import { exec } from "child_process"; -import { CONSOLE_LOGGER } from "../../../../task-context/node_modules/@fern-api/logger/src"; const fixturesDir = join(AbsoluteFilePath.of(__dirname), RelativeFilePath.of("fixtures")); -// const FIXTURES = ["docs"]; describe("fern generate", () => { it("default api (fern init)", async () => { @@ -50,7 +48,11 @@ describe("fern generate", () => { ); }, 180_000); - it("missing docs page", async () => { + // TODO: Re-enable this test if and when it doesn't require the user to be logged in. + // It's otherwise flaky on developer machines that haven't logged in with the fern CLI. + // + // eslint-disable-next-line jest/no-disabled-tests + it.skip("missing docs page", async () => { const { stdout } = await runFernCli(["generate", "--docs"], { cwd: join(fixturesDir, RelativeFilePath.of("docs-missing-page")), reject: false diff --git a/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap b/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap index a3ed8bb919c..d97d612a72c 100644 --- a/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap +++ b/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap @@ -1,31 +1,31 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`ir > {"name":"auth-header-prefix"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[{"_type":"header","name":{"name":{"originalName":"ApiKey","camelCase":{"unsafeName":"apiKey","safeName":"apiKey"},"snakeCase":{"unsafeName":"api_key","safeName":"api_key"},"screamingSnakeCase":{"unsafeName":"API_KEY","safeName":"API_KEY"},"pascalCase":{"unsafeName":"ApiKey","safeName":"ApiKey"}},"wireValue":"Authorization"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"prefix":"ApiKey","headerEnvVar":null,"docs":null}],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{}},"subpackages":{},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":[],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":false,"docs":null},"sdkConfig":{"isAuthMandatory":true,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"auth-header-prefix"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[{"_type":"header","name":{"name":{"originalName":"ApiKey","camelCase":{"unsafeName":"apiKey","safeName":"apiKey"},"snakeCase":{"unsafeName":"api_key","safeName":"api_key"},"screamingSnakeCase":{"unsafeName":"API_KEY","safeName":"API_KEY"},"pascalCase":{"unsafeName":"ApiKey","safeName":"ApiKey"}},"wireValue":"Authorization"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"prefix":"ApiKey","headerEnvVar":null,"docs":null}],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{},"environments":null},"subpackages":{},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":[],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":false,"docs":null},"sdkConfig":{"isAuthMandatory":true,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"extended-examples"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"api","camelCase":{"unsafeName":"api","safeName":"api"},"snakeCase":{"unsafeName":"api","safeName":"api"},"screamingSnakeCase":{"unsafeName":"API","safeName":"API"},"pascalCase":{"unsafeName":"Api","safeName":"Api"}},"apiDisplayName":"API","apiDocs":null,"auth":{"requirement":"ALL","schemes":[{"_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"}},"tokenEnvVar":null,"docs":null}],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_app:GetAppResponse":{"inline":null,"name":{"name":{"originalName":"GetAppResponse","camelCase":{"unsafeName":"getAppResponse","safeName":"getAppResponse"},"snakeCase":{"unsafeName":"get_app_response","safeName":"get_app_response"},"screamingSnakeCase":{"unsafeName":"GET_APP_RESPONSE","safeName":"GET_APP_RESPONSE"},"pascalCase":{"unsafeName":"GetAppResponse","safeName":"GetAppResponse"}},"fernFilepath":{"allParts":[{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}],"packagePath":[],"file":{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}},"typeId":"type_app:GetAppResponse"},"shape":{"_type":"object","extends":[{"name":{"originalName":"Deployment","camelCase":{"unsafeName":"deployment","safeName":"deployment"},"snakeCase":{"unsafeName":"deployment","safeName":"deployment"},"screamingSnakeCase":{"unsafeName":"DEPLOYMENT","safeName":"DEPLOYMENT"},"pascalCase":{"unsafeName":"Deployment","safeName":"Deployment"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Deployment"}],"properties":[{"name":{"name":{"originalName":"property","camelCase":{"unsafeName":"property","safeName":"property"},"snakeCase":{"unsafeName":"property","safeName":"property"},"screamingSnakeCase":{"unsafeName":"PROPERTY","safeName":"PROPERTY"},"pascalCase":{"unsafeName":"Property","safeName":"Property"}},"wireValue":"property"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[{"name":{"name":{"originalName":"appId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"wireValue":"appId"},"valueType":{"_type":"named","name":{"originalName":"AppId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:AppId","default":null,"inline":null},"availability":null,"docs":null}]},"referencedTypes":["type_commons:Deployment","type_commons:AppId"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example","camelCase":{"unsafeName":"example","safeName":"example"},"snakeCase":{"unsafeName":"example","safeName":"example"},"screamingSnakeCase":{"unsafeName":"EXAMPLE","safeName":"EXAMPLE"},"pascalCase":{"unsafeName":"Example","safeName":"Example"}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"appId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"wireValue":"appId"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_commons:AppId","fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"name":{"originalName":"AppId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"your-app-id"}}},"jsonExample":"your-app-id"}}},"jsonExample":"your-app-id"},"originalTypeDeclaration":{"name":{"originalName":"Deployment","camelCase":{"unsafeName":"deployment","safeName":"deployment"},"snakeCase":{"unsafeName":"deployment","safeName":"deployment"},"screamingSnakeCase":{"unsafeName":"DEPLOYMENT","safeName":"DEPLOYMENT"},"pascalCase":{"unsafeName":"Deployment","safeName":"Deployment"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Deployment"}},{"name":{"name":{"originalName":"property","camelCase":{"unsafeName":"property","safeName":"property"},"snakeCase":{"unsafeName":"property","safeName":"property"},"screamingSnakeCase":{"unsafeName":"PROPERTY","safeName":"PROPERTY"},"pascalCase":{"unsafeName":"Property","safeName":"Property"}},"wireValue":"property"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"app-secret"}}},"jsonExample":"app-secret"},"originalTypeDeclaration":{"name":{"originalName":"GetAppResponse","camelCase":{"unsafeName":"getAppResponse","safeName":"getAppResponse"},"snakeCase":{"unsafeName":"get_app_response","safeName":"get_app_response"},"screamingSnakeCase":{"unsafeName":"GET_APP_RESPONSE","safeName":"GET_APP_RESPONSE"},"pascalCase":{"unsafeName":"GetAppResponse","safeName":"GetAppResponse"}},"fernFilepath":{"allParts":[{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}],"packagePath":[],"file":{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}},"typeId":"type_app:GetAppResponse"}}]},"jsonExample":{"appId":"your-app-id","property":"app-secret"},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_commons:AppId":{"inline":null,"name":{"name":{"originalName":"AppId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:AppId"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example","camelCase":{"unsafeName":"example","safeName":"example"},"snakeCase":{"unsafeName":"example","safeName":"example"},"screamingSnakeCase":{"unsafeName":"EXAMPLE","safeName":"EXAMPLE"},"pascalCase":{"unsafeName":"Example","safeName":"Example"}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"your-app-id"}}},"jsonExample":"your-app-id"}},"jsonExample":"your-app-id","docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_commons:Deployment":{"inline":null,"name":{"name":{"originalName":"Deployment","camelCase":{"unsafeName":"deployment","safeName":"deployment"},"snakeCase":{"unsafeName":"deployment","safeName":"deployment"},"screamingSnakeCase":{"unsafeName":"DEPLOYMENT","safeName":"DEPLOYMENT"},"pascalCase":{"unsafeName":"Deployment","safeName":"Deployment"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Deployment"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"appId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"wireValue":"appId"},"valueType":{"_type":"named","name":{"originalName":"AppId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:AppId","default":null,"inline":null},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_commons:AppId"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":["type_app:GetAppResponse","type_commons:AppId","type_commons:Deployment"]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_app:GetAppResponse":{"type":"object","declaration":{"name":{"originalName":"GetAppResponse","camelCase":{"unsafeName":"getAppResponse","safeName":"getAppResponse"},"snakeCase":{"unsafeName":"get_app_response","safeName":"get_app_response"},"screamingSnakeCase":{"unsafeName":"GET_APP_RESPONSE","safeName":"GET_APP_RESPONSE"},"pascalCase":{"unsafeName":"GetAppResponse","safeName":"GetAppResponse"}},"fernFilepath":{"allParts":[{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}],"packagePath":[],"file":{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}}},"properties":[{"name":{"name":{"originalName":"appId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"wireValue":"appId"},"typeReference":{"type":"named","value":"type_commons:AppId"}},{"name":{"name":{"originalName":"property","camelCase":{"unsafeName":"property","safeName":"property"},"snakeCase":{"unsafeName":"property","safeName":"property"},"screamingSnakeCase":{"unsafeName":"PROPERTY","safeName":"PROPERTY"},"pascalCase":{"unsafeName":"Property","safeName":"Property"}},"wireValue":"property"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_commons:AppId":{"type":"alias","declaration":{"name":{"originalName":"AppId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"typeReference":{"type":"primitive","value":"STRING"}},"type_commons:Deployment":{"type":"object","declaration":{"name":{"originalName":"Deployment","camelCase":{"unsafeName":"deployment","safeName":"deployment"},"snakeCase":{"unsafeName":"deployment","safeName":"deployment"},"screamingSnakeCase":{"unsafeName":"DEPLOYMENT","safeName":"DEPLOYMENT"},"pascalCase":{"unsafeName":"Deployment","safeName":"Deployment"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"properties":[{"name":{"name":{"originalName":"appId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"wireValue":"appId"},"typeReference":{"type":"named","value":"type_commons:AppId"}}]}},"headers":[],"endpoints":{}},"subpackages":{"subpackage_app":{"name":{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}},"fernFilepath":{"allParts":[{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}],"packagePath":[],"file":{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}},"service":null,"types":["type_app:GetAppResponse"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_commons":{"name":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"service":null,"types":["type_commons:AppId","type_commons:Deployment"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_app","subpackage_commons"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":false,"docs":null},"sdkConfig":{"isAuthMandatory":true,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"extended-examples"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"api","camelCase":{"unsafeName":"api","safeName":"api"},"snakeCase":{"unsafeName":"api","safeName":"api"},"screamingSnakeCase":{"unsafeName":"API","safeName":"API"},"pascalCase":{"unsafeName":"Api","safeName":"Api"}},"apiDisplayName":"API","apiDocs":null,"auth":{"requirement":"ALL","schemes":[{"_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"}},"tokenEnvVar":null,"docs":null}],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_app:GetAppResponse":{"inline":null,"name":{"name":{"originalName":"GetAppResponse","camelCase":{"unsafeName":"getAppResponse","safeName":"getAppResponse"},"snakeCase":{"unsafeName":"get_app_response","safeName":"get_app_response"},"screamingSnakeCase":{"unsafeName":"GET_APP_RESPONSE","safeName":"GET_APP_RESPONSE"},"pascalCase":{"unsafeName":"GetAppResponse","safeName":"GetAppResponse"}},"fernFilepath":{"allParts":[{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}],"packagePath":[],"file":{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}},"typeId":"type_app:GetAppResponse"},"shape":{"_type":"object","extends":[{"name":{"originalName":"Deployment","camelCase":{"unsafeName":"deployment","safeName":"deployment"},"snakeCase":{"unsafeName":"deployment","safeName":"deployment"},"screamingSnakeCase":{"unsafeName":"DEPLOYMENT","safeName":"DEPLOYMENT"},"pascalCase":{"unsafeName":"Deployment","safeName":"Deployment"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Deployment"}],"properties":[{"name":{"name":{"originalName":"property","camelCase":{"unsafeName":"property","safeName":"property"},"snakeCase":{"unsafeName":"property","safeName":"property"},"screamingSnakeCase":{"unsafeName":"PROPERTY","safeName":"PROPERTY"},"pascalCase":{"unsafeName":"Property","safeName":"Property"}},"wireValue":"property"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[{"name":{"name":{"originalName":"appId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"wireValue":"appId"},"valueType":{"_type":"named","name":{"originalName":"AppId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:AppId","default":null,"inline":null},"availability":null,"docs":null}]},"referencedTypes":["type_commons:Deployment","type_commons:AppId"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example","camelCase":{"unsafeName":"example","safeName":"example"},"snakeCase":{"unsafeName":"example","safeName":"example"},"screamingSnakeCase":{"unsafeName":"EXAMPLE","safeName":"EXAMPLE"},"pascalCase":{"unsafeName":"Example","safeName":"Example"}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"appId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"wireValue":"appId"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_commons:AppId","fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"name":{"originalName":"AppId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"your-app-id"}}},"jsonExample":"your-app-id"}}},"jsonExample":"your-app-id"},"originalTypeDeclaration":{"name":{"originalName":"Deployment","camelCase":{"unsafeName":"deployment","safeName":"deployment"},"snakeCase":{"unsafeName":"deployment","safeName":"deployment"},"screamingSnakeCase":{"unsafeName":"DEPLOYMENT","safeName":"DEPLOYMENT"},"pascalCase":{"unsafeName":"Deployment","safeName":"Deployment"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Deployment"}},{"name":{"name":{"originalName":"property","camelCase":{"unsafeName":"property","safeName":"property"},"snakeCase":{"unsafeName":"property","safeName":"property"},"screamingSnakeCase":{"unsafeName":"PROPERTY","safeName":"PROPERTY"},"pascalCase":{"unsafeName":"Property","safeName":"Property"}},"wireValue":"property"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"app-secret"}}},"jsonExample":"app-secret"},"originalTypeDeclaration":{"name":{"originalName":"GetAppResponse","camelCase":{"unsafeName":"getAppResponse","safeName":"getAppResponse"},"snakeCase":{"unsafeName":"get_app_response","safeName":"get_app_response"},"screamingSnakeCase":{"unsafeName":"GET_APP_RESPONSE","safeName":"GET_APP_RESPONSE"},"pascalCase":{"unsafeName":"GetAppResponse","safeName":"GetAppResponse"}},"fernFilepath":{"allParts":[{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}],"packagePath":[],"file":{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}},"typeId":"type_app:GetAppResponse"}}]},"jsonExample":{"appId":"your-app-id","property":"app-secret"},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_commons:AppId":{"inline":null,"name":{"name":{"originalName":"AppId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:AppId"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example","camelCase":{"unsafeName":"example","safeName":"example"},"snakeCase":{"unsafeName":"example","safeName":"example"},"screamingSnakeCase":{"unsafeName":"EXAMPLE","safeName":"EXAMPLE"},"pascalCase":{"unsafeName":"Example","safeName":"Example"}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"your-app-id"}}},"jsonExample":"your-app-id"}},"jsonExample":"your-app-id","docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_commons:Deployment":{"inline":null,"name":{"name":{"originalName":"Deployment","camelCase":{"unsafeName":"deployment","safeName":"deployment"},"snakeCase":{"unsafeName":"deployment","safeName":"deployment"},"screamingSnakeCase":{"unsafeName":"DEPLOYMENT","safeName":"DEPLOYMENT"},"pascalCase":{"unsafeName":"Deployment","safeName":"Deployment"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Deployment"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"appId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"wireValue":"appId"},"valueType":{"_type":"named","name":{"originalName":"AppId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:AppId","default":null,"inline":null},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_commons:AppId"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":["type_app:GetAppResponse","type_commons:AppId","type_commons:Deployment"]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_app:GetAppResponse":{"type":"object","declaration":{"name":{"originalName":"GetAppResponse","camelCase":{"unsafeName":"getAppResponse","safeName":"getAppResponse"},"snakeCase":{"unsafeName":"get_app_response","safeName":"get_app_response"},"screamingSnakeCase":{"unsafeName":"GET_APP_RESPONSE","safeName":"GET_APP_RESPONSE"},"pascalCase":{"unsafeName":"GetAppResponse","safeName":"GetAppResponse"}},"fernFilepath":{"allParts":[{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}],"packagePath":[],"file":{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}}},"properties":[{"name":{"name":{"originalName":"appId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"wireValue":"appId"},"typeReference":{"type":"named","value":"type_commons:AppId"}},{"name":{"name":{"originalName":"property","camelCase":{"unsafeName":"property","safeName":"property"},"snakeCase":{"unsafeName":"property","safeName":"property"},"screamingSnakeCase":{"unsafeName":"PROPERTY","safeName":"PROPERTY"},"pascalCase":{"unsafeName":"Property","safeName":"Property"}},"wireValue":"property"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_commons:AppId":{"type":"alias","declaration":{"name":{"originalName":"AppId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"typeReference":{"type":"primitive","value":"STRING"}},"type_commons:Deployment":{"type":"object","declaration":{"name":{"originalName":"Deployment","camelCase":{"unsafeName":"deployment","safeName":"deployment"},"snakeCase":{"unsafeName":"deployment","safeName":"deployment"},"screamingSnakeCase":{"unsafeName":"DEPLOYMENT","safeName":"DEPLOYMENT"},"pascalCase":{"unsafeName":"Deployment","safeName":"Deployment"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"properties":[{"name":{"name":{"originalName":"appId","camelCase":{"unsafeName":"appId","safeName":"appId"},"snakeCase":{"unsafeName":"app_id","safeName":"app_id"},"screamingSnakeCase":{"unsafeName":"APP_ID","safeName":"APP_ID"},"pascalCase":{"unsafeName":"AppId","safeName":"AppId"}},"wireValue":"appId"},"typeReference":{"type":"named","value":"type_commons:AppId"}}]}},"headers":[],"endpoints":{},"environments":null},"subpackages":{"subpackage_app":{"name":{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}},"fernFilepath":{"allParts":[{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}],"packagePath":[],"file":{"originalName":"app","camelCase":{"unsafeName":"app","safeName":"app"},"snakeCase":{"unsafeName":"app","safeName":"app"},"screamingSnakeCase":{"unsafeName":"APP","safeName":"APP"},"pascalCase":{"unsafeName":"App","safeName":"App"}}},"service":null,"types":["type_app:GetAppResponse"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_commons":{"name":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"service":null,"types":["type_commons:AppId","type_commons:Deployment"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_app","subpackage_commons"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":false,"docs":null},"sdkConfig":{"isAuthMandatory":true,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"file-upload"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"errors":{},"services":{"service_file-upload":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}],"packagePath":[],"file":{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_file-upload.fileUpload","name":{"originalName":"fileUpload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/movies","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":{"type":"fileUpload","name":{"originalName":"FileUploadRequest","camelCase":{"unsafeName":"fileUploadRequest","safeName":"fileUploadRequest"},"snakeCase":{"unsafeName":"file_upload_request","safeName":"file_upload_request"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD_REQUEST","safeName":"FILE_UPLOAD_REQUEST"},"pascalCase":{"unsafeName":"FileUploadRequest","safeName":"FileUploadRequest"}},"properties":[{"type":"bodyProperty","contentType":null,"name":{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"wireValue":"foo"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"type":"file","value":{"type":"file","key":{"name":{"originalName":"file","camelCase":{"unsafeName":"file","safeName":"file"},"snakeCase":{"unsafeName":"file","safeName":"file"},"screamingSnakeCase":{"unsafeName":"FILE","safeName":"FILE"},"pascalCase":{"unsafeName":"File","safeName":"File"}},"wireValue":"file"},"isOptional":false,"contentType":null}},{"type":"file","value":{"type":"file","key":{"name":{"originalName":"optionalFile","camelCase":{"unsafeName":"optionalFile","safeName":"optionalFile"},"snakeCase":{"unsafeName":"optional_file","safeName":"optional_file"},"screamingSnakeCase":{"unsafeName":"OPTIONAL_FILE","safeName":"OPTIONAL_FILE"},"pascalCase":{"unsafeName":"OptionalFile","safeName":"OptionalFile"}},"wireValue":"optionalFile"},"isOptional":true,"contentType":null}},{"type":"bodyProperty","contentType":null,"name":{"name":{"originalName":"bar","camelCase":{"unsafeName":"bar","safeName":"bar"},"snakeCase":{"unsafeName":"bar","safeName":"bar"},"screamingSnakeCase":{"unsafeName":"BAR","safeName":"BAR"},"pascalCase":{"unsafeName":"Bar","safeName":"Bar"}},"wireValue":"bar"},"valueType":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}},"availability":null,"docs":null}],"docs":null},"sdkRequest":{"shape":{"type":"wrapper","wrapperName":{"originalName":"FileUploadRequest","camelCase":{"unsafeName":"fileUploadRequest","safeName":"fileUploadRequest"},"snakeCase":{"unsafeName":"file_upload_request","safeName":"file_upload_request"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD_REQUEST","safeName":"FILE_UPLOAD_REQUEST"},"pascalCase":{"unsafeName":"FileUploadRequest","safeName":"FileUploadRequest"}},"bodyKey":{"originalName":"body","camelCase":{"unsafeName":"body","safeName":"body"},"snakeCase":{"unsafeName":"body","safeName":"body"},"screamingSnakeCase":{"unsafeName":"BODY","safeName":"BODY"},"pascalCase":{"unsafeName":"Body","safeName":"Body"}},"includePathParameters":false,"onlyPathParameters":false},"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":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{"endpoint_file-upload.fileUpload":{"auth":null,"declaration":{"name":{"originalName":"fileUpload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}},"fernFilepath":{"allParts":[{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}],"packagePath":[],"file":{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}}},"location":{"method":"POST","path":"/movies"},"request":{"type":"inlined","declaration":{"name":{"originalName":"FileUploadRequest","camelCase":{"unsafeName":"fileUploadRequest","safeName":"fileUploadRequest"},"snakeCase":{"unsafeName":"file_upload_request","safeName":"file_upload_request"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD_REQUEST","safeName":"FILE_UPLOAD_REQUEST"},"pascalCase":{"unsafeName":"FileUploadRequest","safeName":"FileUploadRequest"}},"fernFilepath":{"allParts":[{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}],"packagePath":[],"file":{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}}},"pathParameters":[],"queryParameters":[],"headers":[],"body":{"type":"fileUpload","properties":[{"type":"bodyProperty","name":{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"wireValue":"foo"},"typeReference":{"type":"primitive","value":"STRING"}},{"type":"file","name":{"originalName":"file","camelCase":{"unsafeName":"file","safeName":"file"},"snakeCase":{"unsafeName":"file","safeName":"file"},"screamingSnakeCase":{"unsafeName":"FILE","safeName":"FILE"},"pascalCase":{"unsafeName":"File","safeName":"File"}},"wireValue":"file"},{"type":"file","name":{"originalName":"optionalFile","camelCase":{"unsafeName":"optionalFile","safeName":"optionalFile"},"snakeCase":{"unsafeName":"optional_file","safeName":"optional_file"},"screamingSnakeCase":{"unsafeName":"OPTIONAL_FILE","safeName":"OPTIONAL_FILE"},"pascalCase":{"unsafeName":"OptionalFile","safeName":"OptionalFile"}},"wireValue":"optionalFile"},{"type":"bodyProperty","name":{"name":{"originalName":"bar","camelCase":{"unsafeName":"bar","safeName":"bar"},"snakeCase":{"unsafeName":"bar","safeName":"bar"},"screamingSnakeCase":{"unsafeName":"BAR","safeName":"BAR"},"pascalCase":{"unsafeName":"Bar","safeName":"Bar"}},"wireValue":"bar"},"typeReference":{"type":"primitive","value":"INTEGER"}}]},"metadata":{"includePathParameters":false,"onlyPathParameters":false}},"response":{"type":"json"}}}},"subpackages":{"subpackage_file-upload":{"name":{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}},"fernFilepath":{"allParts":[{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}],"packagePath":[],"file":{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}},"service":"service_file-upload","types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_file-upload"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"file-upload"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"errors":{},"services":{"service_file-upload":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}],"packagePath":[],"file":{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_file-upload.fileUpload","name":{"originalName":"fileUpload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/movies","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":{"type":"fileUpload","name":{"originalName":"FileUploadRequest","camelCase":{"unsafeName":"fileUploadRequest","safeName":"fileUploadRequest"},"snakeCase":{"unsafeName":"file_upload_request","safeName":"file_upload_request"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD_REQUEST","safeName":"FILE_UPLOAD_REQUEST"},"pascalCase":{"unsafeName":"FileUploadRequest","safeName":"FileUploadRequest"}},"properties":[{"type":"bodyProperty","contentType":null,"name":{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"wireValue":"foo"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"type":"file","value":{"type":"file","key":{"name":{"originalName":"file","camelCase":{"unsafeName":"file","safeName":"file"},"snakeCase":{"unsafeName":"file","safeName":"file"},"screamingSnakeCase":{"unsafeName":"FILE","safeName":"FILE"},"pascalCase":{"unsafeName":"File","safeName":"File"}},"wireValue":"file"},"isOptional":false,"contentType":null}},{"type":"file","value":{"type":"file","key":{"name":{"originalName":"optionalFile","camelCase":{"unsafeName":"optionalFile","safeName":"optionalFile"},"snakeCase":{"unsafeName":"optional_file","safeName":"optional_file"},"screamingSnakeCase":{"unsafeName":"OPTIONAL_FILE","safeName":"OPTIONAL_FILE"},"pascalCase":{"unsafeName":"OptionalFile","safeName":"OptionalFile"}},"wireValue":"optionalFile"},"isOptional":true,"contentType":null}},{"type":"bodyProperty","contentType":null,"name":{"name":{"originalName":"bar","camelCase":{"unsafeName":"bar","safeName":"bar"},"snakeCase":{"unsafeName":"bar","safeName":"bar"},"screamingSnakeCase":{"unsafeName":"BAR","safeName":"BAR"},"pascalCase":{"unsafeName":"Bar","safeName":"Bar"}},"wireValue":"bar"},"valueType":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}},"availability":null,"docs":null}],"docs":null},"sdkRequest":{"shape":{"type":"wrapper","wrapperName":{"originalName":"FileUploadRequest","camelCase":{"unsafeName":"fileUploadRequest","safeName":"fileUploadRequest"},"snakeCase":{"unsafeName":"file_upload_request","safeName":"file_upload_request"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD_REQUEST","safeName":"FILE_UPLOAD_REQUEST"},"pascalCase":{"unsafeName":"FileUploadRequest","safeName":"FileUploadRequest"}},"bodyKey":{"originalName":"body","camelCase":{"unsafeName":"body","safeName":"body"},"snakeCase":{"unsafeName":"body","safeName":"body"},"screamingSnakeCase":{"unsafeName":"BODY","safeName":"BODY"},"pascalCase":{"unsafeName":"Body","safeName":"Body"}},"includePathParameters":false,"onlyPathParameters":false},"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":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{"endpoint_file-upload.fileUpload":{"auth":null,"declaration":{"name":{"originalName":"fileUpload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}},"fernFilepath":{"allParts":[{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}],"packagePath":[],"file":{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}}},"location":{"method":"POST","path":"/movies"},"request":{"type":"inlined","declaration":{"name":{"originalName":"FileUploadRequest","camelCase":{"unsafeName":"fileUploadRequest","safeName":"fileUploadRequest"},"snakeCase":{"unsafeName":"file_upload_request","safeName":"file_upload_request"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD_REQUEST","safeName":"FILE_UPLOAD_REQUEST"},"pascalCase":{"unsafeName":"FileUploadRequest","safeName":"FileUploadRequest"}},"fernFilepath":{"allParts":[{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}],"packagePath":[],"file":{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}}},"pathParameters":[],"queryParameters":[],"headers":[],"body":{"type":"fileUpload","properties":[{"type":"bodyProperty","name":{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"wireValue":"foo"},"typeReference":{"type":"primitive","value":"STRING"}},{"type":"file","name":{"originalName":"file","camelCase":{"unsafeName":"file","safeName":"file"},"snakeCase":{"unsafeName":"file","safeName":"file"},"screamingSnakeCase":{"unsafeName":"FILE","safeName":"FILE"},"pascalCase":{"unsafeName":"File","safeName":"File"}},"wireValue":"file"},{"type":"file","name":{"originalName":"optionalFile","camelCase":{"unsafeName":"optionalFile","safeName":"optionalFile"},"snakeCase":{"unsafeName":"optional_file","safeName":"optional_file"},"screamingSnakeCase":{"unsafeName":"OPTIONAL_FILE","safeName":"OPTIONAL_FILE"},"pascalCase":{"unsafeName":"OptionalFile","safeName":"OptionalFile"}},"wireValue":"optionalFile"},{"type":"bodyProperty","name":{"name":{"originalName":"bar","camelCase":{"unsafeName":"bar","safeName":"bar"},"snakeCase":{"unsafeName":"bar","safeName":"bar"},"screamingSnakeCase":{"unsafeName":"BAR","safeName":"BAR"},"pascalCase":{"unsafeName":"Bar","safeName":"Bar"}},"wireValue":"bar"},"typeReference":{"type":"primitive","value":"INTEGER"}}]},"metadata":{"includePathParameters":false,"onlyPathParameters":false}},"response":{"type":"json"}}},"environments":null},"subpackages":{"subpackage_file-upload":{"name":{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}},"fernFilepath":{"allParts":[{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}],"packagePath":[],"file":{"originalName":"file-upload","camelCase":{"unsafeName":"fileUpload","safeName":"fileUpload"},"snakeCase":{"unsafeName":"file_upload","safeName":"file_upload"},"screamingSnakeCase":{"unsafeName":"FILE_UPLOAD","safeName":"FILE_UPLOAD"},"pascalCase":{"unsafeName":"FileUpload","safeName":"FileUpload"}}},"service":"service_file-upload","types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_file-upload"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; exports[`ir > {"name":"migration","version":"v1"} 1`] = `"{"apiName":"my-api","auth":{"requirement":"ALL","schemes":[]},"headers":[{"name":{"originalValue":"apiVersion","camelCase":"apiVersion","pascalCase":"ApiVersion","snakeCase":"api_version","screamingSnakeCase":"API_VERSION","wireValue":"X-API-VERSION"},"nameV2":{"wireValue":"X-API-VERSION","name":{"safeName":{"originalValue":"apiVersion","camelCase":"apiVersion","pascalCase":"ApiVersion","snakeCase":"api_version","screamingSnakeCase":"API_VERSION"},"unsafeName":{"originalValue":"apiVersion","camelCase":"apiVersion","pascalCase":"ApiVersion","snakeCase":"api_version","screamingSnakeCase":"API_VERSION"}}},"valueType":{"container":{"optional":{"primitive":"STRING","_type":"primitive"},"_type":"optional"},"_type":"container"},"availability":{"status":"GENERAL_AVAILABILITY"}}],"types":[{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}},"shape":{"extends":[],"properties":[{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"name","camelCase":"name","pascalCase":"Name","snakeCase":"name","screamingSnakeCase":"NAME","wireValue":"name"},"nameV2":{"wireValue":"name","name":{"safeName":{"originalValue":"name","camelCase":"name","pascalCase":"Name","snakeCase":"name","screamingSnakeCase":"NAME"},"unsafeName":{"originalValue":"name","camelCase":"name","pascalCase":"Name","snakeCase":"name","screamingSnakeCase":"NAME"}}},"valueType":{"primitive":"STRING","_type":"primitive"}},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE","wireValue":"age"},"nameV2":{"wireValue":"age","name":{"safeName":{"originalValue":"age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"unsafeName":{"originalValue":"age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"}}},"valueType":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Age","nameV2":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"nameV3":{"safeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"unsafeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"}},"_type":"named"}}],"_type":"object"},"examples":[{"properties":[{"wireKey":"name","value":{"primitive":{"string":"George the Director","type":"string"},"type":"primitive"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}}},{"wireKey":"age","value":{"typeName":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Age","nameV2":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"nameV3":{"safeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"unsafeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"}}},"shape":{"value":{"primitive":{"integer":20,"type":"integer"},"type":"primitive"},"type":"alias"},"type":"named"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}}}],"type":"object"}],"referencedTypes":[{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Age","nameV2":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"nameV3":{"safeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"unsafeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"}}}]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Age","nameV2":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"nameV3":{"safeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"unsafeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"}}},"shape":{"aliasOf":{"primitive":"INTEGER","_type":"primitive"},"resolvedType":{"primitive":"INTEGER","_type":"primitive"},"_type":"alias"},"examples":[{"value":{"primitive":{"integer":20,"type":"integer"},"type":"primitive"},"type":"alias"}],"referencedTypes":[]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"LiteralString","nameV2":{"originalValue":"LiteralString","camelCase":"literalString","pascalCase":"LiteralString","snakeCase":"literal_string","screamingSnakeCase":"LITERAL_STRING"},"nameV3":{"safeName":{"originalValue":"LiteralString","camelCase":"literalString","pascalCase":"LiteralString","snakeCase":"literal_string","screamingSnakeCase":"LITERAL_STRING"},"unsafeName":{"originalValue":"LiteralString","camelCase":"literalString","pascalCase":"LiteralString","snakeCase":"literal_string","screamingSnakeCase":"LITERAL_STRING"}}},"shape":{"aliasOf":{"container":{"literal":{"string":"hello","type":"string"},"_type":"literal"},"_type":"container"},"resolvedType":{"container":{"literal":{"string":"hello","type":"string"},"_type":"literal"},"_type":"container"},"_type":"alias"},"examples":[],"referencedTypes":[]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CurrencyAmount","nameV2":{"originalValue":"CurrencyAmount","camelCase":"currencyAmount","pascalCase":"CurrencyAmount","snakeCase":"currency_amount","screamingSnakeCase":"CURRENCY_AMOUNT"},"nameV3":{"safeName":{"originalValue":"CurrencyAmount","camelCase":"currencyAmount","pascalCase":"CurrencyAmount","snakeCase":"currency_amount","screamingSnakeCase":"CURRENCY_AMOUNT"},"unsafeName":{"originalValue":"CurrencyAmount","camelCase":"currencyAmount","pascalCase":"CurrencyAmount","snakeCase":"currency_amount","screamingSnakeCase":"CURRENCY_AMOUNT"}}},"shape":{"aliasOf":{"primitive":"STRING","_type":"primitive"},"resolvedType":{"primitive":"STRING","_type":"primitive"},"_type":"alias"},"examples":[{"value":{"primitive":{"string":"$4.50","type":"string"},"type":"primitive"},"type":"alias"}],"referencedTypes":[]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"MovieId","nameV2":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"nameV3":{"safeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"unsafeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"}}},"shape":{"aliasOf":{"primitive":"STRING","_type":"primitive"},"resolvedType":{"primitive":"STRING","_type":"primitive"},"_type":"alias"},"examples":[{"value":{"primitive":{"string":"id1","type":"string"},"type":"primitive"},"type":"alias"},{"value":{"primitive":{"string":"id2","type":"string"},"type":"primitive"},"type":"alias"}],"referencedTypes":[]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"ActorId","nameV2":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"},"nameV3":{"safeName":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"},"unsafeName":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"}}},"shape":{"aliasOf":{"primitive":"STRING","_type":"primitive"},"resolvedType":{"primitive":"STRING","_type":"primitive"},"_type":"alias"},"examples":[],"referencedTypes":[]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"Movie","nameV2":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"nameV3":{"safeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"unsafeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"}}},"shape":{"extends":[],"properties":[{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"id","camelCase":"id","pascalCase":"Id","snakeCase":"id","screamingSnakeCase":"ID","wireValue":"id"},"nameV2":{"wireValue":"id","name":{"safeName":{"originalValue":"id","camelCase":"id","pascalCase":"Id","snakeCase":"id","screamingSnakeCase":"ID"},"unsafeName":{"originalValue":"id","camelCase":"id","pascalCase":"Id","snakeCase":"id","screamingSnakeCase":"ID"}}},"valueType":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"MovieId","nameV2":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"nameV3":{"safeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"unsafeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"}},"_type":"named"}},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"title","camelCase":"title","pascalCase":"Title","snakeCase":"title","screamingSnakeCase":"TITLE","wireValue":"title"},"nameV2":{"wireValue":"title","name":{"safeName":{"originalValue":"title","camelCase":"title","pascalCase":"Title","snakeCase":"title","screamingSnakeCase":"TITLE"},"unsafeName":{"originalValue":"title","camelCase":"title","pascalCase":"Title","snakeCase":"title","screamingSnakeCase":"TITLE"}}},"valueType":{"primitive":"STRING","_type":"primitive"}},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"rating","camelCase":"rating","pascalCase":"Rating","snakeCase":"rating","screamingSnakeCase":"RATING","wireValue":"rating"},"nameV2":{"wireValue":"rating","name":{"safeName":{"originalValue":"rating","camelCase":"rating","pascalCase":"Rating","snakeCase":"rating","screamingSnakeCase":"RATING"},"unsafeName":{"originalValue":"rating","camelCase":"rating","pascalCase":"Rating","snakeCase":"rating","screamingSnakeCase":"RATING"}}},"valueType":{"primitive":"DOUBLE","_type":"primitive"}}],"_type":"object"},"examples":[{"properties":[{"wireKey":"id","value":{"typeName":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"MovieId","nameV2":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"nameV3":{"safeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"unsafeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"}}},"shape":{"value":{"primitive":{"string":"my-movie-id","type":"string"},"type":"primitive"},"type":"alias"},"type":"named"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"Movie","nameV2":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"nameV3":{"safeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"unsafeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"}}}},{"wireKey":"title","value":{"primitive":{"string":"Goodwill Hunting","type":"string"},"type":"primitive"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"Movie","nameV2":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"nameV3":{"safeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"unsafeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"}}}},{"wireKey":"rating","value":{"primitive":{"double":14.5,"type":"double"},"type":"primitive"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"Movie","nameV2":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"nameV3":{"safeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"unsafeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"}}}}],"type":"object"}],"referencedTypes":[{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"MovieId","nameV2":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"nameV3":{"safeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"unsafeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"}}}]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}},"shape":{"extends":[],"properties":[{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"title","camelCase":"title","pascalCase":"Title","snakeCase":"title","screamingSnakeCase":"TITLE","wireValue":"title"},"nameV2":{"wireValue":"title","name":{"safeName":{"originalValue":"title","camelCase":"title","pascalCase":"Title","snakeCase":"title","screamingSnakeCase":"TITLE"},"unsafeName":{"originalValue":"title","camelCase":"title","pascalCase":"Title","snakeCase":"title","screamingSnakeCase":"TITLE"}}},"valueType":{"primitive":"STRING","_type":"primitive"}},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"ratings","camelCase":"ratings","pascalCase":"Ratings","snakeCase":"ratings","screamingSnakeCase":"RATINGS","wireValue":"ratings"},"nameV2":{"wireValue":"ratings","name":{"safeName":{"originalValue":"ratings","camelCase":"ratings","pascalCase":"Ratings","snakeCase":"ratings","screamingSnakeCase":"RATINGS"},"unsafeName":{"originalValue":"ratings","camelCase":"ratings","pascalCase":"Ratings","snakeCase":"ratings","screamingSnakeCase":"RATINGS"}}},"valueType":{"container":{"list":{"primitive":"DOUBLE","_type":"primitive"},"_type":"list"},"_type":"container"}}],"_type":"object"},"examples":[{"properties":[{"wireKey":"title","value":{"primitive":{"string":"Winnie the Pooh","type":"string"},"type":"primitive"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}},{"wireKey":"ratings","value":{"container":{"list":[{"primitive":{"double":1,"type":"double"},"type":"primitive"},{"primitive":{"double":2,"type":"double"},"type":"primitive"},{"primitive":{"double":3,"type":"double"},"type":"primitive"}],"type":"list"},"type":"container"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}}],"type":"object"}],"referencedTypes":[]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"DirectorWrapper","nameV2":{"originalValue":"DirectorWrapper","camelCase":"directorWrapper","pascalCase":"DirectorWrapper","snakeCase":"director_wrapper","screamingSnakeCase":"DIRECTOR_WRAPPER"},"nameV3":{"safeName":{"originalValue":"DirectorWrapper","camelCase":"directorWrapper","pascalCase":"DirectorWrapper","snakeCase":"director_wrapper","screamingSnakeCase":"DIRECTOR_WRAPPER"},"unsafeName":{"originalValue":"DirectorWrapper","camelCase":"directorWrapper","pascalCase":"DirectorWrapper","snakeCase":"director_wrapper","screamingSnakeCase":"DIRECTOR_WRAPPER"}}},"shape":{"extends":[],"properties":[{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR","wireValue":"director"},"nameV2":{"wireValue":"director","name":{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}},"valueType":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}},"_type":"named"}}],"_type":"object"},"examples":[{"properties":[{"wireKey":"director","value":{"typeName":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}},"shape":{"properties":[{"wireKey":"name","value":{"primitive":{"string":"George the Director","type":"string"},"type":"primitive"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}}},{"wireKey":"age","value":{"typeName":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Age","nameV2":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"nameV3":{"safeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"unsafeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"}}},"shape":{"value":{"primitive":{"integer":20,"type":"integer"},"type":"primitive"},"type":"alias"},"type":"named"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}}}],"type":"object"},"type":"named"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"DirectorWrapper","nameV2":{"originalValue":"DirectorWrapper","camelCase":"directorWrapper","pascalCase":"DirectorWrapper","snakeCase":"director_wrapper","screamingSnakeCase":"DIRECTOR_WRAPPER"},"nameV3":{"safeName":{"originalValue":"DirectorWrapper","camelCase":"directorWrapper","pascalCase":"DirectorWrapper","snakeCase":"director_wrapper","screamingSnakeCase":"DIRECTOR_WRAPPER"},"unsafeName":{"originalValue":"DirectorWrapper","camelCase":"directorWrapper","pascalCase":"DirectorWrapper","snakeCase":"director_wrapper","screamingSnakeCase":"DIRECTOR_WRAPPER"}}}}],"type":"object"}],"referencedTypes":[{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}},{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Age","nameV2":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"nameV3":{"safeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"unsafeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"}}}]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"EmptyObject","nameV2":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"nameV3":{"safeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"unsafeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"}}},"shape":{"extends":[],"properties":[],"_type":"object"},"examples":[],"referencedTypes":[]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"Person","nameV2":{"originalValue":"Person","camelCase":"person","pascalCase":"Person","snakeCase":"person","screamingSnakeCase":"PERSON"},"nameV3":{"safeName":{"originalValue":"Person","camelCase":"person","pascalCase":"Person","snakeCase":"person","screamingSnakeCase":"PERSON"},"unsafeName":{"originalValue":"Person","camelCase":"person","pascalCase":"Person","snakeCase":"person","screamingSnakeCase":"PERSON"}}},"shape":{"discriminant":"type","discriminantV2":{"originalValue":"type","camelCase":"type","pascalCase":"Type","snakeCase":"type","screamingSnakeCase":"TYPE","wireValue":"type"},"discriminantV3":{"wireValue":"type","name":{"safeName":{"originalValue":"type","camelCase":"type","pascalCase":"Type","snakeCase":"type","screamingSnakeCase":"TYPE"},"unsafeName":{"originalValue":"type","camelCase":"type","pascalCase":"Type","snakeCase":"type","screamingSnakeCase":"TYPE"}}},"types":[{"discriminantValue":{"originalValue":"actor","camelCase":"actor","pascalCase":"Actor","snakeCase":"actor","screamingSnakeCase":"ACTOR","wireValue":"actor"},"discriminantValueV2":{"wireValue":"actor","name":{"safeName":{"originalValue":"actor","camelCase":"actor","pascalCase":"Actor","snakeCase":"actor","screamingSnakeCase":"ACTOR"},"unsafeName":{"originalValue":"actor","camelCase":"actor","pascalCase":"Actor","snakeCase":"actor","screamingSnakeCase":"ACTOR"}}},"valueType":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"ActorId","nameV2":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"},"nameV3":{"safeName":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"},"unsafeName":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"}},"_type":"named"},"shape":{"name":{"originalValue":"value","camelCase":"value","pascalCase":"Value","snakeCase":"value","screamingSnakeCase":"VALUE","wireValue":"value"},"nameV2":{"wireValue":"value","name":{"safeName":{"originalValue":"value","camelCase":"value","pascalCase":"Value","snakeCase":"value","screamingSnakeCase":"VALUE"},"unsafeName":{"originalValue":"value","camelCase":"value","pascalCase":"Value","snakeCase":"value","screamingSnakeCase":"VALUE"}}},"type":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"ActorId","nameV2":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"},"nameV3":{"safeName":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"},"unsafeName":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"}},"_type":"named"},"_type":"singleProperty"}},{"discriminantValue":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR","wireValue":"director"},"discriminantValueV2":{"wireValue":"director","name":{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}},"valueType":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}},"_type":"named"},"shape":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}},"_type":"samePropertiesAsObject"}},{"discriminantValue":{"originalValue":"producer","camelCase":"producer","pascalCase":"Producer","snakeCase":"producer","screamingSnakeCase":"PRODUCER","wireValue":"producer"},"discriminantValueV2":{"wireValue":"producer","name":{"safeName":{"originalValue":"producer","camelCase":"producer","pascalCase":"Producer","snakeCase":"producer","screamingSnakeCase":"PRODUCER"},"unsafeName":{"originalValue":"producer","camelCase":"producer","pascalCase":"Producer","snakeCase":"producer","screamingSnakeCase":"PRODUCER"}}},"valueType":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"EmptyObject","nameV2":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"nameV3":{"safeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"unsafeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"}},"_type":"named"},"shape":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"EmptyObject","nameV2":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"nameV3":{"safeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"unsafeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"}},"_type":"samePropertiesAsObject"}},{"docs":"i am docs","discriminantValue":{"originalValue":"cinematographer","camelCase":"cinematographer","pascalCase":"Cinematographer","snakeCase":"cinematographer","screamingSnakeCase":"CINEMATOGRAPHER","wireValue":"cinematographer"},"discriminantValueV2":{"wireValue":"cinematographer","name":{"safeName":{"originalValue":"cinematographer","camelCase":"cinematographer","pascalCase":"Cinematographer","snakeCase":"cinematographer","screamingSnakeCase":"CINEMATOGRAPHER"},"unsafeName":{"originalValue":"cinematographer","camelCase":"cinematographer","pascalCase":"Cinematographer","snakeCase":"cinematographer","screamingSnakeCase":"CINEMATOGRAPHER"}}},"valueType":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"EmptyObject","nameV2":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"nameV3":{"safeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"unsafeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"}},"_type":"named"},"shape":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"EmptyObject","nameV2":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"nameV3":{"safeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"unsafeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"}},"_type":"samePropertiesAsObject"}}],"_type":"union"},"examples":[{"wireDiscriminantValue":"actor","properties":{"singleProperty":{"typeName":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"ActorId","nameV2":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"},"nameV3":{"safeName":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"},"unsafeName":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"}}},"shape":{"value":{"primitive":{"string":"Matt Damon","type":"string"},"type":"primitive"},"type":"alias"},"type":"named"},"type":"singleProperty"},"type":"union"},{"wireDiscriminantValue":"director","properties":{"typeName":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}},"shape":{"properties":[{"wireKey":"name","value":{"primitive":{"string":"George the Directory","type":"string"},"type":"primitive"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}}},{"wireKey":"age","value":{"typeName":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Age","nameV2":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"nameV3":{"safeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"unsafeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"}}},"shape":{"value":{"primitive":{"integer":100,"type":"integer"},"type":"primitive"},"type":"alias"},"type":"named"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}}}],"type":"object"},"type":"samePropertiesAsObject"},"type":"union"},{"wireDiscriminantValue":"producer","properties":{"typeName":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"EmptyObject","nameV2":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"nameV3":{"safeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"unsafeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"}}},"shape":{"properties":[],"type":"object"},"type":"samePropertiesAsObject"},"type":"union"}],"referencedTypes":[{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"ActorId","nameV2":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"},"nameV3":{"safeName":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"},"unsafeName":{"originalValue":"ActorId","camelCase":"actorId","pascalCase":"ActorId","snakeCase":"actor_id","screamingSnakeCase":"ACTOR_ID"}}},{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Director","nameV2":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"nameV3":{"safeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"Director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}},{"fernFilepath":[{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}],"fernFilepathV2":[{"safeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"},"unsafeName":{"originalValue":"director","camelCase":"director","pascalCase":"Director","snakeCase":"director","screamingSnakeCase":"DIRECTOR"}}],"name":"Age","nameV2":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"nameV3":{"safeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"},"unsafeName":{"originalValue":"Age","camelCase":"age","pascalCase":"Age","snakeCase":"age","screamingSnakeCase":"AGE"}}},{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"EmptyObject","nameV2":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"nameV3":{"safeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"},"unsafeName":{"originalValue":"EmptyObject","camelCase":"emptyObject","pascalCase":"EmptyObject","snakeCase":"empty_object","screamingSnakeCase":"EMPTY_OBJECT"}}}]},{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"RecursiveType","nameV2":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"nameV3":{"safeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"unsafeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"}}},"shape":{"extends":[{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}],"properties":[{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"selfReferencing","camelCase":"selfReferencing","pascalCase":"SelfReferencing","snakeCase":"self_referencing","screamingSnakeCase":"SELF_REFERENCING","wireValue":"selfReferencing"},"nameV2":{"wireValue":"selfReferencing","name":{"safeName":{"originalValue":"selfReferencing","camelCase":"selfReferencing","pascalCase":"SelfReferencing","snakeCase":"self_referencing","screamingSnakeCase":"SELF_REFERENCING"},"unsafeName":{"originalValue":"selfReferencing","camelCase":"selfReferencing","pascalCase":"SelfReferencing","snakeCase":"self_referencing","screamingSnakeCase":"SELF_REFERENCING"}}},"valueType":{"container":{"list":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"RecursiveType","nameV2":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"nameV3":{"safeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"unsafeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"}},"_type":"named"},"_type":"list"},"_type":"container"}}],"_type":"object"},"examples":[{"properties":[{"wireKey":"title","value":{"primitive":{"string":"The Godfather","type":"string"},"type":"primitive"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}},{"wireKey":"ratings","value":{"container":{"list":[{"primitive":{"double":10,"type":"double"},"type":"primitive"},{"primitive":{"double":5,"type":"double"},"type":"primitive"},{"primitive":{"double":9,"type":"double"},"type":"primitive"}],"type":"list"},"type":"container"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}},{"wireKey":"selfReferencing","value":{"container":{"list":[{"typeName":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"RecursiveType","nameV2":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"nameV3":{"safeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"unsafeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"}}},"shape":{"properties":[{"wireKey":"title","value":{"primitive":{"string":"The Godfather II","type":"string"},"type":"primitive"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}},{"wireKey":"ratings","value":{"container":{"list":[{"primitive":{"double":10,"type":"double"},"type":"primitive"},{"primitive":{"double":11,"type":"double"},"type":"primitive"}],"type":"list"},"type":"container"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}},{"wireKey":"selfReferencing","value":{"container":{"list":[],"type":"list"},"type":"container"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"RecursiveType","nameV2":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"nameV3":{"safeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"unsafeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"}}}}],"type":"object"},"type":"named"},{"typeName":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"RecursiveType","nameV2":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"nameV3":{"safeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"unsafeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"}}},"shape":{"properties":[{"wireKey":"title","value":{"primitive":{"string":"The Godfather III","type":"string"},"type":"primitive"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}},{"wireKey":"ratings","value":{"container":{"list":[],"type":"list"},"type":"container"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}},{"wireKey":"selfReferencing","value":{"container":{"list":[],"type":"list"},"type":"container"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"RecursiveType","nameV2":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"nameV3":{"safeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"unsafeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"}}}}],"type":"object"},"type":"named"}],"type":"list"},"type":"container"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"RecursiveType","nameV2":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"nameV3":{"safeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"unsafeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"}}}}],"type":"object"},{"properties":[{"wireKey":"title","value":{"primitive":{"string":"Goodfellas","type":"string"},"type":"primitive"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}},{"wireKey":"ratings","value":{"container":{"list":[{"primitive":{"double":1,"type":"double"},"type":"primitive"},{"primitive":{"double":2,"type":"double"},"type":"primitive"},{"primitive":{"double":3,"type":"double"},"type":"primitive"}],"type":"list"},"type":"container"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}}},{"wireKey":"selfReferencing","value":{"container":{"list":[],"type":"list"},"type":"container"},"originalTypeDeclaration":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"RecursiveType","nameV2":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"nameV3":{"safeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"unsafeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"}}}}],"type":"object"}],"referencedTypes":[{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}}},{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"RecursiveType","nameV2":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"nameV3":{"safeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"},"unsafeName":{"originalValue":"RecursiveType","camelCase":"recursiveType","pascalCase":"RecursiveType","snakeCase":"recursive_type","screamingSnakeCase":"RECURSIVE_TYPE"}}}]}],"services":{"websocket":[],"http":[{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"name":"ImdbService","fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}]},"basePath":"/movies","basePathV2":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"endpoints":[{"availability":{"status":"GENERAL_AVAILABILITY"},"id":"createMovie","name":{"originalValue":"createMovie","camelCase":"createMovie","pascalCase":"CreateMovie","snakeCase":"create_movie","screamingSnakeCase":"CREATE_MOVIE"},"nameV2":{"safeName":{"originalValue":"createMovie","camelCase":"createMovie","pascalCase":"CreateMovie","snakeCase":"create_movie","screamingSnakeCase":"CREATE_MOVIE"},"unsafeName":{"originalValue":"createMovie","camelCase":"createMovie","pascalCase":"CreateMovie","snakeCase":"create_movie","screamingSnakeCase":"CREATE_MOVIE"}},"method":"POST","headers":[],"path":{"head":"","parts":[]},"pathParameters":[],"queryParameters":[],"request":{"type":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}},"_type":"named"},"typeV2":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"CreateMovieRequest","nameV2":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"nameV3":{"safeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"},"unsafeName":{"originalValue":"CreateMovieRequest","camelCase":"createMovieRequest","pascalCase":"CreateMovieRequest","snakeCase":"create_movie_request","screamingSnakeCase":"CREATE_MOVIE_REQUEST"}},"_type":"named"}},"response":{"type":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"MovieId","nameV2":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"nameV3":{"safeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"unsafeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"}},"_type":"named"},"typeV2":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"MovieId","nameV2":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"nameV3":{"safeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"unsafeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"}},"_type":"named"}},"errors":[{"error":{"name":"BadRequestError","nameV2":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"},"nameV3":{"safeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"},"unsafeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"}},"fernFilepath":[{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"}],"fernFilepathV2":[{"safeName":{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"},"unsafeName":{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"}}]}}],"errorsV2":{"discriminant":{"originalValue":"errorName","camelCase":"errorName","snakeCase":"error_name","pascalCase":"ErrorName","screamingSnakeCase":"ERROR_NAME","wireValue":"errorName"},"types":[{"discriminantValue":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR","wireValue":"BadRequestError"},"shape":{"type":"noProperties"}}]},"auth":false},{"availability":{"status":"GENERAL_AVAILABILITY"},"id":"getMovie","name":{"originalValue":"getMovie","camelCase":"getMovie","pascalCase":"GetMovie","snakeCase":"get_movie","screamingSnakeCase":"GET_MOVIE"},"nameV2":{"safeName":{"originalValue":"getMovie","camelCase":"getMovie","pascalCase":"GetMovie","snakeCase":"get_movie","screamingSnakeCase":"GET_MOVIE"},"unsafeName":{"originalValue":"getMovie","camelCase":"getMovie","pascalCase":"GetMovie","snakeCase":"get_movie","screamingSnakeCase":"GET_MOVIE"}},"method":"GET","headers":[],"path":{"head":"/","parts":[{"pathParameter":"movieId","tail":""}]},"pathParameters":[{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"movieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"nameV2":{"safeName":{"originalValue":"movieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"unsafeName":{"originalValue":"movieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"}},"valueType":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"MovieId","nameV2":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"nameV3":{"safeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"unsafeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"}},"_type":"named"}}],"queryParameters":[{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"movieName","camelCase":"movieName","pascalCase":"MovieName","snakeCase":"movie_name","screamingSnakeCase":"MOVIE_NAME","wireValue":"movieName"},"nameV2":{"wireValue":"movieName","name":{"safeName":{"originalValue":"movieName","camelCase":"movieName","pascalCase":"MovieName","snakeCase":"movie_name","screamingSnakeCase":"MOVIE_NAME"},"unsafeName":{"originalValue":"movieName","camelCase":"movieName","pascalCase":"MovieName","snakeCase":"movie_name","screamingSnakeCase":"MOVIE_NAME"}}},"valueType":{"primitive":"STRING","_type":"primitive"},"allowMultiple":true}],"request":{"type":{"_type":"void"}},"response":{"type":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"Movie","nameV2":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"nameV3":{"safeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"unsafeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"}},"_type":"named"},"typeV2":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"Movie","nameV2":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"nameV3":{"safeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"},"unsafeName":{"originalValue":"Movie","camelCase":"movie","pascalCase":"Movie","snakeCase":"movie","screamingSnakeCase":"MOVIE"}},"_type":"named"}},"errors":[{"error":{"name":"NotFoundError","nameV2":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"},"nameV3":{"safeName":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"},"unsafeName":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"}},"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}]}},{"error":{"name":"BadRequestError","nameV2":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"},"nameV3":{"safeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"},"unsafeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"}},"fernFilepath":[{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"}],"fernFilepathV2":[{"safeName":{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"},"unsafeName":{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"}}]}}],"errorsV2":{"discriminant":{"originalValue":"errorName","camelCase":"errorName","snakeCase":"error_name","pascalCase":"ErrorName","screamingSnakeCase":"ERROR_NAME","wireValue":"errorName"},"types":[{"discriminantValue":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR","wireValue":"NotFoundError"},"shape":{"name":{"originalValue":"content","camelCase":"content","snakeCase":"content","pascalCase":"Content","screamingSnakeCase":"CONTENT","wireValue":"content"},"error":{"name":"NotFoundError","nameV2":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"},"nameV3":{"safeName":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"},"unsafeName":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"}},"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}]},"type":"singleProperty"}},{"discriminantValue":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR","wireValue":"BadRequestError"},"shape":{"type":"noProperties"}}]},"auth":false},{"availability":{"status":"GENERAL_AVAILABILITY"},"id":"delete","name":{"originalValue":"delete","camelCase":"delete","pascalCase":"Delete","snakeCase":"delete","screamingSnakeCase":"DELETE"},"nameV2":{"safeName":{"originalValue":"delete","camelCase":"delete","pascalCase":"Delete","snakeCase":"delete","screamingSnakeCase":"DELETE"},"unsafeName":{"originalValue":"delete","camelCase":"delete","pascalCase":"Delete","snakeCase":"delete","screamingSnakeCase":"DELETE"}},"method":"DELETE","headers":[],"path":{"head":"/","parts":[{"pathParameter":"movieId","tail":""}]},"pathParameters":[{"availability":{"status":"GENERAL_AVAILABILITY"},"name":{"originalValue":"movieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"nameV2":{"safeName":{"originalValue":"movieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"unsafeName":{"originalValue":"movieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"}},"valueType":{"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}],"name":"MovieId","nameV2":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"nameV3":{"safeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"},"unsafeName":{"originalValue":"MovieId","camelCase":"movieId","pascalCase":"MovieId","snakeCase":"movie_id","screamingSnakeCase":"MOVIE_ID"}},"_type":"named"}}],"queryParameters":[],"request":{"type":{"_type":"void"}},"response":{"type":{"_type":"void"}},"errors":[{"error":{"name":"BadRequestError","nameV2":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"},"nameV3":{"safeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"},"unsafeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"}},"fernFilepath":[{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"}],"fernFilepathV2":[{"safeName":{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"},"unsafeName":{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"}}]}}],"errorsV2":{"discriminant":{"originalValue":"errorName","camelCase":"errorName","snakeCase":"error_name","pascalCase":"ErrorName","screamingSnakeCase":"ERROR_NAME","wireValue":"errorName"},"types":[{"discriminantValue":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR","wireValue":"BadRequestError"},"shape":{"type":"noProperties"}}]},"auth":false}]}]},"constants":{"errorDiscriminant":"_error","errorInstanceIdKey":"_errorInstanceId","unknownErrorDiscriminantValue":"_unknown"},"constantsV2":{"errors":{"errorInstanceIdKey":{"originalValue":"errorInstanceId","camelCase":"errorInstanceId","pascalCase":"ErrorInstanceId","snakeCase":"error_instance_id","screamingSnakeCase":"ERROR_INSTANCE_ID","wireValue":"errorInstanceId"},"errorDiscriminant":{"originalValue":"error","camelCase":"error","snakeCase":"error","pascalCase":"Error","screamingSnakeCase":"ERROR","wireValue":"error"},"errorContentKey":{"originalValue":"content","camelCase":"content","snakeCase":"content","pascalCase":"Content","screamingSnakeCase":"CONTENT","wireValue":"content"}},"errorsV2":{"errorInstanceIdKey":{"wireValue":"errorInstanceId","name":{"safeName":{"originalValue":"errorInstanceId","camelCase":"errorInstanceId","pascalCase":"ErrorInstanceId","snakeCase":"error_instance_id","screamingSnakeCase":"ERROR_INSTANCE_ID"},"unsafeName":{"originalValue":"errorInstanceId","camelCase":"errorInstanceId","pascalCase":"ErrorInstanceId","snakeCase":"error_instance_id","screamingSnakeCase":"ERROR_INSTANCE_ID"}}},"errorDiscriminant":{"name":{"unsafeName":{"originalValue":"error","camelCase":"error","snakeCase":"error","pascalCase":"Error","screamingSnakeCase":"ERROR"},"safeName":{"originalValue":"error","camelCase":"error","snakeCase":"error","pascalCase":"Error","screamingSnakeCase":"ERROR"}},"wireValue":"error"},"errorContentKey":{"name":{"unsafeName":{"originalValue":"content","camelCase":"content","snakeCase":"content","pascalCase":"Content","screamingSnakeCase":"CONTENT"},"safeName":{"originalValue":"content","camelCase":"content","snakeCase":"content","pascalCase":"Content","screamingSnakeCase":"CONTENT"}},"wireValue":"content"}}},"environments":[],"errorDiscriminant":{"safeName":{"originalValue":"error","camelCase":"error","pascalCase":"Error","snakeCase":"error","screamingSnakeCase":"ERROR"},"unsafeName":{"originalValue":"error","camelCase":"error","pascalCase":"Error","snakeCase":"error","screamingSnakeCase":"ERROR"}},"errorDiscriminationStrategy":{"discriminant":{"wireValue":"error","name":{"safeName":{"originalValue":"error","camelCase":"error","pascalCase":"Error","snakeCase":"error","screamingSnakeCase":"ERROR"},"unsafeName":{"originalValue":"error","camelCase":"error","pascalCase":"Error","snakeCase":"error","screamingSnakeCase":"ERROR"}}},"contentProperty":{"wireValue":"content","name":{"safeName":{"originalValue":"content","camelCase":"content","pascalCase":"Content","snakeCase":"content","screamingSnakeCase":"CONTENT"},"unsafeName":{"originalValue":"content","camelCase":"content","pascalCase":"Content","snakeCase":"content","screamingSnakeCase":"CONTENT"}}},"type":"property"},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version"}},"errors":[{"name":{"name":"BadRequestError","nameV2":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"},"nameV3":{"safeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"},"unsafeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"}},"fernFilepath":[{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"}],"fernFilepathV2":[{"safeName":{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"},"unsafeName":{"originalValue":"commons","camelCase":"commons","pascalCase":"Commons","snakeCase":"commons","screamingSnakeCase":"COMMONS"}}]},"discriminantValue":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR","wireValue":"BadRequestError"},"discriminantValueV2":{"wireValue":"BadRequestError","name":{"safeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"},"unsafeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"}}},"discriminantValueV3":{"wireValue":"content","name":{"safeName":{"originalValue":"content","camelCase":"content","pascalCase":"Content","snakeCase":"content","screamingSnakeCase":"CONTENT"},"unsafeName":{"originalValue":"content","camelCase":"content","pascalCase":"Content","snakeCase":"content","screamingSnakeCase":"CONTENT"}},"type":"property"},"discriminantValueV4":{"wireValue":"BadRequestError","name":{"safeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"},"unsafeName":{"originalValue":"BadRequestError","camelCase":"badRequestError","pascalCase":"BadRequestError","snakeCase":"bad_request_error","screamingSnakeCase":"BAD_REQUEST_ERROR"}}},"type":{"aliasOf":{"_type":"void"},"resolvedType":{"_type":"void"},"_type":"alias"},"http":{"statusCode":400},"statusCode":400},{"name":{"name":"NotFoundError","nameV2":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"},"nameV3":{"safeName":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"},"unsafeName":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"}},"fernFilepath":[{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}],"fernFilepathV2":[{"safeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"},"unsafeName":{"originalValue":"imdb","camelCase":"imdb","pascalCase":"Imdb","snakeCase":"imdb","screamingSnakeCase":"IMDB"}}]},"discriminantValue":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR","wireValue":"NotFoundError"},"discriminantValueV2":{"wireValue":"NotFoundError","name":{"safeName":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"},"unsafeName":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"}}},"discriminantValueV3":{"wireValue":"content","name":{"safeName":{"originalValue":"content","camelCase":"content","pascalCase":"Content","snakeCase":"content","screamingSnakeCase":"CONTENT"},"unsafeName":{"originalValue":"content","camelCase":"content","pascalCase":"Content","snakeCase":"content","screamingSnakeCase":"CONTENT"}},"type":"property"},"discriminantValueV4":{"wireValue":"NotFoundError","name":{"safeName":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"},"unsafeName":{"originalValue":"NotFoundError","camelCase":"notFoundError","pascalCase":"NotFoundError","snakeCase":"not_found_error","screamingSnakeCase":"NOT_FOUND_ERROR"}}},"type":{"aliasOf":{"primitive":"STRING","_type":"primitive"},"resolvedType":{"primitive":"STRING","_type":"primitive"},"_type":"alias"},"typeV2":{"aliasOf":{"primitive":"STRING","_type":"primitive"},"resolvedType":{"primitive":"STRING","_type":"primitive"},"_type":"alias"},"typeV3":{"primitive":"STRING","_type":"primitive"},"http":{"statusCode":404},"statusCode":404}]}"`; -exports[`ir > {"name":"multiple-environment-urls"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"api","camelCase":{"unsafeName":"api","safeName":"api"},"snakeCase":{"unsafeName":"api","safeName":"api"},"screamingSnakeCase":{"unsafeName":"API","safeName":"API"},"pascalCase":{"unsafeName":"Api","safeName":"Api"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"errors":{},"services":{"service_endpoint-urls":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}],"packagePath":[],"file":{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}}},"displayName":null,"basePath":{"head":"/","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_endpoint-urls.test1","name":{"originalName":"test1","camelCase":{"unsafeName":"test1","safeName":"test1"},"snakeCase":{"unsafeName":"test_1","safeName":"test_1"},"screamingSnakeCase":{"unsafeName":"TEST_1","safeName":"TEST_1"},"pascalCase":{"unsafeName":"Test1","safeName":"Test1"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":"ServerA","method":"GET","basePath":null,"path":{"head":"/a","parts":[]},"fullPath":{"head":"/a","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"980dd56c","url":"/a","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_endpoint-urls.test2","name":{"originalName":"test2","camelCase":{"unsafeName":"test2","safeName":"test2"},"snakeCase":{"unsafeName":"test_2","safeName":"test_2"},"screamingSnakeCase":{"unsafeName":"TEST_2","safeName":"TEST_2"},"pascalCase":{"unsafeName":"Test2","safeName":"Test2"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":"ServerB","method":"POST","basePath":null,"path":{"head":"/b","parts":[]},"fullPath":{"head":"/b","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"980dd56c","url":"/b","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]},"service_service-url":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}],"packagePath":[],"file":{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}}},"displayName":null,"basePath":{"head":"/","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_service-url.test","name":{"originalName":"test","camelCase":{"unsafeName":"test","safeName":"test"},"snakeCase":{"unsafeName":"test","safeName":"test"},"screamingSnakeCase":{"unsafeName":"TEST","safeName":"TEST"},"pascalCase":{"unsafeName":"Test","safeName":"Test"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":"ServerA","method":"GET","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"980dd56c","url":"","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":{"type":"multipleBaseUrls","baseUrls":[{"id":"ServerA","name":{"originalName":"ServerA","camelCase":{"unsafeName":"serverA","safeName":"serverA"},"snakeCase":{"unsafeName":"server_a","safeName":"server_a"},"screamingSnakeCase":{"unsafeName":"SERVER_A","safeName":"SERVER_A"},"pascalCase":{"unsafeName":"ServerA","safeName":"ServerA"}}},{"id":"ServerB","name":{"originalName":"ServerB","camelCase":{"unsafeName":"serverB","safeName":"serverB"},"snakeCase":{"unsafeName":"server_b","safeName":"server_b"},"screamingSnakeCase":{"unsafeName":"SERVER_B","safeName":"SERVER_B"},"pascalCase":{"unsafeName":"ServerB","safeName":"ServerB"}}}],"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"}},"urls":{"ServerA":"a.prod.com","ServerB":"b.prod.com"},"docs":null},{"id":"Staging","name":{"originalName":"Staging","camelCase":{"unsafeName":"staging","safeName":"staging"},"snakeCase":{"unsafeName":"staging","safeName":"staging"},"screamingSnakeCase":{"unsafeName":"STAGING","safeName":"STAGING"},"pascalCase":{"unsafeName":"Staging","safeName":"Staging"}},"urls":{"ServerA":"a.staging.com","ServerB":"b.staging.com"},"docs":null}]}},"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{"endpoint_endpoint-urls.test1":{"auth":null,"declaration":{"name":{"originalName":"test1","camelCase":{"unsafeName":"test1","safeName":"test1"},"snakeCase":{"unsafeName":"test_1","safeName":"test_1"},"screamingSnakeCase":{"unsafeName":"TEST_1","safeName":"TEST_1"},"pascalCase":{"unsafeName":"Test1","safeName":"Test1"}},"fernFilepath":{"allParts":[{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}],"packagePath":[],"file":{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}}},"location":{"method":"GET","path":"/a"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}},"endpoint_endpoint-urls.test2":{"auth":null,"declaration":{"name":{"originalName":"test2","camelCase":{"unsafeName":"test2","safeName":"test2"},"snakeCase":{"unsafeName":"test_2","safeName":"test_2"},"screamingSnakeCase":{"unsafeName":"TEST_2","safeName":"TEST_2"},"pascalCase":{"unsafeName":"Test2","safeName":"Test2"}},"fernFilepath":{"allParts":[{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}],"packagePath":[],"file":{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}}},"location":{"method":"POST","path":"/b"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}},"endpoint_service-url.test":{"auth":null,"declaration":{"name":{"originalName":"test","camelCase":{"unsafeName":"test","safeName":"test"},"snakeCase":{"unsafeName":"test","safeName":"test"},"screamingSnakeCase":{"unsafeName":"TEST","safeName":"TEST"},"pascalCase":{"unsafeName":"Test","safeName":"Test"}},"fernFilepath":{"allParts":[{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}],"packagePath":[],"file":{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}}},"location":{"method":"GET","path":"/"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}}}},"subpackages":{"subpackage_endpoint-urls":{"name":{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}},"fernFilepath":{"allParts":[{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}],"packagePath":[],"file":{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}},"service":"service_endpoint-urls","types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null},"subpackage_service-url":{"name":{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}},"fernFilepath":{"allParts":[{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}],"packagePath":[],"file":{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}},"service":"service_service-url","types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_endpoint-urls","subpackage_service-url"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"multiple-environment-urls"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"api","camelCase":{"unsafeName":"api","safeName":"api"},"snakeCase":{"unsafeName":"api","safeName":"api"},"screamingSnakeCase":{"unsafeName":"API","safeName":"API"},"pascalCase":{"unsafeName":"Api","safeName":"Api"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"errors":{},"services":{"service_endpoint-urls":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}],"packagePath":[],"file":{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}}},"displayName":null,"basePath":{"head":"/","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_endpoint-urls.test1","name":{"originalName":"test1","camelCase":{"unsafeName":"test1","safeName":"test1"},"snakeCase":{"unsafeName":"test_1","safeName":"test_1"},"screamingSnakeCase":{"unsafeName":"TEST_1","safeName":"TEST_1"},"pascalCase":{"unsafeName":"Test1","safeName":"Test1"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":"ServerA","method":"GET","basePath":null,"path":{"head":"/a","parts":[]},"fullPath":{"head":"/a","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"980dd56c","url":"/a","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_endpoint-urls.test2","name":{"originalName":"test2","camelCase":{"unsafeName":"test2","safeName":"test2"},"snakeCase":{"unsafeName":"test_2","safeName":"test_2"},"screamingSnakeCase":{"unsafeName":"TEST_2","safeName":"TEST_2"},"pascalCase":{"unsafeName":"Test2","safeName":"Test2"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":"ServerB","method":"POST","basePath":null,"path":{"head":"/b","parts":[]},"fullPath":{"head":"/b","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"980dd56c","url":"/b","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]},"service_service-url":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}],"packagePath":[],"file":{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}}},"displayName":null,"basePath":{"head":"/","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_service-url.test","name":{"originalName":"test","camelCase":{"unsafeName":"test","safeName":"test"},"snakeCase":{"unsafeName":"test","safeName":"test"},"screamingSnakeCase":{"unsafeName":"TEST","safeName":"TEST"},"pascalCase":{"unsafeName":"Test","safeName":"Test"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":"ServerA","method":"GET","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"980dd56c","url":"","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":{"type":"multipleBaseUrls","baseUrls":[{"id":"ServerA","name":{"originalName":"ServerA","camelCase":{"unsafeName":"serverA","safeName":"serverA"},"snakeCase":{"unsafeName":"server_a","safeName":"server_a"},"screamingSnakeCase":{"unsafeName":"SERVER_A","safeName":"SERVER_A"},"pascalCase":{"unsafeName":"ServerA","safeName":"ServerA"}}},{"id":"ServerB","name":{"originalName":"ServerB","camelCase":{"unsafeName":"serverB","safeName":"serverB"},"snakeCase":{"unsafeName":"server_b","safeName":"server_b"},"screamingSnakeCase":{"unsafeName":"SERVER_B","safeName":"SERVER_B"},"pascalCase":{"unsafeName":"ServerB","safeName":"ServerB"}}}],"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"}},"urls":{"ServerA":"a.prod.com","ServerB":"b.prod.com"},"docs":null},{"id":"Staging","name":{"originalName":"Staging","camelCase":{"unsafeName":"staging","safeName":"staging"},"snakeCase":{"unsafeName":"staging","safeName":"staging"},"screamingSnakeCase":{"unsafeName":"STAGING","safeName":"STAGING"},"pascalCase":{"unsafeName":"Staging","safeName":"Staging"}},"urls":{"ServerA":"a.staging.com","ServerB":"b.staging.com"},"docs":null}]}},"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{"endpoint_endpoint-urls.test1":{"auth":null,"declaration":{"name":{"originalName":"test1","camelCase":{"unsafeName":"test1","safeName":"test1"},"snakeCase":{"unsafeName":"test_1","safeName":"test_1"},"screamingSnakeCase":{"unsafeName":"TEST_1","safeName":"TEST_1"},"pascalCase":{"unsafeName":"Test1","safeName":"Test1"}},"fernFilepath":{"allParts":[{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}],"packagePath":[],"file":{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}}},"location":{"method":"GET","path":"/a"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}},"endpoint_endpoint-urls.test2":{"auth":null,"declaration":{"name":{"originalName":"test2","camelCase":{"unsafeName":"test2","safeName":"test2"},"snakeCase":{"unsafeName":"test_2","safeName":"test_2"},"screamingSnakeCase":{"unsafeName":"TEST_2","safeName":"TEST_2"},"pascalCase":{"unsafeName":"Test2","safeName":"Test2"}},"fernFilepath":{"allParts":[{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}],"packagePath":[],"file":{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}}},"location":{"method":"POST","path":"/b"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}},"endpoint_service-url.test":{"auth":null,"declaration":{"name":{"originalName":"test","camelCase":{"unsafeName":"test","safeName":"test"},"snakeCase":{"unsafeName":"test","safeName":"test"},"screamingSnakeCase":{"unsafeName":"TEST","safeName":"TEST"},"pascalCase":{"unsafeName":"Test","safeName":"Test"}},"fernFilepath":{"allParts":[{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}],"packagePath":[],"file":{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}}},"location":{"method":"GET","path":"/"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}}},"environments":{"defaultEnvironment":"Production","environments":{"type":"multipleBaseUrls","baseUrls":[{"id":"ServerA","name":{"originalName":"ServerA","camelCase":{"unsafeName":"serverA","safeName":"serverA"},"snakeCase":{"unsafeName":"server_a","safeName":"server_a"},"screamingSnakeCase":{"unsafeName":"SERVER_A","safeName":"SERVER_A"},"pascalCase":{"unsafeName":"ServerA","safeName":"ServerA"}}},{"id":"ServerB","name":{"originalName":"ServerB","camelCase":{"unsafeName":"serverB","safeName":"serverB"},"snakeCase":{"unsafeName":"server_b","safeName":"server_b"},"screamingSnakeCase":{"unsafeName":"SERVER_B","safeName":"SERVER_B"},"pascalCase":{"unsafeName":"ServerB","safeName":"ServerB"}}}],"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"}},"urls":{"ServerA":"a.prod.com","ServerB":"b.prod.com"},"docs":null},{"id":"Staging","name":{"originalName":"Staging","camelCase":{"unsafeName":"staging","safeName":"staging"},"snakeCase":{"unsafeName":"staging","safeName":"staging"},"screamingSnakeCase":{"unsafeName":"STAGING","safeName":"STAGING"},"pascalCase":{"unsafeName":"Staging","safeName":"Staging"}},"urls":{"ServerA":"a.staging.com","ServerB":"b.staging.com"},"docs":null}]}}},"subpackages":{"subpackage_endpoint-urls":{"name":{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}},"fernFilepath":{"allParts":[{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}],"packagePath":[],"file":{"originalName":"endpoint-urls","camelCase":{"unsafeName":"endpointUrls","safeName":"endpointUrls"},"snakeCase":{"unsafeName":"endpoint_urls","safeName":"endpoint_urls"},"screamingSnakeCase":{"unsafeName":"ENDPOINT_URLS","safeName":"ENDPOINT_URLS"},"pascalCase":{"unsafeName":"EndpointUrls","safeName":"EndpointUrls"}}},"service":"service_endpoint-urls","types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null},"subpackage_service-url":{"name":{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}},"fernFilepath":{"allParts":[{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}],"packagePath":[],"file":{"originalName":"service-url","camelCase":{"unsafeName":"serviceUrl","safeName":"serviceUrl"},"snakeCase":{"unsafeName":"service_url","safeName":"service_url"},"screamingSnakeCase":{"unsafeName":"SERVICE_URL","safeName":"SERVICE_URL"},"pascalCase":{"unsafeName":"ServiceUrl","safeName":"ServiceUrl"}}},"service":"service_service-url","types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_endpoint-urls","subpackage_service-url"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"navigation-points-to"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{}},"subpackages":{"subpackage_subpackage":{"name":{"originalName":"subpackage","camelCase":{"unsafeName":"subpackage","safeName":"subpackage"},"snakeCase":{"unsafeName":"subpackage","safeName":"subpackage"},"screamingSnakeCase":{"unsafeName":"SUBPACKAGE","safeName":"SUBPACKAGE"},"pascalCase":{"unsafeName":"Subpackage","safeName":"Subpackage"}},"fernFilepath":{"allParts":[{"originalName":"subpackage","camelCase":{"unsafeName":"subpackage","safeName":"subpackage"},"snakeCase":{"unsafeName":"subpackage","safeName":"subpackage"},"screamingSnakeCase":{"unsafeName":"SUBPACKAGE","safeName":"SUBPACKAGE"},"pascalCase":{"unsafeName":"Subpackage","safeName":"Subpackage"}}],"packagePath":[{"originalName":"subpackage","camelCase":{"unsafeName":"subpackage","safeName":"subpackage"},"snakeCase":{"unsafeName":"subpackage","safeName":"subpackage"},"screamingSnakeCase":{"unsafeName":"SUBPACKAGE","safeName":"SUBPACKAGE"},"pascalCase":{"unsafeName":"Subpackage","safeName":"Subpackage"}}],"file":null},"service":null,"types":[],"errors":[],"subpackages":["subpackage_subpackage/x"],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_subpackage/x":{"name":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}},"fernFilepath":{"allParts":[{"originalName":"subpackage","camelCase":{"unsafeName":"subpackage","safeName":"subpackage"},"snakeCase":{"unsafeName":"subpackage","safeName":"subpackage"},"screamingSnakeCase":{"unsafeName":"SUBPACKAGE","safeName":"SUBPACKAGE"},"pascalCase":{"unsafeName":"Subpackage","safeName":"Subpackage"}},{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}],"packagePath":[{"originalName":"subpackage","camelCase":{"unsafeName":"subpackage","safeName":"subpackage"},"snakeCase":{"unsafeName":"subpackage","safeName":"subpackage"},"screamingSnakeCase":{"unsafeName":"SUBPACKAGE","safeName":"SUBPACKAGE"},"pascalCase":{"unsafeName":"Subpackage","safeName":"Subpackage"}}],"file":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}},"service":null,"types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_subpackage"],"webhooks":null,"navigationConfig":{"pointsTo":"subpackage_subpackage"},"hasEndpointsInTree":false,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"navigation-points-to"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{},"environments":null},"subpackages":{"subpackage_subpackage":{"name":{"originalName":"subpackage","camelCase":{"unsafeName":"subpackage","safeName":"subpackage"},"snakeCase":{"unsafeName":"subpackage","safeName":"subpackage"},"screamingSnakeCase":{"unsafeName":"SUBPACKAGE","safeName":"SUBPACKAGE"},"pascalCase":{"unsafeName":"Subpackage","safeName":"Subpackage"}},"fernFilepath":{"allParts":[{"originalName":"subpackage","camelCase":{"unsafeName":"subpackage","safeName":"subpackage"},"snakeCase":{"unsafeName":"subpackage","safeName":"subpackage"},"screamingSnakeCase":{"unsafeName":"SUBPACKAGE","safeName":"SUBPACKAGE"},"pascalCase":{"unsafeName":"Subpackage","safeName":"Subpackage"}}],"packagePath":[{"originalName":"subpackage","camelCase":{"unsafeName":"subpackage","safeName":"subpackage"},"snakeCase":{"unsafeName":"subpackage","safeName":"subpackage"},"screamingSnakeCase":{"unsafeName":"SUBPACKAGE","safeName":"SUBPACKAGE"},"pascalCase":{"unsafeName":"Subpackage","safeName":"Subpackage"}}],"file":null},"service":null,"types":[],"errors":[],"subpackages":["subpackage_subpackage/x"],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_subpackage/x":{"name":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}},"fernFilepath":{"allParts":[{"originalName":"subpackage","camelCase":{"unsafeName":"subpackage","safeName":"subpackage"},"snakeCase":{"unsafeName":"subpackage","safeName":"subpackage"},"screamingSnakeCase":{"unsafeName":"SUBPACKAGE","safeName":"SUBPACKAGE"},"pascalCase":{"unsafeName":"Subpackage","safeName":"Subpackage"}},{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}],"packagePath":[{"originalName":"subpackage","camelCase":{"unsafeName":"subpackage","safeName":"subpackage"},"snakeCase":{"unsafeName":"subpackage","safeName":"subpackage"},"screamingSnakeCase":{"unsafeName":"SUBPACKAGE","safeName":"SUBPACKAGE"},"pascalCase":{"unsafeName":"Subpackage","safeName":"Subpackage"}}],"file":{"originalName":"x","camelCase":{"unsafeName":"x","safeName":"x"},"snakeCase":{"unsafeName":"x","safeName":"x"},"screamingSnakeCase":{"unsafeName":"X","safeName":"X"},"pascalCase":{"unsafeName":"X","safeName":"X"}}},"service":null,"types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_subpackage"],"webhooks":null,"navigationConfig":{"pointsTo":"subpackage_subpackage"},"hasEndpointsInTree":false,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"nested-example-reference"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"api","camelCase":{"unsafeName":"api","safeName":"api"},"snakeCase":{"unsafeName":"api","safeName":"api"},"screamingSnakeCase":{"unsafeName":"API","safeName":"API"},"pascalCase":{"unsafeName":"Api","safeName":"Api"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[{"_type":"basic","username":{"originalName":"clientId","camelCase":{"unsafeName":"clientId","safeName":"clientId"},"snakeCase":{"unsafeName":"client_id","safeName":"client_id"},"screamingSnakeCase":{"unsafeName":"CLIENT_ID","safeName":"CLIENT_ID"},"pascalCase":{"unsafeName":"ClientId","safeName":"ClientId"}},"usernameEnvVar":null,"password":{"originalName":"clientSecret","camelCase":{"unsafeName":"clientSecret","safeName":"clientSecret"},"snakeCase":{"unsafeName":"client_secret","safeName":"client_secret"},"screamingSnakeCase":{"unsafeName":"CLIENT_SECRET","safeName":"CLIENT_SECRET"},"pascalCase":{"unsafeName":"ClientSecret","safeName":"ClientSecret"}},"passwordEnvVar":null,"docs":null}],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_nested:Response":{"inline":null,"name":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Response"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"wireValue":"a"},"valueType":{"_type":"container","container":{"_type":"optional","optional":{"_type":"container","container":{"_type":"map","keyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"valueType":{"_type":"named","name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product","default":null,"inline":null}}}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_nested:Product"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_nested:Product":{"inline":null,"name":{"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"c","camelCase":{"unsafeName":"c","safeName":"c"},"snakeCase":{"unsafeName":"c","safeName":"c"},"screamingSnakeCase":{"unsafeName":"C","safeName":"C"},"pascalCase":{"unsafeName":"C","safeName":"C"}},"wireValue":"c"},"valueType":{"_type":"container","container":{"_type":"optional","optional":{"_type":"unknown"}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_nested:StringAlias":{"inline":null,"name":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:StringAlias"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example","camelCase":{"unsafeName":"example","safeName":"example"},"snakeCase":{"unsafeName":"example","safeName":"example"},"screamingSnakeCase":{"unsafeName":"EXAMPLE","safeName":"EXAMPLE"},"pascalCase":{"unsafeName":"Example","safeName":"Example"}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"hello"}}},"jsonExample":"hello"}},"jsonExample":"hello","docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{},"services":{"service_nested":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}}},"displayName":null,"basePath":{"head":"/nested","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_nested.calculate","name":{"originalName":"calculate","camelCase":{"unsafeName":"calculate","safeName":"calculate"},"snakeCase":{"unsafeName":"calculate","safeName":"calculate"},"screamingSnakeCase":{"unsafeName":"CALCULATE","safeName":"CALCULATE"},"pascalCase":{"unsafeName":"Calculate","safeName":"Calculate"}},"displayName":null,"auth":true,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/nested","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":{"type":"json","value":{"type":"response","responseBodyType":{"_type":"named","name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Response","default":null,"inline":null},"docs":null}},"status-code":null},"errors":[],"userSpecifiedExamples":[{"example":{"id":"81ff28ae","name":null,"url":"/nested","rootPathParameters":[],"endpointPathParameters":[],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_nested:Response","fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"wireValue":"a"},"value":{"shape":{"type":"container","container":{"type":"optional","optional":{"shape":{"type":"container","container":{"type":"map","map":[{"key":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"b"}}},"jsonExample":"b"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_nested:Product","fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"c","camelCase":{"unsafeName":"c","safeName":"c"},"snakeCase":{"unsafeName":"c","safeName":"c"},"screamingSnakeCase":{"unsafeName":"C","safeName":"C"},"pascalCase":{"unsafeName":"C","safeName":"C"}},"wireValue":"c"},"value":{"shape":{"type":"container","container":{"type":"optional","optional":{"shape":{"type":"unknown","unknown":{"d":{"e":"$11","f":"hello"}}},"jsonExample":{"d":{"e":"$11","f":"hello"}}},"valueType":{"_type":"unknown"}}},"jsonExample":{"d":{"e":"$11","f":"hello"}}},"originalTypeDeclaration":{"typeId":"type_nested:Product","fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}}}}]}},"jsonExample":{"c":{"d":{"e":"$11","f":"hello"}}}}}],"keyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"valueType":{"_type":"named","name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product","default":null,"inline":null}}},"jsonExample":{"b":{"c":{"d":{"e":"$11","f":"hello"}}}}},"valueType":{"_type":"container","container":{"_type":"map","keyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"valueType":{"_type":"named","name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product","default":null,"inline":null}}}}},"jsonExample":{"b":{"c":{"d":{"e":"$11","f":"hello"}}}}},"originalTypeDeclaration":{"typeId":"type_nested:Response","fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}}}}]}},"jsonExample":{"a":{"b":{"c":{"d":{"e":"$11","f":"hello"}}}}}}}},"docs":null},"codeSamples":null}],"autogeneratedExamples":[{"example":{"id":"7dd0a93","url":"/nested","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":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"wireValue":"a"},"originalTypeDeclaration":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Response"},"value":{"shape":{"type":"container","container":{"type":"optional","optional":{"shape":{"type":"container","container":{"type":"map","map":[{"key":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"a"}}},"jsonExample":"a"},"value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"name":{"name":{"originalName":"c","camelCase":{"unsafeName":"c","safeName":"c"},"snakeCase":{"unsafeName":"c","safeName":"c"},"screamingSnakeCase":{"unsafeName":"C","safeName":"C"},"pascalCase":{"unsafeName":"C","safeName":"C"}},"wireValue":"c"},"originalTypeDeclaration":{"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product"},"value":{"shape":{"type":"container","container":{"type":"optional","optional":{"shape":{"type":"unknown","unknown":{"key":"value"}},"jsonExample":{"key":"value"}},"valueType":{"_type":"unknown"}}},"jsonExample":{"key":"value"}}}]},"typeName":{"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product"}},"jsonExample":{"c":{"key":"value"}}}}],"keyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"valueType":{"_type":"named","name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product","default":null,"inline":null}}},"jsonExample":{"a":{"c":{"key":"value"}}}},"valueType":{"_type":"container","container":{"_type":"map","keyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"valueType":{"_type":"named","name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product","default":null,"inline":null}}}}},"jsonExample":{"a":{"c":{"key":"value"}}}}}]},"typeName":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Response"}},"jsonExample":{"a":{"a":{"c":{"key":"value"}}}}}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{"service_nested":["type_nested:Response","type_nested:Product"]},"sharedTypes":["type_nested:StringAlias"]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_nested:Response":{"type":"object","declaration":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}}},"properties":[{"name":{"name":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"wireValue":"a"},"typeReference":{"type":"optional","value":{"type":"map","key":{"type":"primitive","value":"STRING"},"value":{"type":"named","value":"type_nested:Product"}}}}]},"type_nested:Product":{"type":"object","declaration":{"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}}},"properties":[{"name":{"name":{"originalName":"c","camelCase":{"unsafeName":"c","safeName":"c"},"snakeCase":{"unsafeName":"c","safeName":"c"},"screamingSnakeCase":{"unsafeName":"C","safeName":"C"},"pascalCase":{"unsafeName":"C","safeName":"C"}},"wireValue":"c"},"typeReference":{"type":"optional","value":{"type":"unknown"}}}]},"type_nested:StringAlias":{"type":"alias","declaration":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}}},"typeReference":{"type":"primitive","value":"STRING"}}},"headers":[],"endpoints":{"endpoint_nested.calculate":{"auth":{"type":"basic","username":{"originalName":"clientId","camelCase":{"unsafeName":"clientId","safeName":"clientId"},"snakeCase":{"unsafeName":"client_id","safeName":"client_id"},"screamingSnakeCase":{"unsafeName":"CLIENT_ID","safeName":"CLIENT_ID"},"pascalCase":{"unsafeName":"ClientId","safeName":"ClientId"}},"password":{"originalName":"clientSecret","camelCase":{"unsafeName":"clientSecret","safeName":"clientSecret"},"snakeCase":{"unsafeName":"client_secret","safeName":"client_secret"},"screamingSnakeCase":{"unsafeName":"CLIENT_SECRET","safeName":"CLIENT_SECRET"},"pascalCase":{"unsafeName":"ClientSecret","safeName":"ClientSecret"}}},"declaration":{"name":{"originalName":"calculate","camelCase":{"unsafeName":"calculate","safeName":"calculate"},"snakeCase":{"unsafeName":"calculate","safeName":"calculate"},"screamingSnakeCase":{"unsafeName":"CALCULATE","safeName":"CALCULATE"},"pascalCase":{"unsafeName":"Calculate","safeName":"Calculate"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}}},"location":{"method":"POST","path":"/nested"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}}}},"subpackages":{"subpackage_nested":{"name":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"service":"service_nested","types":["type_nested:Response","type_nested:Product","type_nested:StringAlias"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_nested"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":true,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"nested-example-reference"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"api","camelCase":{"unsafeName":"api","safeName":"api"},"snakeCase":{"unsafeName":"api","safeName":"api"},"screamingSnakeCase":{"unsafeName":"API","safeName":"API"},"pascalCase":{"unsafeName":"Api","safeName":"Api"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[{"_type":"basic","username":{"originalName":"clientId","camelCase":{"unsafeName":"clientId","safeName":"clientId"},"snakeCase":{"unsafeName":"client_id","safeName":"client_id"},"screamingSnakeCase":{"unsafeName":"CLIENT_ID","safeName":"CLIENT_ID"},"pascalCase":{"unsafeName":"ClientId","safeName":"ClientId"}},"usernameEnvVar":null,"password":{"originalName":"clientSecret","camelCase":{"unsafeName":"clientSecret","safeName":"clientSecret"},"snakeCase":{"unsafeName":"client_secret","safeName":"client_secret"},"screamingSnakeCase":{"unsafeName":"CLIENT_SECRET","safeName":"CLIENT_SECRET"},"pascalCase":{"unsafeName":"ClientSecret","safeName":"ClientSecret"}},"passwordEnvVar":null,"docs":null}],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_nested:Response":{"inline":null,"name":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Response"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"wireValue":"a"},"valueType":{"_type":"container","container":{"_type":"optional","optional":{"_type":"container","container":{"_type":"map","keyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"valueType":{"_type":"named","name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product","default":null,"inline":null}}}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_nested:Product"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_nested:Product":{"inline":null,"name":{"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"c","camelCase":{"unsafeName":"c","safeName":"c"},"snakeCase":{"unsafeName":"c","safeName":"c"},"screamingSnakeCase":{"unsafeName":"C","safeName":"C"},"pascalCase":{"unsafeName":"C","safeName":"C"}},"wireValue":"c"},"valueType":{"_type":"container","container":{"_type":"optional","optional":{"_type":"unknown"}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_nested:StringAlias":{"inline":null,"name":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:StringAlias"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example","camelCase":{"unsafeName":"example","safeName":"example"},"snakeCase":{"unsafeName":"example","safeName":"example"},"screamingSnakeCase":{"unsafeName":"EXAMPLE","safeName":"EXAMPLE"},"pascalCase":{"unsafeName":"Example","safeName":"Example"}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"hello"}}},"jsonExample":"hello"}},"jsonExample":"hello","docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{},"services":{"service_nested":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}}},"displayName":null,"basePath":{"head":"/nested","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_nested.calculate","name":{"originalName":"calculate","camelCase":{"unsafeName":"calculate","safeName":"calculate"},"snakeCase":{"unsafeName":"calculate","safeName":"calculate"},"screamingSnakeCase":{"unsafeName":"CALCULATE","safeName":"CALCULATE"},"pascalCase":{"unsafeName":"Calculate","safeName":"Calculate"}},"displayName":null,"auth":true,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/nested","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":{"type":"json","value":{"type":"response","responseBodyType":{"_type":"named","name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Response","default":null,"inline":null},"docs":null}},"status-code":null},"errors":[],"userSpecifiedExamples":[{"example":{"id":"81ff28ae","name":null,"url":"/nested","rootPathParameters":[],"endpointPathParameters":[],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_nested:Response","fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"wireValue":"a"},"value":{"shape":{"type":"container","container":{"type":"optional","optional":{"shape":{"type":"container","container":{"type":"map","map":[{"key":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"b"}}},"jsonExample":"b"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_nested:Product","fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"c","camelCase":{"unsafeName":"c","safeName":"c"},"snakeCase":{"unsafeName":"c","safeName":"c"},"screamingSnakeCase":{"unsafeName":"C","safeName":"C"},"pascalCase":{"unsafeName":"C","safeName":"C"}},"wireValue":"c"},"value":{"shape":{"type":"container","container":{"type":"optional","optional":{"shape":{"type":"unknown","unknown":{"d":{"e":"$11","f":"hello"}}},"jsonExample":{"d":{"e":"$11","f":"hello"}}},"valueType":{"_type":"unknown"}}},"jsonExample":{"d":{"e":"$11","f":"hello"}}},"originalTypeDeclaration":{"typeId":"type_nested:Product","fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}}}}]}},"jsonExample":{"c":{"d":{"e":"$11","f":"hello"}}}}}],"keyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"valueType":{"_type":"named","name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product","default":null,"inline":null}}},"jsonExample":{"b":{"c":{"d":{"e":"$11","f":"hello"}}}}},"valueType":{"_type":"container","container":{"_type":"map","keyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"valueType":{"_type":"named","name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product","default":null,"inline":null}}}}},"jsonExample":{"b":{"c":{"d":{"e":"$11","f":"hello"}}}}},"originalTypeDeclaration":{"typeId":"type_nested:Response","fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}}}}]}},"jsonExample":{"a":{"b":{"c":{"d":{"e":"$11","f":"hello"}}}}}}}},"docs":null},"codeSamples":null}],"autogeneratedExamples":[{"example":{"id":"7dd0a93","url":"/nested","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":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"wireValue":"a"},"originalTypeDeclaration":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Response"},"value":{"shape":{"type":"container","container":{"type":"optional","optional":{"shape":{"type":"container","container":{"type":"map","map":[{"key":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"a"}}},"jsonExample":"a"},"value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"name":{"name":{"originalName":"c","camelCase":{"unsafeName":"c","safeName":"c"},"snakeCase":{"unsafeName":"c","safeName":"c"},"screamingSnakeCase":{"unsafeName":"C","safeName":"C"},"pascalCase":{"unsafeName":"C","safeName":"C"}},"wireValue":"c"},"originalTypeDeclaration":{"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product"},"value":{"shape":{"type":"container","container":{"type":"optional","optional":{"shape":{"type":"unknown","unknown":{"key":"value"}},"jsonExample":{"key":"value"}},"valueType":{"_type":"unknown"}}},"jsonExample":{"key":"value"}}}]},"typeName":{"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product"}},"jsonExample":{"c":{"key":"value"}}}}],"keyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"valueType":{"_type":"named","name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product","default":null,"inline":null}}},"jsonExample":{"a":{"c":{"key":"value"}}}},"valueType":{"_type":"container","container":{"_type":"map","keyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"valueType":{"_type":"named","name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Product","default":null,"inline":null}}}}},"jsonExample":{"a":{"c":{"key":"value"}}}}}]},"typeName":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"typeId":"type_nested:Response"}},"jsonExample":{"a":{"a":{"c":{"key":"value"}}}}}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{"service_nested":["type_nested:Response","type_nested:Product"]},"sharedTypes":["type_nested:StringAlias"]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_nested:Response":{"type":"object","declaration":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}}},"properties":[{"name":{"name":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"wireValue":"a"},"typeReference":{"type":"optional","value":{"type":"map","key":{"type":"primitive","value":"STRING"},"value":{"type":"named","value":"type_nested:Product"}}}}]},"type_nested:Product":{"type":"object","declaration":{"name":{"originalName":"Product","camelCase":{"unsafeName":"product","safeName":"product"},"snakeCase":{"unsafeName":"product","safeName":"product"},"screamingSnakeCase":{"unsafeName":"PRODUCT","safeName":"PRODUCT"},"pascalCase":{"unsafeName":"Product","safeName":"Product"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}}},"properties":[{"name":{"name":{"originalName":"c","camelCase":{"unsafeName":"c","safeName":"c"},"snakeCase":{"unsafeName":"c","safeName":"c"},"screamingSnakeCase":{"unsafeName":"C","safeName":"C"},"pascalCase":{"unsafeName":"C","safeName":"C"}},"wireValue":"c"},"typeReference":{"type":"optional","value":{"type":"unknown"}}}]},"type_nested:StringAlias":{"type":"alias","declaration":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}}},"typeReference":{"type":"primitive","value":"STRING"}}},"headers":[],"endpoints":{"endpoint_nested.calculate":{"auth":{"type":"basic","username":{"originalName":"clientId","camelCase":{"unsafeName":"clientId","safeName":"clientId"},"snakeCase":{"unsafeName":"client_id","safeName":"client_id"},"screamingSnakeCase":{"unsafeName":"CLIENT_ID","safeName":"CLIENT_ID"},"pascalCase":{"unsafeName":"ClientId","safeName":"ClientId"}},"password":{"originalName":"clientSecret","camelCase":{"unsafeName":"clientSecret","safeName":"clientSecret"},"snakeCase":{"unsafeName":"client_secret","safeName":"client_secret"},"screamingSnakeCase":{"unsafeName":"CLIENT_SECRET","safeName":"CLIENT_SECRET"},"pascalCase":{"unsafeName":"ClientSecret","safeName":"ClientSecret"}}},"declaration":{"name":{"originalName":"calculate","camelCase":{"unsafeName":"calculate","safeName":"calculate"},"snakeCase":{"unsafeName":"calculate","safeName":"calculate"},"screamingSnakeCase":{"unsafeName":"CALCULATE","safeName":"CALCULATE"},"pascalCase":{"unsafeName":"Calculate","safeName":"Calculate"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}}},"location":{"method":"POST","path":"/nested"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}}},"environments":null},"subpackages":{"subpackage_nested":{"name":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}},"fernFilepath":{"allParts":[{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}],"packagePath":[],"file":{"originalName":"nested","camelCase":{"unsafeName":"nested","safeName":"nested"},"snakeCase":{"unsafeName":"nested","safeName":"nested"},"screamingSnakeCase":{"unsafeName":"NESTED","safeName":"NESTED"},"pascalCase":{"unsafeName":"Nested","safeName":"Nested"}}},"service":"service_nested","types":["type_nested:Response","type_nested:Product","type_nested:StringAlias"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_nested"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":true,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"packages"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"packages","camelCase":{"unsafeName":"packages","safeName":"packages"},"snakeCase":{"unsafeName":"packages","safeName":"packages"},"screamingSnakeCase":{"unsafeName":"PACKAGES","safeName":"PACKAGES"},"pascalCase":{"unsafeName":"Packages","safeName":"Packages"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_:RootString":{"inline":null,"name":{"name":{"originalName":"RootString","camelCase":{"unsafeName":"rootString","safeName":"rootString"},"snakeCase":{"unsafeName":"root_string","safeName":"root_string"},"screamingSnakeCase":{"unsafeName":"ROOT_STRING","safeName":"ROOT_STRING"},"pascalCase":{"unsafeName":"RootString","safeName":"RootString"}},"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"typeId":"type_:RootString"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_package:PackageString":{"inline":null,"name":{"name":{"originalName":"PackageString","camelCase":{"unsafeName":"packageString","safeName":"packageString"},"snakeCase":{"unsafeName":"package_string","safeName":"package_string"},"screamingSnakeCase":{"unsafeName":"PACKAGE_STRING","safeName":"PACKAGE_STRING"},"pascalCase":{"unsafeName":"PackageString","safeName":"PackageString"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":null},"typeId":"type_package:PackageString"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_importer:Foo":{"inline":null,"name":{"name":{"originalName":"Foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"fernFilepath":{"allParts":[{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}],"packagePath":[],"file":{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}},"typeId":"type_importer:Foo"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"wireValue":"root"},"valueType":{"_type":"named","name":{"originalName":"RootString","camelCase":{"unsafeName":"rootString","safeName":"rootString"},"snakeCase":{"unsafeName":"root_string","safeName":"root_string"},"screamingSnakeCase":{"unsafeName":"ROOT_STRING","safeName":"ROOT_STRING"},"pascalCase":{"unsafeName":"RootString","safeName":"RootString"}},"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"typeId":"type_:RootString","default":null,"inline":null},"availability":null,"docs":null},{"name":{"name":{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},"wireValue":"package"},"valueType":{"_type":"named","name":{"originalName":"PackageString","camelCase":{"unsafeName":"packageString","safeName":"packageString"},"snakeCase":{"unsafeName":"package_string","safeName":"package_string"},"screamingSnakeCase":{"unsafeName":"PACKAGE_STRING","safeName":"PACKAGE_STRING"},"pascalCase":{"unsafeName":"PackageString","safeName":"PackageString"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":null},"typeId":"type_package:PackageString","default":null,"inline":null},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_:RootString","type_package:PackageString"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_package/a:A":{"inline":null,"name":{"name":{"originalName":"A","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}},"typeId":"type_package/a:A"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{},"services":{"service_":{"availability":null,"name":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null}},"displayName":null,"basePath":{"head":"/","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_.rootEndpoint","name":{"originalName":"rootEndpoint","camelCase":{"unsafeName":"rootEndpoint","safeName":"rootEndpoint"},"snakeCase":{"unsafeName":"root_endpoint","safeName":"root_endpoint"},"screamingSnakeCase":{"unsafeName":"ROOT_ENDPOINT","safeName":"ROOT_ENDPOINT"},"pascalCase":{"unsafeName":"RootEndpoint","safeName":"RootEndpoint"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"GET","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"980dd56c","url":"","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]},"service_package":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":null}},"displayName":null,"basePath":{"head":"/","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":["type_:RootString","type_package:PackageString","type_importer:Foo","type_package/a:A"]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_:RootString":{"type":"alias","declaration":{"name":{"originalName":"RootString","camelCase":{"unsafeName":"rootString","safeName":"rootString"},"snakeCase":{"unsafeName":"root_string","safeName":"root_string"},"screamingSnakeCase":{"unsafeName":"ROOT_STRING","safeName":"ROOT_STRING"},"pascalCase":{"unsafeName":"RootString","safeName":"RootString"}},"fernFilepath":{"allParts":[],"packagePath":[],"file":null}},"typeReference":{"type":"primitive","value":"STRING"}},"type_package:PackageString":{"type":"alias","declaration":{"name":{"originalName":"PackageString","camelCase":{"unsafeName":"packageString","safeName":"packageString"},"snakeCase":{"unsafeName":"package_string","safeName":"package_string"},"screamingSnakeCase":{"unsafeName":"PACKAGE_STRING","safeName":"PACKAGE_STRING"},"pascalCase":{"unsafeName":"PackageString","safeName":"PackageString"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":null}},"typeReference":{"type":"primitive","value":"STRING"}},"type_importer:Foo":{"type":"object","declaration":{"name":{"originalName":"Foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"fernFilepath":{"allParts":[{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}],"packagePath":[],"file":{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}}},"properties":[{"name":{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"wireValue":"root"},"typeReference":{"type":"named","value":"type_:RootString"}},{"name":{"name":{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},"wireValue":"package"},"typeReference":{"type":"named","value":"type_package:PackageString"}}]},"type_package/a:A":{"type":"alias","declaration":{"name":{"originalName":"A","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}}},"typeReference":{"type":"primitive","value":"STRING"}}},"headers":[],"endpoints":{"endpoint_.rootEndpoint":{"auth":null,"declaration":{"name":{"originalName":"rootEndpoint","camelCase":{"unsafeName":"rootEndpoint","safeName":"rootEndpoint"},"snakeCase":{"unsafeName":"root_endpoint","safeName":"root_endpoint"},"screamingSnakeCase":{"unsafeName":"ROOT_ENDPOINT","safeName":"ROOT_ENDPOINT"},"pascalCase":{"unsafeName":"RootEndpoint","safeName":"RootEndpoint"}},"fernFilepath":{"allParts":[],"packagePath":[],"file":null}},"location":{"method":"GET","path":"/"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}}}},"subpackages":{"subpackage_package":{"name":{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":null},"service":"service_package","types":["type_package:PackageString"],"errors":[],"subpackages":["subpackage_package/b","subpackage_package/a"],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null},"subpackage_importer":{"name":{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}},"fernFilepath":{"allParts":[{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}],"packagePath":[],"file":{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}},"service":null,"types":["type_importer:Foo"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":"I'm an importer!"},"subpackage_package/a":{"name":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}},"service":null,"types":["type_package/a:A"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_package/b":{"name":{"originalName":"b","camelCase":{"unsafeName":"b","safeName":"b"},"snakeCase":{"unsafeName":"b","safeName":"b"},"screamingSnakeCase":{"unsafeName":"B","safeName":"B"},"pascalCase":{"unsafeName":"B","safeName":"B"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},{"originalName":"b","camelCase":{"unsafeName":"b","safeName":"b"},"snakeCase":{"unsafeName":"b","safeName":"b"},"screamingSnakeCase":{"unsafeName":"B","safeName":"B"},"pascalCase":{"unsafeName":"B","safeName":"B"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":{"originalName":"b","camelCase":{"unsafeName":"b","safeName":"b"},"snakeCase":{"unsafeName":"b","safeName":"b"},"screamingSnakeCase":{"unsafeName":"B","safeName":"B"},"pascalCase":{"unsafeName":"B","safeName":"B"}}},"service":null,"types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":"service_","types":["type_:RootString"],"errors":[],"subpackages":["subpackage_package","subpackage_importer"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"packages"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"packages","camelCase":{"unsafeName":"packages","safeName":"packages"},"snakeCase":{"unsafeName":"packages","safeName":"packages"},"screamingSnakeCase":{"unsafeName":"PACKAGES","safeName":"PACKAGES"},"pascalCase":{"unsafeName":"Packages","safeName":"Packages"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_:RootString":{"inline":null,"name":{"name":{"originalName":"RootString","camelCase":{"unsafeName":"rootString","safeName":"rootString"},"snakeCase":{"unsafeName":"root_string","safeName":"root_string"},"screamingSnakeCase":{"unsafeName":"ROOT_STRING","safeName":"ROOT_STRING"},"pascalCase":{"unsafeName":"RootString","safeName":"RootString"}},"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"typeId":"type_:RootString"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_package:PackageString":{"inline":null,"name":{"name":{"originalName":"PackageString","camelCase":{"unsafeName":"packageString","safeName":"packageString"},"snakeCase":{"unsafeName":"package_string","safeName":"package_string"},"screamingSnakeCase":{"unsafeName":"PACKAGE_STRING","safeName":"PACKAGE_STRING"},"pascalCase":{"unsafeName":"PackageString","safeName":"PackageString"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":null},"typeId":"type_package:PackageString"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_importer:Foo":{"inline":null,"name":{"name":{"originalName":"Foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"fernFilepath":{"allParts":[{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}],"packagePath":[],"file":{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}},"typeId":"type_importer:Foo"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"wireValue":"root"},"valueType":{"_type":"named","name":{"originalName":"RootString","camelCase":{"unsafeName":"rootString","safeName":"rootString"},"snakeCase":{"unsafeName":"root_string","safeName":"root_string"},"screamingSnakeCase":{"unsafeName":"ROOT_STRING","safeName":"ROOT_STRING"},"pascalCase":{"unsafeName":"RootString","safeName":"RootString"}},"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"typeId":"type_:RootString","default":null,"inline":null},"availability":null,"docs":null},{"name":{"name":{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},"wireValue":"package"},"valueType":{"_type":"named","name":{"originalName":"PackageString","camelCase":{"unsafeName":"packageString","safeName":"packageString"},"snakeCase":{"unsafeName":"package_string","safeName":"package_string"},"screamingSnakeCase":{"unsafeName":"PACKAGE_STRING","safeName":"PACKAGE_STRING"},"pascalCase":{"unsafeName":"PackageString","safeName":"PackageString"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":null},"typeId":"type_package:PackageString","default":null,"inline":null},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_:RootString","type_package:PackageString"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_package/a:A":{"inline":null,"name":{"name":{"originalName":"A","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}},"typeId":"type_package/a:A"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{},"services":{"service_":{"availability":null,"name":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null}},"displayName":null,"basePath":{"head":"/","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_.rootEndpoint","name":{"originalName":"rootEndpoint","camelCase":{"unsafeName":"rootEndpoint","safeName":"rootEndpoint"},"snakeCase":{"unsafeName":"root_endpoint","safeName":"root_endpoint"},"screamingSnakeCase":{"unsafeName":"ROOT_ENDPOINT","safeName":"ROOT_ENDPOINT"},"pascalCase":{"unsafeName":"RootEndpoint","safeName":"RootEndpoint"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"GET","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"980dd56c","url":"","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]},"service_package":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":null}},"displayName":null,"basePath":{"head":"/","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":["type_:RootString","type_package:PackageString","type_importer:Foo","type_package/a:A"]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_:RootString":{"type":"alias","declaration":{"name":{"originalName":"RootString","camelCase":{"unsafeName":"rootString","safeName":"rootString"},"snakeCase":{"unsafeName":"root_string","safeName":"root_string"},"screamingSnakeCase":{"unsafeName":"ROOT_STRING","safeName":"ROOT_STRING"},"pascalCase":{"unsafeName":"RootString","safeName":"RootString"}},"fernFilepath":{"allParts":[],"packagePath":[],"file":null}},"typeReference":{"type":"primitive","value":"STRING"}},"type_package:PackageString":{"type":"alias","declaration":{"name":{"originalName":"PackageString","camelCase":{"unsafeName":"packageString","safeName":"packageString"},"snakeCase":{"unsafeName":"package_string","safeName":"package_string"},"screamingSnakeCase":{"unsafeName":"PACKAGE_STRING","safeName":"PACKAGE_STRING"},"pascalCase":{"unsafeName":"PackageString","safeName":"PackageString"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":null}},"typeReference":{"type":"primitive","value":"STRING"}},"type_importer:Foo":{"type":"object","declaration":{"name":{"originalName":"Foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"fernFilepath":{"allParts":[{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}],"packagePath":[],"file":{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}}},"properties":[{"name":{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"wireValue":"root"},"typeReference":{"type":"named","value":"type_:RootString"}},{"name":{"name":{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},"wireValue":"package"},"typeReference":{"type":"named","value":"type_package:PackageString"}}]},"type_package/a:A":{"type":"alias","declaration":{"name":{"originalName":"A","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}}},"typeReference":{"type":"primitive","value":"STRING"}}},"headers":[],"endpoints":{"endpoint_.rootEndpoint":{"auth":null,"declaration":{"name":{"originalName":"rootEndpoint","camelCase":{"unsafeName":"rootEndpoint","safeName":"rootEndpoint"},"snakeCase":{"unsafeName":"root_endpoint","safeName":"root_endpoint"},"screamingSnakeCase":{"unsafeName":"ROOT_ENDPOINT","safeName":"ROOT_ENDPOINT"},"pascalCase":{"unsafeName":"RootEndpoint","safeName":"RootEndpoint"}},"fernFilepath":{"allParts":[],"packagePath":[],"file":null}},"location":{"method":"GET","path":"/"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}}},"environments":null},"subpackages":{"subpackage_package":{"name":{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":null},"service":"service_package","types":["type_package:PackageString"],"errors":[],"subpackages":["subpackage_package/b","subpackage_package/a"],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null},"subpackage_importer":{"name":{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}},"fernFilepath":{"allParts":[{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}],"packagePath":[],"file":{"originalName":"importer","camelCase":{"unsafeName":"importer","safeName":"importer"},"snakeCase":{"unsafeName":"importer","safeName":"importer"},"screamingSnakeCase":{"unsafeName":"IMPORTER","safeName":"IMPORTER"},"pascalCase":{"unsafeName":"Importer","safeName":"Importer"}}},"service":null,"types":["type_importer:Foo"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":"I'm an importer!"},"subpackage_package/a":{"name":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":{"originalName":"a","camelCase":{"unsafeName":"a","safeName":"a"},"snakeCase":{"unsafeName":"a","safeName":"a"},"screamingSnakeCase":{"unsafeName":"A","safeName":"A"},"pascalCase":{"unsafeName":"A","safeName":"A"}}},"service":null,"types":["type_package/a:A"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_package/b":{"name":{"originalName":"b","camelCase":{"unsafeName":"b","safeName":"b"},"snakeCase":{"unsafeName":"b","safeName":"b"},"screamingSnakeCase":{"unsafeName":"B","safeName":"B"},"pascalCase":{"unsafeName":"B","safeName":"B"}},"fernFilepath":{"allParts":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}},{"originalName":"b","camelCase":{"unsafeName":"b","safeName":"b"},"snakeCase":{"unsafeName":"b","safeName":"b"},"screamingSnakeCase":{"unsafeName":"B","safeName":"B"},"pascalCase":{"unsafeName":"B","safeName":"B"}}],"packagePath":[{"originalName":"package","camelCase":{"unsafeName":"package","safeName":"package"},"snakeCase":{"unsafeName":"package","safeName":"package"},"screamingSnakeCase":{"unsafeName":"PACKAGE","safeName":"PACKAGE"},"pascalCase":{"unsafeName":"Package","safeName":"Package"}}],"file":{"originalName":"b","camelCase":{"unsafeName":"b","safeName":"b"},"snakeCase":{"unsafeName":"b","safeName":"b"},"screamingSnakeCase":{"unsafeName":"B","safeName":"B"},"pascalCase":{"unsafeName":"B","safeName":"B"}}},"service":null,"types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":"service_","types":["type_:RootString"],"errors":[],"subpackages":["subpackage_package","subpackage_importer"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"response-property"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"response-property","camelCase":{"unsafeName":"responseProperty","safeName":"responseProperty"},"snakeCase":{"unsafeName":"response_property","safeName":"response_property"},"screamingSnakeCase":{"unsafeName":"RESPONSE_PROPERTY","safeName":"RESPONSE_PROPERTY"},"pascalCase":{"unsafeName":"ResponseProperty","safeName":"ResponseProperty"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_service:WithDocs":{"inline":null,"name":{"name":{"originalName":"WithDocs","camelCase":{"unsafeName":"withDocs","safeName":"withDocs"},"snakeCase":{"unsafeName":"with_docs","safeName":"with_docs"},"screamingSnakeCase":{"unsafeName":"WITH_DOCS","safeName":"WITH_DOCS"},"pascalCase":{"unsafeName":"WithDocs","safeName":"WithDocs"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:WithDocs"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"docs","camelCase":{"unsafeName":"docs","safeName":"docs"},"snakeCase":{"unsafeName":"docs","safeName":"docs"},"screamingSnakeCase":{"unsafeName":"DOCS","safeName":"DOCS"},"pascalCase":{"unsafeName":"Docs","safeName":"Docs"}},"wireValue":"docs"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_service:Movie":{"inline":null,"name":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie"},"shape":{"_type":"object","extends":[],"properties":[{"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"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_service:Response":{"inline":null,"name":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response"},"shape":{"_type":"object","extends":[{"name":{"originalName":"WithDocs","camelCase":{"unsafeName":"withDocs","safeName":"withDocs"},"snakeCase":{"unsafeName":"with_docs","safeName":"with_docs"},"screamingSnakeCase":{"unsafeName":"WITH_DOCS","safeName":"WITH_DOCS"},"pascalCase":{"unsafeName":"WithDocs","safeName":"WithDocs"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:WithDocs"}],"properties":[{"name":{"name":{"originalName":"data","camelCase":{"unsafeName":"data","safeName":"data"},"snakeCase":{"unsafeName":"data","safeName":"data"},"screamingSnakeCase":{"unsafeName":"DATA","safeName":"DATA"},"pascalCase":{"unsafeName":"Data","safeName":"Data"}},"wireValue":"data"},"valueType":{"_type":"named","name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie","default":null,"inline":null},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[{"name":{"name":{"originalName":"docs","camelCase":{"unsafeName":"docs","safeName":"docs"},"snakeCase":{"unsafeName":"docs","safeName":"docs"},"screamingSnakeCase":{"unsafeName":"DOCS","safeName":"DOCS"},"pascalCase":{"unsafeName":"Docs","safeName":"Docs"}},"wireValue":"docs"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}]},"referencedTypes":["type_service:WithDocs","type_service:Movie"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{},"services":{"service_service":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"displayName":null,"basePath":{"head":"","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_service.getMovie","name":{"originalName":"getMovie","camelCase":{"unsafeName":"getMovie","safeName":"getMovie"},"snakeCase":{"unsafeName":"get_movie","safeName":"get_movie"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE","safeName":"GET_MOVIE"},"pascalCase":{"unsafeName":"GetMovie","safeName":"GetMovie"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"/movie","parts":[]},"fullPath":{"head":"movie","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"contentType":null,"docs":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":"nestedPropertyAsResponse","responseBodyType":{"_type":"named","name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response","default":null,"inline":null},"responseProperty":{"name":{"name":{"originalName":"data","camelCase":{"unsafeName":"data","safeName":"data"},"snakeCase":{"unsafeName":"data","safeName":"data"},"screamingSnakeCase":{"unsafeName":"DATA","safeName":"DATA"},"pascalCase":{"unsafeName":"Data","safeName":"Data"}},"wireValue":"data"},"valueType":{"_type":"named","name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie","default":null,"inline":null},"availability":null,"docs":null},"docs":null}},"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"249764e1","url":"/movie","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":{"type":"reference","shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"name":{"name":{"originalName":"data","camelCase":{"unsafeName":"data","safeName":"data"},"snakeCase":{"unsafeName":"data","safeName":"data"},"screamingSnakeCase":{"unsafeName":"DATA","safeName":"DATA"},"pascalCase":{"unsafeName":"Data","safeName":"Data"}},"wireValue":"data"},"originalTypeDeclaration":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response"},"value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"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"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id"}}},"jsonExample":"id"}}]},"typeName":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie"}},"jsonExample":{"id":"id"}}}]},"typeName":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response"}},"jsonExample":{"data":{"id":"id"}}}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_service.getMovieDocs","name":{"originalName":"getMovieDocs","camelCase":{"unsafeName":"getMovieDocs","safeName":"getMovieDocs"},"snakeCase":{"unsafeName":"get_movie_docs","safeName":"get_movie_docs"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE_DOCS","safeName":"GET_MOVIE_DOCS"},"pascalCase":{"unsafeName":"GetMovieDocs","safeName":"GetMovieDocs"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"/movie","parts":[]},"fullPath":{"head":"movie","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"contentType":null,"docs":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":"nestedPropertyAsResponse","responseBodyType":{"_type":"named","name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response","default":null,"inline":null},"responseProperty":{"name":{"name":{"originalName":"docs","camelCase":{"unsafeName":"docs","safeName":"docs"},"snakeCase":{"unsafeName":"docs","safeName":"docs"},"screamingSnakeCase":{"unsafeName":"DOCS","safeName":"DOCS"},"pascalCase":{"unsafeName":"Docs","safeName":"Docs"}},"wireValue":"docs"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},"docs":null}},"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"249764e1","url":"/movie","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":{"type":"reference","shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"name":{"name":{"originalName":"data","camelCase":{"unsafeName":"data","safeName":"data"},"snakeCase":{"unsafeName":"data","safeName":"data"},"screamingSnakeCase":{"unsafeName":"DATA","safeName":"DATA"},"pascalCase":{"unsafeName":"Data","safeName":"Data"}},"wireValue":"data"},"originalTypeDeclaration":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response"},"value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"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"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id"}}},"jsonExample":"id"}}]},"typeName":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie"}},"jsonExample":{"id":"id"}}}]},"typeName":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response"}},"jsonExample":{"data":{"id":"id"}}}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{"service_service":["type_service:WithDocs","type_service:Movie","type_service:Response"]},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_service:WithDocs":{"type":"object","declaration":{"name":{"originalName":"WithDocs","camelCase":{"unsafeName":"withDocs","safeName":"withDocs"},"snakeCase":{"unsafeName":"with_docs","safeName":"with_docs"},"screamingSnakeCase":{"unsafeName":"WITH_DOCS","safeName":"WITH_DOCS"},"pascalCase":{"unsafeName":"WithDocs","safeName":"WithDocs"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"properties":[{"name":{"name":{"originalName":"docs","camelCase":{"unsafeName":"docs","safeName":"docs"},"snakeCase":{"unsafeName":"docs","safeName":"docs"},"screamingSnakeCase":{"unsafeName":"DOCS","safeName":"DOCS"},"pascalCase":{"unsafeName":"Docs","safeName":"Docs"}},"wireValue":"docs"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_service:Movie":{"type":"object","declaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"properties":[{"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"}}]},"type_service:Response":{"type":"object","declaration":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"properties":[{"name":{"name":{"originalName":"docs","camelCase":{"unsafeName":"docs","safeName":"docs"},"snakeCase":{"unsafeName":"docs","safeName":"docs"},"screamingSnakeCase":{"unsafeName":"DOCS","safeName":"DOCS"},"pascalCase":{"unsafeName":"Docs","safeName":"Docs"}},"wireValue":"docs"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"data","camelCase":{"unsafeName":"data","safeName":"data"},"snakeCase":{"unsafeName":"data","safeName":"data"},"screamingSnakeCase":{"unsafeName":"DATA","safeName":"DATA"},"pascalCase":{"unsafeName":"Data","safeName":"Data"}},"wireValue":"data"},"typeReference":{"type":"named","value":"type_service:Movie"}}]}},"headers":[],"endpoints":{"endpoint_service.getMovie":{"auth":null,"declaration":{"name":{"originalName":"getMovie","camelCase":{"unsafeName":"getMovie","safeName":"getMovie"},"snakeCase":{"unsafeName":"get_movie","safeName":"get_movie"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE","safeName":"GET_MOVIE"},"pascalCase":{"unsafeName":"GetMovie","safeName":"GetMovie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"location":{"method":"POST","path":"/movie"},"request":{"type":"body","pathParameters":[],"body":{"type":"typeReference","value":{"type":"primitive","value":"STRING"}}},"response":{"type":"json"}},"endpoint_service.getMovieDocs":{"auth":null,"declaration":{"name":{"originalName":"getMovieDocs","camelCase":{"unsafeName":"getMovieDocs","safeName":"getMovieDocs"},"snakeCase":{"unsafeName":"get_movie_docs","safeName":"get_movie_docs"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE_DOCS","safeName":"GET_MOVIE_DOCS"},"pascalCase":{"unsafeName":"GetMovieDocs","safeName":"GetMovieDocs"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"location":{"method":"POST","path":"/movie"},"request":{"type":"body","pathParameters":[],"body":{"type":"typeReference","value":{"type":"primitive","value":"STRING"}}},"response":{"type":"json"}}}},"subpackages":{"subpackage_service":{"name":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"service":"service_service","types":["type_service:WithDocs","type_service:Movie","type_service:Response"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_service"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"response-property"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"response-property","camelCase":{"unsafeName":"responseProperty","safeName":"responseProperty"},"snakeCase":{"unsafeName":"response_property","safeName":"response_property"},"screamingSnakeCase":{"unsafeName":"RESPONSE_PROPERTY","safeName":"RESPONSE_PROPERTY"},"pascalCase":{"unsafeName":"ResponseProperty","safeName":"ResponseProperty"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_service:WithDocs":{"inline":null,"name":{"name":{"originalName":"WithDocs","camelCase":{"unsafeName":"withDocs","safeName":"withDocs"},"snakeCase":{"unsafeName":"with_docs","safeName":"with_docs"},"screamingSnakeCase":{"unsafeName":"WITH_DOCS","safeName":"WITH_DOCS"},"pascalCase":{"unsafeName":"WithDocs","safeName":"WithDocs"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:WithDocs"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"docs","camelCase":{"unsafeName":"docs","safeName":"docs"},"snakeCase":{"unsafeName":"docs","safeName":"docs"},"screamingSnakeCase":{"unsafeName":"DOCS","safeName":"DOCS"},"pascalCase":{"unsafeName":"Docs","safeName":"Docs"}},"wireValue":"docs"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_service:Movie":{"inline":null,"name":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie"},"shape":{"_type":"object","extends":[],"properties":[{"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"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_service:Response":{"inline":null,"name":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response"},"shape":{"_type":"object","extends":[{"name":{"originalName":"WithDocs","camelCase":{"unsafeName":"withDocs","safeName":"withDocs"},"snakeCase":{"unsafeName":"with_docs","safeName":"with_docs"},"screamingSnakeCase":{"unsafeName":"WITH_DOCS","safeName":"WITH_DOCS"},"pascalCase":{"unsafeName":"WithDocs","safeName":"WithDocs"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:WithDocs"}],"properties":[{"name":{"name":{"originalName":"data","camelCase":{"unsafeName":"data","safeName":"data"},"snakeCase":{"unsafeName":"data","safeName":"data"},"screamingSnakeCase":{"unsafeName":"DATA","safeName":"DATA"},"pascalCase":{"unsafeName":"Data","safeName":"Data"}},"wireValue":"data"},"valueType":{"_type":"named","name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie","default":null,"inline":null},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[{"name":{"name":{"originalName":"docs","camelCase":{"unsafeName":"docs","safeName":"docs"},"snakeCase":{"unsafeName":"docs","safeName":"docs"},"screamingSnakeCase":{"unsafeName":"DOCS","safeName":"DOCS"},"pascalCase":{"unsafeName":"Docs","safeName":"Docs"}},"wireValue":"docs"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}]},"referencedTypes":["type_service:WithDocs","type_service:Movie"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{},"services":{"service_service":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"displayName":null,"basePath":{"head":"","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_service.getMovie","name":{"originalName":"getMovie","camelCase":{"unsafeName":"getMovie","safeName":"getMovie"},"snakeCase":{"unsafeName":"get_movie","safeName":"get_movie"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE","safeName":"GET_MOVIE"},"pascalCase":{"unsafeName":"GetMovie","safeName":"GetMovie"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"/movie","parts":[]},"fullPath":{"head":"movie","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"contentType":null,"docs":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":"nestedPropertyAsResponse","responseBodyType":{"_type":"named","name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response","default":null,"inline":null},"responseProperty":{"name":{"name":{"originalName":"data","camelCase":{"unsafeName":"data","safeName":"data"},"snakeCase":{"unsafeName":"data","safeName":"data"},"screamingSnakeCase":{"unsafeName":"DATA","safeName":"DATA"},"pascalCase":{"unsafeName":"Data","safeName":"Data"}},"wireValue":"data"},"valueType":{"_type":"named","name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie","default":null,"inline":null},"availability":null,"docs":null},"docs":null}},"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"249764e1","url":"/movie","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":{"type":"reference","shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"name":{"name":{"originalName":"data","camelCase":{"unsafeName":"data","safeName":"data"},"snakeCase":{"unsafeName":"data","safeName":"data"},"screamingSnakeCase":{"unsafeName":"DATA","safeName":"DATA"},"pascalCase":{"unsafeName":"Data","safeName":"Data"}},"wireValue":"data"},"originalTypeDeclaration":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response"},"value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"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"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id"}}},"jsonExample":"id"}}]},"typeName":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie"}},"jsonExample":{"id":"id"}}}]},"typeName":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response"}},"jsonExample":{"data":{"id":"id"}}}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_service.getMovieDocs","name":{"originalName":"getMovieDocs","camelCase":{"unsafeName":"getMovieDocs","safeName":"getMovieDocs"},"snakeCase":{"unsafeName":"get_movie_docs","safeName":"get_movie_docs"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE_DOCS","safeName":"GET_MOVIE_DOCS"},"pascalCase":{"unsafeName":"GetMovieDocs","safeName":"GetMovieDocs"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"/movie","parts":[]},"fullPath":{"head":"movie","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"contentType":null,"docs":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":"nestedPropertyAsResponse","responseBodyType":{"_type":"named","name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response","default":null,"inline":null},"responseProperty":{"name":{"name":{"originalName":"docs","camelCase":{"unsafeName":"docs","safeName":"docs"},"snakeCase":{"unsafeName":"docs","safeName":"docs"},"screamingSnakeCase":{"unsafeName":"DOCS","safeName":"DOCS"},"pascalCase":{"unsafeName":"Docs","safeName":"Docs"}},"wireValue":"docs"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},"docs":null}},"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"249764e1","url":"/movie","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[],"request":{"type":"reference","shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"name":{"name":{"originalName":"data","camelCase":{"unsafeName":"data","safeName":"data"},"snakeCase":{"unsafeName":"data","safeName":"data"},"screamingSnakeCase":{"unsafeName":"DATA","safeName":"DATA"},"pascalCase":{"unsafeName":"Data","safeName":"Data"}},"wireValue":"data"},"originalTypeDeclaration":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response"},"value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"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"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id"}}},"jsonExample":"id"}}]},"typeName":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Movie"}},"jsonExample":{"id":"id"}}}]},"typeName":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"typeId":"type_service:Response"}},"jsonExample":{"data":{"id":"id"}}}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{"service_service":["type_service:WithDocs","type_service:Movie","type_service:Response"]},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_service:WithDocs":{"type":"object","declaration":{"name":{"originalName":"WithDocs","camelCase":{"unsafeName":"withDocs","safeName":"withDocs"},"snakeCase":{"unsafeName":"with_docs","safeName":"with_docs"},"screamingSnakeCase":{"unsafeName":"WITH_DOCS","safeName":"WITH_DOCS"},"pascalCase":{"unsafeName":"WithDocs","safeName":"WithDocs"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"properties":[{"name":{"name":{"originalName":"docs","camelCase":{"unsafeName":"docs","safeName":"docs"},"snakeCase":{"unsafeName":"docs","safeName":"docs"},"screamingSnakeCase":{"unsafeName":"DOCS","safeName":"DOCS"},"pascalCase":{"unsafeName":"Docs","safeName":"Docs"}},"wireValue":"docs"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_service:Movie":{"type":"object","declaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"properties":[{"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"}}]},"type_service:Response":{"type":"object","declaration":{"name":{"originalName":"Response","camelCase":{"unsafeName":"response","safeName":"response"},"snakeCase":{"unsafeName":"response","safeName":"response"},"screamingSnakeCase":{"unsafeName":"RESPONSE","safeName":"RESPONSE"},"pascalCase":{"unsafeName":"Response","safeName":"Response"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"properties":[{"name":{"name":{"originalName":"docs","camelCase":{"unsafeName":"docs","safeName":"docs"},"snakeCase":{"unsafeName":"docs","safeName":"docs"},"screamingSnakeCase":{"unsafeName":"DOCS","safeName":"DOCS"},"pascalCase":{"unsafeName":"Docs","safeName":"Docs"}},"wireValue":"docs"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"data","camelCase":{"unsafeName":"data","safeName":"data"},"snakeCase":{"unsafeName":"data","safeName":"data"},"screamingSnakeCase":{"unsafeName":"DATA","safeName":"DATA"},"pascalCase":{"unsafeName":"Data","safeName":"Data"}},"wireValue":"data"},"typeReference":{"type":"named","value":"type_service:Movie"}}]}},"headers":[],"endpoints":{"endpoint_service.getMovie":{"auth":null,"declaration":{"name":{"originalName":"getMovie","camelCase":{"unsafeName":"getMovie","safeName":"getMovie"},"snakeCase":{"unsafeName":"get_movie","safeName":"get_movie"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE","safeName":"GET_MOVIE"},"pascalCase":{"unsafeName":"GetMovie","safeName":"GetMovie"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"location":{"method":"POST","path":"/movie"},"request":{"type":"body","pathParameters":[],"body":{"type":"typeReference","value":{"type":"primitive","value":"STRING"}}},"response":{"type":"json"}},"endpoint_service.getMovieDocs":{"auth":null,"declaration":{"name":{"originalName":"getMovieDocs","camelCase":{"unsafeName":"getMovieDocs","safeName":"getMovieDocs"},"snakeCase":{"unsafeName":"get_movie_docs","safeName":"get_movie_docs"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE_DOCS","safeName":"GET_MOVIE_DOCS"},"pascalCase":{"unsafeName":"GetMovieDocs","safeName":"GetMovieDocs"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"location":{"method":"POST","path":"/movie"},"request":{"type":"body","pathParameters":[],"body":{"type":"typeReference","value":{"type":"primitive","value":"STRING"}}},"response":{"type":"json"}}},"environments":null},"subpackages":{"subpackage_service":{"name":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"service":"service_service","types":["type_service:WithDocs","type_service:Movie","type_service:Response"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_service"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"simple","audiences":["internal"]} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":"foo bar baz","auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"valueType":{"_type":"container","container":{"_type":"optional","optional":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}}},"env":null,"availability":null,"docs":null}],"idempotencyHeaders":[],"types":{"type_commons:Internal":{"inline":null,"name":{"name":{"originalName":"Internal","camelCase":{"unsafeName":"internal","safeName":"internal"},"snakeCase":{"unsafeName":"internal","safeName":"internal"},"screamingSnakeCase":{"unsafeName":"INTERNAL","safeName":"INTERNAL"},"pascalCase":{"unsafeName":"Internal","safeName":"Internal"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Internal"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:UnknownRequest":{"inline":null,"name":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"},"shape":{"_type":"object","extends":[],"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"},"valueType":{"_type":"unknown"},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{"error_commons:BadRequestError":{"name":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"discriminantValue":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"wireValue":"BadRequestError"},"statusCode":400,"type":null,"examples":[],"docs":null}},"services":{"service_imdb":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_imdb.internalEndpoint","name":{"originalName":"internalEndpoint","camelCase":{"unsafeName":"internalEndpoint","safeName":"internalEndpoint"},"snakeCase":{"unsafeName":"internal_endpoint","safeName":"internal_endpoint"},"screamingSnakeCase":{"unsafeName":"INTERNAL_ENDPOINT","safeName":"INTERNAL_ENDPOINT"},"pascalCase":{"unsafeName":"InternalEndpoint","safeName":"InternalEndpoint"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies"}]},"pathParameters":[],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"named","name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest","default":null,"inline":null},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"named","name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest","default":null,"inline":null},"contentType":null,"docs":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":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"docs":null}},"status-code":null},"errors":[{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"cedf7838","url":"/test/rootPathParam/movies","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":{"type":"reference","shape":{"type":"named","shape":{"type":"object","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"},"originalTypeDeclaration":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"},"value":{"shape":{"type":"unknown","unknown":{"key":"value"}},"jsonExample":{"key":"value"}}}]},"typeName":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"}},"jsonExample":{"unknown":{"key":"value"}}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"property","discriminant":{"name":{"originalName":"error","camelCase":{"unsafeName":"error","safeName":"error"},"snakeCase":{"unsafeName":"error","safeName":"error"},"screamingSnakeCase":{"unsafeName":"ERROR","safeName":"ERROR"},"pascalCase":{"unsafeName":"Error","safeName":"Error"}},"wireValue":"error"},"contentProperty":{"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"}},"basePath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":""}]},"pathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"variables":[],"serviceTypeReferenceInfo":{"sharedTypes":["type_commons:Internal"],"typesReferencedOnlyByService":{"service_imdb":["type_imdb:UnknownRequest"]}},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_commons:Internal":{"type":"object","declaration":{"name":{"originalName":"Internal","camelCase":{"unsafeName":"internal","safeName":"internal"},"snakeCase":{"unsafeName":"internal","safeName":"internal"},"screamingSnakeCase":{"unsafeName":"INTERNAL","safeName":"INTERNAL"},"pascalCase":{"unsafeName":"Internal","safeName":"Internal"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_imdb:UnknownRequest":{"type":"object","declaration":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"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"}}]}},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"typeReference":{"type":"optional","value":{"type":"primitive","value":"STRING"}}}],"endpoints":{"endpoint_imdb.internalEndpoint":{"auth":null,"declaration":{"name":{"originalName":"internalEndpoint","camelCase":{"unsafeName":"internalEndpoint","safeName":"internalEndpoint"},"snakeCase":{"unsafeName":"internal_endpoint","safeName":"internal_endpoint"},"screamingSnakeCase":{"unsafeName":"INTERNAL_ENDPOINT","safeName":"INTERNAL_ENDPOINT"},"pascalCase":{"unsafeName":"InternalEndpoint","safeName":"InternalEndpoint"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"POST","path":"/test/{rootPathParam}/movies"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}}],"body":{"type":"typeReference","value":{"type":"named","value":"type_imdb:UnknownRequest"}}},"response":{"type":"json"}}}},"subpackages":{"subpackage_commons":{"name":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"service":null,"types":["type_commons:Internal"],"errors":["error_commons:BadRequestError"],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_imdb":{"name":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"service":"service_imdb","types":["type_imdb:UnknownRequest"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_commons","subpackage_imdb"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"simple","audiences":["internal"]} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":"foo bar baz","auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"valueType":{"_type":"container","container":{"_type":"optional","optional":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}}},"env":null,"availability":null,"docs":null}],"idempotencyHeaders":[],"types":{"type_commons:Internal":{"inline":null,"name":{"name":{"originalName":"Internal","camelCase":{"unsafeName":"internal","safeName":"internal"},"snakeCase":{"unsafeName":"internal","safeName":"internal"},"screamingSnakeCase":{"unsafeName":"INTERNAL","safeName":"INTERNAL"},"pascalCase":{"unsafeName":"Internal","safeName":"Internal"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Internal"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:UnknownRequest":{"inline":null,"name":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"},"shape":{"_type":"object","extends":[],"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"},"valueType":{"_type":"unknown"},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{"error_commons:BadRequestError":{"name":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"discriminantValue":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"wireValue":"BadRequestError"},"statusCode":400,"type":null,"examples":[],"docs":null}},"services":{"service_imdb":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_imdb.internalEndpoint","name":{"originalName":"internalEndpoint","camelCase":{"unsafeName":"internalEndpoint","safeName":"internalEndpoint"},"snakeCase":{"unsafeName":"internal_endpoint","safeName":"internal_endpoint"},"screamingSnakeCase":{"unsafeName":"INTERNAL_ENDPOINT","safeName":"INTERNAL_ENDPOINT"},"pascalCase":{"unsafeName":"InternalEndpoint","safeName":"InternalEndpoint"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies"}]},"pathParameters":[],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"named","name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest","default":null,"inline":null},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"named","name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest","default":null,"inline":null},"contentType":null,"docs":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":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"docs":null}},"status-code":null},"errors":[{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"cedf7838","url":"/test/rootPathParam/movies","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":{"type":"reference","shape":{"type":"named","shape":{"type":"object","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"},"originalTypeDeclaration":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"},"value":{"shape":{"type":"unknown","unknown":{"key":"value"}},"jsonExample":{"key":"value"}}}]},"typeName":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"}},"jsonExample":{"unknown":{"key":"value"}}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"property","discriminant":{"name":{"originalName":"error","camelCase":{"unsafeName":"error","safeName":"error"},"snakeCase":{"unsafeName":"error","safeName":"error"},"screamingSnakeCase":{"unsafeName":"ERROR","safeName":"ERROR"},"pascalCase":{"unsafeName":"Error","safeName":"Error"}},"wireValue":"error"},"contentProperty":{"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"}},"basePath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":""}]},"pathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"variables":[],"serviceTypeReferenceInfo":{"sharedTypes":["type_commons:Internal"],"typesReferencedOnlyByService":{"service_imdb":["type_imdb:UnknownRequest"]}},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_commons:Internal":{"type":"object","declaration":{"name":{"originalName":"Internal","camelCase":{"unsafeName":"internal","safeName":"internal"},"snakeCase":{"unsafeName":"internal","safeName":"internal"},"screamingSnakeCase":{"unsafeName":"INTERNAL","safeName":"INTERNAL"},"pascalCase":{"unsafeName":"Internal","safeName":"Internal"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_imdb:UnknownRequest":{"type":"object","declaration":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"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"}}]}},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"typeReference":{"type":"optional","value":{"type":"primitive","value":"STRING"}}}],"endpoints":{"endpoint_imdb.internalEndpoint":{"auth":null,"declaration":{"name":{"originalName":"internalEndpoint","camelCase":{"unsafeName":"internalEndpoint","safeName":"internalEndpoint"},"snakeCase":{"unsafeName":"internal_endpoint","safeName":"internal_endpoint"},"screamingSnakeCase":{"unsafeName":"INTERNAL_ENDPOINT","safeName":"INTERNAL_ENDPOINT"},"pascalCase":{"unsafeName":"InternalEndpoint","safeName":"InternalEndpoint"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"POST","path":"/test/{rootPathParam}/movies"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}}],"body":{"type":"typeReference","value":{"type":"named","value":"type_imdb:UnknownRequest"}}},"response":{"type":"json"}}},"environments":null},"subpackages":{"subpackage_commons":{"name":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"service":null,"types":["type_commons:Internal"],"errors":["error_commons:BadRequestError"],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_imdb":{"name":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"service":"service_imdb","types":["type_imdb:UnknownRequest"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_commons","subpackage_imdb"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"simple","audiences":["test"]} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":"foo bar baz","auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"valueType":{"_type":"container","container":{"_type":"optional","optional":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}}},"env":null,"availability":null,"docs":null}],"idempotencyHeaders":[],"types":{"type_commons:Type":{"inline":null,"name":{"name":{"originalName":"Type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Type"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:MovieId":{"inline":null,"name":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id1"}}},"jsonExample":"id1"}},"jsonExample":"id1","docs":null},{"name":null,"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id2"}}},"jsonExample":"id2"}},"jsonExample":"id2","docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:CreateMovieRequest":{"inline":null,"name":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"valueType":{"_type":"container","container":{"_type":"list","list":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example1","camelCase":{"unsafeName":"example1","safeName":"example1"},"snakeCase":{"unsafeName":"example_1","safeName":"example_1"},"screamingSnakeCase":{"unsafeName":"EXAMPLE_1","safeName":"EXAMPLE_1"},"pascalCase":{"unsafeName":"Example1","safeName":"Example1"}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Winnie the Pooh"}}},"jsonExample":"Winnie the Pooh"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1}},"jsonExample":1},{"shape":{"type":"primitive","primitive":{"type":"double","double":2}},"jsonExample":2},{"shape":{"type":"primitive","primitive":{"type":"double","double":3}},"jsonExample":3}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1,2,3]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}}]},"jsonExample":{"title":"Winnie the Pooh","ratings":[1,2,3]},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{"error_commons:BadRequestError":{"name":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"discriminantValue":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"wireValue":"BadRequestError"},"statusCode":400,"type":null,"examples":[],"docs":null}},"services":{"service_imdb":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_imdb.createMovie","name":{"originalName":"createMovie","camelCase":{"unsafeName":"createMovie","safeName":"createMovie"},"snakeCase":{"unsafeName":"create_movie","safeName":"create_movie"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE","safeName":"CREATE_MOVIE"},"pascalCase":{"unsafeName":"CreateMovie","safeName":"CreateMovie"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies"}]},"pathParameters":[],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"named","name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest","default":null,"inline":null},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"named","name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest","default":null,"inline":null},"contentType":null,"docs":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":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"docs":null}},"status-code":null},"errors":[{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[{"example":{"id":"d33e05ae","name":null,"url":"/test/root/movies","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[],"request":{"type":"reference","shape":{"type":"named","typeName":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Shrek"}}},"jsonExample":"Shrek"},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[10,10,10,10]},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}}]}},"jsonExample":{"title":"Shrek","ratings":[10,10,10,10]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"shrek-123"}}},"jsonExample":"shrek-123"}}},"jsonExample":"shrek-123"}}},"docs":null},"codeSamples":null},{"example":{"id":"4337a93d","name":null,"url":"/test/root/movies","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[],"request":{"type":"reference","shape":{"type":"named","typeName":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Winnie the Pooh"}}},"jsonExample":"Winnie the Pooh"},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1}},"jsonExample":1},{"shape":{"type":"primitive","primitive":{"type":"double","double":2}},"jsonExample":2},{"shape":{"type":"primitive","primitive":{"type":"double","double":3}},"jsonExample":3}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1,2,3]},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}}]}},"jsonExample":{"title":"Winnie the Pooh","ratings":[1,2,3]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"shrek-123"}}},"jsonExample":"shrek-123"}}},"jsonExample":"shrek-123"}}},"docs":null},"codeSamples":null}],"autogeneratedExamples":[{"example":{"id":"798eeb2f","url":"/test/rootPathParam/movies","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":{"type":"reference","shape":{"type":"named","shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"title"}}},"jsonExample":"title"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1.1}},"jsonExample":1.1},{"shape":{"type":"primitive","primitive":{"type":"double","double":1.1}},"jsonExample":1.1}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1.1,1.1]}}]},"typeName":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},"jsonExample":{"title":"title","ratings":[1.1,1.1]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"}},"typeName":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"}},"jsonExample":"string"}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"property","discriminant":{"name":{"originalName":"error","camelCase":{"unsafeName":"error","safeName":"error"},"snakeCase":{"unsafeName":"error","safeName":"error"},"screamingSnakeCase":{"unsafeName":"ERROR","safeName":"ERROR"},"pascalCase":{"unsafeName":"Error","safeName":"Error"}},"wireValue":"error"},"contentProperty":{"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"}},"basePath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":""}]},"pathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"variables":[],"serviceTypeReferenceInfo":{"sharedTypes":["type_commons:Type"],"typesReferencedOnlyByService":{"service_imdb":["type_imdb:MovieId","type_imdb:CreateMovieRequest"]}},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_commons:Type":{"type":"object","declaration":{"name":{"originalName":"Type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_imdb:MovieId":{"type":"alias","declaration":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"typeReference":{"type":"primitive","value":"STRING"}},"type_imdb:CreateMovieRequest":{"type":"object","declaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"typeReference":{"type":"list","value":{"type":"primitive","value":"DOUBLE"}}}]}},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"typeReference":{"type":"optional","value":{"type":"primitive","value":"STRING"}}}],"endpoints":{"endpoint_imdb.createMovie":{"auth":null,"declaration":{"name":{"originalName":"createMovie","camelCase":{"unsafeName":"createMovie","safeName":"createMovie"},"snakeCase":{"unsafeName":"create_movie","safeName":"create_movie"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE","safeName":"CREATE_MOVIE"},"pascalCase":{"unsafeName":"CreateMovie","safeName":"CreateMovie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"POST","path":"/test/{rootPathParam}/movies"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}}],"body":{"type":"typeReference","value":{"type":"named","value":"type_imdb:CreateMovieRequest"}}},"response":{"type":"json"}}}},"subpackages":{"subpackage_commons":{"name":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"service":null,"types":["type_commons:Type"],"errors":["error_commons:BadRequestError"],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_imdb":{"name":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"service":"service_imdb","types":["type_imdb:MovieId","type_imdb:CreateMovieRequest"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_commons","subpackage_imdb"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"simple","audiences":["test"]} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":"foo bar baz","auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"valueType":{"_type":"container","container":{"_type":"optional","optional":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}}},"env":null,"availability":null,"docs":null}],"idempotencyHeaders":[],"types":{"type_commons:Type":{"inline":null,"name":{"name":{"originalName":"Type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Type"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:MovieId":{"inline":null,"name":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id1"}}},"jsonExample":"id1"}},"jsonExample":"id1","docs":null},{"name":null,"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id2"}}},"jsonExample":"id2"}},"jsonExample":"id2","docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:CreateMovieRequest":{"inline":null,"name":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"valueType":{"_type":"container","container":{"_type":"list","list":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example1","camelCase":{"unsafeName":"example1","safeName":"example1"},"snakeCase":{"unsafeName":"example_1","safeName":"example_1"},"screamingSnakeCase":{"unsafeName":"EXAMPLE_1","safeName":"EXAMPLE_1"},"pascalCase":{"unsafeName":"Example1","safeName":"Example1"}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Winnie the Pooh"}}},"jsonExample":"Winnie the Pooh"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1}},"jsonExample":1},{"shape":{"type":"primitive","primitive":{"type":"double","double":2}},"jsonExample":2},{"shape":{"type":"primitive","primitive":{"type":"double","double":3}},"jsonExample":3}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1,2,3]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}}]},"jsonExample":{"title":"Winnie the Pooh","ratings":[1,2,3]},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{"error_commons:BadRequestError":{"name":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"discriminantValue":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"wireValue":"BadRequestError"},"statusCode":400,"type":null,"examples":[],"docs":null}},"services":{"service_imdb":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_imdb.createMovie","name":{"originalName":"createMovie","camelCase":{"unsafeName":"createMovie","safeName":"createMovie"},"snakeCase":{"unsafeName":"create_movie","safeName":"create_movie"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE","safeName":"CREATE_MOVIE"},"pascalCase":{"unsafeName":"CreateMovie","safeName":"CreateMovie"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies"}]},"pathParameters":[],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"named","name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest","default":null,"inline":null},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"named","name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest","default":null,"inline":null},"contentType":null,"docs":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":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"docs":null}},"status-code":null},"errors":[{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[{"example":{"id":"d33e05ae","name":null,"url":"/test/root/movies","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[],"request":{"type":"reference","shape":{"type":"named","typeName":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Shrek"}}},"jsonExample":"Shrek"},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[10,10,10,10]},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}}]}},"jsonExample":{"title":"Shrek","ratings":[10,10,10,10]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"shrek-123"}}},"jsonExample":"shrek-123"}}},"jsonExample":"shrek-123"}}},"docs":null},"codeSamples":null},{"example":{"id":"4337a93d","name":null,"url":"/test/root/movies","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[],"request":{"type":"reference","shape":{"type":"named","typeName":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Winnie the Pooh"}}},"jsonExample":"Winnie the Pooh"},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1}},"jsonExample":1},{"shape":{"type":"primitive","primitive":{"type":"double","double":2}},"jsonExample":2},{"shape":{"type":"primitive","primitive":{"type":"double","double":3}},"jsonExample":3}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1,2,3]},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}}]}},"jsonExample":{"title":"Winnie the Pooh","ratings":[1,2,3]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"shrek-123"}}},"jsonExample":"shrek-123"}}},"jsonExample":"shrek-123"}}},"docs":null},"codeSamples":null}],"autogeneratedExamples":[{"example":{"id":"798eeb2f","url":"/test/rootPathParam/movies","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":{"type":"reference","shape":{"type":"named","shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"title"}}},"jsonExample":"title"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1.1}},"jsonExample":1.1},{"shape":{"type":"primitive","primitive":{"type":"double","double":1.1}},"jsonExample":1.1}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1.1,1.1]}}]},"typeName":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},"jsonExample":{"title":"title","ratings":[1.1,1.1]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"}},"typeName":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"}},"jsonExample":"string"}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"property","discriminant":{"name":{"originalName":"error","camelCase":{"unsafeName":"error","safeName":"error"},"snakeCase":{"unsafeName":"error","safeName":"error"},"screamingSnakeCase":{"unsafeName":"ERROR","safeName":"ERROR"},"pascalCase":{"unsafeName":"Error","safeName":"Error"}},"wireValue":"error"},"contentProperty":{"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"}},"basePath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":""}]},"pathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"variables":[],"serviceTypeReferenceInfo":{"sharedTypes":["type_commons:Type"],"typesReferencedOnlyByService":{"service_imdb":["type_imdb:MovieId","type_imdb:CreateMovieRequest"]}},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_commons:Type":{"type":"object","declaration":{"name":{"originalName":"Type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_imdb:MovieId":{"type":"alias","declaration":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"typeReference":{"type":"primitive","value":"STRING"}},"type_imdb:CreateMovieRequest":{"type":"object","declaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"typeReference":{"type":"list","value":{"type":"primitive","value":"DOUBLE"}}}]}},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"typeReference":{"type":"optional","value":{"type":"primitive","value":"STRING"}}}],"endpoints":{"endpoint_imdb.createMovie":{"auth":null,"declaration":{"name":{"originalName":"createMovie","camelCase":{"unsafeName":"createMovie","safeName":"createMovie"},"snakeCase":{"unsafeName":"create_movie","safeName":"create_movie"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE","safeName":"CREATE_MOVIE"},"pascalCase":{"unsafeName":"CreateMovie","safeName":"CreateMovie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"POST","path":"/test/{rootPathParam}/movies"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}}],"body":{"type":"typeReference","value":{"type":"named","value":"type_imdb:CreateMovieRequest"}}},"response":{"type":"json"}}},"environments":null},"subpackages":{"subpackage_commons":{"name":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"service":null,"types":["type_commons:Type"],"errors":["error_commons:BadRequestError"],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_imdb":{"name":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"service":"service_imdb","types":["type_imdb:MovieId","type_imdb:CreateMovieRequest"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_commons","subpackage_imdb"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"simple"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":"foo bar baz","auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"valueType":{"_type":"container","container":{"_type":"optional","optional":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}}},"env":null,"availability":null,"docs":null}],"idempotencyHeaders":[],"types":{"type_commons:Internal":{"inline":null,"name":{"name":{"originalName":"Internal","camelCase":{"unsafeName":"internal","safeName":"internal"},"snakeCase":{"unsafeName":"internal","safeName":"internal"},"screamingSnakeCase":{"unsafeName":"INTERNAL","safeName":"INTERNAL"},"pascalCase":{"unsafeName":"Internal","safeName":"Internal"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Internal"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_commons:Type":{"inline":null,"name":{"name":{"originalName":"Type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Type"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_commons:UndiscriminatedUnion":{"inline":null,"name":{"name":{"originalName":"UndiscriminatedUnion","camelCase":{"unsafeName":"undiscriminatedUnion","safeName":"undiscriminatedUnion"},"snakeCase":{"unsafeName":"undiscriminated_union","safeName":"undiscriminated_union"},"screamingSnakeCase":{"unsafeName":"UNDISCRIMINATED_UNION","safeName":"UNDISCRIMINATED_UNION"},"pascalCase":{"unsafeName":"UndiscriminatedUnion","safeName":"UndiscriminatedUnion"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:UndiscriminatedUnion"},"shape":{"_type":"undiscriminatedUnion","members":[{"type":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"docs":null},{"type":{"_type":"container","container":{"_type":"list","list":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}}},"docs":null},{"type":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}},"docs":null},{"type":{"_type":"container","container":{"_type":"list","list":{"_type":"container","container":{"_type":"list","list":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}}}}}},"docs":null}]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_director:Director":{"inline":null,"name":{"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Director"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"wireValue":"age"},"valueType":{"_type":"named","name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Age","default":null,"inline":null},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_director:Age"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"GeorgeExample","camelCase":{"unsafeName":"georgeExample","safeName":"georgeExample"},"snakeCase":{"unsafeName":"george_example","safeName":"george_example"},"screamingSnakeCase":{"unsafeName":"GEORGE_EXAMPLE","safeName":"GEORGE_EXAMPLE"},"pascalCase":{"unsafeName":"GeorgeExample","safeName":"GeorgeExample"}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"George the Director"}}},"jsonExample":"George the Director"},"originalTypeDeclaration":{"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Director"}},{"name":{"name":{"originalName":"age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"wireValue":"age"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_director:Age","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"integer","integer":20}},"jsonExample":20}}},"jsonExample":20},"originalTypeDeclaration":{"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Director"}}]},"jsonExample":{"name":"George the Director","age":20},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_director:Age":{"inline":null,"name":{"name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Age"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example1","camelCase":{"unsafeName":"example1","safeName":"example1"},"snakeCase":{"unsafeName":"example_1","safeName":"example_1"},"screamingSnakeCase":{"unsafeName":"EXAMPLE_1","safeName":"EXAMPLE_1"},"pascalCase":{"unsafeName":"Example1","safeName":"Example1"}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"integer","integer":20}},"jsonExample":20}},"jsonExample":20,"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_director:LiteralBoolean":{"inline":null,"name":{"name":{"originalName":"LiteralBoolean","camelCase":{"unsafeName":"literalBoolean","safeName":"literalBoolean"},"snakeCase":{"unsafeName":"literal_boolean","safeName":"literal_boolean"},"screamingSnakeCase":{"unsafeName":"LITERAL_BOOLEAN","safeName":"LITERAL_BOOLEAN"},"pascalCase":{"unsafeName":"LiteralBoolean","safeName":"LiteralBoolean"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:LiteralBoolean"},"shape":{"_type":"alias","aliasOf":{"_type":"container","container":{"_type":"literal","literal":{"type":"boolean","boolean":true}}},"resolvedType":{"_type":"container","container":{"_type":"literal","literal":{"type":"boolean","boolean":true}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_director:LiteralString":{"inline":null,"name":{"name":{"originalName":"LiteralString","camelCase":{"unsafeName":"literalString","safeName":"literalString"},"snakeCase":{"unsafeName":"literal_string","safeName":"literal_string"},"screamingSnakeCase":{"unsafeName":"LITERAL_STRING","safeName":"LITERAL_STRING"},"pascalCase":{"unsafeName":"LiteralString","safeName":"LiteralString"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:LiteralString"},"shape":{"_type":"alias","aliasOf":{"_type":"container","container":{"_type":"literal","literal":{"type":"string","string":"hello"}}},"resolvedType":{"_type":"container","container":{"_type":"literal","literal":{"type":"string","string":"hello"}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:CurrencyAmount":{"inline":null,"name":{"name":{"originalName":"CurrencyAmount","camelCase":{"unsafeName":"currencyAmount","safeName":"currencyAmount"},"snakeCase":{"unsafeName":"currency_amount","safeName":"currency_amount"},"screamingSnakeCase":{"unsafeName":"CURRENCY_AMOUNT","safeName":"CURRENCY_AMOUNT"},"pascalCase":{"unsafeName":"CurrencyAmount","safeName":"CurrencyAmount"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CurrencyAmount"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"$4.50"}}},"jsonExample":"$4.50"}},"jsonExample":"$4.50","docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:MovieId":{"inline":null,"name":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id1"}}},"jsonExample":"id1"}},"jsonExample":"id1","docs":null},{"name":null,"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id2"}}},"jsonExample":"id2"}},"jsonExample":"id2","docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:ActorId":{"inline":null,"name":{"name":{"originalName":"ActorId","camelCase":{"unsafeName":"actorId","safeName":"actorId"},"snakeCase":{"unsafeName":"actor_id","safeName":"actor_id"},"screamingSnakeCase":{"unsafeName":"ACTOR_ID","safeName":"ACTOR_ID"},"pascalCase":{"unsafeName":"ActorId","safeName":"ActorId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:ActorId"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:Movie":{"inline":null,"name":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"},"shape":{"_type":"object","extends":[],"properties":[{"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"},"valueType":{"_type":"named","name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"availability":null,"docs":null},{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"rating","camelCase":{"unsafeName":"rating","safeName":"rating"},"snakeCase":{"unsafeName":"rating","safeName":"rating"},"screamingSnakeCase":{"unsafeName":"RATING","safeName":"RATING"},"pascalCase":{"unsafeName":"Rating","safeName":"Rating"}},"wireValue":"rating"},"valueType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_imdb:MovieId"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"object","properties":[{"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"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"my-movie-id"}}},"jsonExample":"my-movie-id"}}},"jsonExample":"my-movie-id"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"}},{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Goodwill Hunting"}}},"jsonExample":"Goodwill Hunting"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"}},{"name":{"name":{"originalName":"rating","camelCase":{"unsafeName":"rating","safeName":"rating"},"snakeCase":{"unsafeName":"rating","safeName":"rating"},"screamingSnakeCase":{"unsafeName":"RATING","safeName":"RATING"},"pascalCase":{"unsafeName":"Rating","safeName":"Rating"}},"wireValue":"rating"},"value":{"shape":{"type":"primitive","primitive":{"type":"double","double":14.5}},"jsonExample":14.5},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"}}]},"jsonExample":{"id":"my-movie-id","title":"Goodwill Hunting","rating":14.5},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:CreateMovieRequest":{"inline":null,"name":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"valueType":{"_type":"container","container":{"_type":"list","list":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example1","camelCase":{"unsafeName":"example1","safeName":"example1"},"snakeCase":{"unsafeName":"example_1","safeName":"example_1"},"screamingSnakeCase":{"unsafeName":"EXAMPLE_1","safeName":"EXAMPLE_1"},"pascalCase":{"unsafeName":"Example1","safeName":"Example1"}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Winnie the Pooh"}}},"jsonExample":"Winnie the Pooh"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1}},"jsonExample":1},{"shape":{"type":"primitive","primitive":{"type":"double","double":2}},"jsonExample":2},{"shape":{"type":"primitive","primitive":{"type":"double","double":3}},"jsonExample":3}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1,2,3]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}}]},"jsonExample":{"title":"Winnie the Pooh","ratings":[1,2,3]},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:DirectorWrapper":{"inline":null,"name":{"name":{"originalName":"DirectorWrapper","camelCase":{"unsafeName":"directorWrapper","safeName":"directorWrapper"},"snakeCase":{"unsafeName":"director_wrapper","safeName":"director_wrapper"},"screamingSnakeCase":{"unsafeName":"DIRECTOR_WRAPPER","safeName":"DIRECTOR_WRAPPER"},"pascalCase":{"unsafeName":"DirectorWrapper","safeName":"DirectorWrapper"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:DirectorWrapper"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"valueType":{"_type":"named","name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Director","default":null,"inline":null},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_director:Director","type_director:Age"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_director:Director","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"George the Director"}}},"jsonExample":"George the Director"},"originalTypeDeclaration":{"typeId":"type_director:Director","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},{"name":{"name":{"originalName":"age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"wireValue":"age"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_director:Age","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"integer","integer":20}},"jsonExample":20}}},"jsonExample":20},"originalTypeDeclaration":{"typeId":"type_director:Director","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}}]}},"jsonExample":{"name":"George the Director","age":20}},"originalTypeDeclaration":{"name":{"originalName":"DirectorWrapper","camelCase":{"unsafeName":"directorWrapper","safeName":"directorWrapper"},"snakeCase":{"unsafeName":"director_wrapper","safeName":"director_wrapper"},"screamingSnakeCase":{"unsafeName":"DIRECTOR_WRAPPER","safeName":"DIRECTOR_WRAPPER"},"pascalCase":{"unsafeName":"DirectorWrapper","safeName":"DirectorWrapper"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:DirectorWrapper"}}]},"jsonExample":{"director":{"name":"George the Director","age":20}},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:EmptyObject":{"inline":null,"name":{"name":{"originalName":"EmptyObject","camelCase":{"unsafeName":"emptyObject","safeName":"emptyObject"},"snakeCase":{"unsafeName":"empty_object","safeName":"empty_object"},"screamingSnakeCase":{"unsafeName":"EMPTY_OBJECT","safeName":"EMPTY_OBJECT"},"pascalCase":{"unsafeName":"EmptyObject","safeName":"EmptyObject"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:EmptyObject"},"shape":{"_type":"object","extends":[],"properties":[],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:Person":{"inline":null,"name":{"name":{"originalName":"Person","camelCase":{"unsafeName":"person","safeName":"person"},"snakeCase":{"unsafeName":"person","safeName":"person"},"screamingSnakeCase":{"unsafeName":"PERSON","safeName":"PERSON"},"pascalCase":{"unsafeName":"Person","safeName":"Person"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Person"},"shape":{"_type":"union","discriminant":{"name":{"originalName":"type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"wireValue":"type"},"extends":[],"baseProperties":[],"types":[{"discriminantValue":{"name":{"originalName":"actor","camelCase":{"unsafeName":"actor","safeName":"actor"},"snakeCase":{"unsafeName":"actor","safeName":"actor"},"screamingSnakeCase":{"unsafeName":"ACTOR","safeName":"ACTOR"},"pascalCase":{"unsafeName":"Actor","safeName":"Actor"}},"wireValue":"actor"},"shape":{"_type":"singleProperty","name":{"name":{"originalName":"value","camelCase":{"unsafeName":"value","safeName":"value"},"snakeCase":{"unsafeName":"value","safeName":"value"},"screamingSnakeCase":{"unsafeName":"VALUE","safeName":"VALUE"},"pascalCase":{"unsafeName":"Value","safeName":"Value"}},"wireValue":"value"},"type":{"_type":"named","name":{"originalName":"ActorId","camelCase":{"unsafeName":"actorId","safeName":"actorId"},"snakeCase":{"unsafeName":"actor_id","safeName":"actor_id"},"screamingSnakeCase":{"unsafeName":"ACTOR_ID","safeName":"ACTOR_ID"},"pascalCase":{"unsafeName":"ActorId","safeName":"ActorId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:ActorId","default":null,"inline":null}},"displayName":null,"availability":null,"docs":null},{"discriminantValue":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"shape":{"_type":"samePropertiesAsObject","name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Director"},"displayName":null,"availability":null,"docs":null},{"discriminantValue":{"name":{"originalName":"producer","camelCase":{"unsafeName":"producer","safeName":"producer"},"snakeCase":{"unsafeName":"producer","safeName":"producer"},"screamingSnakeCase":{"unsafeName":"PRODUCER","safeName":"PRODUCER"},"pascalCase":{"unsafeName":"Producer","safeName":"Producer"}},"wireValue":"producer"},"shape":{"_type":"samePropertiesAsObject","name":{"originalName":"EmptyObject","camelCase":{"unsafeName":"emptyObject","safeName":"emptyObject"},"snakeCase":{"unsafeName":"empty_object","safeName":"empty_object"},"screamingSnakeCase":{"unsafeName":"EMPTY_OBJECT","safeName":"EMPTY_OBJECT"},"pascalCase":{"unsafeName":"EmptyObject","safeName":"EmptyObject"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:EmptyObject"},"displayName":null,"availability":null,"docs":null},{"discriminantValue":{"name":{"originalName":"cinematographer","camelCase":{"unsafeName":"cinematographer","safeName":"cinematographer"},"snakeCase":{"unsafeName":"cinematographer","safeName":"cinematographer"},"screamingSnakeCase":{"unsafeName":"CINEMATOGRAPHER","safeName":"CINEMATOGRAPHER"},"pascalCase":{"unsafeName":"Cinematographer","safeName":"Cinematographer"}},"wireValue":"cinematographer"},"shape":{"_type":"samePropertiesAsObject","name":{"originalName":"EmptyObject","camelCase":{"unsafeName":"emptyObject","safeName":"emptyObject"},"snakeCase":{"unsafeName":"empty_object","safeName":"empty_object"},"screamingSnakeCase":{"unsafeName":"EMPTY_OBJECT","safeName":"EMPTY_OBJECT"},"pascalCase":{"unsafeName":"EmptyObject","safeName":"EmptyObject"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:EmptyObject"},"displayName":null,"availability":null,"docs":"i am docs"}]},"referencedTypes":["type_imdb:ActorId","type_director:Director","type_director:Age","type_imdb:EmptyObject"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"PersonExample1","camelCase":{"unsafeName":"personExample1","safeName":"personExample1"},"snakeCase":{"unsafeName":"person_example_1","safeName":"person_example_1"},"screamingSnakeCase":{"unsafeName":"PERSON_EXAMPLE_1","safeName":"PERSON_EXAMPLE_1"},"pascalCase":{"unsafeName":"PersonExample1","safeName":"PersonExample1"}},"shape":{"type":"union","discriminant":{"name":{"originalName":"type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"wireValue":"type"},"singleUnionType":{"wireDiscriminantValue":{"name":{"originalName":"actor","camelCase":{"unsafeName":"actor","safeName":"actor"},"snakeCase":{"unsafeName":"actor","safeName":"actor"},"screamingSnakeCase":{"unsafeName":"ACTOR","safeName":"ACTOR"},"pascalCase":{"unsafeName":"Actor","safeName":"Actor"}},"wireValue":"actor"},"shape":{"type":"singleProperty","shape":{"type":"named","typeName":{"typeId":"type_imdb:ActorId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"ActorId","camelCase":{"unsafeName":"actorId","safeName":"actorId"},"snakeCase":{"unsafeName":"actor_id","safeName":"actor_id"},"screamingSnakeCase":{"unsafeName":"ACTOR_ID","safeName":"ACTOR_ID"},"pascalCase":{"unsafeName":"ActorId","safeName":"ActorId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Matt Damon"}}},"jsonExample":"Matt Damon"}}},"jsonExample":"Matt Damon"}}},"jsonExample":{"type":"actor","value":"Matt Damon"},"docs":"this is a person example"},{"name":null,"shape":{"type":"union","discriminant":{"name":{"originalName":"type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"wireValue":"type"},"singleUnionType":{"wireDiscriminantValue":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"shape":{"type":"samePropertiesAsObject","typeId":"type_director:Director","object":{"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"George the Directory"}}},"jsonExample":"George the Directory"},"originalTypeDeclaration":{"typeId":"type_director:Director","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},{"name":{"name":{"originalName":"age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"wireValue":"age"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_director:Age","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"integer","integer":100}},"jsonExample":100}}},"jsonExample":100},"originalTypeDeclaration":{"typeId":"type_director:Director","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}}]}}}},"jsonExample":{"type":"director","name":"George the Directory","age":100},"docs":null},{"name":null,"shape":{"type":"union","discriminant":{"name":{"originalName":"type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"wireValue":"type"},"singleUnionType":{"wireDiscriminantValue":{"name":{"originalName":"producer","camelCase":{"unsafeName":"producer","safeName":"producer"},"snakeCase":{"unsafeName":"producer","safeName":"producer"},"screamingSnakeCase":{"unsafeName":"PRODUCER","safeName":"PRODUCER"},"pascalCase":{"unsafeName":"Producer","safeName":"Producer"}},"wireValue":"producer"},"shape":{"type":"samePropertiesAsObject","typeId":"type_imdb:EmptyObject","object":{"properties":[]}}}},"jsonExample":{"type":"producer"},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:UnknownRequest":{"inline":null,"name":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"},"shape":{"_type":"object","extends":[],"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"},"valueType":{"_type":"unknown"},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:RecursiveType":{"inline":null,"name":{"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType"},"shape":{"_type":"object","extends":[{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}],"properties":[{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"valueType":{"_type":"container","container":{"_type":"list","list":{"_type":"named","name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType","default":null,"inline":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"valueType":{"_type":"container","container":{"_type":"list","list":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"availability":null,"docs":null}]},"referencedTypes":["type_imdb:CreateMovieRequest","type_imdb:RecursiveType"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"The Godfather"}}},"jsonExample":"The Godfather"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":5}},"jsonExample":5},{"shape":{"type":"primitive","primitive":{"type":"double","double":9}},"jsonExample":9}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[10,5,9]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"named","typeName":{"typeId":"type_imdb:RecursiveType","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"The Godfather II"}}},"jsonExample":"The Godfather II"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":11}},"jsonExample":11}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[10,11]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"value":{"shape":{"type":"container","container":{"type":"list","list":[],"itemType":{"_type":"named","name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType","default":null,"inline":null}}},"jsonExample":[]},"originalTypeDeclaration":{"typeId":"type_imdb:RecursiveType","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}}}}]}},"jsonExample":{"title":"The Godfather II","ratings":[10,11],"selfReferencing":[]}},{"shape":{"type":"named","typeName":{"typeId":"type_imdb:RecursiveType","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"The Godfather III"}}},"jsonExample":"The Godfather III"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"value":{"shape":{"type":"container","container":{"type":"list","list":[],"itemType":{"_type":"named","name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType","default":null,"inline":null}}},"jsonExample":[]},"originalTypeDeclaration":{"typeId":"type_imdb:RecursiveType","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}}}}]}},"jsonExample":{"title":"The Godfather III","ratings":[],"selfReferencing":[]}}],"itemType":{"_type":"named","name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType","default":null,"inline":null}}},"jsonExample":[{"title":"The Godfather II","ratings":[10,11],"selfReferencing":[]},{"title":"The Godfather III","ratings":[],"selfReferencing":[]}]},"originalTypeDeclaration":{"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType"}}]},"jsonExample":{"title":"The Godfather","ratings":[10,5,9],"selfReferencing":[{"title":"The Godfather II","ratings":[10,11],"selfReferencing":[]},{"title":"The Godfather III","ratings":[],"selfReferencing":[]}]},"docs":null},{"name":null,"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Goodfellas"}}},"jsonExample":"Goodfellas"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1}},"jsonExample":1},{"shape":{"type":"primitive","primitive":{"type":"double","double":2}},"jsonExample":2},{"shape":{"type":"primitive","primitive":{"type":"double","double":3}},"jsonExample":3}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1,2,3]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"value":{"shape":{"type":"container","container":{"type":"list","list":[],"itemType":{"_type":"named","name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType","default":null,"inline":null}}},"jsonExample":[]},"originalTypeDeclaration":{"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType"}}]},"jsonExample":{"title":"Goodfellas","ratings":[1,2,3],"selfReferencing":[]},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{"error_commons:BadRequestError":{"name":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"discriminantValue":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"wireValue":"BadRequestError"},"statusCode":400,"type":null,"examples":[],"docs":null},"error_imdb:NotFoundError":{"name":{"name":{"originalName":"NotFoundError","camelCase":{"unsafeName":"notFoundError","safeName":"notFoundError"},"snakeCase":{"unsafeName":"not_found_error","safeName":"not_found_error"},"screamingSnakeCase":{"unsafeName":"NOT_FOUND_ERROR","safeName":"NOT_FOUND_ERROR"},"pascalCase":{"unsafeName":"NotFoundError","safeName":"NotFoundError"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"errorId":"error_imdb:NotFoundError"},"discriminantValue":{"name":{"originalName":"NotFoundError","camelCase":{"unsafeName":"notFoundError","safeName":"notFoundError"},"snakeCase":{"unsafeName":"not_found_error","safeName":"not_found_error"},"screamingSnakeCase":{"unsafeName":"NOT_FOUND_ERROR","safeName":"NOT_FOUND_ERROR"},"pascalCase":{"unsafeName":"NotFoundError","safeName":"NotFoundError"}},"wireValue":"NotFoundError"},"statusCode":404,"type":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"examples":[],"docs":null}},"services":{"service_imdb":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_imdb.internalEndpoint","name":{"originalName":"internalEndpoint","camelCase":{"unsafeName":"internalEndpoint","safeName":"internalEndpoint"},"snakeCase":{"unsafeName":"internal_endpoint","safeName":"internal_endpoint"},"screamingSnakeCase":{"unsafeName":"INTERNAL_ENDPOINT","safeName":"INTERNAL_ENDPOINT"},"pascalCase":{"unsafeName":"InternalEndpoint","safeName":"InternalEndpoint"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies"}]},"pathParameters":[],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"named","name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest","default":null,"inline":null},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"named","name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest","default":null,"inline":null},"contentType":null,"docs":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":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"docs":null}},"status-code":null},"errors":[{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"cedf7838","url":"/test/rootPathParam/movies","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":{"type":"reference","shape":{"type":"named","shape":{"type":"object","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"},"originalTypeDeclaration":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"},"value":{"shape":{"type":"unknown","unknown":{"key":"value"}},"jsonExample":{"key":"value"}}}]},"typeName":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"}},"jsonExample":{"unknown":{"key":"value"}}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_imdb.createMovie","name":{"originalName":"createMovie","camelCase":{"unsafeName":"createMovie","safeName":"createMovie"},"snakeCase":{"unsafeName":"create_movie","safeName":"create_movie"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE","safeName":"CREATE_MOVIE"},"pascalCase":{"unsafeName":"CreateMovie","safeName":"CreateMovie"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies"}]},"pathParameters":[],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"named","name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest","default":null,"inline":null},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"named","name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest","default":null,"inline":null},"contentType":null,"docs":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":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"docs":null}},"status-code":null},"errors":[{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[{"example":{"id":"d33e05ae","name":null,"url":"/test/root/movies","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[],"request":{"type":"reference","shape":{"type":"named","typeName":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Shrek"}}},"jsonExample":"Shrek"},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[10,10,10,10]},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}}]}},"jsonExample":{"title":"Shrek","ratings":[10,10,10,10]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"shrek-123"}}},"jsonExample":"shrek-123"}}},"jsonExample":"shrek-123"}}},"docs":null},"codeSamples":null},{"example":{"id":"4337a93d","name":null,"url":"/test/root/movies","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[],"request":{"type":"reference","shape":{"type":"named","typeName":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Winnie the Pooh"}}},"jsonExample":"Winnie the Pooh"},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1}},"jsonExample":1},{"shape":{"type":"primitive","primitive":{"type":"double","double":2}},"jsonExample":2},{"shape":{"type":"primitive","primitive":{"type":"double","double":3}},"jsonExample":3}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1,2,3]},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}}]}},"jsonExample":{"title":"Winnie the Pooh","ratings":[1,2,3]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"shrek-123"}}},"jsonExample":"shrek-123"}}},"jsonExample":"shrek-123"}}},"docs":null},"codeSamples":null}],"autogeneratedExamples":[{"example":{"id":"798eeb2f","url":"/test/rootPathParam/movies","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":{"type":"reference","shape":{"type":"named","shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"title"}}},"jsonExample":"title"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1.1}},"jsonExample":1.1},{"shape":{"type":"primitive","primitive":{"type":"double","double":1.1}},"jsonExample":1.1}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1.1,1.1]}}]},"typeName":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},"jsonExample":{"title":"title","ratings":[1.1,1.1]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"}},"typeName":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"}},"jsonExample":"string"}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_imdb.getMovie","name":{"originalName":"getMovie","camelCase":{"unsafeName":"getMovie","safeName":"getMovie"},"snakeCase":{"unsafeName":"get_movie","safeName":"get_movie"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE","safeName":"GET_MOVIE"},"pascalCase":{"unsafeName":"GetMovie","safeName":"GetMovie"}},"displayName":"Get Movie by Id","auth":false,"idempotent":false,"baseUrl":null,"method":"GET","basePath":null,"path":{"head":"/","parts":[{"pathParameter":"movieId","tail":""}]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies/"},{"pathParameter":"movieId","tail":""}]},"pathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"valueType":{"_type":"named","name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"location":"ENDPOINT","variable":null,"docs":null}],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null},{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"valueType":{"_type":"named","name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"location":"ENDPOINT","variable":null,"docs":null}],"queryParameters":[{"name":{"name":{"originalName":"movieName","camelCase":{"unsafeName":"movieName","safeName":"movieName"},"snakeCase":{"unsafeName":"movie_name","safeName":"movie_name"},"screamingSnakeCase":{"unsafeName":"MOVIE_NAME","safeName":"MOVIE_NAME"},"pascalCase":{"unsafeName":"MovieName","safeName":"MovieName"}},"wireValue":"movieName"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"allowMultiple":true,"availability":null,"docs":null}],"headers":[],"requestBody":null,"sdkRequest":{"shape":{"type":"wrapper","wrapperName":{"originalName":"GetMovieRequest","camelCase":{"unsafeName":"getMovieRequest","safeName":"getMovieRequest"},"snakeCase":{"unsafeName":"get_movie_request","safeName":"get_movie_request"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE_REQUEST","safeName":"GET_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"GetMovieRequest","safeName":"GetMovieRequest"}},"bodyKey":{"originalName":"body","camelCase":{"unsafeName":"body","safeName":"body"},"snakeCase":{"unsafeName":"body","safeName":"body"},"screamingSnakeCase":{"unsafeName":"BODY","safeName":"BODY"},"pascalCase":{"unsafeName":"Body","safeName":"Body"}},"includePathParameters":false,"onlyPathParameters":false},"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":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie","default":null,"inline":null},"docs":null}},"status-code":null},"errors":[{"error":{"name":{"originalName":"NotFoundError","camelCase":{"unsafeName":"notFoundError","safeName":"notFoundError"},"snakeCase":{"unsafeName":"not_found_error","safeName":"not_found_error"},"screamingSnakeCase":{"unsafeName":"NOT_FOUND_ERROR","safeName":"NOT_FOUND_ERROR"},"pascalCase":{"unsafeName":"NotFoundError","safeName":"NotFoundError"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"errorId":"error_imdb:NotFoundError"},"docs":null},{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[{"example":{"id":"c7ed645f","name":null,"url":"/test/root/movies/id-123","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id-123"}}},"jsonExample":"id-123"}}},"jsonExample":"id-123"}}],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[{"name":{"name":{"originalName":"movieName","camelCase":{"unsafeName":"movieName","safeName":"movieName"},"snakeCase":{"unsafeName":"movie_name","safeName":"movie_name"},"screamingSnakeCase":{"unsafeName":"MOVIE_NAME","safeName":"MOVIE_NAME"},"pascalCase":{"unsafeName":"MovieName","safeName":"MovieName"}},"wireValue":"movieName"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"hello"}}},"jsonExample":"hello"},"shape":{"type":"exploded"}}],"request":null,"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:Movie","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}}},"shape":{"type":"object","properties":[{"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"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id-123"}}},"jsonExample":"id-123"}}},"jsonExample":"id-123"},"originalTypeDeclaration":{"typeId":"type_imdb:Movie","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}}}},{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Shrek"}}},"jsonExample":"Shrek"},"originalTypeDeclaration":{"typeId":"type_imdb:Movie","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}}}},{"name":{"name":{"originalName":"rating","camelCase":{"unsafeName":"rating","safeName":"rating"},"snakeCase":{"unsafeName":"rating","safeName":"rating"},"screamingSnakeCase":{"unsafeName":"RATING","safeName":"RATING"},"pascalCase":{"unsafeName":"Rating","safeName":"Rating"}},"wireValue":"rating"},"value":{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},"originalTypeDeclaration":{"typeId":"type_imdb:Movie","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}}}}]}},"jsonExample":{"id":"id-123","title":"Shrek","rating":10}}}},"docs":null},"codeSamples":null},{"example":{"id":"bc78fbfa","name":null,"url":"/test/root/movies/id-123","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id-123"}}},"jsonExample":"id-123"}}},"jsonExample":"id-123"}}],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[{"name":{"name":{"originalName":"movieName","camelCase":{"unsafeName":"movieName","safeName":"movieName"},"snakeCase":{"unsafeName":"movie_name","safeName":"movie_name"},"screamingSnakeCase":{"unsafeName":"MOVIE_NAME","safeName":"MOVIE_NAME"},"pascalCase":{"unsafeName":"MovieName","safeName":"MovieName"}},"wireValue":"movieName"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"hello"}}},"jsonExample":"hello"},"shape":{"type":"exploded"}}],"request":null,"response":{"type":"error","error":{"name":{"originalName":"NotFoundError","camelCase":{"unsafeName":"notFoundError","safeName":"notFoundError"},"snakeCase":{"unsafeName":"not_found_error","safeName":"not_found_error"},"screamingSnakeCase":{"unsafeName":"NOT_FOUND_ERROR","safeName":"NOT_FOUND_ERROR"},"pascalCase":{"unsafeName":"NotFoundError","safeName":"NotFoundError"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"errorId":"error_imdb:NotFoundError"},"body":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id-123"}}},"jsonExample":"id-123"}},"docs":null},"codeSamples":null}],"autogeneratedExamples":[{"example":{"id":"d5b443a5","url":"/test/rootPathParam/movies/movieId","name":null,"endpointHeaders":[],"endpointPathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"movieId"}}},"jsonExample":"movieId"}},"typeName":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"}},"jsonExample":"movieId"}}],"queryParameters":[{"name":{"name":{"originalName":"movieName","camelCase":{"unsafeName":"movieName","safeName":"movieName"},"snakeCase":{"unsafeName":"movie_name","safeName":"movie_name"},"screamingSnakeCase":{"unsafeName":"MOVIE_NAME","safeName":"MOVIE_NAME"},"pascalCase":{"unsafeName":"MovieName","safeName":"MovieName"}},"wireValue":"movieName"},"shape":{"type":"exploded"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"movieName"}}},"jsonExample":"movieName"}}],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":null,"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"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"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"},"value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id"}}},"jsonExample":"id"}},"typeName":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"}},"jsonExample":"id"}},{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"title"}}},"jsonExample":"title"}},{"name":{"name":{"originalName":"rating","camelCase":{"unsafeName":"rating","safeName":"rating"},"snakeCase":{"unsafeName":"rating","safeName":"rating"},"screamingSnakeCase":{"unsafeName":"RATING","safeName":"RATING"},"pascalCase":{"unsafeName":"Rating","safeName":"Rating"}},"wireValue":"rating"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"},"value":{"shape":{"type":"primitive","primitive":{"type":"double","double":1.1}},"jsonExample":1.1}}]},"typeName":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"}},"jsonExample":{"id":"id","title":"title","rating":1.1}}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_imdb.delete","name":{"originalName":"delete","camelCase":{"unsafeName":"delete","safeName":"delete"},"snakeCase":{"unsafeName":"delete","safeName":"delete"},"screamingSnakeCase":{"unsafeName":"DELETE","safeName":"DELETE"},"pascalCase":{"unsafeName":"Delete","safeName":"Delete"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"DELETE","basePath":null,"path":{"head":"/","parts":[{"pathParameter":"movieId","tail":""}]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies/"},{"pathParameter":"movieId","tail":""}]},"pathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"valueType":{"_type":"named","name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"location":"ENDPOINT","variable":null,"docs":null}],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null},{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"valueType":{"_type":"named","name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"location":"ENDPOINT","variable":null,"docs":null}],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"46f6ba77","url":"/test/rootPathParam/movies/movieId","name":null,"endpointHeaders":[],"endpointPathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"movieId"}}},"jsonExample":"movieId"}},"typeName":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"}},"jsonExample":"movieId"}}],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"property","discriminant":{"name":{"originalName":"error","camelCase":{"unsafeName":"error","safeName":"error"},"snakeCase":{"unsafeName":"error","safeName":"error"},"screamingSnakeCase":{"unsafeName":"ERROR","safeName":"ERROR"},"pascalCase":{"unsafeName":"Error","safeName":"Error"}},"wireValue":"error"},"contentProperty":{"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"}},"basePath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":""}]},"pathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{"service_imdb":["type_imdb:MovieId","type_imdb:Movie","type_imdb:CreateMovieRequest","type_imdb:UnknownRequest"]},"sharedTypes":["type_commons:Internal","type_commons:Type","type_commons:UndiscriminatedUnion","type_director:Director","type_director:Age","type_director:LiteralBoolean","type_director:LiteralString","type_imdb:CurrencyAmount","type_imdb:ActorId","type_imdb:DirectorWrapper","type_imdb:EmptyObject","type_imdb:Person","type_imdb:RecursiveType"]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_commons:Internal":{"type":"object","declaration":{"name":{"originalName":"Internal","camelCase":{"unsafeName":"internal","safeName":"internal"},"snakeCase":{"unsafeName":"internal","safeName":"internal"},"screamingSnakeCase":{"unsafeName":"INTERNAL","safeName":"INTERNAL"},"pascalCase":{"unsafeName":"Internal","safeName":"Internal"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_commons:Type":{"type":"object","declaration":{"name":{"originalName":"Type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_commons:UndiscriminatedUnion":{"type":"undiscriminatedUnion","declaration":{"name":{"originalName":"UndiscriminatedUnion","camelCase":{"unsafeName":"undiscriminatedUnion","safeName":"undiscriminatedUnion"},"snakeCase":{"unsafeName":"undiscriminated_union","safeName":"undiscriminated_union"},"screamingSnakeCase":{"unsafeName":"UNDISCRIMINATED_UNION","safeName":"UNDISCRIMINATED_UNION"},"pascalCase":{"unsafeName":"UndiscriminatedUnion","safeName":"UndiscriminatedUnion"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"types":[{"type":"primitive","value":"STRING"},{"type":"list","value":{"type":"primitive","value":"STRING"}},{"type":"primitive","value":"INTEGER"},{"type":"list","value":{"type":"list","value":{"type":"primitive","value":"INTEGER"}}}]},"type_director:Director":{"type":"object","declaration":{"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"wireValue":"age"},"typeReference":{"type":"named","value":"type_director:Age"}}]},"type_director:Age":{"type":"alias","declaration":{"name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},"typeReference":{"type":"primitive","value":"INTEGER"}},"type_director:LiteralBoolean":{"type":"alias","declaration":{"name":{"originalName":"LiteralBoolean","camelCase":{"unsafeName":"literalBoolean","safeName":"literalBoolean"},"snakeCase":{"unsafeName":"literal_boolean","safeName":"literal_boolean"},"screamingSnakeCase":{"unsafeName":"LITERAL_BOOLEAN","safeName":"LITERAL_BOOLEAN"},"pascalCase":{"unsafeName":"LiteralBoolean","safeName":"LiteralBoolean"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},"typeReference":{"type":"literal","value":{"type":"boolean","value":true}}},"type_director:LiteralString":{"type":"alias","declaration":{"name":{"originalName":"LiteralString","camelCase":{"unsafeName":"literalString","safeName":"literalString"},"snakeCase":{"unsafeName":"literal_string","safeName":"literal_string"},"screamingSnakeCase":{"unsafeName":"LITERAL_STRING","safeName":"LITERAL_STRING"},"pascalCase":{"unsafeName":"LiteralString","safeName":"LiteralString"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},"typeReference":{"type":"literal","value":{"type":"string","value":"hello"}}},"type_imdb:CurrencyAmount":{"type":"alias","declaration":{"name":{"originalName":"CurrencyAmount","camelCase":{"unsafeName":"currencyAmount","safeName":"currencyAmount"},"snakeCase":{"unsafeName":"currency_amount","safeName":"currency_amount"},"screamingSnakeCase":{"unsafeName":"CURRENCY_AMOUNT","safeName":"CURRENCY_AMOUNT"},"pascalCase":{"unsafeName":"CurrencyAmount","safeName":"CurrencyAmount"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"typeReference":{"type":"primitive","value":"STRING"}},"type_imdb:MovieId":{"type":"alias","declaration":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"typeReference":{"type":"primitive","value":"STRING"}},"type_imdb:ActorId":{"type":"alias","declaration":{"name":{"originalName":"ActorId","camelCase":{"unsafeName":"actorId","safeName":"actorId"},"snakeCase":{"unsafeName":"actor_id","safeName":"actor_id"},"screamingSnakeCase":{"unsafeName":"ACTOR_ID","safeName":"ACTOR_ID"},"pascalCase":{"unsafeName":"ActorId","safeName":"ActorId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"typeReference":{"type":"primitive","value":"STRING"}},"type_imdb:Movie":{"type":"object","declaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[{"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":"named","value":"type_imdb:MovieId"}},{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"rating","camelCase":{"unsafeName":"rating","safeName":"rating"},"snakeCase":{"unsafeName":"rating","safeName":"rating"},"screamingSnakeCase":{"unsafeName":"RATING","safeName":"RATING"},"pascalCase":{"unsafeName":"Rating","safeName":"Rating"}},"wireValue":"rating"},"typeReference":{"type":"primitive","value":"DOUBLE"}}]},"type_imdb:CreateMovieRequest":{"type":"object","declaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"typeReference":{"type":"list","value":{"type":"primitive","value":"DOUBLE"}}}]},"type_imdb:DirectorWrapper":{"type":"object","declaration":{"name":{"originalName":"DirectorWrapper","camelCase":{"unsafeName":"directorWrapper","safeName":"directorWrapper"},"snakeCase":{"unsafeName":"director_wrapper","safeName":"director_wrapper"},"screamingSnakeCase":{"unsafeName":"DIRECTOR_WRAPPER","safeName":"DIRECTOR_WRAPPER"},"pascalCase":{"unsafeName":"DirectorWrapper","safeName":"DirectorWrapper"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[{"name":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"typeReference":{"type":"named","value":"type_director:Director"}}]},"type_imdb:EmptyObject":{"type":"object","declaration":{"name":{"originalName":"EmptyObject","camelCase":{"unsafeName":"emptyObject","safeName":"emptyObject"},"snakeCase":{"unsafeName":"empty_object","safeName":"empty_object"},"screamingSnakeCase":{"unsafeName":"EMPTY_OBJECT","safeName":"EMPTY_OBJECT"},"pascalCase":{"unsafeName":"EmptyObject","safeName":"EmptyObject"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[]},"type_imdb:Person":{"type":"discriminatedUnion","declaration":{"name":{"originalName":"Person","camelCase":{"unsafeName":"person","safeName":"person"},"snakeCase":{"unsafeName":"person","safeName":"person"},"screamingSnakeCase":{"unsafeName":"PERSON","safeName":"PERSON"},"pascalCase":{"unsafeName":"Person","safeName":"Person"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"discriminant":{"name":{"originalName":"type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"wireValue":"type"},"types":{"actor":{"type":"singleProperty","typeReference":{"type":"named","value":"type_imdb:ActorId"},"discriminantValue":{"name":{"originalName":"actor","camelCase":{"unsafeName":"actor","safeName":"actor"},"snakeCase":{"unsafeName":"actor","safeName":"actor"},"screamingSnakeCase":{"unsafeName":"ACTOR","safeName":"ACTOR"},"pascalCase":{"unsafeName":"Actor","safeName":"Actor"}},"wireValue":"actor"},"properties":null},"director":{"type":"samePropertiesAsObject","typeId":"type_director:Director","discriminantValue":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"properties":[]},"producer":{"type":"samePropertiesAsObject","typeId":"type_imdb:EmptyObject","discriminantValue":{"name":{"originalName":"producer","camelCase":{"unsafeName":"producer","safeName":"producer"},"snakeCase":{"unsafeName":"producer","safeName":"producer"},"screamingSnakeCase":{"unsafeName":"PRODUCER","safeName":"PRODUCER"},"pascalCase":{"unsafeName":"Producer","safeName":"Producer"}},"wireValue":"producer"},"properties":[]},"cinematographer":{"type":"samePropertiesAsObject","typeId":"type_imdb:EmptyObject","discriminantValue":{"name":{"originalName":"cinematographer","camelCase":{"unsafeName":"cinematographer","safeName":"cinematographer"},"snakeCase":{"unsafeName":"cinematographer","safeName":"cinematographer"},"screamingSnakeCase":{"unsafeName":"CINEMATOGRAPHER","safeName":"CINEMATOGRAPHER"},"pascalCase":{"unsafeName":"Cinematographer","safeName":"Cinematographer"}},"wireValue":"cinematographer"},"properties":[]}}},"type_imdb:UnknownRequest":{"type":"object","declaration":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"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"}}]},"type_imdb:RecursiveType":{"type":"object","declaration":{"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"typeReference":{"type":"list","value":{"type":"primitive","value":"DOUBLE"}}},{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"typeReference":{"type":"list","value":{"type":"named","value":"type_imdb:RecursiveType"}}}]}},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"typeReference":{"type":"optional","value":{"type":"primitive","value":"STRING"}}}],"endpoints":{"endpoint_imdb.internalEndpoint":{"auth":null,"declaration":{"name":{"originalName":"internalEndpoint","camelCase":{"unsafeName":"internalEndpoint","safeName":"internalEndpoint"},"snakeCase":{"unsafeName":"internal_endpoint","safeName":"internal_endpoint"},"screamingSnakeCase":{"unsafeName":"INTERNAL_ENDPOINT","safeName":"INTERNAL_ENDPOINT"},"pascalCase":{"unsafeName":"InternalEndpoint","safeName":"InternalEndpoint"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"POST","path":"/test/{rootPathParam}/movies"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}}],"body":{"type":"typeReference","value":{"type":"named","value":"type_imdb:UnknownRequest"}}},"response":{"type":"json"}},"endpoint_imdb.createMovie":{"auth":null,"declaration":{"name":{"originalName":"createMovie","camelCase":{"unsafeName":"createMovie","safeName":"createMovie"},"snakeCase":{"unsafeName":"create_movie","safeName":"create_movie"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE","safeName":"CREATE_MOVIE"},"pascalCase":{"unsafeName":"CreateMovie","safeName":"CreateMovie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"POST","path":"/test/{rootPathParam}/movies"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}}],"body":{"type":"typeReference","value":{"type":"named","value":"type_imdb:CreateMovieRequest"}}},"response":{"type":"json"}},"endpoint_imdb.getMovie":{"auth":null,"declaration":{"name":{"originalName":"getMovie","camelCase":{"unsafeName":"getMovie","safeName":"getMovie"},"snakeCase":{"unsafeName":"get_movie","safeName":"get_movie"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE","safeName":"GET_MOVIE"},"pascalCase":{"unsafeName":"GetMovie","safeName":"GetMovie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"GET","path":"/test/{rootPathParam}/movies/{movieId}"},"request":{"type":"inlined","declaration":{"name":{"originalName":"GetMovieRequest","camelCase":{"unsafeName":"getMovieRequest","safeName":"getMovieRequest"},"snakeCase":{"unsafeName":"get_movie_request","safeName":"get_movie_request"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE_REQUEST","safeName":"GET_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"GetMovieRequest","safeName":"GetMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"wireValue":"movieId"},"typeReference":{"type":"named","value":"type_imdb:MovieId"}}],"queryParameters":[{"name":{"name":{"originalName":"movieName","camelCase":{"unsafeName":"movieName","safeName":"movieName"},"snakeCase":{"unsafeName":"movie_name","safeName":"movie_name"},"screamingSnakeCase":{"unsafeName":"MOVIE_NAME","safeName":"MOVIE_NAME"},"pascalCase":{"unsafeName":"MovieName","safeName":"MovieName"}},"wireValue":"movieName"},"typeReference":{"type":"list","value":{"type":"primitive","value":"STRING"}}}],"headers":[],"body":null,"metadata":{"includePathParameters":false,"onlyPathParameters":false}},"response":{"type":"json"}},"endpoint_imdb.delete":{"auth":null,"declaration":{"name":{"originalName":"delete","camelCase":{"unsafeName":"delete","safeName":"delete"},"snakeCase":{"unsafeName":"delete","safeName":"delete"},"screamingSnakeCase":{"unsafeName":"DELETE","safeName":"DELETE"},"pascalCase":{"unsafeName":"Delete","safeName":"Delete"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"DELETE","path":"/test/{rootPathParam}/movies/{movieId}"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"wireValue":"movieId"},"typeReference":{"type":"named","value":"type_imdb:MovieId"}}],"body":null},"response":{"type":"json"}}}},"subpackages":{"subpackage_commons":{"name":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"service":null,"types":["type_commons:Internal","type_commons:Type","type_commons:UndiscriminatedUnion"],"errors":["error_commons:BadRequestError"],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_director":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"service":null,"types":["type_director:Director","type_director:Age","type_director:LiteralBoolean","type_director:LiteralString"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_imdb":{"name":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"service":"service_imdb","types":["type_imdb:CurrencyAmount","type_imdb:MovieId","type_imdb:ActorId","type_imdb:Movie","type_imdb:CreateMovieRequest","type_imdb:DirectorWrapper","type_imdb:EmptyObject","type_imdb:Person","type_imdb:UnknownRequest","type_imdb:RecursiveType"],"errors":["error_imdb:NotFoundError"],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_commons","subpackage_director","subpackage_imdb"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"simple"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":"foo bar baz","auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"valueType":{"_type":"container","container":{"_type":"optional","optional":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}}},"env":null,"availability":null,"docs":null}],"idempotencyHeaders":[],"types":{"type_commons:Internal":{"inline":null,"name":{"name":{"originalName":"Internal","camelCase":{"unsafeName":"internal","safeName":"internal"},"snakeCase":{"unsafeName":"internal","safeName":"internal"},"screamingSnakeCase":{"unsafeName":"INTERNAL","safeName":"INTERNAL"},"pascalCase":{"unsafeName":"Internal","safeName":"Internal"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Internal"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_commons:Type":{"inline":null,"name":{"name":{"originalName":"Type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:Type"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_commons:UndiscriminatedUnion":{"inline":null,"name":{"name":{"originalName":"UndiscriminatedUnion","camelCase":{"unsafeName":"undiscriminatedUnion","safeName":"undiscriminatedUnion"},"snakeCase":{"unsafeName":"undiscriminated_union","safeName":"undiscriminated_union"},"screamingSnakeCase":{"unsafeName":"UNDISCRIMINATED_UNION","safeName":"UNDISCRIMINATED_UNION"},"pascalCase":{"unsafeName":"UndiscriminatedUnion","safeName":"UndiscriminatedUnion"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:UndiscriminatedUnion"},"shape":{"_type":"undiscriminatedUnion","members":[{"type":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"docs":null},{"type":{"_type":"container","container":{"_type":"list","list":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}}},"docs":null},{"type":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}},"docs":null},{"type":{"_type":"container","container":{"_type":"list","list":{"_type":"container","container":{"_type":"list","list":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}}}}}},"docs":null}]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_director:Director":{"inline":null,"name":{"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Director"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"wireValue":"age"},"valueType":{"_type":"named","name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Age","default":null,"inline":null},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_director:Age"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"GeorgeExample","camelCase":{"unsafeName":"georgeExample","safeName":"georgeExample"},"snakeCase":{"unsafeName":"george_example","safeName":"george_example"},"screamingSnakeCase":{"unsafeName":"GEORGE_EXAMPLE","safeName":"GEORGE_EXAMPLE"},"pascalCase":{"unsafeName":"GeorgeExample","safeName":"GeorgeExample"}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"George the Director"}}},"jsonExample":"George the Director"},"originalTypeDeclaration":{"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Director"}},{"name":{"name":{"originalName":"age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"wireValue":"age"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_director:Age","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"integer","integer":20}},"jsonExample":20}}},"jsonExample":20},"originalTypeDeclaration":{"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Director"}}]},"jsonExample":{"name":"George the Director","age":20},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_director:Age":{"inline":null,"name":{"name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Age"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"INTEGER","v2":{"type":"integer","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example1","camelCase":{"unsafeName":"example1","safeName":"example1"},"snakeCase":{"unsafeName":"example_1","safeName":"example_1"},"screamingSnakeCase":{"unsafeName":"EXAMPLE_1","safeName":"EXAMPLE_1"},"pascalCase":{"unsafeName":"Example1","safeName":"Example1"}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"integer","integer":20}},"jsonExample":20}},"jsonExample":20,"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_director:LiteralBoolean":{"inline":null,"name":{"name":{"originalName":"LiteralBoolean","camelCase":{"unsafeName":"literalBoolean","safeName":"literalBoolean"},"snakeCase":{"unsafeName":"literal_boolean","safeName":"literal_boolean"},"screamingSnakeCase":{"unsafeName":"LITERAL_BOOLEAN","safeName":"LITERAL_BOOLEAN"},"pascalCase":{"unsafeName":"LiteralBoolean","safeName":"LiteralBoolean"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:LiteralBoolean"},"shape":{"_type":"alias","aliasOf":{"_type":"container","container":{"_type":"literal","literal":{"type":"boolean","boolean":true}}},"resolvedType":{"_type":"container","container":{"_type":"literal","literal":{"type":"boolean","boolean":true}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_director:LiteralString":{"inline":null,"name":{"name":{"originalName":"LiteralString","camelCase":{"unsafeName":"literalString","safeName":"literalString"},"snakeCase":{"unsafeName":"literal_string","safeName":"literal_string"},"screamingSnakeCase":{"unsafeName":"LITERAL_STRING","safeName":"LITERAL_STRING"},"pascalCase":{"unsafeName":"LiteralString","safeName":"LiteralString"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:LiteralString"},"shape":{"_type":"alias","aliasOf":{"_type":"container","container":{"_type":"literal","literal":{"type":"string","string":"hello"}}},"resolvedType":{"_type":"container","container":{"_type":"literal","literal":{"type":"string","string":"hello"}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:CurrencyAmount":{"inline":null,"name":{"name":{"originalName":"CurrencyAmount","camelCase":{"unsafeName":"currencyAmount","safeName":"currencyAmount"},"snakeCase":{"unsafeName":"currency_amount","safeName":"currency_amount"},"screamingSnakeCase":{"unsafeName":"CURRENCY_AMOUNT","safeName":"CURRENCY_AMOUNT"},"pascalCase":{"unsafeName":"CurrencyAmount","safeName":"CurrencyAmount"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CurrencyAmount"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"$4.50"}}},"jsonExample":"$4.50"}},"jsonExample":"$4.50","docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:MovieId":{"inline":null,"name":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id1"}}},"jsonExample":"id1"}},"jsonExample":"id1","docs":null},{"name":null,"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id2"}}},"jsonExample":"id2"}},"jsonExample":"id2","docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:ActorId":{"inline":null,"name":{"name":{"originalName":"ActorId","camelCase":{"unsafeName":"actorId","safeName":"actorId"},"snakeCase":{"unsafeName":"actor_id","safeName":"actor_id"},"screamingSnakeCase":{"unsafeName":"ACTOR_ID","safeName":"ACTOR_ID"},"pascalCase":{"unsafeName":"ActorId","safeName":"ActorId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:ActorId"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:Movie":{"inline":null,"name":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"},"shape":{"_type":"object","extends":[],"properties":[{"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"},"valueType":{"_type":"named","name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"availability":null,"docs":null},{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"rating","camelCase":{"unsafeName":"rating","safeName":"rating"},"snakeCase":{"unsafeName":"rating","safeName":"rating"},"screamingSnakeCase":{"unsafeName":"RATING","safeName":"RATING"},"pascalCase":{"unsafeName":"Rating","safeName":"Rating"}},"wireValue":"rating"},"valueType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_imdb:MovieId"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"object","properties":[{"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"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"my-movie-id"}}},"jsonExample":"my-movie-id"}}},"jsonExample":"my-movie-id"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"}},{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Goodwill Hunting"}}},"jsonExample":"Goodwill Hunting"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"}},{"name":{"name":{"originalName":"rating","camelCase":{"unsafeName":"rating","safeName":"rating"},"snakeCase":{"unsafeName":"rating","safeName":"rating"},"screamingSnakeCase":{"unsafeName":"RATING","safeName":"RATING"},"pascalCase":{"unsafeName":"Rating","safeName":"Rating"}},"wireValue":"rating"},"value":{"shape":{"type":"primitive","primitive":{"type":"double","double":14.5}},"jsonExample":14.5},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"}}]},"jsonExample":{"id":"my-movie-id","title":"Goodwill Hunting","rating":14.5},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:CreateMovieRequest":{"inline":null,"name":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"valueType":{"_type":"container","container":{"_type":"list","list":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"Example1","camelCase":{"unsafeName":"example1","safeName":"example1"},"snakeCase":{"unsafeName":"example_1","safeName":"example_1"},"screamingSnakeCase":{"unsafeName":"EXAMPLE_1","safeName":"EXAMPLE_1"},"pascalCase":{"unsafeName":"Example1","safeName":"Example1"}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Winnie the Pooh"}}},"jsonExample":"Winnie the Pooh"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1}},"jsonExample":1},{"shape":{"type":"primitive","primitive":{"type":"double","double":2}},"jsonExample":2},{"shape":{"type":"primitive","primitive":{"type":"double","double":3}},"jsonExample":3}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1,2,3]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}}]},"jsonExample":{"title":"Winnie the Pooh","ratings":[1,2,3]},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:DirectorWrapper":{"inline":null,"name":{"name":{"originalName":"DirectorWrapper","camelCase":{"unsafeName":"directorWrapper","safeName":"directorWrapper"},"snakeCase":{"unsafeName":"director_wrapper","safeName":"director_wrapper"},"screamingSnakeCase":{"unsafeName":"DIRECTOR_WRAPPER","safeName":"DIRECTOR_WRAPPER"},"pascalCase":{"unsafeName":"DirectorWrapper","safeName":"DirectorWrapper"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:DirectorWrapper"},"shape":{"_type":"object","extends":[],"properties":[{"name":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"valueType":{"_type":"named","name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Director","default":null,"inline":null},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":["type_director:Director","type_director:Age"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_director:Director","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"George the Director"}}},"jsonExample":"George the Director"},"originalTypeDeclaration":{"typeId":"type_director:Director","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},{"name":{"name":{"originalName":"age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"wireValue":"age"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_director:Age","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"integer","integer":20}},"jsonExample":20}}},"jsonExample":20},"originalTypeDeclaration":{"typeId":"type_director:Director","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}}]}},"jsonExample":{"name":"George the Director","age":20}},"originalTypeDeclaration":{"name":{"originalName":"DirectorWrapper","camelCase":{"unsafeName":"directorWrapper","safeName":"directorWrapper"},"snakeCase":{"unsafeName":"director_wrapper","safeName":"director_wrapper"},"screamingSnakeCase":{"unsafeName":"DIRECTOR_WRAPPER","safeName":"DIRECTOR_WRAPPER"},"pascalCase":{"unsafeName":"DirectorWrapper","safeName":"DirectorWrapper"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:DirectorWrapper"}}]},"jsonExample":{"director":{"name":"George the Director","age":20}},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:EmptyObject":{"inline":null,"name":{"name":{"originalName":"EmptyObject","camelCase":{"unsafeName":"emptyObject","safeName":"emptyObject"},"snakeCase":{"unsafeName":"empty_object","safeName":"empty_object"},"screamingSnakeCase":{"unsafeName":"EMPTY_OBJECT","safeName":"EMPTY_OBJECT"},"pascalCase":{"unsafeName":"EmptyObject","safeName":"EmptyObject"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:EmptyObject"},"shape":{"_type":"object","extends":[],"properties":[],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:Person":{"inline":null,"name":{"name":{"originalName":"Person","camelCase":{"unsafeName":"person","safeName":"person"},"snakeCase":{"unsafeName":"person","safeName":"person"},"screamingSnakeCase":{"unsafeName":"PERSON","safeName":"PERSON"},"pascalCase":{"unsafeName":"Person","safeName":"Person"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Person"},"shape":{"_type":"union","discriminant":{"name":{"originalName":"type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"wireValue":"type"},"extends":[],"baseProperties":[],"types":[{"discriminantValue":{"name":{"originalName":"actor","camelCase":{"unsafeName":"actor","safeName":"actor"},"snakeCase":{"unsafeName":"actor","safeName":"actor"},"screamingSnakeCase":{"unsafeName":"ACTOR","safeName":"ACTOR"},"pascalCase":{"unsafeName":"Actor","safeName":"Actor"}},"wireValue":"actor"},"shape":{"_type":"singleProperty","name":{"name":{"originalName":"value","camelCase":{"unsafeName":"value","safeName":"value"},"snakeCase":{"unsafeName":"value","safeName":"value"},"screamingSnakeCase":{"unsafeName":"VALUE","safeName":"VALUE"},"pascalCase":{"unsafeName":"Value","safeName":"Value"}},"wireValue":"value"},"type":{"_type":"named","name":{"originalName":"ActorId","camelCase":{"unsafeName":"actorId","safeName":"actorId"},"snakeCase":{"unsafeName":"actor_id","safeName":"actor_id"},"screamingSnakeCase":{"unsafeName":"ACTOR_ID","safeName":"ACTOR_ID"},"pascalCase":{"unsafeName":"ActorId","safeName":"ActorId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:ActorId","default":null,"inline":null}},"displayName":null,"availability":null,"docs":null},{"discriminantValue":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"shape":{"_type":"samePropertiesAsObject","name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"typeId":"type_director:Director"},"displayName":null,"availability":null,"docs":null},{"discriminantValue":{"name":{"originalName":"producer","camelCase":{"unsafeName":"producer","safeName":"producer"},"snakeCase":{"unsafeName":"producer","safeName":"producer"},"screamingSnakeCase":{"unsafeName":"PRODUCER","safeName":"PRODUCER"},"pascalCase":{"unsafeName":"Producer","safeName":"Producer"}},"wireValue":"producer"},"shape":{"_type":"samePropertiesAsObject","name":{"originalName":"EmptyObject","camelCase":{"unsafeName":"emptyObject","safeName":"emptyObject"},"snakeCase":{"unsafeName":"empty_object","safeName":"empty_object"},"screamingSnakeCase":{"unsafeName":"EMPTY_OBJECT","safeName":"EMPTY_OBJECT"},"pascalCase":{"unsafeName":"EmptyObject","safeName":"EmptyObject"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:EmptyObject"},"displayName":null,"availability":null,"docs":null},{"discriminantValue":{"name":{"originalName":"cinematographer","camelCase":{"unsafeName":"cinematographer","safeName":"cinematographer"},"snakeCase":{"unsafeName":"cinematographer","safeName":"cinematographer"},"screamingSnakeCase":{"unsafeName":"CINEMATOGRAPHER","safeName":"CINEMATOGRAPHER"},"pascalCase":{"unsafeName":"Cinematographer","safeName":"Cinematographer"}},"wireValue":"cinematographer"},"shape":{"_type":"samePropertiesAsObject","name":{"originalName":"EmptyObject","camelCase":{"unsafeName":"emptyObject","safeName":"emptyObject"},"snakeCase":{"unsafeName":"empty_object","safeName":"empty_object"},"screamingSnakeCase":{"unsafeName":"EMPTY_OBJECT","safeName":"EMPTY_OBJECT"},"pascalCase":{"unsafeName":"EmptyObject","safeName":"EmptyObject"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:EmptyObject"},"displayName":null,"availability":null,"docs":"i am docs"}]},"referencedTypes":["type_imdb:ActorId","type_director:Director","type_director:Age","type_imdb:EmptyObject"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":{"originalName":"PersonExample1","camelCase":{"unsafeName":"personExample1","safeName":"personExample1"},"snakeCase":{"unsafeName":"person_example_1","safeName":"person_example_1"},"screamingSnakeCase":{"unsafeName":"PERSON_EXAMPLE_1","safeName":"PERSON_EXAMPLE_1"},"pascalCase":{"unsafeName":"PersonExample1","safeName":"PersonExample1"}},"shape":{"type":"union","discriminant":{"name":{"originalName":"type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"wireValue":"type"},"singleUnionType":{"wireDiscriminantValue":{"name":{"originalName":"actor","camelCase":{"unsafeName":"actor","safeName":"actor"},"snakeCase":{"unsafeName":"actor","safeName":"actor"},"screamingSnakeCase":{"unsafeName":"ACTOR","safeName":"ACTOR"},"pascalCase":{"unsafeName":"Actor","safeName":"Actor"}},"wireValue":"actor"},"shape":{"type":"singleProperty","shape":{"type":"named","typeName":{"typeId":"type_imdb:ActorId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"ActorId","camelCase":{"unsafeName":"actorId","safeName":"actorId"},"snakeCase":{"unsafeName":"actor_id","safeName":"actor_id"},"screamingSnakeCase":{"unsafeName":"ACTOR_ID","safeName":"ACTOR_ID"},"pascalCase":{"unsafeName":"ActorId","safeName":"ActorId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Matt Damon"}}},"jsonExample":"Matt Damon"}}},"jsonExample":"Matt Damon"}}},"jsonExample":{"type":"actor","value":"Matt Damon"},"docs":"this is a person example"},{"name":null,"shape":{"type":"union","discriminant":{"name":{"originalName":"type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"wireValue":"type"},"singleUnionType":{"wireDiscriminantValue":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"shape":{"type":"samePropertiesAsObject","typeId":"type_director:Director","object":{"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"George the Directory"}}},"jsonExample":"George the Directory"},"originalTypeDeclaration":{"typeId":"type_director:Director","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},{"name":{"name":{"originalName":"age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"wireValue":"age"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_director:Age","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"integer","integer":100}},"jsonExample":100}}},"jsonExample":100},"originalTypeDeclaration":{"typeId":"type_director:Director","fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}}]}}}},"jsonExample":{"type":"director","name":"George the Directory","age":100},"docs":null},{"name":null,"shape":{"type":"union","discriminant":{"name":{"originalName":"type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"wireValue":"type"},"singleUnionType":{"wireDiscriminantValue":{"name":{"originalName":"producer","camelCase":{"unsafeName":"producer","safeName":"producer"},"snakeCase":{"unsafeName":"producer","safeName":"producer"},"screamingSnakeCase":{"unsafeName":"PRODUCER","safeName":"PRODUCER"},"pascalCase":{"unsafeName":"Producer","safeName":"Producer"}},"wireValue":"producer"},"shape":{"type":"samePropertiesAsObject","typeId":"type_imdb:EmptyObject","object":{"properties":[]}}}},"jsonExample":{"type":"producer"},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:UnknownRequest":{"inline":null,"name":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"},"shape":{"_type":"object","extends":[],"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"},"valueType":{"_type":"unknown"},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[]},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null},"type_imdb:RecursiveType":{"inline":null,"name":{"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType"},"shape":{"_type":"object","extends":[{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}],"properties":[{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"valueType":{"_type":"container","container":{"_type":"list","list":{"_type":"named","name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType","default":null,"inline":null}}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"valueType":{"_type":"container","container":{"_type":"list","list":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"availability":null,"docs":null}]},"referencedTypes":["type_imdb:CreateMovieRequest","type_imdb:RecursiveType"],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[{"name":null,"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"The Godfather"}}},"jsonExample":"The Godfather"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":5}},"jsonExample":5},{"shape":{"type":"primitive","primitive":{"type":"double","double":9}},"jsonExample":9}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[10,5,9]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"named","typeName":{"typeId":"type_imdb:RecursiveType","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"The Godfather II"}}},"jsonExample":"The Godfather II"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":11}},"jsonExample":11}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[10,11]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"value":{"shape":{"type":"container","container":{"type":"list","list":[],"itemType":{"_type":"named","name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType","default":null,"inline":null}}},"jsonExample":[]},"originalTypeDeclaration":{"typeId":"type_imdb:RecursiveType","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}}}}]}},"jsonExample":{"title":"The Godfather II","ratings":[10,11],"selfReferencing":[]}},{"shape":{"type":"named","typeName":{"typeId":"type_imdb:RecursiveType","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"The Godfather III"}}},"jsonExample":"The Godfather III"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"value":{"shape":{"type":"container","container":{"type":"list","list":[],"itemType":{"_type":"named","name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType","default":null,"inline":null}}},"jsonExample":[]},"originalTypeDeclaration":{"typeId":"type_imdb:RecursiveType","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}}}}]}},"jsonExample":{"title":"The Godfather III","ratings":[],"selfReferencing":[]}}],"itemType":{"_type":"named","name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType","default":null,"inline":null}}},"jsonExample":[{"title":"The Godfather II","ratings":[10,11],"selfReferencing":[]},{"title":"The Godfather III","ratings":[],"selfReferencing":[]}]},"originalTypeDeclaration":{"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType"}}]},"jsonExample":{"title":"The Godfather","ratings":[10,5,9],"selfReferencing":[{"title":"The Godfather II","ratings":[10,11],"selfReferencing":[]},{"title":"The Godfather III","ratings":[],"selfReferencing":[]}]},"docs":null},{"name":null,"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Goodfellas"}}},"jsonExample":"Goodfellas"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1}},"jsonExample":1},{"shape":{"type":"primitive","primitive":{"type":"double","double":2}},"jsonExample":2},{"shape":{"type":"primitive","primitive":{"type":"double","double":3}},"jsonExample":3}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1,2,3]},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"value":{"shape":{"type":"container","container":{"type":"list","list":[],"itemType":{"_type":"named","name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType","default":null,"inline":null}}},"jsonExample":[]},"originalTypeDeclaration":{"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:RecursiveType"}}]},"jsonExample":{"title":"Goodfellas","ratings":[1,2,3],"selfReferencing":[]},"docs":null}],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{"error_commons:BadRequestError":{"name":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"discriminantValue":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"wireValue":"BadRequestError"},"statusCode":400,"type":null,"examples":[],"docs":null},"error_imdb:NotFoundError":{"name":{"name":{"originalName":"NotFoundError","camelCase":{"unsafeName":"notFoundError","safeName":"notFoundError"},"snakeCase":{"unsafeName":"not_found_error","safeName":"not_found_error"},"screamingSnakeCase":{"unsafeName":"NOT_FOUND_ERROR","safeName":"NOT_FOUND_ERROR"},"pascalCase":{"unsafeName":"NotFoundError","safeName":"NotFoundError"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"errorId":"error_imdb:NotFoundError"},"discriminantValue":{"name":{"originalName":"NotFoundError","camelCase":{"unsafeName":"notFoundError","safeName":"notFoundError"},"snakeCase":{"unsafeName":"not_found_error","safeName":"not_found_error"},"screamingSnakeCase":{"unsafeName":"NOT_FOUND_ERROR","safeName":"NOT_FOUND_ERROR"},"pascalCase":{"unsafeName":"NotFoundError","safeName":"NotFoundError"}},"wireValue":"NotFoundError"},"statusCode":404,"type":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"examples":[],"docs":null}},"services":{"service_imdb":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_imdb.internalEndpoint","name":{"originalName":"internalEndpoint","camelCase":{"unsafeName":"internalEndpoint","safeName":"internalEndpoint"},"snakeCase":{"unsafeName":"internal_endpoint","safeName":"internal_endpoint"},"screamingSnakeCase":{"unsafeName":"INTERNAL_ENDPOINT","safeName":"INTERNAL_ENDPOINT"},"pascalCase":{"unsafeName":"InternalEndpoint","safeName":"InternalEndpoint"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies"}]},"pathParameters":[],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"named","name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest","default":null,"inline":null},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"named","name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest","default":null,"inline":null},"contentType":null,"docs":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":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"docs":null}},"status-code":null},"errors":[{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"cedf7838","url":"/test/rootPathParam/movies","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":{"type":"reference","shape":{"type":"named","shape":{"type":"object","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"},"originalTypeDeclaration":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"},"value":{"shape":{"type":"unknown","unknown":{"key":"value"}},"jsonExample":{"key":"value"}}}]},"typeName":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:UnknownRequest"}},"jsonExample":{"unknown":{"key":"value"}}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_imdb.createMovie","name":{"originalName":"createMovie","camelCase":{"unsafeName":"createMovie","safeName":"createMovie"},"snakeCase":{"unsafeName":"create_movie","safeName":"create_movie"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE","safeName":"CREATE_MOVIE"},"pascalCase":{"unsafeName":"CreateMovie","safeName":"CreateMovie"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"","parts":[]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies"}]},"pathParameters":[],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"queryParameters":[],"headers":[],"requestBody":{"type":"reference","requestBodyType":{"_type":"named","name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest","default":null,"inline":null},"contentType":null,"docs":null},"sdkRequest":{"shape":{"type":"justRequestBody","value":{"type":"typeReference","requestBodyType":{"_type":"named","name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest","default":null,"inline":null},"contentType":null,"docs":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":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"docs":null}},"status-code":null},"errors":[{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[{"example":{"id":"d33e05ae","name":null,"url":"/test/root/movies","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[],"request":{"type":"reference","shape":{"type":"named","typeName":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Shrek"}}},"jsonExample":"Shrek"},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[10,10,10,10]},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}}]}},"jsonExample":{"title":"Shrek","ratings":[10,10,10,10]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"shrek-123"}}},"jsonExample":"shrek-123"}}},"jsonExample":"shrek-123"}}},"docs":null},"codeSamples":null},{"example":{"id":"4337a93d","name":null,"url":"/test/root/movies","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[],"request":{"type":"reference","shape":{"type":"named","typeName":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}},"shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Winnie the Pooh"}}},"jsonExample":"Winnie the Pooh"},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1}},"jsonExample":1},{"shape":{"type":"primitive","primitive":{"type":"double","double":2}},"jsonExample":2},{"shape":{"type":"primitive","primitive":{"type":"double","double":3}},"jsonExample":3}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1,2,3]},"originalTypeDeclaration":{"typeId":"type_imdb:CreateMovieRequest","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}}}}]}},"jsonExample":{"title":"Winnie the Pooh","ratings":[1,2,3]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"shrek-123"}}},"jsonExample":"shrek-123"}}},"jsonExample":"shrek-123"}}},"docs":null},"codeSamples":null}],"autogeneratedExamples":[{"example":{"id":"798eeb2f","url":"/test/rootPathParam/movies","name":null,"endpointHeaders":[],"endpointPathParameters":[],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":{"type":"reference","shape":{"type":"named","shape":{"type":"object","properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"title"}}},"jsonExample":"title"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"originalTypeDeclaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"},"value":{"shape":{"type":"container","container":{"type":"list","list":[{"shape":{"type":"primitive","primitive":{"type":"double","double":1.1}},"jsonExample":1.1},{"shape":{"type":"primitive","primitive":{"type":"double","double":1.1}},"jsonExample":1.1}],"itemType":{"_type":"primitive","primitive":{"v1":"DOUBLE","v2":{"type":"double","default":null,"validation":null}}}}},"jsonExample":[1.1,1.1]}}]},"typeName":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:CreateMovieRequest"}},"jsonExample":{"title":"title","ratings":[1.1,1.1]}},"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"string"}}},"jsonExample":"string"}},"typeName":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"}},"jsonExample":"string"}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_imdb.getMovie","name":{"originalName":"getMovie","camelCase":{"unsafeName":"getMovie","safeName":"getMovie"},"snakeCase":{"unsafeName":"get_movie","safeName":"get_movie"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE","safeName":"GET_MOVIE"},"pascalCase":{"unsafeName":"GetMovie","safeName":"GetMovie"}},"displayName":"Get Movie by Id","auth":false,"idempotent":false,"baseUrl":null,"method":"GET","basePath":null,"path":{"head":"/","parts":[{"pathParameter":"movieId","tail":""}]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies/"},{"pathParameter":"movieId","tail":""}]},"pathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"valueType":{"_type":"named","name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"location":"ENDPOINT","variable":null,"docs":null}],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null},{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"valueType":{"_type":"named","name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"location":"ENDPOINT","variable":null,"docs":null}],"queryParameters":[{"name":{"name":{"originalName":"movieName","camelCase":{"unsafeName":"movieName","safeName":"movieName"},"snakeCase":{"unsafeName":"movie_name","safeName":"movie_name"},"screamingSnakeCase":{"unsafeName":"MOVIE_NAME","safeName":"MOVIE_NAME"},"pascalCase":{"unsafeName":"MovieName","safeName":"MovieName"}},"wireValue":"movieName"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"allowMultiple":true,"availability":null,"docs":null}],"headers":[],"requestBody":null,"sdkRequest":{"shape":{"type":"wrapper","wrapperName":{"originalName":"GetMovieRequest","camelCase":{"unsafeName":"getMovieRequest","safeName":"getMovieRequest"},"snakeCase":{"unsafeName":"get_movie_request","safeName":"get_movie_request"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE_REQUEST","safeName":"GET_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"GetMovieRequest","safeName":"GetMovieRequest"}},"bodyKey":{"originalName":"body","camelCase":{"unsafeName":"body","safeName":"body"},"snakeCase":{"unsafeName":"body","safeName":"body"},"screamingSnakeCase":{"unsafeName":"BODY","safeName":"BODY"},"pascalCase":{"unsafeName":"Body","safeName":"Body"}},"includePathParameters":false,"onlyPathParameters":false},"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":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie","default":null,"inline":null},"docs":null}},"status-code":null},"errors":[{"error":{"name":{"originalName":"NotFoundError","camelCase":{"unsafeName":"notFoundError","safeName":"notFoundError"},"snakeCase":{"unsafeName":"not_found_error","safeName":"not_found_error"},"screamingSnakeCase":{"unsafeName":"NOT_FOUND_ERROR","safeName":"NOT_FOUND_ERROR"},"pascalCase":{"unsafeName":"NotFoundError","safeName":"NotFoundError"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"errorId":"error_imdb:NotFoundError"},"docs":null},{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[{"example":{"id":"c7ed645f","name":null,"url":"/test/root/movies/id-123","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id-123"}}},"jsonExample":"id-123"}}},"jsonExample":"id-123"}}],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[{"name":{"name":{"originalName":"movieName","camelCase":{"unsafeName":"movieName","safeName":"movieName"},"snakeCase":{"unsafeName":"movie_name","safeName":"movie_name"},"screamingSnakeCase":{"unsafeName":"MOVIE_NAME","safeName":"MOVIE_NAME"},"pascalCase":{"unsafeName":"MovieName","safeName":"MovieName"}},"wireValue":"movieName"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"hello"}}},"jsonExample":"hello"},"shape":{"type":"exploded"}}],"request":null,"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:Movie","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}}},"shape":{"type":"object","properties":[{"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"},"value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id-123"}}},"jsonExample":"id-123"}}},"jsonExample":"id-123"},"originalTypeDeclaration":{"typeId":"type_imdb:Movie","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}}}},{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"Shrek"}}},"jsonExample":"Shrek"},"originalTypeDeclaration":{"typeId":"type_imdb:Movie","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}}}},{"name":{"name":{"originalName":"rating","camelCase":{"unsafeName":"rating","safeName":"rating"},"snakeCase":{"unsafeName":"rating","safeName":"rating"},"screamingSnakeCase":{"unsafeName":"RATING","safeName":"RATING"},"pascalCase":{"unsafeName":"Rating","safeName":"Rating"}},"wireValue":"rating"},"value":{"shape":{"type":"primitive","primitive":{"type":"double","double":10}},"jsonExample":10},"originalTypeDeclaration":{"typeId":"type_imdb:Movie","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}}}}]}},"jsonExample":{"id":"id-123","title":"Shrek","rating":10}}}},"docs":null},"codeSamples":null},{"example":{"id":"bc78fbfa","name":null,"url":"/test/root/movies/id-123","rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}}],"endpointPathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"value":{"shape":{"type":"named","typeName":{"typeId":"type_imdb:MovieId","fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}}},"shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id-123"}}},"jsonExample":"id-123"}}},"jsonExample":"id-123"}}],"servicePathParameters":[],"endpointHeaders":[],"serviceHeaders":[],"queryParameters":[{"name":{"name":{"originalName":"movieName","camelCase":{"unsafeName":"movieName","safeName":"movieName"},"snakeCase":{"unsafeName":"movie_name","safeName":"movie_name"},"screamingSnakeCase":{"unsafeName":"MOVIE_NAME","safeName":"MOVIE_NAME"},"pascalCase":{"unsafeName":"MovieName","safeName":"MovieName"}},"wireValue":"movieName"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"hello"}}},"jsonExample":"hello"},"shape":{"type":"exploded"}}],"request":null,"response":{"type":"error","error":{"name":{"originalName":"NotFoundError","camelCase":{"unsafeName":"notFoundError","safeName":"notFoundError"},"snakeCase":{"unsafeName":"not_found_error","safeName":"not_found_error"},"screamingSnakeCase":{"unsafeName":"NOT_FOUND_ERROR","safeName":"NOT_FOUND_ERROR"},"pascalCase":{"unsafeName":"NotFoundError","safeName":"NotFoundError"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"errorId":"error_imdb:NotFoundError"},"body":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id-123"}}},"jsonExample":"id-123"}},"docs":null},"codeSamples":null}],"autogeneratedExamples":[{"example":{"id":"d5b443a5","url":"/test/rootPathParam/movies/movieId","name":null,"endpointHeaders":[],"endpointPathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"movieId"}}},"jsonExample":"movieId"}},"typeName":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"}},"jsonExample":"movieId"}}],"queryParameters":[{"name":{"name":{"originalName":"movieName","camelCase":{"unsafeName":"movieName","safeName":"movieName"},"snakeCase":{"unsafeName":"movie_name","safeName":"movie_name"},"screamingSnakeCase":{"unsafeName":"MOVIE_NAME","safeName":"MOVIE_NAME"},"pascalCase":{"unsafeName":"MovieName","safeName":"MovieName"}},"wireValue":"movieName"},"shape":{"type":"exploded"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"movieName"}}},"jsonExample":"movieName"}}],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":null,"response":{"type":"ok","value":{"type":"body","value":{"shape":{"type":"named","shape":{"type":"object","properties":[{"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"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"},"value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"id"}}},"jsonExample":"id"}},"typeName":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"}},"jsonExample":"id"}},{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"title"}}},"jsonExample":"title"}},{"name":{"name":{"originalName":"rating","camelCase":{"unsafeName":"rating","safeName":"rating"},"snakeCase":{"unsafeName":"rating","safeName":"rating"},"screamingSnakeCase":{"unsafeName":"RATING","safeName":"RATING"},"pascalCase":{"unsafeName":"Rating","safeName":"Rating"}},"wireValue":"rating"},"originalTypeDeclaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"},"value":{"shape":{"type":"primitive","primitive":{"type":"double","double":1.1}},"jsonExample":1.1}}]},"typeName":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:Movie"}},"jsonExample":{"id":"id","title":"title","rating":1.1}}}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_imdb.delete","name":{"originalName":"delete","camelCase":{"unsafeName":"delete","safeName":"delete"},"snakeCase":{"unsafeName":"delete","safeName":"delete"},"screamingSnakeCase":{"unsafeName":"DELETE","safeName":"DELETE"},"pascalCase":{"unsafeName":"Delete","safeName":"Delete"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"DELETE","basePath":null,"path":{"head":"/","parts":[{"pathParameter":"movieId","tail":""}]},"fullPath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":"/movies/"},{"pathParameter":"movieId","tail":""}]},"pathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"valueType":{"_type":"named","name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"location":"ENDPOINT","variable":null,"docs":null}],"allPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null},{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"valueType":{"_type":"named","name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId","default":null,"inline":null},"location":"ENDPOINT","variable":null,"docs":null}],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[{"error":{"name":{"originalName":"BadRequestError","camelCase":{"unsafeName":"badRequestError","safeName":"badRequestError"},"snakeCase":{"unsafeName":"bad_request_error","safeName":"bad_request_error"},"screamingSnakeCase":{"unsafeName":"BAD_REQUEST_ERROR","safeName":"BAD_REQUEST_ERROR"},"pascalCase":{"unsafeName":"BadRequestError","safeName":"BadRequestError"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"errorId":"error_commons:BadRequestError"},"docs":null}],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"46f6ba77","url":"/test/rootPathParam/movies/movieId","name":null,"endpointHeaders":[],"endpointPathParameters":[{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"movieId"}}},"jsonExample":"movieId"}},"typeName":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"typeId":"type_imdb:MovieId"}},"jsonExample":"movieId"}}],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"rootPathParam"}}},"jsonExample":"rootPathParam"}}],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"property","discriminant":{"name":{"originalName":"error","camelCase":{"unsafeName":"error","safeName":"error"},"snakeCase":{"unsafeName":"error","safeName":"error"},"screamingSnakeCase":{"unsafeName":"ERROR","safeName":"ERROR"},"pascalCase":{"unsafeName":"Error","safeName":"Error"}},"wireValue":"error"},"contentProperty":{"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"}},"basePath":{"head":"/test/","parts":[{"pathParameter":"rootPathParam","tail":""}]},"pathParameters":[{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"location":"ROOT","variable":null,"docs":null}],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{"service_imdb":["type_imdb:MovieId","type_imdb:Movie","type_imdb:CreateMovieRequest","type_imdb:UnknownRequest"]},"sharedTypes":["type_commons:Internal","type_commons:Type","type_commons:UndiscriminatedUnion","type_director:Director","type_director:Age","type_director:LiteralBoolean","type_director:LiteralString","type_imdb:CurrencyAmount","type_imdb:ActorId","type_imdb:DirectorWrapper","type_imdb:EmptyObject","type_imdb:Person","type_imdb:RecursiveType"]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_commons:Internal":{"type":"object","declaration":{"name":{"originalName":"Internal","camelCase":{"unsafeName":"internal","safeName":"internal"},"snakeCase":{"unsafeName":"internal","safeName":"internal"},"screamingSnakeCase":{"unsafeName":"INTERNAL","safeName":"INTERNAL"},"pascalCase":{"unsafeName":"Internal","safeName":"Internal"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_commons:Type":{"type":"object","declaration":{"name":{"originalName":"Type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"typeReference":{"type":"primitive","value":"STRING"}}]},"type_commons:UndiscriminatedUnion":{"type":"undiscriminatedUnion","declaration":{"name":{"originalName":"UndiscriminatedUnion","camelCase":{"unsafeName":"undiscriminatedUnion","safeName":"undiscriminatedUnion"},"snakeCase":{"unsafeName":"undiscriminated_union","safeName":"undiscriminated_union"},"screamingSnakeCase":{"unsafeName":"UNDISCRIMINATED_UNION","safeName":"UNDISCRIMINATED_UNION"},"pascalCase":{"unsafeName":"UndiscriminatedUnion","safeName":"UndiscriminatedUnion"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"types":[{"type":"primitive","value":"STRING"},{"type":"list","value":{"type":"primitive","value":"STRING"}},{"type":"primitive","value":"INTEGER"},{"type":"list","value":{"type":"list","value":{"type":"primitive","value":"INTEGER"}}}]},"type_director:Director":{"type":"object","declaration":{"name":{"originalName":"Director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"wireValue":"age"},"typeReference":{"type":"named","value":"type_director:Age"}}]},"type_director:Age":{"type":"alias","declaration":{"name":{"originalName":"Age","camelCase":{"unsafeName":"age","safeName":"age"},"snakeCase":{"unsafeName":"age","safeName":"age"},"screamingSnakeCase":{"unsafeName":"AGE","safeName":"AGE"},"pascalCase":{"unsafeName":"Age","safeName":"Age"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},"typeReference":{"type":"primitive","value":"INTEGER"}},"type_director:LiteralBoolean":{"type":"alias","declaration":{"name":{"originalName":"LiteralBoolean","camelCase":{"unsafeName":"literalBoolean","safeName":"literalBoolean"},"snakeCase":{"unsafeName":"literal_boolean","safeName":"literal_boolean"},"screamingSnakeCase":{"unsafeName":"LITERAL_BOOLEAN","safeName":"LITERAL_BOOLEAN"},"pascalCase":{"unsafeName":"LiteralBoolean","safeName":"LiteralBoolean"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},"typeReference":{"type":"literal","value":{"type":"boolean","value":true}}},"type_director:LiteralString":{"type":"alias","declaration":{"name":{"originalName":"LiteralString","camelCase":{"unsafeName":"literalString","safeName":"literalString"},"snakeCase":{"unsafeName":"literal_string","safeName":"literal_string"},"screamingSnakeCase":{"unsafeName":"LITERAL_STRING","safeName":"LITERAL_STRING"},"pascalCase":{"unsafeName":"LiteralString","safeName":"LiteralString"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}}},"typeReference":{"type":"literal","value":{"type":"string","value":"hello"}}},"type_imdb:CurrencyAmount":{"type":"alias","declaration":{"name":{"originalName":"CurrencyAmount","camelCase":{"unsafeName":"currencyAmount","safeName":"currencyAmount"},"snakeCase":{"unsafeName":"currency_amount","safeName":"currency_amount"},"screamingSnakeCase":{"unsafeName":"CURRENCY_AMOUNT","safeName":"CURRENCY_AMOUNT"},"pascalCase":{"unsafeName":"CurrencyAmount","safeName":"CurrencyAmount"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"typeReference":{"type":"primitive","value":"STRING"}},"type_imdb:MovieId":{"type":"alias","declaration":{"name":{"originalName":"MovieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"typeReference":{"type":"primitive","value":"STRING"}},"type_imdb:ActorId":{"type":"alias","declaration":{"name":{"originalName":"ActorId","camelCase":{"unsafeName":"actorId","safeName":"actorId"},"snakeCase":{"unsafeName":"actor_id","safeName":"actor_id"},"screamingSnakeCase":{"unsafeName":"ACTOR_ID","safeName":"ACTOR_ID"},"pascalCase":{"unsafeName":"ActorId","safeName":"ActorId"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"typeReference":{"type":"primitive","value":"STRING"}},"type_imdb:Movie":{"type":"object","declaration":{"name":{"originalName":"Movie","camelCase":{"unsafeName":"movie","safeName":"movie"},"snakeCase":{"unsafeName":"movie","safeName":"movie"},"screamingSnakeCase":{"unsafeName":"MOVIE","safeName":"MOVIE"},"pascalCase":{"unsafeName":"Movie","safeName":"Movie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[{"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":"named","value":"type_imdb:MovieId"}},{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"rating","camelCase":{"unsafeName":"rating","safeName":"rating"},"snakeCase":{"unsafeName":"rating","safeName":"rating"},"screamingSnakeCase":{"unsafeName":"RATING","safeName":"RATING"},"pascalCase":{"unsafeName":"Rating","safeName":"Rating"}},"wireValue":"rating"},"typeReference":{"type":"primitive","value":"DOUBLE"}}]},"type_imdb:CreateMovieRequest":{"type":"object","declaration":{"name":{"originalName":"CreateMovieRequest","camelCase":{"unsafeName":"createMovieRequest","safeName":"createMovieRequest"},"snakeCase":{"unsafeName":"create_movie_request","safeName":"create_movie_request"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE_REQUEST","safeName":"CREATE_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"CreateMovieRequest","safeName":"CreateMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"typeReference":{"type":"list","value":{"type":"primitive","value":"DOUBLE"}}}]},"type_imdb:DirectorWrapper":{"type":"object","declaration":{"name":{"originalName":"DirectorWrapper","camelCase":{"unsafeName":"directorWrapper","safeName":"directorWrapper"},"snakeCase":{"unsafeName":"director_wrapper","safeName":"director_wrapper"},"screamingSnakeCase":{"unsafeName":"DIRECTOR_WRAPPER","safeName":"DIRECTOR_WRAPPER"},"pascalCase":{"unsafeName":"DirectorWrapper","safeName":"DirectorWrapper"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[{"name":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"typeReference":{"type":"named","value":"type_director:Director"}}]},"type_imdb:EmptyObject":{"type":"object","declaration":{"name":{"originalName":"EmptyObject","camelCase":{"unsafeName":"emptyObject","safeName":"emptyObject"},"snakeCase":{"unsafeName":"empty_object","safeName":"empty_object"},"screamingSnakeCase":{"unsafeName":"EMPTY_OBJECT","safeName":"EMPTY_OBJECT"},"pascalCase":{"unsafeName":"EmptyObject","safeName":"EmptyObject"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[]},"type_imdb:Person":{"type":"discriminatedUnion","declaration":{"name":{"originalName":"Person","camelCase":{"unsafeName":"person","safeName":"person"},"snakeCase":{"unsafeName":"person","safeName":"person"},"screamingSnakeCase":{"unsafeName":"PERSON","safeName":"PERSON"},"pascalCase":{"unsafeName":"Person","safeName":"Person"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"discriminant":{"name":{"originalName":"type","camelCase":{"unsafeName":"type","safeName":"type"},"snakeCase":{"unsafeName":"type","safeName":"type"},"screamingSnakeCase":{"unsafeName":"TYPE","safeName":"TYPE"},"pascalCase":{"unsafeName":"Type","safeName":"Type"}},"wireValue":"type"},"types":{"actor":{"type":"singleProperty","typeReference":{"type":"named","value":"type_imdb:ActorId"},"discriminantValue":{"name":{"originalName":"actor","camelCase":{"unsafeName":"actor","safeName":"actor"},"snakeCase":{"unsafeName":"actor","safeName":"actor"},"screamingSnakeCase":{"unsafeName":"ACTOR","safeName":"ACTOR"},"pascalCase":{"unsafeName":"Actor","safeName":"Actor"}},"wireValue":"actor"},"properties":null},"director":{"type":"samePropertiesAsObject","typeId":"type_director:Director","discriminantValue":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"wireValue":"director"},"properties":[]},"producer":{"type":"samePropertiesAsObject","typeId":"type_imdb:EmptyObject","discriminantValue":{"name":{"originalName":"producer","camelCase":{"unsafeName":"producer","safeName":"producer"},"snakeCase":{"unsafeName":"producer","safeName":"producer"},"screamingSnakeCase":{"unsafeName":"PRODUCER","safeName":"PRODUCER"},"pascalCase":{"unsafeName":"Producer","safeName":"Producer"}},"wireValue":"producer"},"properties":[]},"cinematographer":{"type":"samePropertiesAsObject","typeId":"type_imdb:EmptyObject","discriminantValue":{"name":{"originalName":"cinematographer","camelCase":{"unsafeName":"cinematographer","safeName":"cinematographer"},"snakeCase":{"unsafeName":"cinematographer","safeName":"cinematographer"},"screamingSnakeCase":{"unsafeName":"CINEMATOGRAPHER","safeName":"CINEMATOGRAPHER"},"pascalCase":{"unsafeName":"Cinematographer","safeName":"Cinematographer"}},"wireValue":"cinematographer"},"properties":[]}}},"type_imdb:UnknownRequest":{"type":"object","declaration":{"name":{"originalName":"UnknownRequest","camelCase":{"unsafeName":"unknownRequest","safeName":"unknownRequest"},"snakeCase":{"unsafeName":"unknown_request","safeName":"unknown_request"},"screamingSnakeCase":{"unsafeName":"UNKNOWN_REQUEST","safeName":"UNKNOWN_REQUEST"},"pascalCase":{"unsafeName":"UnknownRequest","safeName":"UnknownRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"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"}}]},"type_imdb:RecursiveType":{"type":"object","declaration":{"name":{"originalName":"RecursiveType","camelCase":{"unsafeName":"recursiveType","safeName":"recursiveType"},"snakeCase":{"unsafeName":"recursive_type","safeName":"recursive_type"},"screamingSnakeCase":{"unsafeName":"RECURSIVE_TYPE","safeName":"RECURSIVE_TYPE"},"pascalCase":{"unsafeName":"RecursiveType","safeName":"RecursiveType"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"properties":[{"name":{"name":{"originalName":"title","camelCase":{"unsafeName":"title","safeName":"title"},"snakeCase":{"unsafeName":"title","safeName":"title"},"screamingSnakeCase":{"unsafeName":"TITLE","safeName":"TITLE"},"pascalCase":{"unsafeName":"Title","safeName":"Title"}},"wireValue":"title"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"ratings","camelCase":{"unsafeName":"ratings","safeName":"ratings"},"snakeCase":{"unsafeName":"ratings","safeName":"ratings"},"screamingSnakeCase":{"unsafeName":"RATINGS","safeName":"RATINGS"},"pascalCase":{"unsafeName":"Ratings","safeName":"Ratings"}},"wireValue":"ratings"},"typeReference":{"type":"list","value":{"type":"primitive","value":"DOUBLE"}}},{"name":{"name":{"originalName":"selfReferencing","camelCase":{"unsafeName":"selfReferencing","safeName":"selfReferencing"},"snakeCase":{"unsafeName":"self_referencing","safeName":"self_referencing"},"screamingSnakeCase":{"unsafeName":"SELF_REFERENCING","safeName":"SELF_REFERENCING"},"pascalCase":{"unsafeName":"SelfReferencing","safeName":"SelfReferencing"}},"wireValue":"selfReferencing"},"typeReference":{"type":"list","value":{"type":"named","value":"type_imdb:RecursiveType"}}}]}},"headers":[{"name":{"name":{"originalName":"apiVersion","camelCase":{"unsafeName":"apiVersion","safeName":"apiVersion"},"snakeCase":{"unsafeName":"api_version","safeName":"api_version"},"screamingSnakeCase":{"unsafeName":"API_VERSION","safeName":"API_VERSION"},"pascalCase":{"unsafeName":"ApiVersion","safeName":"ApiVersion"}},"wireValue":"X-API-VERSION"},"typeReference":{"type":"optional","value":{"type":"primitive","value":"STRING"}}}],"endpoints":{"endpoint_imdb.internalEndpoint":{"auth":null,"declaration":{"name":{"originalName":"internalEndpoint","camelCase":{"unsafeName":"internalEndpoint","safeName":"internalEndpoint"},"snakeCase":{"unsafeName":"internal_endpoint","safeName":"internal_endpoint"},"screamingSnakeCase":{"unsafeName":"INTERNAL_ENDPOINT","safeName":"INTERNAL_ENDPOINT"},"pascalCase":{"unsafeName":"InternalEndpoint","safeName":"InternalEndpoint"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"POST","path":"/test/{rootPathParam}/movies"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}}],"body":{"type":"typeReference","value":{"type":"named","value":"type_imdb:UnknownRequest"}}},"response":{"type":"json"}},"endpoint_imdb.createMovie":{"auth":null,"declaration":{"name":{"originalName":"createMovie","camelCase":{"unsafeName":"createMovie","safeName":"createMovie"},"snakeCase":{"unsafeName":"create_movie","safeName":"create_movie"},"screamingSnakeCase":{"unsafeName":"CREATE_MOVIE","safeName":"CREATE_MOVIE"},"pascalCase":{"unsafeName":"CreateMovie","safeName":"CreateMovie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"POST","path":"/test/{rootPathParam}/movies"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}}],"body":{"type":"typeReference","value":{"type":"named","value":"type_imdb:CreateMovieRequest"}}},"response":{"type":"json"}},"endpoint_imdb.getMovie":{"auth":null,"declaration":{"name":{"originalName":"getMovie","camelCase":{"unsafeName":"getMovie","safeName":"getMovie"},"snakeCase":{"unsafeName":"get_movie","safeName":"get_movie"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE","safeName":"GET_MOVIE"},"pascalCase":{"unsafeName":"GetMovie","safeName":"GetMovie"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"GET","path":"/test/{rootPathParam}/movies/{movieId}"},"request":{"type":"inlined","declaration":{"name":{"originalName":"GetMovieRequest","camelCase":{"unsafeName":"getMovieRequest","safeName":"getMovieRequest"},"snakeCase":{"unsafeName":"get_movie_request","safeName":"get_movie_request"},"screamingSnakeCase":{"unsafeName":"GET_MOVIE_REQUEST","safeName":"GET_MOVIE_REQUEST"},"pascalCase":{"unsafeName":"GetMovieRequest","safeName":"GetMovieRequest"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"wireValue":"movieId"},"typeReference":{"type":"named","value":"type_imdb:MovieId"}}],"queryParameters":[{"name":{"name":{"originalName":"movieName","camelCase":{"unsafeName":"movieName","safeName":"movieName"},"snakeCase":{"unsafeName":"movie_name","safeName":"movie_name"},"screamingSnakeCase":{"unsafeName":"MOVIE_NAME","safeName":"MOVIE_NAME"},"pascalCase":{"unsafeName":"MovieName","safeName":"MovieName"}},"wireValue":"movieName"},"typeReference":{"type":"list","value":{"type":"primitive","value":"STRING"}}}],"headers":[],"body":null,"metadata":{"includePathParameters":false,"onlyPathParameters":false}},"response":{"type":"json"}},"endpoint_imdb.delete":{"auth":null,"declaration":{"name":{"originalName":"delete","camelCase":{"unsafeName":"delete","safeName":"delete"},"snakeCase":{"unsafeName":"delete","safeName":"delete"},"screamingSnakeCase":{"unsafeName":"DELETE","safeName":"DELETE"},"pascalCase":{"unsafeName":"Delete","safeName":"Delete"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}}},"location":{"method":"DELETE","path":"/test/{rootPathParam}/movies/{movieId}"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"rootPathParam","camelCase":{"unsafeName":"rootPathParam","safeName":"rootPathParam"},"snakeCase":{"unsafeName":"root_path_param","safeName":"root_path_param"},"screamingSnakeCase":{"unsafeName":"ROOT_PATH_PARAM","safeName":"ROOT_PATH_PARAM"},"pascalCase":{"unsafeName":"RootPathParam","safeName":"RootPathParam"}},"wireValue":"rootPathParam"},"typeReference":{"type":"primitive","value":"STRING"}},{"name":{"name":{"originalName":"movieId","camelCase":{"unsafeName":"movieId","safeName":"movieId"},"snakeCase":{"unsafeName":"movie_id","safeName":"movie_id"},"screamingSnakeCase":{"unsafeName":"MOVIE_ID","safeName":"MOVIE_ID"},"pascalCase":{"unsafeName":"MovieId","safeName":"MovieId"}},"wireValue":"movieId"},"typeReference":{"type":"named","value":"type_imdb:MovieId"}}],"body":null},"response":{"type":"json"}}},"environments":null},"subpackages":{"subpackage_commons":{"name":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"service":null,"types":["type_commons:Internal","type_commons:Type","type_commons:UndiscriminatedUnion"],"errors":["error_commons:BadRequestError"],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_director":{"name":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}},"fernFilepath":{"allParts":[{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}],"packagePath":[],"file":{"originalName":"director","camelCase":{"unsafeName":"director","safeName":"director"},"snakeCase":{"unsafeName":"director","safeName":"director"},"screamingSnakeCase":{"unsafeName":"DIRECTOR","safeName":"DIRECTOR"},"pascalCase":{"unsafeName":"Director","safeName":"Director"}}},"service":null,"types":["type_director:Director","type_director:Age","type_director:LiteralBoolean","type_director:LiteralString"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_imdb":{"name":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}},"fernFilepath":{"allParts":[{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}],"packagePath":[],"file":{"originalName":"imdb","camelCase":{"unsafeName":"imdb","safeName":"imdb"},"snakeCase":{"unsafeName":"imdb","safeName":"imdb"},"screamingSnakeCase":{"unsafeName":"IMDB","safeName":"IMDB"},"pascalCase":{"unsafeName":"Imdb","safeName":"Imdb"}}},"service":"service_imdb","types":["type_imdb:CurrencyAmount","type_imdb:MovieId","type_imdb:ActorId","type_imdb:Movie","type_imdb:CreateMovieRequest","type_imdb:DirectorWrapper","type_imdb:EmptyObject","type_imdb:Person","type_imdb:UnknownRequest","type_imdb:RecursiveType"],"errors":["error_imdb:NotFoundError"],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_commons","subpackage_director","subpackage_imdb"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"streaming"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"errors":{},"services":{"service_streaming":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}],"packagePath":[],"file":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_streaming.streaming","name":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"/streaming","parts":[]},"fullPath":{"head":"/movies/streaming","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":{"type":"streaming","value":{"type":"json","payload":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"terminator":null,"docs":null}},"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_streaming.maybeStreaming","name":{"originalName":"maybeStreaming","camelCase":{"unsafeName":"maybeStreaming","safeName":"maybeStreaming"},"snakeCase":{"unsafeName":"maybe_streaming","safeName":"maybe_streaming"},"screamingSnakeCase":{"unsafeName":"MAYBE_STREAMING","safeName":"MAYBE_STREAMING"},"pascalCase":{"unsafeName":"MaybeStreaming","safeName":"MaybeStreaming"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"/maybe-streaming","parts":[]},"fullPath":{"head":"/movies/maybe-streaming","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":{"type":"inlinedRequestBody","name":{"originalName":"maybeStreamingRequest","camelCase":{"unsafeName":"maybeStreamingRequest","safeName":"maybeStreamingRequest"},"snakeCase":{"unsafeName":"maybe_streaming_request","safeName":"maybe_streaming_request"},"screamingSnakeCase":{"unsafeName":"MAYBE_STREAMING_REQUEST","safeName":"MAYBE_STREAMING_REQUEST"},"pascalCase":{"unsafeName":"MaybeStreamingRequest","safeName":"MaybeStreamingRequest"}},"extends":[],"contentType":null,"properties":[{"name":{"name":{"originalName":"stream","camelCase":{"unsafeName":"stream","safeName":"stream"},"snakeCase":{"unsafeName":"stream","safeName":"stream"},"screamingSnakeCase":{"unsafeName":"STREAM","safeName":"STREAM"},"pascalCase":{"unsafeName":"Stream","safeName":"Stream"}},"wireValue":"stream"},"valueType":{"_type":"primitive","primitive":{"v1":"BOOLEAN","v2":null}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[],"docs":null},"sdkRequest":{"shape":{"type":"wrapper","wrapperName":{"originalName":"maybeStreamingRequest","camelCase":{"unsafeName":"maybeStreamingRequest","safeName":"maybeStreamingRequest"},"snakeCase":{"unsafeName":"maybe_streaming_request","safeName":"maybe_streaming_request"},"screamingSnakeCase":{"unsafeName":"MAYBE_STREAMING_REQUEST","safeName":"MAYBE_STREAMING_REQUEST"},"pascalCase":{"unsafeName":"MaybeStreamingRequest","safeName":"MaybeStreamingRequest"}},"bodyKey":{"originalName":"body","camelCase":{"unsafeName":"body","safeName":"body"},"snakeCase":{"unsafeName":"body","safeName":"body"},"screamingSnakeCase":{"unsafeName":"BODY","safeName":"BODY"},"pascalCase":{"unsafeName":"Body","safeName":"Body"}},"includePathParameters":false,"onlyPathParameters":false},"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":"streaming","value":{"type":"json","payload":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"terminator":"[DONE]","docs":null}},"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{"endpoint_streaming.streaming":{"auth":null,"declaration":{"name":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}},"fernFilepath":{"allParts":[{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}],"packagePath":[],"file":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}}},"location":{"method":"POST","path":"/movies/streaming"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}},"endpoint_streaming.maybeStreaming":{"auth":null,"declaration":{"name":{"originalName":"maybeStreaming","camelCase":{"unsafeName":"maybeStreaming","safeName":"maybeStreaming"},"snakeCase":{"unsafeName":"maybe_streaming","safeName":"maybe_streaming"},"screamingSnakeCase":{"unsafeName":"MAYBE_STREAMING","safeName":"MAYBE_STREAMING"},"pascalCase":{"unsafeName":"MaybeStreaming","safeName":"MaybeStreaming"}},"fernFilepath":{"allParts":[{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}],"packagePath":[],"file":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}}},"location":{"method":"POST","path":"/movies/maybe-streaming"},"request":{"type":"inlined","declaration":{"name":{"originalName":"maybeStreamingRequest","camelCase":{"unsafeName":"maybeStreamingRequest","safeName":"maybeStreamingRequest"},"snakeCase":{"unsafeName":"maybe_streaming_request","safeName":"maybe_streaming_request"},"screamingSnakeCase":{"unsafeName":"MAYBE_STREAMING_REQUEST","safeName":"MAYBE_STREAMING_REQUEST"},"pascalCase":{"unsafeName":"MaybeStreamingRequest","safeName":"MaybeStreamingRequest"}},"fernFilepath":{"allParts":[{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}],"packagePath":[],"file":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}}},"pathParameters":[],"queryParameters":[],"headers":[],"body":{"type":"properties","value":[{"name":{"name":{"originalName":"stream","camelCase":{"unsafeName":"stream","safeName":"stream"},"snakeCase":{"unsafeName":"stream","safeName":"stream"},"screamingSnakeCase":{"unsafeName":"STREAM","safeName":"STREAM"},"pascalCase":{"unsafeName":"Stream","safeName":"Stream"}},"wireValue":"stream"},"typeReference":{"type":"primitive","value":"BOOLEAN"}}]},"metadata":{"includePathParameters":false,"onlyPathParameters":false}},"response":{"type":"json"}}}},"subpackages":{"subpackage_streaming":{"name":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}},"fernFilepath":{"allParts":[{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}],"packagePath":[],"file":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}},"service":"service_streaming","types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_streaming"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":true,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"streaming"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"errors":{},"services":{"service_streaming":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}],"packagePath":[],"file":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_streaming.streaming","name":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"/streaming","parts":[]},"fullPath":{"head":"/movies/streaming","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":{"type":"streaming","value":{"type":"json","payload":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"terminator":null,"docs":null}},"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[],"pagination":null,"transport":null,"availability":null,"docs":null},{"id":"endpoint_streaming.maybeStreaming","name":{"originalName":"maybeStreaming","camelCase":{"unsafeName":"maybeStreaming","safeName":"maybeStreaming"},"snakeCase":{"unsafeName":"maybe_streaming","safeName":"maybe_streaming"},"screamingSnakeCase":{"unsafeName":"MAYBE_STREAMING","safeName":"MAYBE_STREAMING"},"pascalCase":{"unsafeName":"MaybeStreaming","safeName":"MaybeStreaming"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"/maybe-streaming","parts":[]},"fullPath":{"head":"/movies/maybe-streaming","parts":[]},"pathParameters":[],"allPathParameters":[],"queryParameters":[],"headers":[],"requestBody":{"type":"inlinedRequestBody","name":{"originalName":"maybeStreamingRequest","camelCase":{"unsafeName":"maybeStreamingRequest","safeName":"maybeStreamingRequest"},"snakeCase":{"unsafeName":"maybe_streaming_request","safeName":"maybe_streaming_request"},"screamingSnakeCase":{"unsafeName":"MAYBE_STREAMING_REQUEST","safeName":"MAYBE_STREAMING_REQUEST"},"pascalCase":{"unsafeName":"MaybeStreamingRequest","safeName":"MaybeStreamingRequest"}},"extends":[],"contentType":null,"properties":[{"name":{"name":{"originalName":"stream","camelCase":{"unsafeName":"stream","safeName":"stream"},"snakeCase":{"unsafeName":"stream","safeName":"stream"},"screamingSnakeCase":{"unsafeName":"STREAM","safeName":"STREAM"},"pascalCase":{"unsafeName":"Stream","safeName":"Stream"}},"wireValue":"stream"},"valueType":{"_type":"primitive","primitive":{"v1":"BOOLEAN","v2":null}},"availability":null,"docs":null}],"extra-properties":false,"extendedProperties":[],"docs":null},"sdkRequest":{"shape":{"type":"wrapper","wrapperName":{"originalName":"maybeStreamingRequest","camelCase":{"unsafeName":"maybeStreamingRequest","safeName":"maybeStreamingRequest"},"snakeCase":{"unsafeName":"maybe_streaming_request","safeName":"maybe_streaming_request"},"screamingSnakeCase":{"unsafeName":"MAYBE_STREAMING_REQUEST","safeName":"MAYBE_STREAMING_REQUEST"},"pascalCase":{"unsafeName":"MaybeStreamingRequest","safeName":"MaybeStreamingRequest"}},"bodyKey":{"originalName":"body","camelCase":{"unsafeName":"body","safeName":"body"},"snakeCase":{"unsafeName":"body","safeName":"body"},"screamingSnakeCase":{"unsafeName":"BODY","safeName":"BODY"},"pascalCase":{"unsafeName":"Body","safeName":"Body"}},"includePathParameters":false,"onlyPathParameters":false},"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":"streaming","value":{"type":"json","payload":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"terminator":"[DONE]","docs":null}},"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{"endpoint_streaming.streaming":{"auth":null,"declaration":{"name":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}},"fernFilepath":{"allParts":[{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}],"packagePath":[],"file":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}}},"location":{"method":"POST","path":"/movies/streaming"},"request":{"type":"body","pathParameters":[],"body":null},"response":{"type":"json"}},"endpoint_streaming.maybeStreaming":{"auth":null,"declaration":{"name":{"originalName":"maybeStreaming","camelCase":{"unsafeName":"maybeStreaming","safeName":"maybeStreaming"},"snakeCase":{"unsafeName":"maybe_streaming","safeName":"maybe_streaming"},"screamingSnakeCase":{"unsafeName":"MAYBE_STREAMING","safeName":"MAYBE_STREAMING"},"pascalCase":{"unsafeName":"MaybeStreaming","safeName":"MaybeStreaming"}},"fernFilepath":{"allParts":[{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}],"packagePath":[],"file":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}}},"location":{"method":"POST","path":"/movies/maybe-streaming"},"request":{"type":"inlined","declaration":{"name":{"originalName":"maybeStreamingRequest","camelCase":{"unsafeName":"maybeStreamingRequest","safeName":"maybeStreamingRequest"},"snakeCase":{"unsafeName":"maybe_streaming_request","safeName":"maybe_streaming_request"},"screamingSnakeCase":{"unsafeName":"MAYBE_STREAMING_REQUEST","safeName":"MAYBE_STREAMING_REQUEST"},"pascalCase":{"unsafeName":"MaybeStreamingRequest","safeName":"MaybeStreamingRequest"}},"fernFilepath":{"allParts":[{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}],"packagePath":[],"file":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}}},"pathParameters":[],"queryParameters":[],"headers":[],"body":{"type":"properties","value":[{"name":{"name":{"originalName":"stream","camelCase":{"unsafeName":"stream","safeName":"stream"},"snakeCase":{"unsafeName":"stream","safeName":"stream"},"screamingSnakeCase":{"unsafeName":"STREAM","safeName":"STREAM"},"pascalCase":{"unsafeName":"Stream","safeName":"Stream"}},"wireValue":"stream"},"typeReference":{"type":"primitive","value":"BOOLEAN"}}]},"metadata":{"includePathParameters":false,"onlyPathParameters":false}},"response":{"type":"json"}}},"environments":null},"subpackages":{"subpackage_streaming":{"name":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}},"fernFilepath":{"allParts":[{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}],"packagePath":[],"file":{"originalName":"streaming","camelCase":{"unsafeName":"streaming","safeName":"streaming"},"snakeCase":{"unsafeName":"streaming","safeName":"streaming"},"screamingSnakeCase":{"unsafeName":"STREAMING","safeName":"STREAMING"},"pascalCase":{"unsafeName":"Streaming","safeName":"Streaming"}}},"service":"service_streaming","types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_streaming"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":true,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"variables"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_commons:StringAlias":{"inline":null,"name":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{},"services":{"service_service":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_service.test","name":{"originalName":"test","camelCase":{"unsafeName":"test","safeName":"test"},"snakeCase":{"unsafeName":"test","safeName":"test"},"screamingSnakeCase":{"unsafeName":"TEST","safeName":"TEST"},"pascalCase":{"unsafeName":"Test","safeName":"Test"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"/","parts":[{"pathParameter":"foo","tail":""}]},"fullPath":{"head":"/","parts":[{"pathParameter":"root","tail":"/movies/"},{"pathParameter":"foo","tail":""}]},"pathParameters":[{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"valueType":{"_type":"named","name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias","default":null,"inline":null},"location":"ENDPOINT","variable":"my-variable","docs":null}],"allPathParameters":[{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"valueType":{"_type":"named","name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias","default":null,"inline":null},"location":"ROOT","variable":"my-variable","docs":null},{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"valueType":{"_type":"named","name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias","default":null,"inline":null},"location":"ENDPOINT","variable":"my-variable","docs":null}],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"ed88afbe","url":"/root/movies/foo","name":null,"endpointHeaders":[],"endpointPathParameters":[{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"foo"}}},"jsonExample":"foo"}},"typeName":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias"}},"jsonExample":"foo"}}],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}},"typeName":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias"}},"jsonExample":"root"}}],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":{"head":"/","parts":[{"pathParameter":"root","tail":""}]},"pathParameters":[{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"valueType":{"_type":"named","name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias","default":null,"inline":null},"location":"ROOT","variable":"my-variable","docs":null}],"variables":[{"id":"my-variable","name":{"originalName":"my-variable","camelCase":{"unsafeName":"myVariable","safeName":"myVariable"},"snakeCase":{"unsafeName":"my_variable","safeName":"my_variable"},"screamingSnakeCase":{"unsafeName":"MY_VARIABLE","safeName":"MY_VARIABLE"},"pascalCase":{"unsafeName":"MyVariable","safeName":"MyVariable"}},"type":{"_type":"named","name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias","default":null,"inline":null},"docs":"I am a variable"}],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{"service_service":["type_commons:StringAlias"]},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_commons:StringAlias":{"type":"alias","declaration":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"typeReference":{"type":"primitive","value":"STRING"}}},"headers":[],"endpoints":{"endpoint_service.test":{"auth":null,"declaration":{"name":{"originalName":"test","camelCase":{"unsafeName":"test","safeName":"test"},"snakeCase":{"unsafeName":"test","safeName":"test"},"screamingSnakeCase":{"unsafeName":"TEST","safeName":"TEST"},"pascalCase":{"unsafeName":"Test","safeName":"Test"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"location":{"method":"POST","path":"/{root}/movies/{foo}"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"wireValue":"root"},"typeReference":{"type":"named","value":"type_commons:StringAlias"}},{"name":{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"wireValue":"foo"},"typeReference":{"type":"named","value":"type_commons:StringAlias"}}],"body":null},"response":{"type":"json"}}}},"subpackages":{"subpackage_commons":{"name":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"service":null,"types":["type_commons:StringAlias"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_service":{"name":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"service":"service_service","types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_commons","subpackage_service"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"variables"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{"type_commons:StringAlias":{"inline":null,"name":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias"},"shape":{"_type":"alias","aliasOf":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"resolvedType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}}},"referencedTypes":[],"encoding":{"json":{},"proto":null},"source":null,"userProvidedExamples":[],"autogeneratedExamples":[],"availability":null,"docs":null}},"errors":{},"services":{"service_service":{"availability":null,"name":{"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"displayName":null,"basePath":{"head":"/movies","parts":[]},"headers":[],"pathParameters":[],"encoding":{"json":{},"proto":null},"transport":{"type":"http"},"endpoints":[{"id":"endpoint_service.test","name":{"originalName":"test","camelCase":{"unsafeName":"test","safeName":"test"},"snakeCase":{"unsafeName":"test","safeName":"test"},"screamingSnakeCase":{"unsafeName":"TEST","safeName":"TEST"},"pascalCase":{"unsafeName":"Test","safeName":"Test"}},"displayName":null,"auth":false,"idempotent":false,"baseUrl":null,"method":"POST","basePath":null,"path":{"head":"/","parts":[{"pathParameter":"foo","tail":""}]},"fullPath":{"head":"/","parts":[{"pathParameter":"root","tail":"/movies/"},{"pathParameter":"foo","tail":""}]},"pathParameters":[{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"valueType":{"_type":"named","name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias","default":null,"inline":null},"location":"ENDPOINT","variable":"my-variable","docs":null}],"allPathParameters":[{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"valueType":{"_type":"named","name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias","default":null,"inline":null},"location":"ROOT","variable":"my-variable","docs":null},{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"valueType":{"_type":"named","name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias","default":null,"inline":null},"location":"ENDPOINT","variable":"my-variable","docs":null}],"queryParameters":[],"headers":[],"requestBody":null,"sdkRequest":null,"response":{"body":null,"status-code":null},"errors":[],"userSpecifiedExamples":[],"autogeneratedExamples":[{"example":{"id":"ed88afbe","url":"/root/movies/foo","name":null,"endpointHeaders":[],"endpointPathParameters":[{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"foo"}}},"jsonExample":"foo"}},"typeName":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias"}},"jsonExample":"foo"}}],"queryParameters":[],"servicePathParameters":[],"serviceHeaders":[],"rootPathParameters":[{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"value":{"shape":{"type":"named","shape":{"type":"alias","value":{"shape":{"type":"primitive","primitive":{"type":"string","string":{"original":"root"}}},"jsonExample":"root"}},"typeName":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias"}},"jsonExample":"root"}}],"request":null,"response":{"type":"ok","value":{"type":"body","value":null}},"docs":null}}],"pagination":null,"transport":null,"availability":null,"docs":null}]}},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":{"head":"/","parts":[{"pathParameter":"root","tail":""}]},"pathParameters":[{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"valueType":{"_type":"named","name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias","default":null,"inline":null},"location":"ROOT","variable":"my-variable","docs":null}],"variables":[{"id":"my-variable","name":{"originalName":"my-variable","camelCase":{"unsafeName":"myVariable","safeName":"myVariable"},"snakeCase":{"unsafeName":"my_variable","safeName":"my_variable"},"screamingSnakeCase":{"unsafeName":"MY_VARIABLE","safeName":"MY_VARIABLE"},"pascalCase":{"unsafeName":"MyVariable","safeName":"MyVariable"}},"type":{"_type":"named","name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"typeId":"type_commons:StringAlias","default":null,"inline":null},"docs":"I am a variable"}],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{"service_service":["type_commons:StringAlias"]},"sharedTypes":[]},"webhookGroups":{},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{"type_commons:StringAlias":{"type":"alias","declaration":{"name":{"originalName":"StringAlias","camelCase":{"unsafeName":"stringAlias","safeName":"stringAlias"},"snakeCase":{"unsafeName":"string_alias","safeName":"string_alias"},"screamingSnakeCase":{"unsafeName":"STRING_ALIAS","safeName":"STRING_ALIAS"},"pascalCase":{"unsafeName":"StringAlias","safeName":"StringAlias"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}}},"typeReference":{"type":"primitive","value":"STRING"}}},"headers":[],"endpoints":{"endpoint_service.test":{"auth":null,"declaration":{"name":{"originalName":"test","camelCase":{"unsafeName":"test","safeName":"test"},"snakeCase":{"unsafeName":"test","safeName":"test"},"screamingSnakeCase":{"unsafeName":"TEST","safeName":"TEST"},"pascalCase":{"unsafeName":"Test","safeName":"Test"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}}},"location":{"method":"POST","path":"/{root}/movies/{foo}"},"request":{"type":"body","pathParameters":[{"name":{"name":{"originalName":"root","camelCase":{"unsafeName":"root","safeName":"root"},"snakeCase":{"unsafeName":"root","safeName":"root"},"screamingSnakeCase":{"unsafeName":"ROOT","safeName":"ROOT"},"pascalCase":{"unsafeName":"Root","safeName":"Root"}},"wireValue":"root"},"typeReference":{"type":"named","value":"type_commons:StringAlias"}},{"name":{"name":{"originalName":"foo","camelCase":{"unsafeName":"foo","safeName":"foo"},"snakeCase":{"unsafeName":"foo","safeName":"foo"},"screamingSnakeCase":{"unsafeName":"FOO","safeName":"FOO"},"pascalCase":{"unsafeName":"Foo","safeName":"Foo"}},"wireValue":"foo"},"typeReference":{"type":"named","value":"type_commons:StringAlias"}}],"body":null},"response":{"type":"json"}}},"environments":null},"subpackages":{"subpackage_commons":{"name":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}},"fernFilepath":{"allParts":[{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}],"packagePath":[],"file":{"originalName":"commons","camelCase":{"unsafeName":"commons","safeName":"commons"},"snakeCase":{"unsafeName":"commons","safeName":"commons"},"screamingSnakeCase":{"unsafeName":"COMMONS","safeName":"COMMONS"},"pascalCase":{"unsafeName":"Commons","safeName":"Commons"}}},"service":null,"types":["type_commons:StringAlias"],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":false,"docs":null},"subpackage_service":{"name":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}},"fernFilepath":{"allParts":[{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}],"packagePath":[],"file":{"originalName":"service","camelCase":{"unsafeName":"service","safeName":"service"},"snakeCase":{"unsafeName":"service","safeName":"service"},"screamingSnakeCase":{"unsafeName":"SERVICE","safeName":"SERVICE"},"pascalCase":{"unsafeName":"Service","safeName":"Service"}}},"service":"service_service","types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":null,"websocket":null,"hasEndpointsInTree":true,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_commons","subpackage_service"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":true,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; -exports[`ir > {"name":"webhooks"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{"webhooks_webhooks":[{"id":"webhooks_webhooks.sendNotification","displayName":null,"method":"POST","name":{"originalName":"sendNotification","camelCase":{"unsafeName":"sendNotification","safeName":"sendNotification"},"snakeCase":{"unsafeName":"send_notification","safeName":"send_notification"},"screamingSnakeCase":{"unsafeName":"SEND_NOTIFICATION","safeName":"SEND_NOTIFICATION"},"pascalCase":{"unsafeName":"SendNotification","safeName":"SendNotification"}},"headers":[],"payload":{"type":"inlinedPayload","name":{"originalName":"NotificationPayload","camelCase":{"unsafeName":"notificationPayload","safeName":"notificationPayload"},"snakeCase":{"unsafeName":"notification_payload","safeName":"notification_payload"},"screamingSnakeCase":{"unsafeName":"NOTIFICATION_PAYLOAD","safeName":"NOTIFICATION_PAYLOAD"},"pascalCase":{"unsafeName":"NotificationPayload","safeName":"NotificationPayload"}},"extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"urgent","camelCase":{"unsafeName":"urgent","safeName":"urgent"},"snakeCase":{"unsafeName":"urgent","safeName":"urgent"},"screamingSnakeCase":{"unsafeName":"URGENT","safeName":"URGENT"},"pascalCase":{"unsafeName":"Urgent","safeName":"Urgent"}},"wireValue":"urgent"},"valueType":{"_type":"primitive","primitive":{"v1":"BOOLEAN","v2":null}},"availability":null,"docs":"Some docs about urgency"}]},"examples":null,"availability":null,"docs":"This is a webhook to receive notifications."}]},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{}},"subpackages":{"subpackage_webhooks":{"name":{"originalName":"webhooks","camelCase":{"unsafeName":"webhooks","safeName":"webhooks"},"snakeCase":{"unsafeName":"webhooks","safeName":"webhooks"},"screamingSnakeCase":{"unsafeName":"WEBHOOKS","safeName":"WEBHOOKS"},"pascalCase":{"unsafeName":"Webhooks","safeName":"Webhooks"}},"fernFilepath":{"allParts":[{"originalName":"webhooks","camelCase":{"unsafeName":"webhooks","safeName":"webhooks"},"snakeCase":{"unsafeName":"webhooks","safeName":"webhooks"},"screamingSnakeCase":{"unsafeName":"WEBHOOKS","safeName":"WEBHOOKS"},"pascalCase":{"unsafeName":"Webhooks","safeName":"Webhooks"}}],"packagePath":[],"file":{"originalName":"webhooks","camelCase":{"unsafeName":"webhooks","safeName":"webhooks"},"snakeCase":{"unsafeName":"webhooks","safeName":"webhooks"},"screamingSnakeCase":{"unsafeName":"WEBHOOKS","safeName":"WEBHOOKS"},"pascalCase":{"unsafeName":"Webhooks","safeName":"Webhooks"}}},"service":null,"types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":"webhooks_webhooks","websocket":null,"hasEndpointsInTree":false,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_webhooks"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":false,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; +exports[`ir > {"name":"webhooks"} 1`] = `"{"fdrApiDefinitionId":null,"apiVersion":null,"apiName":{"originalName":"my-api","camelCase":{"unsafeName":"myApi","safeName":"myApi"},"snakeCase":{"unsafeName":"my_api","safeName":"my_api"},"screamingSnakeCase":{"unsafeName":"MY_API","safeName":"MY_API"},"pascalCase":{"unsafeName":"MyApi","safeName":"MyApi"}},"apiDisplayName":null,"apiDocs":null,"auth":{"requirement":"ALL","schemes":[],"docs":null},"headers":[],"idempotencyHeaders":[],"types":{},"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":null,"errorDiscriminationStrategy":{"type":"statusCode"},"basePath":null,"pathParameters":[],"variables":[],"serviceTypeReferenceInfo":{"typesReferencedOnlyByService":{},"sharedTypes":[]},"webhookGroups":{"webhooks_webhooks":[{"id":"webhooks_webhooks.sendNotification","displayName":null,"method":"POST","name":{"originalName":"sendNotification","camelCase":{"unsafeName":"sendNotification","safeName":"sendNotification"},"snakeCase":{"unsafeName":"send_notification","safeName":"send_notification"},"screamingSnakeCase":{"unsafeName":"SEND_NOTIFICATION","safeName":"SEND_NOTIFICATION"},"pascalCase":{"unsafeName":"SendNotification","safeName":"SendNotification"}},"headers":[],"payload":{"type":"inlinedPayload","name":{"originalName":"NotificationPayload","camelCase":{"unsafeName":"notificationPayload","safeName":"notificationPayload"},"snakeCase":{"unsafeName":"notification_payload","safeName":"notification_payload"},"screamingSnakeCase":{"unsafeName":"NOTIFICATION_PAYLOAD","safeName":"NOTIFICATION_PAYLOAD"},"pascalCase":{"unsafeName":"NotificationPayload","safeName":"NotificationPayload"}},"extends":[],"properties":[{"name":{"name":{"originalName":"name","camelCase":{"unsafeName":"name","safeName":"name"},"snakeCase":{"unsafeName":"name","safeName":"name"},"screamingSnakeCase":{"unsafeName":"NAME","safeName":"NAME"},"pascalCase":{"unsafeName":"Name","safeName":"Name"}},"wireValue":"name"},"valueType":{"_type":"primitive","primitive":{"v1":"STRING","v2":{"type":"string","default":null,"validation":null}}},"availability":null,"docs":null},{"name":{"name":{"originalName":"urgent","camelCase":{"unsafeName":"urgent","safeName":"urgent"},"snakeCase":{"unsafeName":"urgent","safeName":"urgent"},"screamingSnakeCase":{"unsafeName":"URGENT","safeName":"URGENT"},"pascalCase":{"unsafeName":"Urgent","safeName":"Urgent"}},"wireValue":"urgent"},"valueType":{"_type":"primitive","primitive":{"v1":"BOOLEAN","v2":null}},"availability":null,"docs":"Some docs about urgency"}]},"examples":null,"availability":null,"docs":"This is a webhook to receive notifications."}]},"websocketChannels":{},"readmeConfig":null,"sourceConfig":null,"publishConfig":null,"dynamic":{"version":"1.0.0","types":{},"headers":[],"endpoints":{},"environments":null},"subpackages":{"subpackage_webhooks":{"name":{"originalName":"webhooks","camelCase":{"unsafeName":"webhooks","safeName":"webhooks"},"snakeCase":{"unsafeName":"webhooks","safeName":"webhooks"},"screamingSnakeCase":{"unsafeName":"WEBHOOKS","safeName":"WEBHOOKS"},"pascalCase":{"unsafeName":"Webhooks","safeName":"Webhooks"}},"fernFilepath":{"allParts":[{"originalName":"webhooks","camelCase":{"unsafeName":"webhooks","safeName":"webhooks"},"snakeCase":{"unsafeName":"webhooks","safeName":"webhooks"},"screamingSnakeCase":{"unsafeName":"WEBHOOKS","safeName":"WEBHOOKS"},"pascalCase":{"unsafeName":"Webhooks","safeName":"Webhooks"}}],"packagePath":[],"file":{"originalName":"webhooks","camelCase":{"unsafeName":"webhooks","safeName":"webhooks"},"snakeCase":{"unsafeName":"webhooks","safeName":"webhooks"},"screamingSnakeCase":{"unsafeName":"WEBHOOKS","safeName":"WEBHOOKS"},"pascalCase":{"unsafeName":"Webhooks","safeName":"Webhooks"}}},"service":null,"types":[],"errors":[],"subpackages":[],"navigationConfig":null,"webhooks":"webhooks_webhooks","websocket":null,"hasEndpointsInTree":false,"docs":null}},"rootPackage":{"fernFilepath":{"allParts":[],"packagePath":[],"file":null},"websocket":null,"service":null,"types":[],"errors":[],"subpackages":["subpackage_webhooks"],"webhooks":null,"navigationConfig":null,"hasEndpointsInTree":false,"docs":null},"sdkConfig":{"isAuthMandatory":false,"hasStreamingEndpoints":false,"hasPaginatedEndpoints":false,"hasFileDownloadEndpoints":false,"platformHeaders":{"language":"X-Fern-Language","sdkName":"X-Fern-SDK-Name","sdkVersion":"X-Fern-SDK-Version","userAgent":null}}}"`; diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/__snapshots__/update-api.test.ts.snap b/packages/cli/ete-tests/src/tests/update-api-unioned/__snapshots__/update-api.test.ts.snap deleted file mode 100644 index 1a7f41a12f6..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/__snapshots__/update-api.test.ts.snap +++ /dev/null @@ -1,797 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`fern api update unioned > fern api update unioned 1`] = ` -[ - { - "contents": "default-group: local -api: - path: ./openapi.json - origin: https://bump.sh/bump-examples/doc/train-travel-api.json -", - "name": "generators.yml", - "type": "file", - }, - { - "contents": "{ - "info": { - "contact": { - "name": "Train Support", - "url": "https://example.com/support", - "email": "support@example.com" - }, - "license": { - "name": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", - "identifier": "CC-BY-NC-SA-4.0" - } - }, - "servers": [ - { - "url": "https://api.example.com", - "description": "Production" - } - ], - "security": [ - { - "OAuth2": [ - "read" - ] - } - ], - "x-topics": [ - { - "title": "Getting started", - "content": { - "$ref": "./docs/getting-started.md" - } - } - ], - "tags": [ - { - "name": "Stations", - "description": "Find and filter train stations across Europe, including their location\\nand local timezone.\\n" - }, - { - "name": "Train Tracks", - "description": "Find and filter all the different rail roads available across Europe, including their location\\nand local timezone.\\n" - }, - { - "name": "Trips", - "description": "Timetables and routes for train trips between stations, including pricing\\nand availability.\\n" - }, - { - "name": "Bookings", - "description": "Create and manage bookings for train trips, including passenger details\\nand optional extras.\\n" - }, - { - "name": "Payments", - "description": "Pay for bookings using a card or bank account, and view payment\\nstatus and history.\\n\\n> warn\\n> Bookings usually expire within 1 hour so you'll need to make your payment\\n> before the expiry date \\n" - } - ], - "webhooks": { - "newBooking": { - "post": { - "operationId": "new-booking", - "summary": "New Booking", - "description": "Subscribe to new bookings being created, to update integrations for your users. Related data is available via the links provided in the request.\\n", - "tags": [ - "Bookings" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - }, - "responses": { - "200": { - "description": "Return a 200 status to indicate that the data was received successfully." - } - } - } - } - }, - "components": { - "securitySchemes": { - "OAuth2": { - "type": "oauth2", - "description": "OAuth 2.0 authorization code following RFC8725 best practices.", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://example.com/oauth/authorize", - "tokenUrl": "https://example.com/oauth/token", - "scopes": { - "read": "Read access", - "write": "Write access" - } - } - } - } - }, - "schemas": { - "Station": { - "type": "object", - "xml": { - "name": "station" - }, - "required": [ - "id", - "name", - "address", - "country_code" - ], - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the station.", - "examples": [ - "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "b2e783e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "name": { - "type": "string", - "description": "The name of the station", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "address": { - "type": "string", - "description": "The address of the station.", - "examples": [ - "Invalidenstraße 10557 Berlin, Germany", - "18 Rue de Dunkerque 75010 Paris, France" - ] - }, - "country_code": { - "type": "string", - "description": "The country code of the station.", - "format": "iso-country-code", - "examples": [ - "DE", - "FR" - ] - }, - "timezone": { - "type": "string", - "description": "The timezone of the station in the [IANA Time Zone Database format](https://www.iana.org/time-zones).", - "examples": [ - "Europe/Berlin", - "Europe/Paris" - ] - } - } - }, - "Links-Self": { - "type": "object", - "properties": { - "self": { - "type": "string", - "format": "uri" - } - } - }, - "Links-Pagination": { - "type": "object", - "properties": { - "next": { - "type": "string", - "format": "uri" - }, - "prev": { - "type": "string", - "format": "uri" - } - } - }, - "Trip": { - "type": "object", - "xml": { - "name": "trip" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "origin": { - "type": "string", - "description": "The starting station of the trip", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "destination": { - "type": "string", - "description": "The destination station of the trip", - "examples": [ - "Paris Gare du Nord", - "Berlin Hauptbahnhof" - ] - }, - "departure_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip departs", - "examples": [ - "2024-02-01T10:00:00Z" - ] - }, - "arrival_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip arrives", - "examples": [ - "2024-02-01T16:00:00Z" - ] - }, - "operator": { - "type": "string", - "description": "The name of the operator of the trip", - "examples": [ - "Deutsche Bahn", - "SNCF" - ] - }, - "price": { - "type": "number", - "description": "The cost of the trip", - "examples": [ - 50 - ] - }, - "bicycles_allowed": { - "type": "boolean", - "description": "Indicates whether bicycles are allowed on the trip" - }, - "dogs_allowed": { - "type": "boolean", - "description": "Indicates whether dogs are allowed on the trip" - } - } - }, - "Booking": { - "type": "object", - "xml": { - "name": "booking" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the booking", - "readOnly": true, - "examples": [ - "3f3e3e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "trip_id": { - "type": "string", - "format": "uuid", - "description": "Identifier of the booked trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "passenger_name": { - "type": "string", - "description": "Name of the passenger", - "examples": [ - "John Doe" - ] - }, - "has_bicycle": { - "type": "boolean", - "description": "Indicates whether the passenger has a bicycle." - }, - "has_dog": { - "type": "boolean", - "description": "Indicates whether the passenger has a dog." - } - } - }, - "Wrapper-Collection": { - "description": "This is a generic request/response wrapper which contains both data and links which serve as hypermedia controls (HATEOAS).", - "type": "object", - "properties": { - "data": { - "description": "The wrapper for a collection is an array of objects.", - "type": "array", - "items": { - "type": "object" - } - }, - "links": { - "description": "A set of hypermedia links which serve as controls for the client.", - "type": "object", - "readOnly": true - } - }, - "xml": { - "name": "data" - } - }, - "BookingPayment": { - "type": "object", - "properties": { - "id": { - "description": "Unique identifier for the payment. This will be a unique identifier for the payment, and is used to reference the payment in other objects.", - "type": "string", - "format": "uuid", - "readOnly": true - }, - "amount": { - "description": "Amount intended to be collected by this payment. A positive decimal figure describing the amount to be collected.", - "type": "number", - "exclusiveMinimum": 0, - "examples": [ - 49.99 - ] - }, - "currency": { - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", - "type": "string", - "enum": [ - "bam", - "bgn", - "chf", - "eur", - "gbp", - "nok", - "sek", - "try" - ] - }, - "source": { - "unevaluatedProperties": false, - "description": "The payment source to take the payment from. This can be a card or a bank account. Some of these properties will be hidden on read to protect PII leaking.", - "anyOf": [ - { - "title": "Card", - "description": "A card (debit or credit) to take payment from.", - "properties": { - "object": { - "type": "string", - "const": "card" - }, - "name": { - "type": "string", - "description": "Cardholder's full name as it appears on the card.", - "examples": [ - "Francis Bourgeois" - ] - }, - "number": { - "type": "string", - "description": "The card number, as a string without any separators. On read all but the last four digits will be masked for security.", - "examples": [ - "4242424242424242" - ] - }, - "cvc": { - "type": "integer", - "description": "Card security code, 3 or 4 digits usually found on the back of the card.", - "minLength": 3, - "maxLength": 4, - "writeOnly": true, - "example": 123 - }, - "exp_month": { - "type": "integer", - "format": "int64", - "description": "Two-digit number representing the card's expiration month.", - "examples": [ - 12 - ] - }, - "exp_year": { - "type": "integer", - "format": "int64", - "description": "Four-digit number representing the card's expiration year.", - "examples": [ - 2025 - ] - }, - "address_line1": { - "type": "string", - "writeOnly": true - }, - "address_line2": { - "type": "string", - "writeOnly": true - }, - "address_city": { - "type": "string" - }, - "address_country": { - "type": "string" - }, - "address_post_code": { - "type": "string" - } - }, - "required": [ - "name", - "number", - "cvc", - "exp_month", - "exp_year", - "address_country" - ] - }, - { - "title": "Bank Account", - "description": "A bank account to take payment from. Must be able to make payments in the currency specified in the payment.", - "type": "object", - "properties": { - "object": { - "const": "bank_account", - "type": "string" - }, - "name": { - "type": "string" - }, - "number": { - "type": "string", - "description": "The account number for the bank account, in string form. Must be a current account." - }, - "sort_code": { - "type": "string", - "description": "The sort code for the bank account, in string form. Must be a six-digit number." - }, - "account_type": { - "enum": [ - "individual", - "company" - ], - "type": "string", - "description": "The type of entity that holds the account. This can be either \`individual\` or \`company\`." - }, - "bank_name": { - "type": "string", - "description": "The name of the bank associated with the routing number.", - "examples": [ - "Starling Bank" - ] - }, - "country": { - "type": "string", - "description": "Two-letter country code (ISO 3166-1 alpha-2)." - } - }, - "required": [ - "name", - "number", - "account_type", - "bank_name", - "country" - ] - } - ] - }, - "status": { - "description": "The status of the payment, one of \`pending\`, \`succeeded\`, or \`failed\`.", - "type": "string", - "enum": [ - "pending", - "succeeded", - "failed" - ], - "readOnly": true - } - } - }, - "Links-Booking": { - "type": "object", - "properties": { - "booking": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - ] - } - } - } - }, - "headers": { - "RateLimit": { - "description": "The RateLimit header communicates quota policies. It contains a \`limit\` to\\nconvey the expiring limit, \`remaining\` to convey the remaining quota units,\\nand \`reset\` to convey the time window reset time.\\n", - "schema": { - "type": "string", - "examples": [ - "limit=10, remaining=0, reset=10" - ] - } - }, - "Retry-After": { - "description": "The Retry-After header indicates how long the user agent should wait before making a follow-up request. \\nThe value is in seconds and can be an integer or a date in the future. \\nIf the value is an integer, it indicates the number of seconds to wait. \\nIf the value is a date, it indicates the time at which the user agent should make a follow-up request. \\n", - "schema": { - "type": "string" - }, - "examples": { - "integer": { - "value": "120", - "summary": "Retry after 120 seconds" - }, - "date": { - "value": "Fri, 31 Dec 2021 23:59:59 GMT", - "summary": "Retry after the specified date" - } - } - } - }, - "responses": { - "BadRequest": { - "description": "Bad Request", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - } - } - }, - "Conflict": { - "description": "Conflict", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - } - } - }, - "Forbidden": { - "description": "Forbidden", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - } - } - }, - "InternalServerError": { - "description": "Internal Server Error", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - } - } - }, - "NotFound": { - "description": "Not Found", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - } - } - }, - "TooManyRequests": { - "description": "Too Many Requests", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - } - } - }, - "Unauthorized": { - "description": "Unauthorized", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - } - } - } - } - } -}", - "name": "openapi.json", - "type": "file", - }, -] -`; diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/fern.config.json b/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/fern.config.json deleted file mode 100644 index 2e3e1df85fd..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/fern.config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": "*", - "organization": "fern" -} \ No newline at end of file diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec1/generators.yml b/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec1/generators.yml deleted file mode 100644 index cf0562dda16..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec1/generators.yml +++ /dev/null @@ -1,4 +0,0 @@ -default-group: local -api: - path: ./openapi.json - origin: https://bump.sh/bump-examples/doc/train-travel-api.json diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec1/openapi.json b/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec1/openapi.json deleted file mode 100644 index 3a835787863..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec1/openapi.json +++ /dev/null @@ -1,778 +0,0 @@ -{ - "info": { - "contact": { - "name": "Train Support", - "url": "https://example.com/support", - "email": "support@example.com" - }, - "license": { - "name": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", - "identifier": "CC-BY-NC-SA-4.0" - } - }, - "servers": [ - { - "url": "https://api.example.com", - "description": "Production" - } - ], - "security": [ - { - "OAuth2": [ - "read" - ] - } - ], - "x-topics": [ - { - "title": "Getting started", - "content": { - "$ref": "./docs/getting-started.md" - } - } - ], - "tags": [ - { - "name": "Stations", - "description": "Find and filter train stations across Europe, including their location\nand local timezone.\n" - }, - { - "name": "Train Tracks", - "description": "Find and filter all the different rail roads available across Europe, including their location\nand local timezone.\n" - }, - { - "name": "Trips", - "description": "Timetables and routes for train trips between stations, including pricing\nand availability.\n" - }, - { - "name": "Bookings", - "description": "Create and manage bookings for train trips, including passenger details\nand optional extras.\n" - }, - { - "name": "Payments", - "description": "Pay for bookings using a card or bank account, and view payment\nstatus and history.\n\n> warn\n> Bookings usually expire within 1 hour so you'll need to make your payment\n> before the expiry date \n" - } - ], - "webhooks": { - "newBooking": { - "post": { - "operationId": "new-booking", - "summary": "New Booking", - "description": "Subscribe to new bookings being created, to update integrations for your users. Related data is available via the links provided in the request.\n", - "tags": [ - "Bookings" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - }, - "responses": { - "200": { - "description": "Return a 200 status to indicate that the data was received successfully." - } - } - } - } - }, - "components": { - "securitySchemes": { - "OAuth2": { - "type": "oauth2", - "description": "OAuth 2.0 authorization code following RFC8725 best practices.", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://example.com/oauth/authorize", - "tokenUrl": "https://example.com/oauth/token", - "scopes": { - "read": "Read access", - "write": "Write access" - } - } - } - } - }, - "schemas": { - "Station": { - "type": "object", - "xml": { - "name": "station" - }, - "required": [ - "id", - "name", - "address", - "country_code" - ], - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the station.", - "examples": [ - "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "b2e783e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "name": { - "type": "string", - "description": "The name of the station", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "address": { - "type": "string", - "description": "The address of the station.", - "examples": [ - "Invalidenstraße 10557 Berlin, Germany", - "18 Rue de Dunkerque 75010 Paris, France" - ] - }, - "country_code": { - "type": "string", - "description": "The country code of the station.", - "format": "iso-country-code", - "examples": [ - "DE", - "FR" - ] - }, - "timezone": { - "type": "string", - "description": "The timezone of the station in the [IANA Time Zone Database format](https://www.iana.org/time-zones).", - "examples": [ - "Europe/Berlin", - "Europe/Paris" - ] - } - } - }, - "Links-Self": { - "type": "object", - "properties": { - "self": { - "type": "string", - "format": "uri" - } - } - }, - "Links-Pagination": { - "type": "object", - "properties": { - "next": { - "type": "string", - "format": "uri" - }, - "prev": { - "type": "string", - "format": "uri" - } - } - }, - "Trip": { - "type": "object", - "xml": { - "name": "trip" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "origin": { - "type": "string", - "description": "The starting station of the trip", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "destination": { - "type": "string", - "description": "The destination station of the trip", - "examples": [ - "Paris Gare du Nord", - "Berlin Hauptbahnhof" - ] - }, - "departure_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip departs", - "examples": [ - "2024-02-01T10:00:00Z" - ] - }, - "arrival_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip arrives", - "examples": [ - "2024-02-01T16:00:00Z" - ] - }, - "operator": { - "type": "string", - "description": "The name of the operator of the trip", - "examples": [ - "Deutsche Bahn", - "SNCF" - ] - }, - "price": { - "type": "number", - "description": "The cost of the trip", - "examples": [ - 50 - ] - }, - "bicycles_allowed": { - "type": "boolean", - "description": "Indicates whether bicycles are allowed on the trip" - }, - "dogs_allowed": { - "type": "boolean", - "description": "Indicates whether dogs are allowed on the trip" - } - } - }, - "Booking": { - "type": "object", - "xml": { - "name": "booking" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the booking", - "readOnly": true, - "examples": [ - "3f3e3e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "trip_id": { - "type": "string", - "format": "uuid", - "description": "Identifier of the booked trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "passenger_name": { - "type": "string", - "description": "Name of the passenger", - "examples": [ - "John Doe" - ] - }, - "has_bicycle": { - "type": "boolean", - "description": "Indicates whether the passenger has a bicycle." - }, - "has_dog": { - "type": "boolean", - "description": "Indicates whether the passenger has a dog." - } - } - }, - "Wrapper-Collection": { - "description": "This is a generic request/response wrapper which contains both data and links which serve as hypermedia controls (HATEOAS).", - "type": "object", - "properties": { - "data": { - "description": "The wrapper for a collection is an array of objects.", - "type": "array", - "items": { - "type": "object" - } - }, - "links": { - "description": "A set of hypermedia links which serve as controls for the client.", - "type": "object", - "readOnly": true - } - }, - "xml": { - "name": "data" - } - }, - "BookingPayment": { - "type": "object", - "properties": { - "id": { - "description": "Unique identifier for the payment. This will be a unique identifier for the payment, and is used to reference the payment in other objects.", - "type": "string", - "format": "uuid", - "readOnly": true - }, - "amount": { - "description": "Amount intended to be collected by this payment. A positive decimal figure describing the amount to be collected.", - "type": "number", - "exclusiveMinimum": 0, - "examples": [ - 49.99 - ] - }, - "currency": { - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", - "type": "string", - "enum": [ - "bam", - "bgn", - "chf", - "eur", - "gbp", - "nok", - "sek", - "try" - ] - }, - "source": { - "unevaluatedProperties": false, - "description": "The payment source to take the payment from. This can be a card or a bank account. Some of these properties will be hidden on read to protect PII leaking.", - "anyOf": [ - { - "title": "Card", - "description": "A card (debit or credit) to take payment from.", - "properties": { - "object": { - "type": "string", - "const": "card" - }, - "name": { - "type": "string", - "description": "Cardholder's full name as it appears on the card.", - "examples": [ - "Francis Bourgeois" - ] - }, - "number": { - "type": "string", - "description": "The card number, as a string without any separators. On read all but the last four digits will be masked for security.", - "examples": [ - "4242424242424242" - ] - }, - "cvc": { - "type": "integer", - "description": "Card security code, 3 or 4 digits usually found on the back of the card.", - "minLength": 3, - "maxLength": 4, - "writeOnly": true, - "example": 123 - }, - "exp_month": { - "type": "integer", - "format": "int64", - "description": "Two-digit number representing the card's expiration month.", - "examples": [ - 12 - ] - }, - "exp_year": { - "type": "integer", - "format": "int64", - "description": "Four-digit number representing the card's expiration year.", - "examples": [ - 2025 - ] - }, - "address_line1": { - "type": "string", - "writeOnly": true - }, - "address_line2": { - "type": "string", - "writeOnly": true - }, - "address_city": { - "type": "string" - }, - "address_country": { - "type": "string" - }, - "address_post_code": { - "type": "string" - } - }, - "required": [ - "name", - "number", - "cvc", - "exp_month", - "exp_year", - "address_country" - ] - }, - { - "title": "Bank Account", - "description": "A bank account to take payment from. Must be able to make payments in the currency specified in the payment.", - "type": "object", - "properties": { - "object": { - "const": "bank_account", - "type": "string" - }, - "name": { - "type": "string" - }, - "number": { - "type": "string", - "description": "The account number for the bank account, in string form. Must be a current account." - }, - "sort_code": { - "type": "string", - "description": "The sort code for the bank account, in string form. Must be a six-digit number." - }, - "account_type": { - "enum": [ - "individual", - "company" - ], - "type": "string", - "description": "The type of entity that holds the account. This can be either `individual` or `company`." - }, - "bank_name": { - "type": "string", - "description": "The name of the bank associated with the routing number.", - "examples": [ - "Starling Bank" - ] - }, - "country": { - "type": "string", - "description": "Two-letter country code (ISO 3166-1 alpha-2)." - } - }, - "required": [ - "name", - "number", - "account_type", - "bank_name", - "country" - ] - } - ] - }, - "status": { - "description": "The status of the payment, one of `pending`, `succeeded`, or `failed`.", - "type": "string", - "enum": [ - "pending", - "succeeded", - "failed" - ], - "readOnly": true - } - } - }, - "Links-Booking": { - "type": "object", - "properties": { - "booking": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - ] - } - } - } - }, - "headers": { - "RateLimit": { - "description": "The RateLimit header communicates quota policies. It contains a `limit` to\nconvey the expiring limit, `remaining` to convey the remaining quota units,\nand `reset` to convey the time window reset time.\n", - "schema": { - "type": "string", - "examples": [ - "limit=10, remaining=0, reset=10" - ] - } - }, - "Retry-After": { - "description": "The Retry-After header indicates how long the user agent should wait before making a follow-up request. \nThe value is in seconds and can be an integer or a date in the future. \nIf the value is an integer, it indicates the number of seconds to wait. \nIf the value is a date, it indicates the time at which the user agent should make a follow-up request. \n", - "schema": { - "type": "string" - }, - "examples": { - "integer": { - "value": "120", - "summary": "Retry after 120 seconds" - }, - "date": { - "value": "Fri, 31 Dec 2021 23:59:59 GMT", - "summary": "Retry after the specified date" - } - } - } - }, - "responses": { - "BadRequest": { - "description": "Bad Request", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - } - } - }, - "Conflict": { - "description": "Conflict", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - } - } - }, - "Forbidden": { - "description": "Forbidden", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - } - } - }, - "InternalServerError": { - "description": "Internal Server Error", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - } - } - }, - "NotFound": { - "description": "Not Found", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - } - } - }, - "TooManyRequests": { - "description": "Too Many Requests", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - } - } - }, - "Unauthorized": { - "description": "Unauthorized", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec2/generators.yml b/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec2/generators.yml deleted file mode 100644 index cf0562dda16..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec2/generators.yml +++ /dev/null @@ -1,4 +0,0 @@ -default-group: local -api: - path: ./openapi.json - origin: https://bump.sh/bump-examples/doc/train-travel-api.json diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec2/openapi.json b/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec2/openapi.json deleted file mode 100644 index a7705520202..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/spec2/openapi.json +++ /dev/null @@ -1,1435 +0,0 @@ -{ - "info": { - "contact": { - "name": "Train Support", - "url": "https://example.com/support", - "email": "support@example.com" - }, - "license": { - "name": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", - "identifier": "CC-BY-NC-SA-4.0" - } - }, - "servers": [ - { - "url": "https://api.example.com", - "description": "Production" - } - ], - "security": [ - { - "OAuth2": [ - "read" - ] - } - ], - "x-topics": [ - { - "title": "Getting started", - "content": { - "$ref": "./docs/getting-started.md" - } - } - ], - "tags": [ - { - "name": "Stations", - "description": "Find and filter train stations across Europe, including their location\nand local timezone.\n" - }, - { - "name": "Train Tracks", - "description": "Find and filter all the different rail roads available across Europe, including their location\nand local timezone.\n" - }, - { - "name": "Trips", - "description": "Timetables and routes for train trips between stations, including pricing\nand availability.\n" - }, - { - "name": "Bookings", - "description": "Create and manage bookings for train trips, including passenger details\nand optional extras.\n" - }, - { - "name": "Payments", - "description": "Pay for bookings using a card or bank account, and view payment\nstatus and history.\n\n> warn\n> Bookings usually expire within 1 hour so you'll need to make your payment\n> before the expiry date \n" - } - ], - "paths": { - "/trips": { - "get": { - "summary": "Get available train trips", - "description": "Returns a list of available train trips between the specified origin and destination stations on the given date, and allows for filtering by bicycle and dog allowances.", - "operationId": "get-trips", - "tags": [ - "Trips" - ], - "parameters": [ - { - "name": "origin", - "in": "query", - "description": "The ID of the origin station", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" - }, - { - "name": "destination", - "in": "query", - "description": "The ID of the destination station", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "b2e783e1-c824-4d63-b37a-d8d698862f1d" - }, - { - "name": "date", - "in": "query", - "description": "The date and time of the trip in ISO 8601 format in origin station's timezone.", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - }, - "example": "2024-02-01T09:00:00Z" - }, - { - "name": "bicycles", - "in": "query", - "description": "Only return trips where bicycles are known to be allowed", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "dogs", - "in": "query", - "description": "Only return trips where dogs are known to be allowed", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "A list of available train trips", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Trip" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "ea399ba1-6d95-433f-92d1-83f67b775594", - "origin": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "destination": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "departure_time": "2024-02-01T10:00:00Z", - "arrival_time": "2024-02-01T16:00:00Z", - "price": 50, - "operator": "Deutsche Bahn", - "bicycles_allowed": true, - "dogs_allowed": true - }, - { - "id": "4d67459c-af07-40bb-bb12-178dbb88e09f", - "origin": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "destination": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "departure_time": "2024-02-01T12:00:00Z", - "arrival_time": "2024-02-01T18:00:00Z", - "price": 50, - "operator": "SNCF", - "bicycles_allowed": true, - "dogs_allowed": true - } - ], - "links": { - "self": "https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01", - "next": "https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01&page=2" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "trips", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Trip" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings": { - "get": { - "operationId": "get-bookings", - "summary": "List existing bookings", - "description": "Returns a list of all trip bookings by the authenticated user.", - "tags": [ - "Bookings" - ], - "responses": { - "200": { - "description": "A list of bookings", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true - }, - { - "id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "trip_id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "passenger_name": "Jane Smith", - "has_bicycle": false, - "has_dog": false - } - ], - "links": { - "self": "https://api.example.com/bookings", - "next": "https://api.example.com/bookings?page=2" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "bookings", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - }, - "post": { - "operationId": "create-booking", - "summary": "Create a booking", - "description": "A booking is a temporary hold on a trip. It is not confirmed until the payment is processed.", - "tags": [ - "Bookings" - ], - "security": [ - { - "OAuth2": [ - "write" - ] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Booking" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - "responses": { - "201": { - "description": "Booking successful", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings/{bookingId}": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "description": "The ID of the booking to retrieve.", - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "1725ff48-ab45-4bb5-9d02-88745177dedb" - } - ], - "get": { - "summary": "Get a booking", - "description": "Returns the details of a specific booking.", - "operationId": "get-booking", - "tags": [ - "Bookings" - ], - "responses": { - "200": { - "description": "The booking details", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - }, - "delete": { - "summary": "Delete a booking", - "description": "Deletes a booking, cancelling the hold on the trip.", - "operationId": "delete-booking", - "security": [ - { - "OAuth2": [ - "write" - ] - } - ], - "tags": [ - "Bookings" - ], - "responses": { - "204": { - "description": "Booking deleted" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings/{bookingId}/payment": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "description": "The ID of the booking to pay for.", - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "1725ff48-ab45-4bb5-9d02-88745177dedb" - } - ], - "post": { - "summary": "Pay for a Booking", - "description": "A payment is an attempt to pay for the booking, which will confirm the booking for the user and enable them to get their tickets.", - "operationId": "create-booking-payment", - "tags": [ - "Payments" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingPayment" - }, - "examples": { - "Card": { - "summary": "Card Payment", - "value": { - "amount": 49.99, - "currency": "gbp", - "source": { - "object": "card", - "name": "J. Doe", - "number": "4242424242424242", - "cvc": 123, - "exp_month": 12, - "exp_year": 2025, - "address_line1": "123 Fake Street", - "address_line2": "4th Floor", - "address_city": "London", - "address_country": "gb", - "address_post_code": "N12 9XX" - } - } - }, - "Bank": { - "summary": "Bank Account Payment", - "value": { - "amount": 100.5, - "currency": "gbp", - "source": { - "object": "bank_account", - "name": "J. Doe", - "number": "00012345", - "sort_code": "000123", - "account_type": "individual", - "bank_name": "Starling Bank", - "country": "gb" - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Payment successful", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BookingPayment" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Booking" - } - } - } - ] - }, - "examples": { - "Card": { - "summary": "Card Payment", - "value": { - "id": "2e3b4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a", - "amount": 49.99, - "currency": "gbp", - "source": { - "object": "card", - "name": "J. Doe", - "number": "************4242", - "cvc": 123, - "exp_month": 12, - "exp_year": 2025, - "address_country": "gb", - "address_post_code": "N12 9XX" - }, - "status": "succeeded", - "links": { - "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb/payment" - } - } - }, - "Bank": { - "summary": "Bank Account Payment", - "value": { - "id": "2e3b4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a", - "amount": 100.5, - "currency": "gbp", - "source": { - "object": "bank_account", - "name": "J. Doe", - "account_type": "individual", - "number": "*********2345", - "sort_code": "000123", - "bank_name": "Starling Bank", - "country": "gb" - }, - "status": "succeeded", - "links": { - "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - } - }, - "components": { - "securitySchemes": { - "OAuth2": { - "type": "oauth2", - "description": "OAuth 2.0 authorization code following RFC8725 best practices.", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://example.com/oauth/authorize", - "tokenUrl": "https://example.com/oauth/token", - "scopes": { - "read": "Read access", - "write": "Write access" - } - } - } - } - }, - "schemas": { - "Station": { - "type": "object", - "xml": { - "name": "station" - }, - "required": [ - "id", - "name", - "address", - "country_code" - ], - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the station.", - "examples": [ - "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "b2e783e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "name": { - "type": "string", - "description": "The name of the station", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "address": { - "type": "string", - "description": "The address of the station.", - "examples": [ - "Invalidenstraße 10557 Berlin, Germany", - "18 Rue de Dunkerque 75010 Paris, France" - ] - }, - "country_code": { - "type": "string", - "description": "The country code of the station.", - "format": "iso-country-code", - "examples": [ - "DE", - "FR" - ] - }, - "timezone": { - "type": "string", - "description": "The timezone of the station in the [IANA Time Zone Database format](https://www.iana.org/time-zones).", - "examples": [ - "Europe/Berlin", - "Europe/Paris" - ] - } - } - }, - "Links-Self": { - "type": "object", - "properties": { - "self": { - "type": "string", - "format": "uri" - } - } - }, - "Links-Pagination": { - "type": "object", - "properties": { - "next": { - "type": "string", - "format": "uri" - }, - "prev": { - "type": "string", - "format": "uri" - } - } - }, - "Trip": { - "type": "object", - "xml": { - "name": "trip" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "origin": { - "type": "string", - "description": "The starting station of the trip", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "destination": { - "type": "string", - "description": "The destination station of the trip", - "examples": [ - "Paris Gare du Nord", - "Berlin Hauptbahnhof" - ] - }, - "departure_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip departs", - "examples": [ - "2024-02-01T10:00:00Z" - ] - }, - "arrival_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip arrives", - "examples": [ - "2024-02-01T16:00:00Z" - ] - }, - "operator": { - "type": "string", - "description": "The name of the operator of the trip", - "examples": [ - "Deutsche Bahn", - "SNCF" - ] - }, - "price": { - "type": "number", - "description": "The cost of the trip", - "examples": [ - 50 - ] - }, - "bicycles_allowed": { - "type": "boolean", - "description": "Indicates whether bicycles are allowed on the trip" - }, - "dogs_allowed": { - "type": "boolean", - "description": "Indicates whether dogs are allowed on the trip" - } - } - }, - "Booking": { - "type": "object", - "xml": { - "name": "booking" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the booking", - "readOnly": true, - "examples": [ - "3f3e3e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "trip_id": { - "type": "string", - "format": "uuid", - "description": "Identifier of the booked trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "passenger_name": { - "type": "string", - "description": "Name of the passenger", - "examples": [ - "John Doe" - ] - }, - "has_bicycle": { - "type": "boolean", - "description": "Indicates whether the passenger has a bicycle." - }, - "has_dog": { - "type": "boolean", - "description": "Indicates whether the passenger has a dog." - } - } - }, - "Wrapper-Collection": { - "description": "This is a generic request/response wrapper which contains both data and links which serve as hypermedia controls (HATEOAS).", - "type": "object", - "properties": { - "data": { - "description": "The wrapper for a collection is an array of objects.", - "type": "array", - "items": { - "type": "object" - } - }, - "links": { - "description": "A set of hypermedia links which serve as controls for the client.", - "type": "object", - "readOnly": true - } - }, - "xml": { - "name": "data" - } - }, - "BookingPayment": { - "type": "object", - "properties": { - "id": { - "description": "Unique identifier for the payment. This will be a unique identifier for the payment, and is used to reference the payment in other objects.", - "type": "string", - "format": "uuid", - "readOnly": true - }, - "amount": { - "description": "Amount intended to be collected by this payment. A positive decimal figure describing the amount to be collected.", - "type": "number", - "exclusiveMinimum": 0, - "examples": [ - 49.99 - ] - }, - "currency": { - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", - "type": "string", - "enum": [ - "bam", - "bgn", - "chf", - "eur", - "gbp", - "nok", - "sek", - "try" - ] - }, - "source": { - "unevaluatedProperties": false, - "description": "The payment source to take the payment from. This can be a card or a bank account. Some of these properties will be hidden on read to protect PII leaking.", - "anyOf": [ - { - "title": "Card", - "description": "A card (debit or credit) to take payment from.", - "properties": { - "object": { - "type": "string", - "const": "card" - }, - "name": { - "type": "string", - "description": "Cardholder's full name as it appears on the card.", - "examples": [ - "Francis Bourgeois" - ] - }, - "number": { - "type": "string", - "description": "The card number, as a string without any separators. On read all but the last four digits will be masked for security.", - "examples": [ - "4242424242424242" - ] - }, - "cvc": { - "type": "integer", - "description": "Card security code, 3 or 4 digits usually found on the back of the card.", - "minLength": 3, - "maxLength": 4, - "writeOnly": true, - "example": 123 - }, - "exp_month": { - "type": "integer", - "format": "int64", - "description": "Two-digit number representing the card's expiration month.", - "examples": [ - 12 - ] - }, - "exp_year": { - "type": "integer", - "format": "int64", - "description": "Four-digit number representing the card's expiration year.", - "examples": [ - 2025 - ] - }, - "address_line1": { - "type": "string", - "writeOnly": true - }, - "address_line2": { - "type": "string", - "writeOnly": true - }, - "address_city": { - "type": "string" - }, - "address_country": { - "type": "string" - }, - "address_post_code": { - "type": "string" - } - }, - "required": [ - "name", - "number", - "cvc", - "exp_month", - "exp_year", - "address_country" - ] - }, - { - "title": "Bank Account", - "description": "A bank account to take payment from. Must be able to make payments in the currency specified in the payment.", - "type": "object", - "properties": { - "object": { - "const": "bank_account", - "type": "string" - }, - "name": { - "type": "string" - }, - "number": { - "type": "string", - "description": "The account number for the bank account, in string form. Must be a current account." - }, - "sort_code": { - "type": "string", - "description": "The sort code for the bank account, in string form. Must be a six-digit number." - }, - "account_type": { - "enum": [ - "individual", - "company" - ], - "type": "string", - "description": "The type of entity that holds the account. This can be either `individual` or `company`." - }, - "bank_name": { - "type": "string", - "description": "The name of the bank associated with the routing number.", - "examples": [ - "Starling Bank" - ] - }, - "country": { - "type": "string", - "description": "Two-letter country code (ISO 3166-1 alpha-2)." - } - }, - "required": [ - "name", - "number", - "account_type", - "bank_name", - "country" - ] - } - ] - }, - "status": { - "description": "The status of the payment, one of `pending`, `succeeded`, or `failed`.", - "type": "string", - "enum": [ - "pending", - "succeeded", - "failed" - ], - "readOnly": true - } - } - }, - "Links-Booking": { - "type": "object", - "properties": { - "booking": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - ] - } - } - } - }, - "headers": { - "RateLimit": { - "description": "The RateLimit header communicates quota policies. It contains a `limit` to\nconvey the expiring limit, `remaining` to convey the remaining quota units,\nand `reset` to convey the time window reset time.\n", - "schema": { - "type": "string", - "examples": [ - "limit=10, remaining=0, reset=10" - ] - } - }, - "Retry-After": { - "description": "The Retry-After header indicates how long the user agent should wait before making a follow-up request. \nThe value is in seconds and can be an integer or a date in the future. \nIf the value is an integer, it indicates the number of seconds to wait. \nIf the value is a date, it indicates the time at which the user agent should make a follow-up request. \n", - "schema": { - "type": "string" - }, - "examples": { - "integer": { - "value": "120", - "summary": "Retry after 120 seconds" - }, - "date": { - "value": "Fri, 31 Dec 2021 23:59:59 GMT", - "summary": "Retry after the specified date" - } - } - } - }, - "responses": { - "BadRequest": { - "description": "Bad Request", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - } - } - }, - "Conflict": { - "description": "Conflict", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - } - } - }, - "Forbidden": { - "description": "Forbidden", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - } - } - }, - "InternalServerError": { - "description": "Internal Server Error", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - } - } - }, - "NotFound": { - "description": "Not Found", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - } - } - }, - "TooManyRequests": { - "description": "Too Many Requests", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - } - } - }, - "Unauthorized": { - "description": "Unauthorized", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/api.yml b/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/api.yml deleted file mode 100644 index a939faab6cf..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: api \ No newline at end of file diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/definition/spec1/__package__.yml b/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/definition/spec1/__package__.yml deleted file mode 100644 index 7e022f0d628..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/definition/spec1/__package__.yml +++ /dev/null @@ -1 +0,0 @@ -export: spec1 \ No newline at end of file diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/definition/spec2/__package__.yml b/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/definition/spec2/__package__.yml deleted file mode 100644 index aad3c796b2f..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/definition/spec2/__package__.yml +++ /dev/null @@ -1 +0,0 @@ -export: spec2 \ No newline at end of file diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/dependencies.yml b/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/dependencies.yml deleted file mode 100644 index 45e0bfea97e..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/dependencies.yml +++ /dev/null @@ -1,3 +0,0 @@ -dependencies: - spec1: ../spec1 - spec2: ../spec2 diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/generators.yml b/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/generators.yml deleted file mode 100644 index c8ae78dfffa..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/fixtures/fern/unioned/generators.yml +++ /dev/null @@ -1,9 +0,0 @@ -default-group: local -groups: - local: - generators: - - name: fernapi/fern-typescript-node-sdk - version: 0.9.5 - output: - location: local-file-system - path: ../sdks/typescript diff --git a/packages/cli/ete-tests/src/tests/update-api-unioned/update-api.test.ts b/packages/cli/ete-tests/src/tests/update-api-unioned/update-api.test.ts deleted file mode 100644 index dcb813457d3..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-unioned/update-api.test.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { AbsoluteFilePath, getDirectoryContents, getDirectoryContentsForSnapshot } from "@fern-api/fs-utils"; -import { cp } from "fs/promises"; -import path from "path"; -import tmp from "tmp-promise"; -import { runFernCli } from "../../utils/runFernCli"; - -const FIXTURES_DIR = path.join(__dirname, "fixtures"); - -describe("fern api update unioned", () => { - it("fern api update unioned", async () => { - // Create tmpdir and copy contents - const tmpDir = await tmp.dir(); - const directory = AbsoluteFilePath.of(tmpDir.path); - - await cp(FIXTURES_DIR, directory, { recursive: true }); - - const outputPath = AbsoluteFilePath.of(path.join(directory, "fern", "spec1")); - - await runFernCli(["api", "update"], { - cwd: directory - }); - - expect(await getDirectoryContentsForSnapshot(outputPath)).toMatchSnapshot(); - }, 60_000); -}); diff --git a/packages/cli/ete-tests/src/tests/update-api-v2/__snapshots__/update-api.test.ts.snap b/packages/cli/ete-tests/src/tests/update-api-v2/__snapshots__/update-api.test.ts.snap deleted file mode 100644 index d1df439a677..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-v2/__snapshots__/update-api.test.ts.snap +++ /dev/null @@ -1,1797 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`fern api update unioned > fern api update unioned 1`] = ` -[ - { - "contents": "{ - "openapi": "3.1.0", - "info": { - "title": "Train Travel API", - "description": "API for finding and booking train trips across Europe.\\n\\n## Run in Postman\\n\\nExperiment with this API in Postman, using our Postman Collection.\\n\\n[![Run In Postman](https://run.pstmn.io/button.svg =128pxx32px)](https://app.getpostman.com/run-collection/9265903-7a75a0d0-b108-4436-ba54-c6139698dc08?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D9265903-7a75a0d0-b108-4436-ba54-c6139698dc08%26entityType%3Dcollection%26workspaceId%3Df507f69d-9564-419c-89a2-cb8e4c8c7b8f)\\n", - "version": "1.0.0", - "contact": { - "name": "Train Support", - "url": "https://example.com/support", - "email": "support@example.com" - }, - "license": { - "name": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", - "identifier": "CC-BY-NC-SA-4.0" - }, - "x-feedbackLink": { - "label": "Submit Feedback", - "url": "https://github.com/bump-sh-examples/train-travel-api/issues/new" - } - }, - "servers": [ - { - "url": "https://api.example.com", - "description": "Production", - "x-internal": false - }, - { - "url": "https://try.microcks.io/rest/Train+Travel+API/1.0.0", - "description": "Mock Server", - "x-internal": false - } - ], - "security": [ - { - "OAuth2": [ - "read" - ] - } - ], - "x-topics": [ - { - "title": "Getting started", - "content": { - "$ref": "./docs/getting-started.md" - } - } - ], - "tags": [ - { - "name": "Stations", - "description": "Find and filter train stations across Europe, including their location\\nand local timezone.\\n" - }, - { - "name": "Trips", - "description": "Timetables and routes for train trips between stations, including pricing\\nand availability.\\n" - }, - { - "name": "Bookings", - "description": "Create and manage bookings for train trips, including passenger details\\nand optional extras.\\n" - }, - { - "name": "Payments", - "description": "Pay for bookings using a card or bank account, and view payment\\nstatus and history.\\n\\n> warn\\n> Bookings usually expire within 1 hour so you'll need to make your payment\\n> before the expiry date \\n" - } - ], - "paths": { - "/stations": { - "get": { - "summary": "Get a list of train stations", - "description": "Returns a paginated and searchable list of all train stations.", - "operationId": "get-stations", - "tags": [ - "Stations" - ], - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "name": "coordinates", - "in": "query", - "description": "The latitude and longitude of the user's location, to narrow down the search results to sites within a proximity of this location.\\n", - "required": false, - "schema": { - "type": "string" - }, - "example": "52.5200,13.4050" - }, - { - "name": "search", - "in": "query", - "description": "A search term to filter the list of stations by name or address.\\n", - "required": false, - "schema": { - "type": "string", - "examples": [ - "Milano Centrale", - "Paris" - ] - } - }, - { - "name": "country", - "in": "query", - "description": "Filter stations by country code", - "required": false, - "schema": { - "type": "string", - "format": "iso-country-code" - }, - "example": "DE" - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "Cache-Control": { - "$ref": "#/components/headers/Cache-Control" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Station" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "name": "Berlin Hauptbahnhof", - "address": "Invalidenstraße 10557 Berlin, Germany", - "country_code": "DE", - "timezone": "Europe/Berlin" - }, - { - "id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "name": "Paris Gare du Nord", - "address": "18 Rue de Dunkerque 75010 Paris, France", - "country_code": "FR", - "timezone": "Europe/Paris" - } - ], - "links": { - "self": "https://api.example.com/stations&page=2", - "next": "https://api.example.com/stations?page=3", - "prev": "https://api.example.com/stations?page=1" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "stations", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Station" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/trips": { - "get": { - "summary": "Get available train trips", - "description": "Returns a list of available train trips between the specified origin and destination stations on the given date, and allows for filtering by bicycle and dog allowances.\\n", - "operationId": "get-trips", - "tags": [ - "Trips" - ], - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "name": "origin", - "in": "query", - "description": "The ID of the origin station", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" - }, - { - "name": "destination", - "in": "query", - "description": "The ID of the destination station", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "b2e783e1-c824-4d63-b37a-d8d698862f1d" - }, - { - "name": "date", - "in": "query", - "description": "The date and time of the trip in ISO 8601 format in origin station's timezone.", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - }, - "example": "2024-02-01T09:00:00Z" - }, - { - "name": "bicycles", - "in": "query", - "description": "Only return trips where bicycles are known to be allowed", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "dogs", - "in": "query", - "description": "Only return trips where dogs are known to be allowed", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "A list of available train trips", - "headers": { - "Cache-Control": { - "$ref": "#/components/headers/Cache-Control" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Trip" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "ea399ba1-6d95-433f-92d1-83f67b775594", - "origin": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "destination": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "departure_time": "2024-02-01T10:00:00Z", - "arrival_time": "2024-02-01T16:00:00Z", - "price": 50, - "operator": "Deutsche Bahn", - "bicycles_allowed": true, - "dogs_allowed": true - }, - { - "id": "4d67459c-af07-40bb-bb12-178dbb88e09f", - "origin": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "destination": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "departure_time": "2024-02-01T12:00:00Z", - "arrival_time": "2024-02-01T18:00:00Z", - "price": 50, - "operator": "SNCF", - "bicycles_allowed": true, - "dogs_allowed": true - } - ], - "links": { - "self": "https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01", - "next": "https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01&page=2" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "trips", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Trip" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings": { - "get": { - "operationId": "get-bookings", - "summary": "List existing bookings", - "description": "Returns a list of all trip bookings by the authenticated user.", - "tags": [ - "Bookings" - ], - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/limit" - } - ], - "responses": { - "200": { - "description": "A list of bookings", - "headers": { - "Cache-Control": { - "$ref": "#/components/headers/Cache-Control" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true - }, - { - "id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "trip_id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "passenger_name": "Jane Smith", - "has_bicycle": false, - "has_dog": false - } - ], - "links": { - "self": "https://api.example.com/bookings", - "next": "https://api.example.com/bookings?page=2" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "bookings", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - }, - "post": { - "operationId": "create-booking", - "summary": "Create a booking", - "description": "A booking is a temporary hold on a trip. It is not confirmed until the payment is processed.", - "tags": [ - "Bookings" - ], - "security": [ - { - "OAuth2": [ - "write" - ] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Booking" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - "responses": { - "201": { - "description": "Booking successful", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings/{bookingId}": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "description": "The ID of the booking to retrieve.", - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "1725ff48-ab45-4bb5-9d02-88745177dedb" - } - ], - "get": { - "summary": "Get a booking", - "description": "Returns the details of a specific booking.", - "operationId": "get-booking", - "tags": [ - "Bookings" - ], - "responses": { - "200": { - "description": "The booking details", - "headers": { - "Cache-Control": { - "$ref": "#/components/headers/Cache-Control" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - }, - "delete": { - "summary": "Delete a booking", - "description": "Deletes a booking, cancelling the hold on the trip.", - "operationId": "delete-booking", - "security": [ - { - "OAuth2": [ - "write" - ] - } - ], - "tags": [ - "Bookings" - ], - "responses": { - "204": { - "description": "Booking deleted" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings/{bookingId}/payment": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "description": "The ID of the booking to pay for.", - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "1725ff48-ab45-4bb5-9d02-88745177dedb" - } - ], - "post": { - "summary": "Pay for a Booking", - "description": "A payment is an attempt to pay for the booking, which will confirm the booking for the user and enable them to get their tickets.", - "operationId": "create-booking-payment", - "tags": [ - "Payments" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingPayment" - }, - "examples": { - "Card": { - "summary": "Card Payment", - "value": { - "amount": 49.99, - "currency": "gbp", - "source": { - "object": "card", - "name": "J. Doe", - "number": "4242424242424242", - "cvc": 123, - "exp_month": 12, - "exp_year": 2025, - "address_line1": "123 Fake Street", - "address_line2": "4th Floor", - "address_city": "London", - "address_country": "gb", - "address_post_code": "N12 9XX" - } - } - }, - "Bank": { - "summary": "Bank Account Payment", - "value": { - "amount": 100.5, - "currency": "gbp", - "source": { - "object": "bank_account", - "name": "J. Doe", - "number": "00012345", - "sort_code": "000123", - "account_type": "individual", - "bank_name": "Starling Bank", - "country": "gb" - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Payment successful", - "headers": { - "Cache-Control": { - "$ref": "#/components/headers/Cache-Control" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BookingPayment" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Booking" - } - } - } - ] - }, - "examples": { - "Card": { - "summary": "Card Payment", - "value": { - "id": "2e3b4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a", - "amount": 49.99, - "currency": "gbp", - "source": { - "object": "card", - "name": "J. Doe", - "number": "************4242", - "cvc": 123, - "exp_month": 12, - "exp_year": 2025, - "address_country": "gb", - "address_post_code": "N12 9XX" - }, - "status": "succeeded", - "links": { - "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb/payment" - } - } - }, - "Bank": { - "summary": "Bank Account Payment", - "value": { - "id": "2e3b4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a", - "amount": 100.5, - "currency": "gbp", - "source": { - "object": "bank_account", - "name": "J. Doe", - "account_type": "individual", - "number": "*********2345", - "sort_code": "000123", - "bank_name": "Starling Bank", - "country": "gb" - }, - "status": "succeeded", - "links": { - "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - } - }, - "webhooks": { - "newBooking": { - "post": { - "operationId": "new-booking", - "summary": "New Booking", - "description": "Subscribe to new bookings being created, to update integrations for your users. Related data is available via the links provided in the request.\\n", - "tags": [ - "Bookings" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - }, - "responses": { - "200": { - "description": "Return a 200 status to indicate that the data was received successfully." - } - } - } - } - }, - "components": { - "parameters": { - "page": { - "name": "page", - "in": "query", - "description": "The page number to return", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - }, - "example": 1 - }, - "limit": { - "name": "limit", - "in": "query", - "description": "The number of items to return per page", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 10 - }, - "example": 10 - } - }, - "securitySchemes": { - "OAuth2": { - "type": "oauth2", - "description": "OAuth 2.0 authorization code following RFC8725 best practices.", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://example.com/oauth/authorize", - "tokenUrl": "https://example.com/oauth/token", - "scopes": { - "read": "Read access", - "write": "Write access" - } - } - } - } - }, - "schemas": { - "Station": { - "type": "object", - "xml": { - "name": "station" - }, - "required": [ - "id", - "name", - "address", - "country_code" - ], - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the station.", - "examples": [ - "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "b2e783e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "name": { - "type": "string", - "description": "The name of the station", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "address": { - "type": "string", - "description": "The address of the station.", - "examples": [ - "Invalidenstraße 10557 Berlin, Germany", - "18 Rue de Dunkerque 75010 Paris, France" - ] - }, - "country_code": { - "type": "string", - "description": "The country code of the station.", - "format": "iso-country-code", - "examples": [ - "DE", - "FR" - ] - }, - "timezone": { - "type": "string", - "description": "The timezone of the station in the [IANA Time Zone Database format](https://www.iana.org/time-zones).", - "examples": [ - "Europe/Berlin", - "Europe/Paris" - ] - } - } - }, - "Links-Self": { - "type": "object", - "properties": { - "self": { - "type": "string", - "format": "uri" - } - } - }, - "Links-Pagination": { - "type": "object", - "properties": { - "next": { - "type": "string", - "format": "uri" - }, - "prev": { - "type": "string", - "format": "uri" - } - } - }, - "Problem": { - "type": "object", - "xml": { - "name": "problem", - "namespace": "urn:ietf:rfc:7807" - }, - "properties": { - "type": { - "type": "string", - "description": "A URI reference that identifies the problem type", - "examples": [ - "https://example.com/probs/out-of-credit" - ] - }, - "title": { - "type": "string", - "description": "A short, human-readable summary of the problem type", - "examples": [ - "You do not have enough credit." - ] - }, - "detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem", - "examples": [ - "Your current balance is 30, but that costs 50." - ] - }, - "instance": { - "type": "string", - "description": "A URI reference that identifies the specific occurrence of the problem", - "examples": [ - "/account/12345/msgs/abc" - ] - }, - "status": { - "type": "integer", - "description": "The HTTP status code", - "examples": [ - 400 - ] - } - } - }, - "Trip": { - "type": "object", - "xml": { - "name": "trip" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "origin": { - "type": "string", - "description": "The starting station of the trip", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "destination": { - "type": "string", - "description": "The destination station of the trip", - "examples": [ - "Paris Gare du Nord", - "Berlin Hauptbahnhof" - ] - }, - "departure_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip departs", - "examples": [ - "2024-02-01T10:00:00Z" - ] - }, - "arrival_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip arrives", - "examples": [ - "2024-02-01T16:00:00Z" - ] - }, - "operator": { - "type": "string", - "description": "The name of the operator of the trip", - "examples": [ - "Deutsche Bahn", - "SNCF" - ] - }, - "price": { - "type": "number", - "description": "The cost of the trip", - "examples": [ - 50 - ] - }, - "bicycles_allowed": { - "type": "boolean", - "description": "Indicates whether bicycles are allowed on the trip" - }, - "dogs_allowed": { - "type": "boolean", - "description": "Indicates whether dogs are allowed on the trip" - } - } - }, - "Booking": { - "type": "object", - "xml": { - "name": "booking" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the booking", - "readOnly": true, - "examples": [ - "3f3e3e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "trip_id": { - "type": "string", - "format": "uuid", - "description": "Identifier of the booked trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "passenger_name": { - "type": "string", - "description": "Name of the passenger", - "examples": [ - "John Doe" - ] - }, - "has_bicycle": { - "type": "boolean", - "description": "Indicates whether the passenger has a bicycle." - }, - "has_dog": { - "type": "boolean", - "description": "Indicates whether the passenger has a dog." - } - } - }, - "Wrapper-Collection": { - "description": "This is a generic request/response wrapper which contains both data and links which serve as hypermedia controls (HATEOAS).", - "type": "object", - "properties": { - "data": { - "description": "The wrapper for a collection is an array of objects.", - "type": "array", - "items": { - "type": "object" - } - }, - "links": { - "description": "A set of hypermedia links which serve as controls for the client.", - "type": "object", - "readOnly": true - } - }, - "xml": { - "name": "data" - } - }, - "BookingPayment": { - "type": "object", - "properties": { - "id": { - "description": "Unique identifier for the payment. This will be a unique identifier for the payment, and is used to reference the payment in other objects.", - "type": "string", - "format": "uuid", - "readOnly": true - }, - "amount": { - "description": "Amount intended to be collected by this payment. A positive decimal figure describing the amount to be collected.", - "type": "number", - "exclusiveMinimum": 0, - "examples": [ - 49.99 - ] - }, - "currency": { - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", - "type": "string", - "enum": [ - "bam", - "bgn", - "chf", - "eur", - "gbp", - "nok", - "sek", - "try" - ] - }, - "source": { - "unevaluatedProperties": false, - "description": "The payment source to take the payment from. This can be a card or a bank account. Some of these properties will be hidden on read to protect PII leaking.", - "oneOf": [ - { - "title": "Card", - "description": "A card (debit or credit) to take payment from.", - "type": "object", - "properties": { - "object": { - "type": "string", - "const": "card" - }, - "name": { - "type": "string", - "description": "Cardholder's full name as it appears on the card.", - "examples": [ - "Francis Bourgeois" - ] - }, - "number": { - "type": "string", - "description": "The card number, as a string without any separators. On read all but the last four digits will be masked for security.", - "examples": [ - "4242424242424242" - ] - }, - "cvc": { - "type": "integer", - "description": "Card security code, 3 or 4 digits usually found on the back of the card.", - "minLength": 3, - "maxLength": 4, - "writeOnly": true, - "example": 123 - }, - "exp_month": { - "type": "integer", - "format": "int64", - "description": "Two-digit number representing the card's expiration month.", - "examples": [ - 12 - ] - }, - "exp_year": { - "type": "integer", - "format": "int64", - "description": "Four-digit number representing the card's expiration year.", - "examples": [ - 2025 - ] - }, - "address_line1": { - "type": "string", - "writeOnly": true - }, - "address_line2": { - "type": "string", - "writeOnly": true - }, - "address_city": { - "type": "string" - }, - "address_country": { - "type": "string" - }, - "address_post_code": { - "type": "string" - } - }, - "required": [ - "name", - "number", - "cvc", - "exp_month", - "exp_year", - "address_country" - ] - }, - { - "title": "Bank Account", - "description": "A bank account to take payment from. Must be able to make payments in the currency specified in the payment.", - "type": "object", - "properties": { - "object": { - "const": "bank_account", - "type": "string" - }, - "name": { - "type": "string" - }, - "number": { - "type": "string", - "description": "The account number for the bank account, in string form. Must be a current account." - }, - "sort_code": { - "type": "string", - "description": "The sort code for the bank account, in string form. Must be a six-digit number." - }, - "account_type": { - "enum": [ - "individual", - "company" - ], - "type": "string", - "description": "The type of entity that holds the account. This can be either \`individual\` or \`company\`." - }, - "bank_name": { - "type": "string", - "description": "The name of the bank associated with the routing number.", - "examples": [ - "Starling Bank" - ] - }, - "country": { - "type": "string", - "description": "Two-letter country code (ISO 3166-1 alpha-2)." - } - }, - "required": [ - "name", - "number", - "account_type", - "bank_name", - "country" - ] - } - ] - }, - "status": { - "description": "The status of the payment, one of \`pending\`, \`succeeded\`, or \`failed\`.", - "type": "string", - "enum": [ - "pending", - "succeeded", - "failed" - ], - "readOnly": true - } - } - }, - "Links-Booking": { - "type": "object", - "properties": { - "booking": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - ] - } - } - } - }, - "headers": { - "Cache-Control": { - "description": "The Cache-Control header communicates directives for caching mechanisms in both requests and responses. \\nIt is used to specify the caching directives in responses to prevent caches from storing sensitive information.\\n", - "schema": { - "type": "string", - "description": "A comma-separated list of directives as defined in [RFC 9111](https://www.rfc-editor.org/rfc/rfc9111.html).", - "examples": [ - "max-age=3600", - "max-age=604800, public", - "no-store", - "no-cache", - "private" - ] - } - }, - "RateLimit": { - "description": "The RateLimit header communicates quota policies. It contains a \`limit\` to\\nconvey the expiring limit, \`remaining\` to convey the remaining quota units,\\nand \`reset\` to convey the time window reset time.\\n", - "schema": { - "type": "string", - "examples": [ - "limit=10, remaining=0, reset=10" - ] - } - }, - "Retry-After": { - "description": "The Retry-After header indicates how long the user agent should wait before making a follow-up request. \\nThe value is in seconds and can be an integer or a date in the future. \\nIf the value is an integer, it indicates the number of seconds to wait. \\nIf the value is a date, it indicates the time at which the user agent should make a follow-up request. \\n", - "schema": { - "type": "string" - }, - "examples": { - "integer": { - "value": "120", - "summary": "Retry after 120 seconds" - }, - "date": { - "value": "Fri, 31 Dec 2021 23:59:59 GMT", - "summary": "Retry after the specified date" - } - } - } - }, - "responses": { - "BadRequest": { - "description": "Bad Request", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - } - } - }, - "Conflict": { - "description": "Conflict", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - } - } - }, - "Forbidden": { - "description": "Forbidden", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - } - } - }, - "InternalServerError": { - "description": "Internal Server Error", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - } - } - }, - "NotFound": { - "description": "Not Found", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - } - } - }, - "TooManyRequests": { - "description": "Too Many Requests", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - } - } - }, - "Unauthorized": { - "description": "Unauthorized", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - } - } - } - } - } -}", - "name": "openapi.json", - "type": "file", - }, -] -`; diff --git a/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/fern.config.json b/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/fern.config.json deleted file mode 100644 index 2e3e1df85fd..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/fern.config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": "*", - "organization": "fern" -} \ No newline at end of file diff --git a/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/generators.yml b/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/generators.yml deleted file mode 100644 index 53695c89415..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/generators.yml +++ /dev/null @@ -1,17 +0,0 @@ -default-group: local - -api: - specs: - - openapi: ./spec1/openapi.json - origin: https://bump.sh/bump-examples/doc/train-travel-api.json - - openapi: ./spec2/openapi.json - origin: https://bump.sh/bump-examples/doc/train-travel-api.json - -groups: - local: - generators: - - name: fernapi/fern-typescript-node-sdk - version: 0.9.5 - output: - location: local-file-system - path: ../sdks/typescript diff --git a/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/spec1/openapi.json b/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/spec1/openapi.json deleted file mode 100644 index 97cfa9cecb8..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/spec1/openapi.json +++ /dev/null @@ -1,1673 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "Train Travel API", - "description": "API for finding and booking train trips across Europe.\n\n## Run in Postman\n\nExperiment with this API in Postman, using our Postman Collection.\n\n[\"Run](https://app.getpostman.com/run-collection/9265903-7a75a0d0-b108-4436-ba54-c6139698dc08?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D9265903-7a75a0d0-b108-4436-ba54-c6139698dc08%26entityType%3Dcollection%26workspaceId%3Df507f69d-9564-419c-89a2-cb8e4c8c7b8f)\n", - "version": "1.0.0", - "contact": { - "name": "Train Support", - "url": "https://example.com/support", - "email": "support@example.com" - }, - "license": { - "name": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", - "identifier": "CC-BY-NC-SA-4.0" - }, - "x-feedbackLink": { - "label": "Submit Feedback", - "url": "https://github.com/bump-sh-examples/train-travel-api/issues/new" - } - }, - "servers": [ - { - "url": "https://api.example.com", - "description": "Production" - } - ], - "security": [ - { - "OAuth2": [ - "read" - ] - } - ], - "x-topics": [ - { - "title": "Getting started", - "content": { - "$ref": "./docs/getting-started.md" - } - } - ], - "tags": [ - { - "name": "Stations", - "description": "Find and filter train stations across Europe, including their location\nand local timezone.\n" - }, - { - "name": "Trips", - "description": "Timetables and routes for train trips between stations, including pricing\nand availability.\n" - }, - { - "name": "Bookings", - "description": "Create and manage bookings for train trips, including passenger details\nand optional extras.\n" - }, - { - "name": "Payments", - "description": "Pay for bookings using a card or bank account, and view payment\nstatus and history.\n\n> warn\n> Bookings usually expire within 1 hour so you'll need to make your payment\n> before the expiry date \n" - } - ], - "paths": { - "/stations": { - "get": { - "summary": "Get a list of train stations", - "description": "Returns a paginated and searchable list of all train stations.", - "operationId": "get-stations", - "tags": [ - "Stations" - ], - "parameters": [ - { - "name": "page", - "in": "query", - "description": "The page number to return", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - }, - "example": 1 - }, - { - "name": "coordinates", - "in": "query", - "description": "The latitude and longitude of the user's location, to narrow down the search results to sites within a proximity of this location.\n", - "required": false, - "schema": { - "type": "string" - }, - "example": "52.5200,13.4050" - }, - { - "name": "search", - "in": "query", - "description": "A search term to filter the list of stations by name or address.\n", - "required": false, - "schema": { - "type": "string", - "examples": [ - "Milano Centrale", - "Paris" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Station" - } - } - } - }, - "example": { - "data": [ - { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "name": "Berlin Hauptbahnhof", - "address": "Invalidenstraße 10557 Berlin, Germany", - "country_code": "DE", - "timezone": "Europe/Berlin" - }, - { - "id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "name": "Paris Gare du Nord", - "address": "18 Rue de Dunkerque 75010 Paris, France", - "country_code": "FR", - "timezone": "Europe/Paris" - } - ], - "links": { - "self": "https://api.example.com/stations&page=2", - "next": "https://api.example.com/stations?page=3", - "prev": "https://api.example.com/stations?page=1" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "stations", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Station" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/trips": { - "get": { - "summary": "Get available train trips", - "description": "Returns a list of available train trips between the specified origin and destination stations on the given date, and allows for filtering by bicycle and dog allowances.\n", - "operationId": "get-trips", - "tags": [ - "Trips" - ], - "parameters": [ - { - "name": "origin", - "in": "query", - "description": "The ID of the origin station", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" - }, - { - "name": "destination", - "in": "query", - "description": "The ID of the destination station", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "b2e783e1-c824-4d63-b37a-d8d698862f1d" - }, - { - "name": "date", - "in": "query", - "description": "The date and time of the trip in ISO 8601 format in origin station's timezone.", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - }, - "example": "2024-02-01T09:00:00Z" - }, - { - "name": "bicycles", - "in": "query", - "description": "Only return trips where bicycles are known to be allowed", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "dogs", - "in": "query", - "description": "Only return trips where dogs are known to be allowed", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "A list of available train trips", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Trip" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "ea399ba1-6d95-433f-92d1-83f67b775594", - "origin": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "destination": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "departure_time": "2024-02-01T10:00:00Z", - "arrival_time": "2024-02-01T16:00:00Z", - "price": 50, - "operator": "Deutsche Bahn", - "bicycles_allowed": true, - "dogs_allowed": true - }, - { - "id": "4d67459c-af07-40bb-bb12-178dbb88e09f", - "origin": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "destination": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "departure_time": "2024-02-01T12:00:00Z", - "arrival_time": "2024-02-01T18:00:00Z", - "price": 50, - "operator": "SNCF", - "bicycles_allowed": true, - "dogs_allowed": true - } - ], - "links": { - "self": "https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01", - "next": "https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01&page=2" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "trips", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Trip" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings": { - "get": { - "operationId": "get-bookings", - "summary": "List existing bookings", - "description": "Returns a list of all trip bookings by the authenticated user.", - "tags": [ - "Bookings" - ], - "responses": { - "200": { - "description": "A list of bookings", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true - }, - { - "id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "trip_id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "passenger_name": "Jane Smith", - "has_bicycle": false, - "has_dog": false - } - ], - "links": { - "self": "https://api.example.com/bookings", - "next": "https://api.example.com/bookings?page=2" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "bookings", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - }, - "post": { - "operationId": "create-booking", - "summary": "Create a booking", - "description": "A booking is a temporary hold on a trip. It is not confirmed until the payment is processed.", - "tags": [ - "Bookings" - ], - "security": [ - { - "OAuth2": [ - "write" - ] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Booking" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - "responses": { - "201": { - "description": "Booking successful", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings/{bookingId}": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "description": "The ID of the booking to retrieve.", - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "1725ff48-ab45-4bb5-9d02-88745177dedb" - } - ], - "get": { - "summary": "Get a booking", - "description": "Returns the details of a specific booking.", - "operationId": "get-booking", - "tags": [ - "Bookings" - ], - "responses": { - "200": { - "description": "The booking details", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - }, - "delete": { - "summary": "Delete a booking", - "description": "Deletes a booking, cancelling the hold on the trip.", - "operationId": "delete-booking", - "security": [ - { - "OAuth2": [ - "write" - ] - } - ], - "tags": [ - "Bookings" - ], - "responses": { - "204": { - "description": "Booking deleted" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings/{bookingId}/payment": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "description": "The ID of the booking to pay for.", - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "1725ff48-ab45-4bb5-9d02-88745177dedb" - } - ], - "post": { - "summary": "Pay for a Booking", - "description": "A payment is an attempt to pay for the booking, which will confirm the booking for the user and enable them to get their tickets.", - "operationId": "create-booking-payment", - "tags": [ - "Payments" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingPayment" - }, - "examples": { - "Card": { - "summary": "Card Payment", - "value": { - "amount": 49.99, - "currency": "gbp", - "source": { - "object": "card", - "name": "J. Doe", - "number": "4242424242424242", - "cvc": 123, - "exp_month": 12, - "exp_year": 2025, - "address_line1": "123 Fake Street", - "address_line2": "4th Floor", - "address_city": "London", - "address_country": "gb", - "address_post_code": "N12 9XX" - } - } - }, - "Bank": { - "summary": "Bank Account Payment", - "value": { - "amount": 100.5, - "currency": "gbp", - "source": { - "object": "bank_account", - "name": "J. Doe", - "number": "00012345", - "sort_code": "000123", - "account_type": "individual", - "bank_name": "Starling Bank", - "country": "gb" - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Payment successful", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BookingPayment" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Booking" - } - } - } - ] - }, - "examples": { - "Card": { - "summary": "Card Payment", - "value": { - "id": "2e3b4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a", - "amount": 49.99, - "currency": "gbp", - "source": { - "object": "card", - "name": "J. Doe", - "number": "************4242", - "cvc": 123, - "exp_month": 12, - "exp_year": 2025, - "address_country": "gb", - "address_post_code": "N12 9XX" - }, - "status": "succeeded", - "links": { - "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb/payment" - } - } - }, - "Bank": { - "summary": "Bank Account Payment", - "value": { - "id": "2e3b4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a", - "amount": 100.5, - "currency": "gbp", - "source": { - "object": "bank_account", - "name": "J. Doe", - "account_type": "individual", - "number": "*********2345", - "sort_code": "000123", - "bank_name": "Starling Bank", - "country": "gb" - }, - "status": "succeeded", - "links": { - "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - } - }, - "webhooks": { - "newBooking": { - "post": { - "operationId": "new-booking", - "summary": "New Booking", - "description": "Subscribe to new bookings being created, to update integrations for your users. Related data is available via the links provided in the request.\n", - "tags": [ - "Bookings" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - }, - "responses": { - "200": { - "description": "Return a 200 status to indicate that the data was received successfully." - } - } - } - } - }, - "components": { - "securitySchemes": { - "OAuth2": { - "type": "oauth2", - "description": "OAuth 2.0 authorization code following RFC8725 best practices.", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://example.com/oauth/authorize", - "tokenUrl": "https://example.com/oauth/token", - "scopes": { - "read": "Read access", - "write": "Write access" - } - } - } - } - }, - "schemas": { - "Station": { - "type": "object", - "xml": { - "name": "station" - }, - "required": [ - "id", - "name", - "address", - "country_code" - ], - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the station.", - "examples": [ - "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "b2e783e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "name": { - "type": "string", - "description": "The name of the station", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "address": { - "type": "string", - "description": "The address of the station.", - "examples": [ - "Invalidenstraße 10557 Berlin, Germany", - "18 Rue de Dunkerque 75010 Paris, France" - ] - }, - "country_code": { - "type": "string", - "description": "The country code of the station.", - "format": "iso-country-code", - "examples": [ - "DE", - "FR" - ] - }, - "timezone": { - "type": "string", - "description": "The timezone of the station in the [IANA Time Zone Database format](https://www.iana.org/time-zones).", - "examples": [ - "Europe/Berlin", - "Europe/Paris" - ] - } - } - }, - "Links-Self": { - "type": "object", - "properties": { - "self": { - "type": "string", - "format": "uri" - } - } - }, - "Links-Pagination": { - "type": "object", - "properties": { - "next": { - "type": "string", - "format": "uri" - }, - "prev": { - "type": "string", - "format": "uri" - } - } - }, - "Problem": { - "xml": { - "name": "problem", - "namespace": "urn:ietf:rfc:7807" - }, - "properties": { - "type": { - "type": "string", - "description": "A URI reference that identifies the problem type", - "example": "https://example.com/probs/out-of-credit" - }, - "title": { - "type": "string", - "description": "A short, human-readable summary of the problem type", - "example": "You do not have enough credit." - }, - "detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem", - "example": "Your current balance is 30, but that costs 50." - }, - "instance": { - "type": "string", - "description": "A URI reference that identifies the specific occurrence of the problem", - "example": "/account/12345/msgs/abc" - }, - "status": { - "type": "integer", - "description": "The HTTP status code", - "example": 400 - } - } - }, - "Trip": { - "type": "object", - "xml": { - "name": "trip" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "origin": { - "type": "string", - "description": "The starting station of the trip", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "destination": { - "type": "string", - "description": "The destination station of the trip", - "examples": [ - "Paris Gare du Nord", - "Berlin Hauptbahnhof" - ] - }, - "departure_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip departs", - "examples": [ - "2024-02-01T10:00:00Z" - ] - }, - "arrival_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip arrives", - "examples": [ - "2024-02-01T16:00:00Z" - ] - }, - "operator": { - "type": "string", - "description": "The name of the operator of the trip", - "examples": [ - "Deutsche Bahn", - "SNCF" - ] - }, - "price": { - "type": "number", - "description": "The cost of the trip", - "examples": [ - 50 - ] - }, - "bicycles_allowed": { - "type": "boolean", - "description": "Indicates whether bicycles are allowed on the trip" - }, - "dogs_allowed": { - "type": "boolean", - "description": "Indicates whether dogs are allowed on the trip" - } - } - }, - "Booking": { - "type": "object", - "xml": { - "name": "booking" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the booking", - "readOnly": true, - "examples": [ - "3f3e3e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "trip_id": { - "type": "string", - "format": "uuid", - "description": "Identifier of the booked trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "passenger_name": { - "type": "string", - "description": "Name of the passenger", - "examples": [ - "John Doe" - ] - }, - "has_bicycle": { - "type": "boolean", - "description": "Indicates whether the passenger has a bicycle." - }, - "has_dog": { - "type": "boolean", - "description": "Indicates whether the passenger has a dog." - } - } - }, - "Wrapper-Collection": { - "description": "This is a generic request/response wrapper which contains both data and links which serve as hypermedia controls (HATEOAS).", - "type": "object", - "properties": { - "data": { - "description": "The wrapper for a collection is an array of objects.", - "type": "array", - "items": { - "type": "object" - } - }, - "links": { - "description": "A set of hypermedia links which serve as controls for the client.", - "type": "object", - "readOnly": true - } - }, - "xml": { - "name": "data" - } - }, - "BookingPayment": { - "type": "object", - "properties": { - "id": { - "description": "Unique identifier for the payment. This will be a unique identifier for the payment, and is used to reference the payment in other objects.", - "type": "string", - "format": "uuid", - "readOnly": true - }, - "amount": { - "description": "Amount intended to be collected by this payment. A positive decimal figure describing the amount to be collected.", - "type": "number", - "exclusiveMinimum": 0, - "examples": [ - 49.99 - ] - }, - "currency": { - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", - "type": "string", - "enum": [ - "bam", - "bgn", - "chf", - "eur", - "gbp", - "nok", - "sek", - "try" - ] - }, - "source": { - "unevaluatedProperties": false, - "description": "The payment source to take the payment from. This can be a card or a bank account. Some of these properties will be hidden on read to protect PII leaking.", - "anyOf": [ - { - "title": "Card", - "description": "A card (debit or credit) to take payment from.", - "properties": { - "object": { - "type": "string", - "const": "card" - }, - "name": { - "type": "string", - "description": "Cardholder's full name as it appears on the card.", - "examples": [ - "Francis Bourgeois" - ] - }, - "number": { - "type": "string", - "description": "The card number, as a string without any separators. On read all but the last four digits will be masked for security.", - "examples": [ - "4242424242424242" - ] - }, - "cvc": { - "type": "integer", - "description": "Card security code, 3 or 4 digits usually found on the back of the card.", - "minLength": 3, - "maxLength": 4, - "writeOnly": true, - "example": 123 - }, - "exp_month": { - "type": "integer", - "format": "int64", - "description": "Two-digit number representing the card's expiration month.", - "examples": [ - 12 - ] - }, - "exp_year": { - "type": "integer", - "format": "int64", - "description": "Four-digit number representing the card's expiration year.", - "examples": [ - 2025 - ] - }, - "address_line1": { - "type": "string", - "writeOnly": true - }, - "address_line2": { - "type": "string", - "writeOnly": true - }, - "address_city": { - "type": "string" - }, - "address_country": { - "type": "string" - }, - "address_post_code": { - "type": "string" - } - }, - "required": [ - "name", - "number", - "cvc", - "exp_month", - "exp_year", - "address_country" - ] - }, - { - "title": "Bank Account", - "description": "A bank account to take payment from. Must be able to make payments in the currency specified in the payment.", - "type": "object", - "properties": { - "object": { - "const": "bank_account", - "type": "string" - }, - "name": { - "type": "string" - }, - "number": { - "type": "string", - "description": "The account number for the bank account, in string form. Must be a current account." - }, - "sort_code": { - "type": "string", - "description": "The sort code for the bank account, in string form. Must be a six-digit number." - }, - "account_type": { - "enum": [ - "individual", - "company" - ], - "type": "string", - "description": "The type of entity that holds the account. This can be either `individual` or `company`." - }, - "bank_name": { - "type": "string", - "description": "The name of the bank associated with the routing number.", - "examples": [ - "Starling Bank" - ] - }, - "country": { - "type": "string", - "description": "Two-letter country code (ISO 3166-1 alpha-2)." - } - }, - "required": [ - "name", - "number", - "account_type", - "bank_name", - "country" - ] - } - ] - }, - "status": { - "description": "The status of the payment, one of `pending`, `succeeded`, or `failed`.", - "type": "string", - "enum": [ - "pending", - "succeeded", - "failed" - ], - "readOnly": true - } - } - }, - "Links-Booking": { - "type": "object", - "properties": { - "booking": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - ] - } - } - } - }, - "headers": { - "RateLimit": { - "description": "The RateLimit header communicates quota policies. It contains a `limit` to\nconvey the expiring limit, `remaining` to convey the remaining quota units,\nand `reset` to convey the time window reset time.\n", - "schema": { - "type": "string", - "examples": [ - "limit=10, remaining=0, reset=10" - ] - } - }, - "Retry-After": { - "description": "The Retry-After header indicates how long the user agent should wait before making a follow-up request. \nThe value is in seconds and can be an integer or a date in the future. \nIf the value is an integer, it indicates the number of seconds to wait. \nIf the value is a date, it indicates the time at which the user agent should make a follow-up request. \n", - "schema": { - "type": "string" - }, - "examples": { - "integer": { - "value": "120", - "summary": "Retry after 120 seconds" - }, - "date": { - "value": "Fri, 31 Dec 2021 23:59:59 GMT", - "summary": "Retry after the specified date" - } - } - } - }, - "responses": { - "BadRequest": { - "description": "Bad Request", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - } - } - }, - "Conflict": { - "description": "Conflict", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - } - } - }, - "Forbidden": { - "description": "Forbidden", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - } - } - }, - "InternalServerError": { - "description": "Internal Server Error", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - } - } - }, - "NotFound": { - "description": "Not Found", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - } - } - }, - "TooManyRequests": { - "description": "Too Many Requests", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - } - } - }, - "Unauthorized": { - "description": "Unauthorized", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - } - } - } - } - } -} \ No newline at end of file diff --git a/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/spec2/openapi.json b/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/spec2/openapi.json deleted file mode 100644 index ecaa3eed856..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-v2/fixtures/fern/spec2/openapi.json +++ /dev/null @@ -1,1329 +0,0 @@ -{ - "info": { - "contact": { - "name": "Train Support", - "url": "https://example.com/support", - "email": "support@example.com" - }, - "license": { - "name": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", - "identifier": "CC-BY-NC-SA-4.0" - } - }, - "servers": [ - { - "url": "https://api.example.com", - "description": "Production" - } - ], - "security": [ - { - "OAuth2": ["read"] - } - ], - "x-topics": [ - { - "title": "Getting started", - "content": { - "$ref": "./docs/getting-started.md" - } - } - ], - "tags": [ - { - "name": "Stations", - "description": "Find and filter train stations across Europe, including their location\nand local timezone.\n" - }, - { - "name": "Train Tracks", - "description": "Find and filter all the different rail roads available across Europe, including their location\nand local timezone.\n" - }, - { - "name": "Trips", - "description": "Timetables and routes for train trips between stations, including pricing\nand availability.\n" - }, - { - "name": "Bookings", - "description": "Create and manage bookings for train trips, including passenger details\nand optional extras.\n" - }, - { - "name": "Payments", - "description": "Pay for bookings using a card or bank account, and view payment\nstatus and history.\n\n> warn\n> Bookings usually expire within 1 hour so you'll need to make your payment\n> before the expiry date \n" - } - ], - "paths": { - "/trips": { - "get": { - "summary": "Get available train trips", - "description": "Returns a list of available train trips between the specified origin and destination stations on the given date, and allows for filtering by bicycle and dog allowances.", - "operationId": "get-trips", - "tags": ["Trips"], - "parameters": [ - { - "name": "origin", - "in": "query", - "description": "The ID of the origin station", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" - }, - { - "name": "destination", - "in": "query", - "description": "The ID of the destination station", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "b2e783e1-c824-4d63-b37a-d8d698862f1d" - }, - { - "name": "date", - "in": "query", - "description": "The date and time of the trip in ISO 8601 format in origin station's timezone.", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - }, - "example": "2024-02-01T09:00:00Z" - }, - { - "name": "bicycles", - "in": "query", - "description": "Only return trips where bicycles are known to be allowed", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "dogs", - "in": "query", - "description": "Only return trips where dogs are known to be allowed", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "A list of available train trips", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Trip" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "ea399ba1-6d95-433f-92d1-83f67b775594", - "origin": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "destination": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "departure_time": "2024-02-01T10:00:00Z", - "arrival_time": "2024-02-01T16:00:00Z", - "price": 50, - "operator": "Deutsche Bahn", - "bicycles_allowed": true, - "dogs_allowed": true - }, - { - "id": "4d67459c-af07-40bb-bb12-178dbb88e09f", - "origin": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "destination": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "departure_time": "2024-02-01T12:00:00Z", - "arrival_time": "2024-02-01T18:00:00Z", - "price": 50, - "operator": "SNCF", - "bicycles_allowed": true, - "dogs_allowed": true - } - ], - "links": { - "self": "https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01", - "next": "https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01&page=2" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "trips", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Trip" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings": { - "get": { - "operationId": "get-bookings", - "summary": "List existing bookings", - "description": "Returns a list of all trip bookings by the authenticated user.", - "tags": ["Bookings"], - "responses": { - "200": { - "description": "A list of bookings", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true - }, - { - "id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "trip_id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "passenger_name": "Jane Smith", - "has_bicycle": false, - "has_dog": false - } - ], - "links": { - "self": "https://api.example.com/bookings", - "next": "https://api.example.com/bookings?page=2" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "bookings", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - }, - "post": { - "operationId": "create-booking", - "summary": "Create a booking", - "description": "A booking is a temporary hold on a trip. It is not confirmed until the payment is processed.", - "tags": ["Bookings"], - "security": [ - { - "OAuth2": ["write"] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Booking" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - "responses": { - "201": { - "description": "Booking successful", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings/{bookingId}": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "description": "The ID of the booking to retrieve.", - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "1725ff48-ab45-4bb5-9d02-88745177dedb" - } - ], - "get": { - "summary": "Get a booking", - "description": "Returns the details of a specific booking.", - "operationId": "get-booking", - "tags": ["Bookings"], - "responses": { - "200": { - "description": "The booking details", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - }, - "delete": { - "summary": "Delete a booking", - "description": "Deletes a booking, cancelling the hold on the trip.", - "operationId": "delete-booking", - "security": [ - { - "OAuth2": ["write"] - } - ], - "tags": ["Bookings"], - "responses": { - "204": { - "description": "Booking deleted" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings/{bookingId}/payment": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "description": "The ID of the booking to pay for.", - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "1725ff48-ab45-4bb5-9d02-88745177dedb" - } - ], - "post": { - "summary": "Pay for a Booking", - "description": "A payment is an attempt to pay for the booking, which will confirm the booking for the user and enable them to get their tickets.", - "operationId": "create-booking-payment", - "tags": ["Payments"], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingPayment" - }, - "examples": { - "Card": { - "summary": "Card Payment", - "value": { - "amount": 49.99, - "currency": "gbp", - "source": { - "object": "card", - "name": "J. Doe", - "number": "4242424242424242", - "cvc": 123, - "exp_month": 12, - "exp_year": 2025, - "address_line1": "123 Fake Street", - "address_line2": "4th Floor", - "address_city": "London", - "address_country": "gb", - "address_post_code": "N12 9XX" - } - } - }, - "Bank": { - "summary": "Bank Account Payment", - "value": { - "amount": 100.5, - "currency": "gbp", - "source": { - "object": "bank_account", - "name": "J. Doe", - "number": "00012345", - "sort_code": "000123", - "account_type": "individual", - "bank_name": "Starling Bank", - "country": "gb" - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Payment successful", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BookingPayment" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Booking" - } - } - } - ] - }, - "examples": { - "Card": { - "summary": "Card Payment", - "value": { - "id": "2e3b4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a", - "amount": 49.99, - "currency": "gbp", - "source": { - "object": "card", - "name": "J. Doe", - "number": "************4242", - "cvc": 123, - "exp_month": 12, - "exp_year": 2025, - "address_country": "gb", - "address_post_code": "N12 9XX" - }, - "status": "succeeded", - "links": { - "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb/payment" - } - } - }, - "Bank": { - "summary": "Bank Account Payment", - "value": { - "id": "2e3b4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a", - "amount": 100.5, - "currency": "gbp", - "source": { - "object": "bank_account", - "name": "J. Doe", - "account_type": "individual", - "number": "*********2345", - "sort_code": "000123", - "bank_name": "Starling Bank", - "country": "gb" - }, - "status": "succeeded", - "links": { - "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - } - }, - "components": { - "securitySchemes": { - "OAuth2": { - "type": "oauth2", - "description": "OAuth 2.0 authorization code following RFC8725 best practices.", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://example.com/oauth/authorize", - "tokenUrl": "https://example.com/oauth/token", - "scopes": { - "read": "Read access", - "write": "Write access" - } - } - } - } - }, - "schemas": { - "Station": { - "type": "object", - "xml": { - "name": "station" - }, - "required": ["id", "name", "address", "country_code"], - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the station.", - "examples": ["efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", "b2e783e1-c824-4d63-b37a-d8d698862f1d"] - }, - "name": { - "type": "string", - "description": "The name of the station", - "examples": ["Berlin Hauptbahnhof", "Paris Gare du Nord"] - }, - "address": { - "type": "string", - "description": "The address of the station.", - "examples": ["Invalidenstraße 10557 Berlin, Germany", "18 Rue de Dunkerque 75010 Paris, France"] - }, - "country_code": { - "type": "string", - "description": "The country code of the station.", - "format": "iso-country-code", - "examples": ["DE", "FR"] - }, - "timezone": { - "type": "string", - "description": "The timezone of the station in the [IANA Time Zone Database format](https://www.iana.org/time-zones).", - "examples": ["Europe/Berlin", "Europe/Paris"] - } - } - }, - "Links-Self": { - "type": "object", - "properties": { - "self": { - "type": "string", - "format": "uri" - } - } - }, - "Links-Pagination": { - "type": "object", - "properties": { - "next": { - "type": "string", - "format": "uri" - }, - "prev": { - "type": "string", - "format": "uri" - } - } - }, - "Trip": { - "type": "object", - "xml": { - "name": "trip" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the trip", - "examples": ["4f4e4e1-c824-4d63-b37a-d8d698862f1d"] - }, - "origin": { - "type": "string", - "description": "The starting station of the trip", - "examples": ["Berlin Hauptbahnhof", "Paris Gare du Nord"] - }, - "destination": { - "type": "string", - "description": "The destination station of the trip", - "examples": ["Paris Gare du Nord", "Berlin Hauptbahnhof"] - }, - "departure_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip departs", - "examples": ["2024-02-01T10:00:00Z"] - }, - "arrival_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip arrives", - "examples": ["2024-02-01T16:00:00Z"] - }, - "operator": { - "type": "string", - "description": "The name of the operator of the trip", - "examples": ["Deutsche Bahn", "SNCF"] - }, - "price": { - "type": "number", - "description": "The cost of the trip", - "examples": [50] - }, - "bicycles_allowed": { - "type": "boolean", - "description": "Indicates whether bicycles are allowed on the trip" - }, - "dogs_allowed": { - "type": "boolean", - "description": "Indicates whether dogs are allowed on the trip" - } - } - }, - "Booking": { - "type": "object", - "xml": { - "name": "booking" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the booking", - "readOnly": true, - "examples": ["3f3e3e1-c824-4d63-b37a-d8d698862f1d"] - }, - "trip_id": { - "type": "string", - "format": "uuid", - "description": "Identifier of the booked trip", - "examples": ["4f4e4e1-c824-4d63-b37a-d8d698862f1d"] - }, - "passenger_name": { - "type": "string", - "description": "Name of the passenger", - "examples": ["John Doe"] - }, - "has_bicycle": { - "type": "boolean", - "description": "Indicates whether the passenger has a bicycle." - }, - "has_dog": { - "type": "boolean", - "description": "Indicates whether the passenger has a dog." - } - } - }, - "Wrapper-Collection": { - "description": "This is a generic request/response wrapper which contains both data and links which serve as hypermedia controls (HATEOAS).", - "type": "object", - "properties": { - "data": { - "description": "The wrapper for a collection is an array of objects.", - "type": "array", - "items": { - "type": "object" - } - }, - "links": { - "description": "A set of hypermedia links which serve as controls for the client.", - "type": "object", - "readOnly": true - } - }, - "xml": { - "name": "data" - } - }, - "BookingPayment": { - "type": "object", - "properties": { - "id": { - "description": "Unique identifier for the payment. This will be a unique identifier for the payment, and is used to reference the payment in other objects.", - "type": "string", - "format": "uuid", - "readOnly": true - }, - "amount": { - "description": "Amount intended to be collected by this payment. A positive decimal figure describing the amount to be collected.", - "type": "number", - "exclusiveMinimum": 0, - "examples": [49.99] - }, - "currency": { - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", - "type": "string", - "enum": ["bam", "bgn", "chf", "eur", "gbp", "nok", "sek", "try"] - }, - "source": { - "unevaluatedProperties": false, - "description": "The payment source to take the payment from. This can be a card or a bank account. Some of these properties will be hidden on read to protect PII leaking.", - "anyOf": [ - { - "title": "Card", - "description": "A card (debit or credit) to take payment from.", - "properties": { - "object": { - "type": "string", - "const": "card" - }, - "name": { - "type": "string", - "description": "Cardholder's full name as it appears on the card.", - "examples": ["Francis Bourgeois"] - }, - "number": { - "type": "string", - "description": "The card number, as a string without any separators. On read all but the last four digits will be masked for security.", - "examples": ["4242424242424242"] - }, - "cvc": { - "type": "integer", - "description": "Card security code, 3 or 4 digits usually found on the back of the card.", - "minLength": 3, - "maxLength": 4, - "writeOnly": true, - "example": 123 - }, - "exp_month": { - "type": "integer", - "format": "int64", - "description": "Two-digit number representing the card's expiration month.", - "examples": [12] - }, - "exp_year": { - "type": "integer", - "format": "int64", - "description": "Four-digit number representing the card's expiration year.", - "examples": [2025] - }, - "address_line1": { - "type": "string", - "writeOnly": true - }, - "address_line2": { - "type": "string", - "writeOnly": true - }, - "address_city": { - "type": "string" - }, - "address_country": { - "type": "string" - }, - "address_post_code": { - "type": "string" - } - }, - "required": ["name", "number", "cvc", "exp_month", "exp_year", "address_country"] - }, - { - "title": "Bank Account", - "description": "A bank account to take payment from. Must be able to make payments in the currency specified in the payment.", - "type": "object", - "properties": { - "object": { - "const": "bank_account", - "type": "string" - }, - "name": { - "type": "string" - }, - "number": { - "type": "string", - "description": "The account number for the bank account, in string form. Must be a current account." - }, - "sort_code": { - "type": "string", - "description": "The sort code for the bank account, in string form. Must be a six-digit number." - }, - "account_type": { - "enum": ["individual", "company"], - "type": "string", - "description": "The type of entity that holds the account. This can be either `individual` or `company`." - }, - "bank_name": { - "type": "string", - "description": "The name of the bank associated with the routing number.", - "examples": ["Starling Bank"] - }, - "country": { - "type": "string", - "description": "Two-letter country code (ISO 3166-1 alpha-2)." - } - }, - "required": ["name", "number", "account_type", "bank_name", "country"] - } - ] - }, - "status": { - "description": "The status of the payment, one of `pending`, `succeeded`, or `failed`.", - "type": "string", - "enum": ["pending", "succeeded", "failed"], - "readOnly": true - } - } - }, - "Links-Booking": { - "type": "object", - "properties": { - "booking": { - "type": "string", - "format": "uri", - "examples": ["https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb"] - } - } - } - }, - "headers": { - "RateLimit": { - "description": "The RateLimit header communicates quota policies. It contains a `limit` to\nconvey the expiring limit, `remaining` to convey the remaining quota units,\nand `reset` to convey the time window reset time.\n", - "schema": { - "type": "string", - "examples": ["limit=10, remaining=0, reset=10"] - } - }, - "Retry-After": { - "description": "The Retry-After header indicates how long the user agent should wait before making a follow-up request. \nThe value is in seconds and can be an integer or a date in the future. \nIf the value is an integer, it indicates the number of seconds to wait. \nIf the value is a date, it indicates the time at which the user agent should make a follow-up request. \n", - "schema": { - "type": "string" - }, - "examples": { - "integer": { - "value": "120", - "summary": "Retry after 120 seconds" - }, - "date": { - "value": "Fri, 31 Dec 2021 23:59:59 GMT", - "summary": "Retry after the specified date" - } - } - } - }, - "responses": { - "BadRequest": { - "description": "Bad Request", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - } - } - }, - "Conflict": { - "description": "Conflict", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - } - } - }, - "Forbidden": { - "description": "Forbidden", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - } - } - }, - "InternalServerError": { - "description": "Internal Server Error", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - } - } - }, - "NotFound": { - "description": "Not Found", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - } - } - }, - "TooManyRequests": { - "description": "Too Many Requests", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - } - } - }, - "Unauthorized": { - "description": "Unauthorized", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - } - } - } - } - } -} diff --git a/packages/cli/ete-tests/src/tests/update-api-v2/update-api.test.ts b/packages/cli/ete-tests/src/tests/update-api-v2/update-api.test.ts deleted file mode 100644 index dcb813457d3..00000000000 --- a/packages/cli/ete-tests/src/tests/update-api-v2/update-api.test.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { AbsoluteFilePath, getDirectoryContents, getDirectoryContentsForSnapshot } from "@fern-api/fs-utils"; -import { cp } from "fs/promises"; -import path from "path"; -import tmp from "tmp-promise"; -import { runFernCli } from "../../utils/runFernCli"; - -const FIXTURES_DIR = path.join(__dirname, "fixtures"); - -describe("fern api update unioned", () => { - it("fern api update unioned", async () => { - // Create tmpdir and copy contents - const tmpDir = await tmp.dir(); - const directory = AbsoluteFilePath.of(tmpDir.path); - - await cp(FIXTURES_DIR, directory, { recursive: true }); - - const outputPath = AbsoluteFilePath.of(path.join(directory, "fern", "spec1")); - - await runFernCli(["api", "update"], { - cwd: directory - }); - - expect(await getDirectoryContentsForSnapshot(outputPath)).toMatchSnapshot(); - }, 60_000); -}); diff --git a/packages/cli/ete-tests/src/tests/update-api/__snapshots__/update-api.test.ts.snap b/packages/cli/ete-tests/src/tests/update-api/__snapshots__/update-api.test.ts.snap index 7f8805c1c11..bc1d3b57b55 100644 --- a/packages/cli/ete-tests/src/tests/update-api/__snapshots__/update-api.test.ts.snap +++ b/packages/cli/ete-tests/src/tests/update-api/__snapshots__/update-api.test.ts.snap @@ -4,1794 +4,92 @@ exports[`fern api update > fern api update 1`] = ` [ { "contents": "{ - "openapi": "3.1.0", + "version": "*", + "organization": "fern" +}", + "name": "fern.config.json", + "type": "file", + }, + { + "contents": "default-group: local +api: + path: ./openapi/openapi.json + origin: http://localhost:4567/openapi.json +groups: + local: + generators: + - name: fernapi/fern-typescript-node-sdk + version: 0.9.5 + output: + location: local-file-system + path: ../sdks/typescript", + "name": "generators.yml", + "type": "file", + }, + { + "contents": [ + { + "contents": "{ + "openapi": "3.0.0", "info": { - "title": "Train Travel API", - "description": "API for finding and booking train trips across Europe.\\n\\n## Run in Postman\\n\\nExperiment with this API in Postman, using our Postman Collection.\\n\\n[![Run In Postman](https://run.pstmn.io/button.svg =128pxx32px)](https://app.getpostman.com/run-collection/9265903-7a75a0d0-b108-4436-ba54-c6139698dc08?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D9265903-7a75a0d0-b108-4436-ba54-c6139698dc08%26entityType%3Dcollection%26workspaceId%3Df507f69d-9564-419c-89a2-cb8e4c8c7b8f)\\n", - "version": "1.0.0", - "contact": { - "name": "Train Support", - "url": "https://example.com/support", - "email": "support@example.com" - }, - "license": { - "name": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", - "identifier": "CC-BY-NC-SA-4.0" - }, - "x-feedbackLink": { - "label": "Submit Feedback", - "url": "https://github.com/bump-sh-examples/train-travel-api/issues/new" - } + "title": "Test API", + "version": "1.0.0" }, - "servers": [ - { - "url": "https://api.example.com", - "description": "Production", - "x-internal": false - }, - { - "url": "https://try.microcks.io/rest/Train+Travel+API/1.0.0", - "description": "Mock Server", - "x-internal": false - } - ], - "security": [ - { - "OAuth2": [ - "read" - ] - } - ], - "x-topics": [ - { - "title": "Getting started", - "content": { - "$ref": "./docs/getting-started.md" - } - } - ], - "tags": [ - { - "name": "Stations", - "description": "Find and filter train stations across Europe, including their location\\nand local timezone.\\n" - }, - { - "name": "Trips", - "description": "Timetables and routes for train trips between stations, including pricing\\nand availability.\\n" - }, - { - "name": "Bookings", - "description": "Create and manage bookings for train trips, including passenger details\\nand optional extras.\\n" - }, - { - "name": "Payments", - "description": "Pay for bookings using a card or bank account, and view payment\\nstatus and history.\\n\\n> warn\\n> Bookings usually expire within 1 hour so you'll need to make your payment\\n> before the expiry date \\n" - } - ], "paths": { - "/stations": { + "/testdata": { "get": { - "summary": "Get a list of train stations", - "description": "Returns a paginated and searchable list of all train stations.", - "operationId": "get-stations", - "tags": [ - "Stations" - ], - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "name": "coordinates", - "in": "query", - "description": "The latitude and longitude of the user's location, to narrow down the search results to sites within a proximity of this location.\\n", - "required": false, - "schema": { - "type": "string" - }, - "example": "52.5200,13.4050" - }, - { - "name": "search", - "in": "query", - "description": "A search term to filter the list of stations by name or address.\\n", - "required": false, - "schema": { - "type": "string", - "examples": [ - "Milano Centrale", - "Paris" - ] - } - }, - { - "name": "country", - "in": "query", - "description": "Filter stations by country code", - "required": false, - "schema": { - "type": "string", - "format": "iso-country-code" - }, - "example": "DE" - } - ], + "summary": "Retrieve test data", + "operationId": "getTestData", "responses": { "200": { - "description": "OK", - "headers": { - "Cache-Control": { - "$ref": "#/components/headers/Cache-Control" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, + "description": "Successful response", "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Station" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "name": "Berlin Hauptbahnhof", - "address": "Invalidenstraße 10557 Berlin, Germany", - "country_code": "DE", - "timezone": "Europe/Berlin" - }, - { - "id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "name": "Paris Gare du Nord", - "address": "18 Rue de Dunkerque 75010 Paris, France", - "country_code": "FR", - "timezone": "Europe/Paris" + "type": "object", + "properties": { + "message": { + "type": "string" } - ], - "links": { - "self": "https://api.example.com/stations&page=2", - "next": "https://api.example.com/stations?page=3", - "prev": "https://api.example.com/stations?page=1" } } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "stations", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Station" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } } } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" } } } }, - "/trips": { + "/filtered": { "get": { - "summary": "Get available train trips", - "description": "Returns a list of available train trips between the specified origin and destination stations on the given date, and allows for filtering by bicycle and dog allowances.\\n", - "operationId": "get-trips", - "tags": [ - "Trips" - ], - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/limit" - }, - { - "name": "origin", - "in": "query", - "description": "The ID of the origin station", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" - }, - { - "name": "destination", - "in": "query", - "description": "The ID of the destination station", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "b2e783e1-c824-4d63-b37a-d8d698862f1d" - }, - { - "name": "date", - "in": "query", - "description": "The date and time of the trip in ISO 8601 format in origin station's timezone.", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - }, - "example": "2024-02-01T09:00:00Z" - }, - { - "name": "bicycles", - "in": "query", - "description": "Only return trips where bicycles are known to be allowed", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "dogs", - "in": "query", - "description": "Only return trips where dogs are known to be allowed", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - } - ], + "summary": "This endpoint should be filtered out", + "operationId": "filtered", "responses": { "200": { - "description": "A list of available train trips", - "headers": { - "Cache-Control": { - "$ref": "#/components/headers/Cache-Control" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, + "description": "Successful response", "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Trip" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } + "type": "object", + "properties": { + "message": { + "type": "string" } - ] - }, - "example": { - "data": [ - { - "id": "ea399ba1-6d95-433f-92d1-83f67b775594", - "origin": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "destination": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "departure_time": "2024-02-01T10:00:00Z", - "arrival_time": "2024-02-01T16:00:00Z", - "price": 50, - "operator": "Deutsche Bahn", - "bicycles_allowed": true, - "dogs_allowed": true - }, - { - "id": "4d67459c-af07-40bb-bb12-178dbb88e09f", - "origin": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "destination": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "departure_time": "2024-02-01T12:00:00Z", - "arrival_time": "2024-02-01T18:00:00Z", - "price": 50, - "operator": "SNCF", - "bicycles_allowed": true, - "dogs_allowed": true - } - ], - "links": { - "self": "https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01", - "next": "https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01&page=2" } } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "trips", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Trip" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } } } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings": { - "get": { - "operationId": "get-bookings", - "summary": "List existing bookings", - "description": "Returns a list of all trip bookings by the authenticated user.", - "tags": [ - "Bookings" - ], - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/limit" - } - ], - "responses": { - "200": { - "description": "A list of bookings", - "headers": { - "Cache-Control": { - "$ref": "#/components/headers/Cache-Control" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "data": [ - { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true - }, - { - "id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "trip_id": "b2e783e1-c824-4d63-b37a-d8d698862f1d", - "passenger_name": "Jane Smith", - "has_bicycle": false, - "has_dog": false - } - ], - "links": { - "self": "https://api.example.com/bookings", - "next": "https://api.example.com/bookings?page=2" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Wrapper-Collection" - }, - { - "properties": { - "data": { - "type": "array", - "xml": { - "name": "bookings", - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - }, - "post": { - "operationId": "create-booking", - "summary": "Create a booking", - "description": "A booking is a temporary hold on a trip. It is not confirmed until the payment is processed.", - "tags": [ - "Bookings" - ], - "security": [ - { - "OAuth2": [ - "write" - ] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Booking" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Booking" - } - } - } - }, - "responses": { - "201": { - "description": "Booking successful", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/efdbb9d1-02c2-4bc3-afb7-6788d8782b1e" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings/{bookingId}": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "description": "The ID of the booking to retrieve.", - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "1725ff48-ab45-4bb5-9d02-88745177dedb" - } - ], - "get": { - "summary": "Get a booking", - "description": "Returns the details of a specific booking.", - "operationId": "get-booking", - "tags": [ - "Bookings" - ], - "responses": { - "200": { - "description": "The booking details", - "headers": { - "Cache-Control": { - "$ref": "#/components/headers/Cache-Control" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - }, - "application/xml": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Self" - } - } - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - }, - "delete": { - "summary": "Delete a booking", - "description": "Deletes a booking, cancelling the hold on the trip.", - "operationId": "delete-booking", - "security": [ - { - "OAuth2": [ - "write" - ] - } - ], - "tags": [ - "Bookings" - ], - "responses": { - "204": { - "description": "Booking deleted" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - }, - "/bookings/{bookingId}/payment": { - "parameters": [ - { - "name": "bookingId", - "in": "path", - "required": true, - "description": "The ID of the booking to pay for.", - "schema": { - "type": "string", - "format": "uuid" - }, - "example": "1725ff48-ab45-4bb5-9d02-88745177dedb" - } - ], - "post": { - "summary": "Pay for a Booking", - "description": "A payment is an attempt to pay for the booking, which will confirm the booking for the user and enable them to get their tickets.", - "operationId": "create-booking-payment", - "tags": [ - "Payments" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BookingPayment" - }, - "examples": { - "Card": { - "summary": "Card Payment", - "value": { - "amount": 49.99, - "currency": "gbp", - "source": { - "object": "card", - "name": "J. Doe", - "number": "4242424242424242", - "cvc": 123, - "exp_month": 12, - "exp_year": 2025, - "address_line1": "123 Fake Street", - "address_line2": "4th Floor", - "address_city": "London", - "address_country": "gb", - "address_post_code": "N12 9XX" - } - } - }, - "Bank": { - "summary": "Bank Account Payment", - "value": { - "amount": 100.5, - "currency": "gbp", - "source": { - "object": "bank_account", - "name": "J. Doe", - "number": "00012345", - "sort_code": "000123", - "account_type": "individual", - "bank_name": "Starling Bank", - "country": "gb" - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Payment successful", - "headers": { - "Cache-Control": { - "$ref": "#/components/headers/Cache-Control" - }, - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/BookingPayment" - }, - { - "properties": { - "links": { - "$ref": "#/components/schemas/Links-Booking" - } - } - } - ] - }, - "examples": { - "Card": { - "summary": "Card Payment", - "value": { - "id": "2e3b4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a", - "amount": 49.99, - "currency": "gbp", - "source": { - "object": "card", - "name": "J. Doe", - "number": "************4242", - "cvc": 123, - "exp_month": 12, - "exp_year": 2025, - "address_country": "gb", - "address_post_code": "N12 9XX" - }, - "status": "succeeded", - "links": { - "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb/payment" - } - } - }, - "Bank": { - "summary": "Bank Account Payment", - "value": { - "id": "2e3b4f5a-6b7c-8d9e-0f1a-2b3c4d5e6f7a", - "amount": 100.5, - "currency": "gbp", - "source": { - "object": "bank_account", - "name": "J. Doe", - "account_type": "individual", - "number": "*********2345", - "sort_code": "000123", - "bank_name": "Starling Bank", - "country": "gb" - }, - "status": "succeeded", - "links": { - "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "401": { - "$ref": "#/components/responses/Unauthorized" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "429": { - "$ref": "#/components/responses/TooManyRequests" - }, - "500": { - "$ref": "#/components/responses/InternalServerError" - } - } - } - } - }, - "webhooks": { - "newBooking": { - "post": { - "operationId": "new-booking", - "summary": "New Booking", - "description": "Subscribe to new bookings being created, to update integrations for your users. Related data is available via the links provided in the request.\\n", - "tags": [ - "Bookings" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - }, - "responses": { - "200": { - "description": "Return a 200 status to indicate that the data was received successfully." - } - } - } - } - }, - "components": { - "parameters": { - "page": { - "name": "page", - "in": "query", - "description": "The page number to return", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - }, - "example": 1 - }, - "limit": { - "name": "limit", - "in": "query", - "description": "The number of items to return per page", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 10 - }, - "example": 10 - } - }, - "securitySchemes": { - "OAuth2": { - "type": "oauth2", - "description": "OAuth 2.0 authorization code following RFC8725 best practices.", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://example.com/oauth/authorize", - "tokenUrl": "https://example.com/oauth/token", - "scopes": { - "read": "Read access", - "write": "Write access" - } - } - } - } - }, - "schemas": { - "Station": { - "type": "object", - "xml": { - "name": "station" - }, - "required": [ - "id", - "name", - "address", - "country_code" - ], - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the station.", - "examples": [ - "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "b2e783e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "name": { - "type": "string", - "description": "The name of the station", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "address": { - "type": "string", - "description": "The address of the station.", - "examples": [ - "Invalidenstraße 10557 Berlin, Germany", - "18 Rue de Dunkerque 75010 Paris, France" - ] - }, - "country_code": { - "type": "string", - "description": "The country code of the station.", - "format": "iso-country-code", - "examples": [ - "DE", - "FR" - ] - }, - "timezone": { - "type": "string", - "description": "The timezone of the station in the [IANA Time Zone Database format](https://www.iana.org/time-zones).", - "examples": [ - "Europe/Berlin", - "Europe/Paris" - ] - } - } - }, - "Links-Self": { - "type": "object", - "properties": { - "self": { - "type": "string", - "format": "uri" - } - } - }, - "Links-Pagination": { - "type": "object", - "properties": { - "next": { - "type": "string", - "format": "uri" - }, - "prev": { - "type": "string", - "format": "uri" - } - } - }, - "Problem": { - "type": "object", - "xml": { - "name": "problem", - "namespace": "urn:ietf:rfc:7807" - }, - "properties": { - "type": { - "type": "string", - "description": "A URI reference that identifies the problem type", - "examples": [ - "https://example.com/probs/out-of-credit" - ] - }, - "title": { - "type": "string", - "description": "A short, human-readable summary of the problem type", - "examples": [ - "You do not have enough credit." - ] - }, - "detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem", - "examples": [ - "Your current balance is 30, but that costs 50." - ] - }, - "instance": { - "type": "string", - "description": "A URI reference that identifies the specific occurrence of the problem", - "examples": [ - "/account/12345/msgs/abc" - ] - }, - "status": { - "type": "integer", - "description": "The HTTP status code", - "examples": [ - 400 - ] - } - } - }, - "Trip": { - "type": "object", - "xml": { - "name": "trip" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "origin": { - "type": "string", - "description": "The starting station of the trip", - "examples": [ - "Berlin Hauptbahnhof", - "Paris Gare du Nord" - ] - }, - "destination": { - "type": "string", - "description": "The destination station of the trip", - "examples": [ - "Paris Gare du Nord", - "Berlin Hauptbahnhof" - ] - }, - "departure_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip departs", - "examples": [ - "2024-02-01T10:00:00Z" - ] - }, - "arrival_time": { - "type": "string", - "format": "date-time", - "description": "The date and time when the trip arrives", - "examples": [ - "2024-02-01T16:00:00Z" - ] - }, - "operator": { - "type": "string", - "description": "The name of the operator of the trip", - "examples": [ - "Deutsche Bahn", - "SNCF" - ] - }, - "price": { - "type": "number", - "description": "The cost of the trip", - "examples": [ - 50 - ] - }, - "bicycles_allowed": { - "type": "boolean", - "description": "Indicates whether bicycles are allowed on the trip" - }, - "dogs_allowed": { - "type": "boolean", - "description": "Indicates whether dogs are allowed on the trip" - } - } - }, - "Booking": { - "type": "object", - "xml": { - "name": "booking" - }, - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the booking", - "readOnly": true, - "examples": [ - "3f3e3e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "trip_id": { - "type": "string", - "format": "uuid", - "description": "Identifier of the booked trip", - "examples": [ - "4f4e4e1-c824-4d63-b37a-d8d698862f1d" - ] - }, - "passenger_name": { - "type": "string", - "description": "Name of the passenger", - "examples": [ - "John Doe" - ] - }, - "has_bicycle": { - "type": "boolean", - "description": "Indicates whether the passenger has a bicycle." - }, - "has_dog": { - "type": "boolean", - "description": "Indicates whether the passenger has a dog." - } - } - }, - "Wrapper-Collection": { - "description": "This is a generic request/response wrapper which contains both data and links which serve as hypermedia controls (HATEOAS).", - "type": "object", - "properties": { - "data": { - "description": "The wrapper for a collection is an array of objects.", - "type": "array", - "items": { - "type": "object" - } - }, - "links": { - "description": "A set of hypermedia links which serve as controls for the client.", - "type": "object", - "readOnly": true - } - }, - "xml": { - "name": "data" - } - }, - "BookingPayment": { - "type": "object", - "properties": { - "id": { - "description": "Unique identifier for the payment. This will be a unique identifier for the payment, and is used to reference the payment in other objects.", - "type": "string", - "format": "uuid", - "readOnly": true - }, - "amount": { - "description": "Amount intended to be collected by this payment. A positive decimal figure describing the amount to be collected.", - "type": "number", - "exclusiveMinimum": 0, - "examples": [ - 49.99 - ] - }, - "currency": { - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", - "type": "string", - "enum": [ - "bam", - "bgn", - "chf", - "eur", - "gbp", - "nok", - "sek", - "try" - ] - }, - "source": { - "unevaluatedProperties": false, - "description": "The payment source to take the payment from. This can be a card or a bank account. Some of these properties will be hidden on read to protect PII leaking.", - "oneOf": [ - { - "title": "Card", - "description": "A card (debit or credit) to take payment from.", - "type": "object", - "properties": { - "object": { - "type": "string", - "const": "card" - }, - "name": { - "type": "string", - "description": "Cardholder's full name as it appears on the card.", - "examples": [ - "Francis Bourgeois" - ] - }, - "number": { - "type": "string", - "description": "The card number, as a string without any separators. On read all but the last four digits will be masked for security.", - "examples": [ - "4242424242424242" - ] - }, - "cvc": { - "type": "integer", - "description": "Card security code, 3 or 4 digits usually found on the back of the card.", - "minLength": 3, - "maxLength": 4, - "writeOnly": true, - "example": 123 - }, - "exp_month": { - "type": "integer", - "format": "int64", - "description": "Two-digit number representing the card's expiration month.", - "examples": [ - 12 - ] - }, - "exp_year": { - "type": "integer", - "format": "int64", - "description": "Four-digit number representing the card's expiration year.", - "examples": [ - 2025 - ] - }, - "address_line1": { - "type": "string", - "writeOnly": true - }, - "address_line2": { - "type": "string", - "writeOnly": true - }, - "address_city": { - "type": "string" - }, - "address_country": { - "type": "string" - }, - "address_post_code": { - "type": "string" - } - }, - "required": [ - "name", - "number", - "cvc", - "exp_month", - "exp_year", - "address_country" - ] - }, - { - "title": "Bank Account", - "description": "A bank account to take payment from. Must be able to make payments in the currency specified in the payment.", - "type": "object", - "properties": { - "object": { - "const": "bank_account", - "type": "string" - }, - "name": { - "type": "string" - }, - "number": { - "type": "string", - "description": "The account number for the bank account, in string form. Must be a current account." - }, - "sort_code": { - "type": "string", - "description": "The sort code for the bank account, in string form. Must be a six-digit number." - }, - "account_type": { - "enum": [ - "individual", - "company" - ], - "type": "string", - "description": "The type of entity that holds the account. This can be either \`individual\` or \`company\`." - }, - "bank_name": { - "type": "string", - "description": "The name of the bank associated with the routing number.", - "examples": [ - "Starling Bank" - ] - }, - "country": { - "type": "string", - "description": "Two-letter country code (ISO 3166-1 alpha-2)." - } - }, - "required": [ - "name", - "number", - "account_type", - "bank_name", - "country" - ] - } - ] - }, - "status": { - "description": "The status of the payment, one of \`pending\`, \`succeeded\`, or \`failed\`.", - "type": "string", - "enum": [ - "pending", - "succeeded", - "failed" - ], - "readOnly": true - } - } - }, - "Links-Booking": { - "type": "object", - "properties": { - "booking": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - ] - } - } - } - }, - "headers": { - "Cache-Control": { - "description": "The Cache-Control header communicates directives for caching mechanisms in both requests and responses. \\nIt is used to specify the caching directives in responses to prevent caches from storing sensitive information.\\n", - "schema": { - "type": "string", - "description": "A comma-separated list of directives as defined in [RFC 9111](https://www.rfc-editor.org/rfc/rfc9111.html).", - "examples": [ - "max-age=3600", - "max-age=604800, public", - "no-store", - "no-cache", - "private" - ] - } - }, - "RateLimit": { - "description": "The RateLimit header communicates quota policies. It contains a \`limit\` to\\nconvey the expiring limit, \`remaining\` to convey the remaining quota units,\\nand \`reset\` to convey the time window reset time.\\n", - "schema": { - "type": "string", - "examples": [ - "limit=10, remaining=0, reset=10" - ] - } - }, - "Retry-After": { - "description": "The Retry-After header indicates how long the user agent should wait before making a follow-up request. \\nThe value is in seconds and can be an integer or a date in the future. \\nIf the value is an integer, it indicates the number of seconds to wait. \\nIf the value is a date, it indicates the time at which the user agent should make a follow-up request. \\n", - "schema": { - "type": "string" - }, - "examples": { - "integer": { - "value": "120", - "summary": "Retry after 120 seconds" - }, - "date": { - "value": "Fri, 31 Dec 2021 23:59:59 GMT", - "summary": "Retry after the specified date" - } - } - } - }, - "responses": { - "BadRequest": { - "description": "Bad Request", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/bad-request", - "title": "Bad Request", - "status": 400, - "detail": "The request is invalid or missing required parameters." - } - } - } - }, - "Conflict": { - "description": "Conflict", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/conflict", - "title": "Conflict", - "status": 409, - "detail": "There is a conflict with an existing resource." - } - } - } - }, - "Forbidden": { - "description": "Forbidden", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/forbidden", - "title": "Forbidden", - "status": 403, - "detail": "Access is forbidden with the provided credentials." - } - } - } - }, - "InternalServerError": { - "description": "Internal Server Error", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/internal-server-error", - "title": "Internal Server Error", - "status": 500, - "detail": "An unexpected error occurred." - } - } - } - }, - "NotFound": { - "description": "Not Found", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/not-found", - "title": "Not Found", - "status": 404, - "detail": "The requested resource was not found." - } - } - } - }, - "TooManyRequests": { - "description": "Too Many Requests", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - }, - "Retry-After": { - "$ref": "#/components/headers/Retry-After" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/too-many-requests", - "title": "Too Many Requests", - "status": 429, - "detail": "You have exceeded the rate limit." - } - } - } - }, - "Unauthorized": { - "description": "Unauthorized", - "headers": { - "RateLimit": { - "$ref": "#/components/headers/RateLimit" - } - }, - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } - }, - "application/problem+xml": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://example.com/errors/unauthorized", - "title": "Unauthorized", - "status": 401, - "detail": "You do not have the necessary permissions." - } } } } } } }", - "name": "openapi.json", - "type": "file", + "name": "openapi.json", + "type": "file", + }, + ], + "name": "openapi", + "type": "directory", }, ] `; diff --git a/packages/cli/ete-tests/src/tests/update-api/fixtures/fern/generators.yml b/packages/cli/ete-tests/src/tests/update-api/fixtures/fern/generators.yml index ecdc5f49d5d..5739e3068cb 100644 --- a/packages/cli/ete-tests/src/tests/update-api/fixtures/fern/generators.yml +++ b/packages/cli/ete-tests/src/tests/update-api/fixtures/fern/generators.yml @@ -1,7 +1,7 @@ default-group: local api: path: ./openapi/openapi.json - origin: https://bump.sh/bump-examples/doc/train-travel-api.json + origin: http://localhost:4567/openapi.json groups: local: generators: @@ -9,4 +9,4 @@ groups: version: 0.9.5 output: location: local-file-system - path: ../sdks/typescript + path: ../sdks/typescript \ No newline at end of file diff --git a/packages/cli/ete-tests/src/tests/update-api/fixtures/fern/openapi/openapi.json b/packages/cli/ete-tests/src/tests/update-api/fixtures/fern/openapi/openapi.json index 11a1b14d2b3..a7705520202 100644 --- a/packages/cli/ete-tests/src/tests/update-api/fixtures/fern/openapi/openapi.json +++ b/packages/cli/ete-tests/src/tests/update-api/fixtures/fern/openapi/openapi.json @@ -764,60 +764,6 @@ } } }, - "webhooks": { - "newBooking": { - "post": { - "operationId": "new-booking", - "summary": "New Booking", - "description": "Subscribe to new bookings being created, to update integrations for your users. Related data is available via the links provided in the request.\n", - "tags": [ - "Bookings" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Booking" - }, - { - "properties": { - "links": { - "allOf": [ - { - "$ref": "#/components/schemas/Links-Self" - }, - { - "$ref": "#/components/schemas/Links-Pagination" - } - ] - } - } - } - ] - }, - "example": { - "id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "trip_id": "efdbb9d1-02c2-4bc3-afb7-6788d8782b1e", - "passenger_name": "John Doe", - "has_bicycle": true, - "has_dog": true, - "links": { - "self": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb" - } - } - } - } - }, - "responses": { - "200": { - "description": "Return a 200 status to indicate that the data was received successfully." - } - } - } - } - }, "components": { "securitySchemes": { "OAuth2": { diff --git a/packages/cli/ete-tests/src/tests/update-api/update-api.test.ts b/packages/cli/ete-tests/src/tests/update-api/update-api.test.ts index ea74ad5053d..3ad7098cbfe 100644 --- a/packages/cli/ete-tests/src/tests/update-api/update-api.test.ts +++ b/packages/cli/ete-tests/src/tests/update-api/update-api.test.ts @@ -1,25 +1,29 @@ -import { AbsoluteFilePath, getDirectoryContents, getDirectoryContentsForSnapshot } from "@fern-api/fs-utils"; +import { AbsoluteFilePath, getDirectoryContentsForSnapshot } from "@fern-api/fs-utils"; import { cp } from "fs/promises"; import path from "path"; import tmp from "tmp-promise"; import { runFernCli } from "../../utils/runFernCli"; +import { setupOpenAPIServer } from "../../utils/setupOpenAPIServer"; const FIXTURES_DIR = path.join(__dirname, "fixtures"); describe("fern api update", () => { it("fern api update", async () => { - // Create tmpdir and copy contents + // Start express server that will respond with the OpenAPI spec. + const { cleanup } = setupOpenAPIServer(); + const tmpDir = await tmp.dir(); const directory = AbsoluteFilePath.of(tmpDir.path); + const outputPath = AbsoluteFilePath.of(path.join(directory, "fern")); await cp(FIXTURES_DIR, directory, { recursive: true }); - - const outputPath = AbsoluteFilePath.of(path.join(directory, "fern", "openapi")); - await runFernCli(["api", "update"], { cwd: directory }); expect(await getDirectoryContentsForSnapshot(outputPath)).toMatchSnapshot(); + + // Shutdown the server now that we're done. + await cleanup(); }, 60_000); }); diff --git a/packages/cli/ete-tests/src/tests/write-definition/__snapshots__/writeDefinition.test.ts.snap b/packages/cli/ete-tests/src/tests/write-definition/__snapshots__/writeDefinition.test.ts.snap index ed3178559c8..de34cee5810 100644 --- a/packages/cli/ete-tests/src/tests/write-definition/__snapshots__/writeDefinition.test.ts.snap +++ b/packages/cli/ete-tests/src/tests/write-definition/__snapshots__/writeDefinition.test.ts.snap @@ -415,12 +415,14 @@ service: - trade - cancel - initial + inline: true source: openapi: asyncapi/sample.yml EventsItemSide: enum: - bid - side + inline: true source: openapi: asyncapi/sample.yml EventsItemType: @@ -429,6 +431,7 @@ service: - change - name: AuctionBlockTrade value: auction, block_trade + inline: true source: openapi: asyncapi/sample.yml Heartbeat: @@ -583,6 +586,7 @@ channel: - nok - sek - try + inline: true source: openapi: openapi/trains/openapi.yml BookingPaymentSource: @@ -640,6 +644,7 @@ channel: enum: - individual - company + inline: true source: openapi: openapi/trains/openapi.yml BookingPaymentStatus: @@ -648,6 +653,7 @@ channel: - pending - succeeded - failed + inline: true source: openapi: openapi/trains/openapi.yml Card: @@ -1572,6 +1578,7 @@ name: api - 'OFF' - AUTO - AUTO_PRESERVE_ORDER + inline: true source: openapi: openapi/cohere.yaml ChatRequestSafetyMode: @@ -1597,6 +1604,7 @@ name: api - CONTEXTUAL - STRICT - NONE + inline: true source: openapi: openapi/cohere.yaml ClientClosedRequestErrorBody: @@ -2190,6 +2198,7 @@ types: - CONTEXTUAL - STRICT - NONE + inline: true source: openapi: openapi/cohere-v2.yaml service: diff --git a/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced-fleshedout/fern/.definition/v1/__package__.yml b/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced-fleshedout/fern/.definition/v1/__package__.yml index 84b8e967746..f0d3192247d 100644 --- a/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced-fleshedout/fern/.definition/v1/__package__.yml +++ b/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced-fleshedout/fern/.definition/v1/__package__.yml @@ -39,6 +39,7 @@ types: - 'OFF' - AUTO - AUTO_PRESERVE_ORDER + inline: true source: openapi: openapi/cohere.yaml ChatRequestSafetyMode: @@ -64,6 +65,7 @@ types: - CONTEXTUAL - STRICT - NONE + inline: true source: openapi: openapi/cohere.yaml ClientClosedRequestErrorBody: diff --git a/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced-fleshedout/fern/.definition/v2/v2.yml b/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced-fleshedout/fern/.definition/v2/v2.yml index 069a05c81b8..2c4889d1c0d 100644 --- a/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced-fleshedout/fern/.definition/v2/v2.yml +++ b/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced-fleshedout/fern/.definition/v2/v2.yml @@ -24,6 +24,7 @@ types: - CONTEXTUAL - STRICT - NONE + inline: true source: openapi: openapi/cohere-v2.yaml service: diff --git a/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced/fern/.definition/stream/__package__.yml b/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced/fern/.definition/stream/__package__.yml index 561105e7a85..b088d509de7 100644 --- a/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced/fern/.definition/stream/__package__.yml +++ b/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced/fern/.definition/stream/__package__.yml @@ -57,12 +57,14 @@ types: - trade - cancel - initial + inline: true source: openapi: asyncapi/sample.yml EventsItemSide: enum: - bid - side + inline: true source: openapi: asyncapi/sample.yml EventsItemType: @@ -71,6 +73,7 @@ types: - change - name: AuctionBlockTrade value: auction, block_trade + inline: true source: openapi: asyncapi/sample.yml Heartbeat: diff --git a/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced/fern/.definition/trains/__package__.yml b/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced/fern/.definition/trains/__package__.yml index 12ae3bf8277..3d0a768745d 100644 --- a/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced/fern/.definition/trains/__package__.yml +++ b/packages/cli/ete-tests/src/tests/write-definition/fixtures/namespaced/fern/.definition/trains/__package__.yml @@ -66,6 +66,7 @@ types: - nok - sek - try + inline: true source: openapi: openapi/trains/openapi.yml BookingPaymentSource: @@ -123,6 +124,7 @@ types: enum: - individual - company + inline: true source: openapi: openapi/trains/openapi.yml BookingPaymentStatus: @@ -131,6 +133,7 @@ types: - pending - succeeded - failed + inline: true source: openapi: openapi/trains/openapi.yml Card: diff --git a/packages/cli/ete-tests/src/utils/setupOpenAPIServer.ts b/packages/cli/ete-tests/src/utils/setupOpenAPIServer.ts new file mode 100644 index 00000000000..d917a38e1fe --- /dev/null +++ b/packages/cli/ete-tests/src/utils/setupOpenAPIServer.ts @@ -0,0 +1,78 @@ +import { OpenAPI } from "openapi-types"; +import express from "express"; +import * as http from "http"; + +const TEST_OPENAPI_DOCUMENT: OpenAPI.Document = { + openapi: "3.0.0", + info: { + title: "Test API", + version: "1.0.0" + }, + paths: { + "/testdata": { + get: { + summary: "Retrieve test data", + operationId: "getTestData", + responses: { + "200": { + description: "Successful response", + content: { + "application/json": { + schema: { + type: "object", + properties: { + message: { type: "string" } + } + } + } + } + } + } + } + }, + "/filtered": { + get: { + summary: "This endpoint should be filtered out", + operationId: "filtered", + responses: { + "200": { + description: "Successful response", + content: { + "application/json": { + schema: { + type: "object", + properties: { + message: { type: "string" } + } + } + } + } + } + } + } + } + } +}; + +export function setupOpenAPIServer(): { server: http.Server; cleanup: () => Promise } { + const app = express(); + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + app.get("/openapi.json", (req: any, res: any) => { + res.json(TEST_OPENAPI_DOCUMENT); + }); + + const server = app.listen(4567); + const cleanup = async () => { + return new Promise((resolve, reject) => { + server.close((err) => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); + }; + return { server, cleanup }; +} diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__DiscriminatedUnion1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__DiscriminatedUnion1.json deleted file mode 100644 index 56723478151..00000000000 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__DiscriminatedUnion1.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "type1", - "type2" - ] - } - }, - "required": [ - "type" - ], - "oneOf": [ - { - "properties": { - "type": { - "const": "type1" - }, - "foo": { - "type": "string" - }, - "bar": { - "$ref": "#/definitions/NestedInlineType1" - } - }, - "required": [ - "type", - "foo", - "bar" - ] - }, - { - "properties": { - "type": { - "const": "type2" - }, - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - } - }, - "required": [ - "type", - "foo", - "bar" - ] - } - ], - "definitions": { - "NestedInlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - } - }, - "required": [ - "foo", - "bar" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlineType1.json deleted file mode 100644 index 5204fe27698..00000000000 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlineType1.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "$ref": "#/definitions/NestedInlineType1" - } - }, - "required": [ - "foo", - "bar" - ], - "additionalProperties": false, - "definitions": { - "InlineEnum": { - "type": "string", - "enum": [ - "SUNNY", - "CLOUDY", - "RAINING", - "SNOWING" - ] - }, - "NestedInlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - }, - "myEnum": { - "$ref": "#/definitions/InlineEnum" - } - }, - "required": [ - "foo", - "bar", - "myEnum" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlineType2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlineType2.json deleted file mode 100644 index 801c382f354..00000000000 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlineType2.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "object", - "properties": { - "baz": { - "type": "string" - } - }, - "required": [ - "baz" - ], - "additionalProperties": false, - "definitions": {} -} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlinedDiscriminatedUnion1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlinedDiscriminatedUnion1.json deleted file mode 100644 index 8b87c341009..00000000000 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlinedDiscriminatedUnion1.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "type1", - "type2" - ] - } - }, - "required": [ - "type" - ], - "oneOf": [ - { - "properties": { - "type": { - "const": "type1" - }, - "foo": { - "type": "string" - }, - "bar": { - "$ref": "#/definitions/NestedInlineType1" - } - }, - "required": [ - "type", - "foo", - "bar" - ] - }, - { - "properties": { - "type": { - "const": "type2" - }, - "baz": { - "type": "string" - } - }, - "required": [ - "type", - "baz" - ] - } - ], - "definitions": { - "InlineEnum": { - "type": "string", - "enum": [ - "SUNNY", - "CLOUDY", - "RAINING", - "SNOWING" - ] - }, - "NestedInlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - }, - "myEnum": { - "$ref": "#/definitions/InlineEnum" - } - }, - "required": [ - "foo", - "bar", - "myEnum" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlinedUndiscriminatedUnion1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlinedUndiscriminatedUnion1.json deleted file mode 100644 index 6cd71fc31ed..00000000000 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlinedUndiscriminatedUnion1.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "anyOf": [ - { - "$ref": "#/definitions/InlineType1" - }, - { - "$ref": "#/definitions/InlineType2" - } - ], - "definitions": { - "InlineEnum": { - "type": "string", - "enum": [ - "SUNNY", - "CLOUDY", - "RAINING", - "SNOWING" - ] - }, - "NestedInlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - }, - "myEnum": { - "$ref": "#/definitions/InlineEnum" - } - }, - "required": [ - "foo", - "bar", - "myEnum" - ], - "additionalProperties": false - }, - "InlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "$ref": "#/definitions/NestedInlineType1" - } - }, - "required": [ - "foo", - "bar" - ], - "additionalProperties": false - }, - "InlineType2": { - "type": "object", - "properties": { - "baz": { - "type": "string" - } - }, - "required": [ - "baz" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__NestedInlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__NestedInlineType1.json deleted file mode 100644 index 45e73a2f960..00000000000 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__NestedInlineType1.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - }, - "myEnum": { - "$ref": "#/definitions/InlineEnum" - } - }, - "required": [ - "foo", - "bar", - "myEnum" - ], - "additionalProperties": false, - "definitions": { - "InlineEnum": { - "type": "string", - "enum": [ - "SUNNY", - "CLOUDY", - "RAINING", - "SNOWING" - ] - } - } -} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__RootType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__RootType1.json deleted file mode 100644 index 2e21be35674..00000000000 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__RootType1.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "$ref": "#/definitions/InlineType1" - } - }, - "required": [ - "foo", - "bar" - ], - "additionalProperties": false, - "definitions": { - "InlineEnum": { - "type": "string", - "enum": [ - "SUNNY", - "CLOUDY", - "RAINING", - "SNOWING" - ] - }, - "NestedInlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - }, - "myEnum": { - "$ref": "#/definitions/InlineEnum" - } - }, - "required": [ - "foo", - "bar", - "myEnum" - ], - "additionalProperties": false - }, - "InlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "$ref": "#/definitions/NestedInlineType1" - } - }, - "required": [ - "foo", - "bar" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__RootType2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__RootType2.json deleted file mode 100644 index 326461285ac..00000000000 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__RootType2.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "object", - "properties": { - "one": { - "type": "integer" - }, - "two": { - "$ref": "#/definitions/MixedInlineType1" - } - }, - "required": [ - "one", - "two" - ], - "additionalProperties": false, - "definitions": { - "MixedInlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - } - }, - "required": [ - "foo", - "bar" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__UndiscriminatedUnion1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__UndiscriminatedUnion1.json deleted file mode 100644 index eb5b53eba17..00000000000 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__UndiscriminatedUnion1.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "anyOf": [ - { - "$ref": "#/definitions/InlineType1" - }, - { - "$ref": "#/definitions/MixedInlineType1" - } - ], - "definitions": { - "NestedInlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - } - }, - "required": [ - "foo", - "bar" - ], - "additionalProperties": false - }, - "InlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "$ref": "#/definitions/NestedInlineType1" - } - }, - "required": [ - "foo", - "bar" - ], - "additionalProperties": false - }, - "MixedInlineType1": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - } - }, - "required": [ - "foo", - "bar" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/java-custom-package-prefix/type_imdb_CreateMovieRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/java-custom-package-prefix/type_imdb_CreateMovieRequest.json new file mode 100644 index 00000000000..eef0d7ac8aa --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/java-custom-package-prefix/type_imdb_CreateMovieRequest.json @@ -0,0 +1,17 @@ +{ + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "rating": { + "type": "number" + } + }, + "required": [ + "title", + "rating" + ], + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/java-custom-package-prefix/type_imdb_Movie.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/java-custom-package-prefix/type_imdb_Movie.json new file mode 100644 index 00000000000..7efcc3b44b0 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/java-custom-package-prefix/type_imdb_Movie.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/imdb.MovieId" + }, + "title": { + "type": "string" + }, + "rating": { + "type": "number" + } + }, + "required": [ + "id", + "title", + "rating" + ], + "additionalProperties": false, + "definitions": { + "imdb.MovieId": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/java-custom-package-prefix/type_imdb_MovieId.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/java-custom-package-prefix/type_imdb_MovieId.json new file mode 100644 index 00000000000..cdb8c887b62 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/java-custom-package-prefix/type_imdb_MovieId.json @@ -0,0 +1,4 @@ +{ + "type": "string", + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__MixedInlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasInlineValue.json similarity index 100% rename from packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__MixedInlineType1.json rename to packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasInlineValue.json diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasListInline.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasListInline.json new file mode 100644 index 00000000000..e31e4a64b87 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasListInline.json @@ -0,0 +1,24 @@ +{ + "type": "array", + "items": { + "$ref": "#/definitions/AliasInlineValue" + }, + "definitions": { + "AliasInlineValue": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "type": "string" + } + }, + "required": [ + "foo", + "bar" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasMapInline.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasMapInline.json new file mode 100644 index 00000000000..488b51ce648 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasMapInline.json @@ -0,0 +1,24 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AliasInlineValue" + }, + "definitions": { + "AliasInlineValue": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "type": "string" + } + }, + "required": [ + "foo", + "bar" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasSetInline.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasSetInline.json new file mode 100644 index 00000000000..727f11a0ec3 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__AliasSetInline.json @@ -0,0 +1,25 @@ +{ + "type": "array", + "items": { + "$ref": "#/definitions/AliasInlineValue" + }, + "uniqueItems": true, + "definitions": { + "AliasInlineValue": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "type": "string" + } + }, + "required": [ + "foo", + "bar" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1.json new file mode 100644 index 00000000000..94f4a226346 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1.json @@ -0,0 +1,102 @@ +{ + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "type1", + "type2", + "ref" + ] + } + }, + "required": [ + "type" + ], + "oneOf": [ + { + "properties": { + "type": { + "const": "type1" + }, + "foo": { + "type": "string" + }, + "bar": { + "$ref": "#/definitions/DiscriminatedUnion1InlineType1InlineType1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "type", + "foo", + "bar", + "ref" + ] + }, + { + "properties": { + "type": { + "const": "type2" + }, + "baz": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "type", + "baz", + "ref" + ] + }, + { + "properties": { + "type": { + "const": "ref" + }, + "foo": { + "type": "string" + } + }, + "required": [ + "type", + "foo" + ] + } + ], + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + }, + "DiscriminatedUnion1InlineType1InlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1InlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1InlineType1.json new file mode 100644 index 00000000000..da941d968ac --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1InlineType1.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "$ref": "#/definitions/DiscriminatedUnion1InlineType1InlineType1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "bar", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + }, + "DiscriminatedUnion1InlineType1InlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1InlineType1InlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1InlineType1InlineType1.json new file mode 100644 index 00000000000..d43b6cb8bc4 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1InlineType1InlineType1.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1InlineType2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1InlineType2.json new file mode 100644 index 00000000000..86f3f399eb1 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__DiscriminatedUnion1InlineType2.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "baz": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "baz", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlineEnum.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__InlineEnum1.json similarity index 100% rename from packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/inline-types/type__InlineEnum.json rename to packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__InlineEnum1.json diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__ReferenceType.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__ReferenceType.json new file mode 100644 index 00000000000..080dd1a61ae --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__ReferenceType.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RequestTypeInlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RequestTypeInlineType1.json new file mode 100644 index 00000000000..080dd1a61ae --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RequestTypeInlineType1.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false, + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1.json new file mode 100644 index 00000000000..eb0a382274c --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1.json @@ -0,0 +1,157 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "$ref": "#/definitions/RootType1InlineType1" + }, + "fooMap": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/RootType1FooMapValue" + } + }, + "fooList": { + "type": "array", + "items": { + "$ref": "#/definitions/RootType1FooListItem" + } + }, + "fooSet": { + "type": "array", + "items": { + "$ref": "#/definitions/RootType1FooSetItem" + }, + "uniqueItems": true + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "bar", + "fooMap", + "fooList", + "fooSet", + "ref" + ], + "additionalProperties": false, + "definitions": { + "InlineEnum1": { + "type": "string", + "enum": [ + "SUNNY", + "CLOUDY", + "RAINING", + "SNOWING" + ] + }, + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + }, + "RootType1InlineType1NestedInlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "type": "string" + }, + "myEnum": { + "$ref": "#/definitions/InlineEnum1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "bar", + "myEnum", + "ref" + ], + "additionalProperties": false + }, + "RootType1InlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "$ref": "#/definitions/RootType1InlineType1NestedInlineType1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "bar", + "ref" + ], + "additionalProperties": false + }, + "RootType1FooMapValue": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + }, + "RootType1FooListItem": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + }, + "RootType1FooSetItem": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1FooListItem.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1FooListItem.json new file mode 100644 index 00000000000..d43b6cb8bc4 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1FooListItem.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1FooMapValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1FooMapValue.json new file mode 100644 index 00000000000..d43b6cb8bc4 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1FooMapValue.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1FooSetItem.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1FooSetItem.json new file mode 100644 index 00000000000..d43b6cb8bc4 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1FooSetItem.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1InlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1InlineType1.json new file mode 100644 index 00000000000..d39cce62366 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1InlineType1.json @@ -0,0 +1,67 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "$ref": "#/definitions/RootType1InlineType1NestedInlineType1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "bar", + "ref" + ], + "additionalProperties": false, + "definitions": { + "InlineEnum1": { + "type": "string", + "enum": [ + "SUNNY", + "CLOUDY", + "RAINING", + "SNOWING" + ] + }, + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + }, + "RootType1InlineType1NestedInlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "type": "string" + }, + "myEnum": { + "$ref": "#/definitions/InlineEnum1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "bar", + "myEnum", + "ref" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1InlineType1NestedInlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1InlineType1NestedInlineType1.json new file mode 100644 index 00000000000..4c714bfff7f --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__RootType1InlineType1NestedInlineType1.json @@ -0,0 +1,47 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "type": "string" + }, + "myEnum": { + "$ref": "#/definitions/InlineEnum1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "bar", + "myEnum", + "ref" + ], + "additionalProperties": false, + "definitions": { + "InlineEnum1": { + "type": "string", + "enum": [ + "SUNNY", + "CLOUDY", + "RAINING", + "SNOWING" + ] + }, + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1.json new file mode 100644 index 00000000000..07479c3ec42 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1.json @@ -0,0 +1,268 @@ +{ + "anyOf": [ + { + "$ref": "#/definitions/UndiscriminatedUnion1InlineType1", + "description": "lorem ipsum" + }, + { + "$ref": "#/definitions/UndiscriminatedUnion1InlineType2", + "description": "lorem ipsum" + }, + { + "$ref": "#/definitions/UndiscriminatedUnion1DiscriminatedUnion1", + "description": "lorem ipsum" + }, + { + "$ref": "#/definitions/UndiscriminatedUnion1DiscriminatedUnion1", + "description": "lorem ipsum" + }, + { + "$ref": "#/definitions/UndiscriminatedUnion1InlineEnum1", + "description": "lorem ipsum" + }, + { + "$ref": "#/definitions/UserId", + "description": "lorem ipsum" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/UndiscriminatedUnion1InlineListItem1" + }, + "description": "lorem ipsum" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/UndiscriminatedUnion1InlineSetItem1" + }, + "uniqueItems": true, + "description": "lorem ipsum" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UndiscriminatedUnion1InlineMapItem1" + }, + "description": "lorem ipsum" + }, + { + "$ref": "#/definitions/ReferenceType", + "description": "lorem ipsum" + } + ], + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + }, + "UndiscriminatedUnion1InlineType1InlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + }, + "UndiscriminatedUnion1InlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "$ref": "#/definitions/UndiscriminatedUnion1InlineType1InlineType1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "bar", + "ref" + ], + "additionalProperties": false + }, + "UndiscriminatedUnion1InlineType2": { + "type": "object", + "properties": { + "baz": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "baz", + "ref" + ], + "additionalProperties": false + }, + "UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + }, + "UndiscriminatedUnion1DiscriminatedUnion1": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "type1", + "type2", + "ref" + ] + } + }, + "required": [ + "type" + ], + "oneOf": [ + { + "properties": { + "type": { + "const": "type1" + }, + "foo": { + "type": "string" + }, + "bar": { + "$ref": "#/definitions/UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "type", + "foo", + "bar", + "ref" + ] + }, + { + "properties": { + "type": { + "const": "type2" + }, + "baz": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "type", + "baz", + "ref" + ] + }, + { + "properties": { + "type": { + "const": "ref" + }, + "foo": { + "type": "string" + } + }, + "required": [ + "type", + "foo" + ] + } + ] + }, + "UndiscriminatedUnion1InlineEnum1": { + "type": "string", + "enum": [ + "SUNNY", + "CLOUDY", + "RAINING", + "SNOWING" + ] + }, + "UserId": { + "type": "string" + }, + "UndiscriminatedUnion1InlineListItem1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + }, + "UndiscriminatedUnion1InlineSetItem1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + }, + "UndiscriminatedUnion1InlineMapItem1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1.json new file mode 100644 index 00000000000..7c541eba134 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1.json @@ -0,0 +1,102 @@ +{ + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "type1", + "type2", + "ref" + ] + } + }, + "required": [ + "type" + ], + "oneOf": [ + { + "properties": { + "type": { + "const": "type1" + }, + "foo": { + "type": "string" + }, + "bar": { + "$ref": "#/definitions/UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "type", + "foo", + "bar", + "ref" + ] + }, + { + "properties": { + "type": { + "const": "type2" + }, + "baz": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "type", + "baz", + "ref" + ] + }, + { + "properties": { + "type": { + "const": "ref" + }, + "foo": { + "type": "string" + } + }, + "required": [ + "type", + "foo" + ] + } + ], + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + }, + "UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1InlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1InlineType1.json new file mode 100644 index 00000000000..c55d0195ec7 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1InlineType1.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "$ref": "#/definitions/UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "bar", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + }, + "UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1.json new file mode 100644 index 00000000000..d43b6cb8bc4 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1InlineType2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1InlineType2.json new file mode 100644 index 00000000000..86f3f399eb1 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1DiscriminatedUnion1InlineType2.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "baz": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "baz", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineEnum1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineEnum1.json new file mode 100644 index 00000000000..247b41d0eb2 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineEnum1.json @@ -0,0 +1,10 @@ +{ + "type": "string", + "enum": [ + "SUNNY", + "CLOUDY", + "RAINING", + "SNOWING" + ], + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineListItem1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineListItem1.json new file mode 100644 index 00000000000..d43b6cb8bc4 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineListItem1.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineMapItem1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineMapItem1.json new file mode 100644 index 00000000000..d43b6cb8bc4 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineMapItem1.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineSetItem1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineSetItem1.json new file mode 100644 index 00000000000..d43b6cb8bc4 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineSetItem1.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineType1.json new file mode 100644 index 00000000000..7669e968d6a --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineType1.json @@ -0,0 +1,50 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "bar": { + "$ref": "#/definitions/UndiscriminatedUnion1InlineType1InlineType1" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "bar", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + }, + "UndiscriminatedUnion1InlineType1InlineType1": { + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineType1InlineType1.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineType1InlineType1.json new file mode 100644 index 00000000000..d43b6cb8bc4 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineType1InlineType1.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "foo": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "foo", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineType2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineType2.json new file mode 100644 index 00000000000..86f3f399eb1 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UndiscriminatedUnion1InlineType2.json @@ -0,0 +1,30 @@ +{ + "type": "object", + "properties": { + "baz": { + "type": "string" + }, + "ref": { + "$ref": "#/definitions/ReferenceType" + } + }, + "required": [ + "baz", + "ref" + ], + "additionalProperties": false, + "definitions": { + "ReferenceType": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UserId.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UserId.json new file mode 100644 index 00000000000..cdb8c887b62 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/ts-inline-types/type__UserId.json @@ -0,0 +1,4 @@ +{ + "type": "string", + "definitions": {} +} \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/alias-extends.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/alias-extends.json index 6833fa9e351..9146aac06d2 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/alias-extends.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/alias-extends.json @@ -316,5 +316,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/alias.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/alias.json index e4ee0fb18dc..fb3729b72ca 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/alias.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/alias.json @@ -227,5 +227,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/any-auth.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/any-auth.json index 24b44c2f527..eead4bd6971 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/any-auth.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/any-auth.json @@ -708,5 +708,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/api-wide-base-path.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/api-wide-base-path.json index 0c513c929a8..926a3f12415 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/api-wide-base-path.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/api-wide-base-path.json @@ -195,5 +195,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/audiences.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/audiences.json index d4fba999b53..f6a5b19cbf2 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/audiences.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/audiences.json @@ -1404,5 +1404,61 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": null, + "environments": { + "type": "singleBaseUrl", + "environments": [ + { + "id": "environment-a", + "name": { + "originalName": "environment-a", + "camelCase": { + "unsafeName": "environmentA", + "safeName": "environmentA" + }, + "snakeCase": { + "unsafeName": "environment_a", + "safeName": "environment_a" + }, + "screamingSnakeCase": { + "unsafeName": "ENVIRONMENT_A", + "safeName": "ENVIRONMENT_A" + }, + "pascalCase": { + "unsafeName": "EnvironmentA", + "safeName": "EnvironmentA" + } + }, + "url": "https://api.example.a.com", + "docs": null + }, + { + "id": "environment-b", + "name": { + "originalName": "environment-b", + "camelCase": { + "unsafeName": "environmentB", + "safeName": "environmentB" + }, + "snakeCase": { + "unsafeName": "environment_b", + "safeName": "environment_b" + }, + "screamingSnakeCase": { + "unsafeName": "ENVIRONMENT_B", + "safeName": "ENVIRONMENT_B" + }, + "pascalCase": { + "unsafeName": "EnvironmentB", + "safeName": "EnvironmentB" + } + }, + "url": "https://api.example.b.com", + "docs": null + } + ] + } } } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/auth-environment-variables.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/auth-environment-variables.json index 759729546aa..770ec47e53b 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/auth-environment-variables.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/auth-environment-variables.json @@ -380,5 +380,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/basic-auth-environment-variables.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/basic-auth-environment-variables.json index df1b6a20d03..ba8c595ae53 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/basic-auth-environment-variables.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/basic-auth-environment-variables.json @@ -344,5 +344,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/basic-auth.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/basic-auth.json index df1b6a20d03..ba8c595ae53 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/basic-auth.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/basic-auth.json @@ -344,5 +344,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/bearer-token-environment-variable.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/bearer-token-environment-variable.json index 9ff58226711..9573bf6f396 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/bearer-token-environment-variable.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/bearer-token-environment-variable.json @@ -103,5 +103,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/bytes.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/bytes.json index c92fbe49433..8b8cd86e543 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/bytes.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/bytes.json @@ -84,5 +84,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/circular-references-advanced.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/circular-references-advanced.json index 1312ef6a1fb..1e902550497 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/circular-references-advanced.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/circular-references-advanced.json @@ -933,5 +933,6 @@ } }, "headers": [], - "endpoints": {} + "endpoints": {}, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/circular-references.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/circular-references.json index f60c91c58c6..e08f4cf7693 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/circular-references.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/circular-references.json @@ -836,5 +836,6 @@ } }, "headers": [], - "endpoints": {} + "endpoints": {}, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/cross-package-type-names.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/cross-package-type-names.json index 23dbe2743e8..3108534052d 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/cross-package-type-names.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/cross-package-type-names.json @@ -1279,5 +1279,6 @@ "type": "json" } } - } + }, + "environments": null } \ 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 215a724ec06..573bdc90122 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 @@ -3784,5 +3784,37 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": "Default", + "environments": { + "type": "singleBaseUrl", + "environments": [ + { + "id": "Default", + "name": { + "originalName": "Default", + "camelCase": { + "unsafeName": "default", + "safeName": "default" + }, + "snakeCase": { + "unsafeName": "default", + "safeName": "default" + }, + "screamingSnakeCase": { + "unsafeName": "DEFAULT", + "safeName": "DEFAULT" + }, + "pascalCase": { + "unsafeName": "Default", + "safeName": "Default" + } + }, + "url": "https://localhost", + "docs": null + } + ] + } } } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-grpc-proto.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-grpc-proto.json index 9a75d9ea436..76e69837039 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-grpc-proto.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-grpc-proto.json @@ -655,5 +655,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-namespace-conflict.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-namespace-conflict.json index cf227421baf..edac27f5e4f 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-namespace-conflict.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-namespace-conflict.json @@ -688,5 +688,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/custom-auth.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/custom-auth.json index 7e75e1894e7..a62c97dd872 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/custom-auth.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/custom-auth.json @@ -324,5 +324,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/enum.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/enum.json index 46e0023ea64..e1a163f32eb 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/enum.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/enum.json @@ -1170,5 +1170,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/error-property.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/error-property.json index 8eb84ba3455..6745e29b35a 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/error-property.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/error-property.json @@ -180,5 +180,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/examples.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/examples.json index eb9ab06bb2b..31aa4552946 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/examples.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/examples.json @@ -6600,5 +6600,61 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": null, + "environments": { + "type": "singleBaseUrl", + "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": "https://production.com/api", + "docs": null + }, + { + "id": "Staging", + "name": { + "originalName": "Staging", + "camelCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "snakeCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "screamingSnakeCase": { + "unsafeName": "STAGING", + "safeName": "STAGING" + }, + "pascalCase": { + "unsafeName": "Staging", + "safeName": "Staging" + } + }, + "url": "https://staging.com/api", + "docs": null + } + ] + } } } \ No newline at end of file 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 a4664f04f20..65e8fb46986 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 @@ -8947,5 +8947,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/extends.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/extends.json index dd57dc4b843..a5a50c62845 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/extends.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/extends.json @@ -513,5 +513,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/extra-properties.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/extra-properties.json index 5cb228dcc6a..952fe188b47 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/extra-properties.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/extra-properties.json @@ -406,5 +406,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/file-download.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/file-download.json index e877d6d4fa1..8741f689940 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/file-download.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/file-download.json @@ -82,5 +82,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/file-upload.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/file-upload.json index 5afd0cb7e01..80e09da5c07 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/file-upload.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/file-upload.json @@ -1559,5 +1559,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/folders.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/folders.json index ef65d25ebbf..213695a4ced 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/folders.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/folders.json @@ -753,5 +753,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/go-content-type.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/go-content-type.json index 658e322fb29..84b15b3ab8d 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/go-content-type.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/go-content-type.json @@ -235,5 +235,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/idempotency-headers.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/idempotency-headers.json index 8bbccc56a51..fafbe378212 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/idempotency-headers.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/idempotency-headers.json @@ -476,5 +476,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/imdb.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/imdb.json index 67ddd958a7d..332d0d2e392 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/imdb.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/imdb.json @@ -588,5 +588,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/inline-types.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/inline-types.json deleted file mode 100644 index 85ea1db9b4e..00000000000 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/inline-types.json +++ /dev/null @@ -1,754 +0,0 @@ -{ - "version": "1.0.0", - "types": { - "type_:RootType1": { - "type": "object", - "declaration": { - "name": { - "originalName": "RootType1", - "camelCase": { - "unsafeName": "rootType1", - "safeName": "rootType1" - }, - "snakeCase": { - "unsafeName": "root_type1", - "safeName": "root_type1" - }, - "screamingSnakeCase": { - "unsafeName": "ROOT_TYPE1", - "safeName": "ROOT_TYPE1" - }, - "pascalCase": { - "unsafeName": "RootType1", - "safeName": "RootType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "typeReference": { - "type": "primitive", - "value": "STRING" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "typeReference": { - "type": "named", - "value": "type_:InlineType1" - } - } - ] - }, - "type_:InlineType1": { - "type": "object", - "declaration": { - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "typeReference": { - "type": "primitive", - "value": "STRING" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "typeReference": { - "type": "named", - "value": "type_:NestedInlineType1" - } - } - ] - }, - "type_:InlineType2": { - "type": "object", - "declaration": { - "name": { - "originalName": "InlineType2", - "camelCase": { - "unsafeName": "inlineType2", - "safeName": "inlineType2" - }, - "snakeCase": { - "unsafeName": "inline_type2", - "safeName": "inline_type2" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE2", - "safeName": "INLINE_TYPE2" - }, - "pascalCase": { - "unsafeName": "InlineType2", - "safeName": "InlineType2" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "properties": [ - { - "name": { - "name": { - "originalName": "baz", - "camelCase": { - "unsafeName": "baz", - "safeName": "baz" - }, - "snakeCase": { - "unsafeName": "baz", - "safeName": "baz" - }, - "screamingSnakeCase": { - "unsafeName": "BAZ", - "safeName": "BAZ" - }, - "pascalCase": { - "unsafeName": "Baz", - "safeName": "Baz" - } - }, - "wireValue": "baz" - }, - "typeReference": { - "type": "primitive", - "value": "STRING" - } - } - ] - }, - "type_:NestedInlineType1": { - "type": "object", - "declaration": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "typeReference": { - "type": "primitive", - "value": "STRING" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "typeReference": { - "type": "primitive", - "value": "STRING" - } - }, - { - "name": { - "name": { - "originalName": "myEnum", - "camelCase": { - "unsafeName": "myEnum", - "safeName": "myEnum" - }, - "snakeCase": { - "unsafeName": "my_enum", - "safeName": "my_enum" - }, - "screamingSnakeCase": { - "unsafeName": "MY_ENUM", - "safeName": "MY_ENUM" - }, - "pascalCase": { - "unsafeName": "MyEnum", - "safeName": "MyEnum" - } - }, - "wireValue": "myEnum" - }, - "typeReference": { - "type": "named", - "value": "type_:InlineEnum" - } - } - ] - }, - "type_:InlinedDiscriminatedUnion1": { - "type": "discriminatedUnion", - "declaration": { - "name": { - "originalName": "InlinedDiscriminatedUnion1", - "camelCase": { - "unsafeName": "inlinedDiscriminatedUnion1", - "safeName": "inlinedDiscriminatedUnion1" - }, - "snakeCase": { - "unsafeName": "inlined_discriminated_union1", - "safeName": "inlined_discriminated_union1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINED_DISCRIMINATED_UNION1", - "safeName": "INLINED_DISCRIMINATED_UNION1" - }, - "pascalCase": { - "unsafeName": "InlinedDiscriminatedUnion1", - "safeName": "InlinedDiscriminatedUnion1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "discriminant": { - "name": { - "originalName": "type", - "camelCase": { - "unsafeName": "type", - "safeName": "type" - }, - "snakeCase": { - "unsafeName": "type", - "safeName": "type" - }, - "screamingSnakeCase": { - "unsafeName": "TYPE", - "safeName": "TYPE" - }, - "pascalCase": { - "unsafeName": "Type", - "safeName": "Type" - } - }, - "wireValue": "type" - }, - "types": { - "type1": { - "type": "samePropertiesAsObject", - "typeId": "type_:InlineType1", - "discriminantValue": { - "name": { - "originalName": "type1", - "camelCase": { - "unsafeName": "type1", - "safeName": "type1" - }, - "snakeCase": { - "unsafeName": "type1", - "safeName": "type1" - }, - "screamingSnakeCase": { - "unsafeName": "TYPE1", - "safeName": "TYPE1" - }, - "pascalCase": { - "unsafeName": "Type1", - "safeName": "Type1" - } - }, - "wireValue": "type1" - }, - "properties": [] - }, - "type2": { - "type": "samePropertiesAsObject", - "typeId": "type_:InlineType2", - "discriminantValue": { - "name": { - "originalName": "type2", - "camelCase": { - "unsafeName": "type2", - "safeName": "type2" - }, - "snakeCase": { - "unsafeName": "type2", - "safeName": "type2" - }, - "screamingSnakeCase": { - "unsafeName": "TYPE2", - "safeName": "TYPE2" - }, - "pascalCase": { - "unsafeName": "Type2", - "safeName": "Type2" - } - }, - "wireValue": "type2" - }, - "properties": [] - } - } - }, - "type_:InlinedUndiscriminatedUnion1": { - "type": "undiscriminatedUnion", - "declaration": { - "name": { - "originalName": "InlinedUndiscriminatedUnion1", - "camelCase": { - "unsafeName": "inlinedUndiscriminatedUnion1", - "safeName": "inlinedUndiscriminatedUnion1" - }, - "snakeCase": { - "unsafeName": "inlined_undiscriminated_union1", - "safeName": "inlined_undiscriminated_union1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINED_UNDISCRIMINATED_UNION1", - "safeName": "INLINED_UNDISCRIMINATED_UNION1" - }, - "pascalCase": { - "unsafeName": "InlinedUndiscriminatedUnion1", - "safeName": "InlinedUndiscriminatedUnion1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "types": [ - { - "type": "named", - "value": "type_:InlineType1" - }, - { - "type": "named", - "value": "type_:InlineType2" - } - ] - }, - "type_:InlineEnum": { - "type": "enum", - "declaration": { - "name": { - "originalName": "InlineEnum", - "camelCase": { - "unsafeName": "inlineEnum", - "safeName": "inlineEnum" - }, - "snakeCase": { - "unsafeName": "inline_enum", - "safeName": "inline_enum" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_ENUM", - "safeName": "INLINE_ENUM" - }, - "pascalCase": { - "unsafeName": "InlineEnum", - "safeName": "InlineEnum" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "values": [ - { - "name": { - "originalName": "SUNNY", - "camelCase": { - "unsafeName": "sunny", - "safeName": "sunny" - }, - "snakeCase": { - "unsafeName": "sunny", - "safeName": "sunny" - }, - "screamingSnakeCase": { - "unsafeName": "SUNNY", - "safeName": "SUNNY" - }, - "pascalCase": { - "unsafeName": "Sunny", - "safeName": "Sunny" - } - }, - "wireValue": "SUNNY" - }, - { - "name": { - "originalName": "CLOUDY", - "camelCase": { - "unsafeName": "cloudy", - "safeName": "cloudy" - }, - "snakeCase": { - "unsafeName": "cloudy", - "safeName": "cloudy" - }, - "screamingSnakeCase": { - "unsafeName": "CLOUDY", - "safeName": "CLOUDY" - }, - "pascalCase": { - "unsafeName": "Cloudy", - "safeName": "Cloudy" - } - }, - "wireValue": "CLOUDY" - }, - { - "name": { - "originalName": "RAINING", - "camelCase": { - "unsafeName": "raining", - "safeName": "raining" - }, - "snakeCase": { - "unsafeName": "raining", - "safeName": "raining" - }, - "screamingSnakeCase": { - "unsafeName": "RAINING", - "safeName": "RAINING" - }, - "pascalCase": { - "unsafeName": "Raining", - "safeName": "Raining" - } - }, - "wireValue": "RAINING" - }, - { - "name": { - "originalName": "SNOWING", - "camelCase": { - "unsafeName": "snowing", - "safeName": "snowing" - }, - "snakeCase": { - "unsafeName": "snowing", - "safeName": "snowing" - }, - "screamingSnakeCase": { - "unsafeName": "SNOWING", - "safeName": "SNOWING" - }, - "pascalCase": { - "unsafeName": "Snowing", - "safeName": "Snowing" - } - }, - "wireValue": "SNOWING" - } - ] - } - }, - "headers": [], - "endpoints": { - "endpoint_.getRoot": { - "auth": null, - "declaration": { - "name": { - "originalName": "getRoot", - "camelCase": { - "unsafeName": "getRoot", - "safeName": "getRoot" - }, - "snakeCase": { - "unsafeName": "get_root", - "safeName": "get_root" - }, - "screamingSnakeCase": { - "unsafeName": "GET_ROOT", - "safeName": "GET_ROOT" - }, - "pascalCase": { - "unsafeName": "GetRoot", - "safeName": "GetRoot" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "location": { - "method": "POST", - "path": "/root/root" - }, - "request": { - "type": "inlined", - "declaration": { - "name": { - "originalName": "PostRootRequest", - "camelCase": { - "unsafeName": "postRootRequest", - "safeName": "postRootRequest" - }, - "snakeCase": { - "unsafeName": "post_root_request", - "safeName": "post_root_request" - }, - "screamingSnakeCase": { - "unsafeName": "POST_ROOT_REQUEST", - "safeName": "POST_ROOT_REQUEST" - }, - "pascalCase": { - "unsafeName": "PostRootRequest", - "safeName": "PostRootRequest" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "pathParameters": [], - "queryParameters": [], - "headers": [], - "body": { - "type": "properties", - "value": [ - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "typeReference": { - "type": "named", - "value": "type_:InlineType1" - } - }, - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "typeReference": { - "type": "primitive", - "value": "STRING" - } - } - ] - }, - "metadata": { - "includePathParameters": false, - "onlyPathParameters": false - } - }, - "response": { - "type": "json" - } - } - } -} \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/java-custom-package-prefix.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/java-custom-package-prefix.json new file mode 100644 index 00000000000..332d0d2e392 --- /dev/null +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/java-custom-package-prefix.json @@ -0,0 +1,593 @@ +{ + "version": "1.0.0", + "types": { + "type_imdb:MovieId": { + "type": "alias", + "declaration": { + "name": { + "originalName": "MovieId", + "camelCase": { + "unsafeName": "movieID", + "safeName": "movieID" + }, + "snakeCase": { + "unsafeName": "movie_id", + "safeName": "movie_id" + }, + "screamingSnakeCase": { + "unsafeName": "MOVIE_ID", + "safeName": "MOVIE_ID" + }, + "pascalCase": { + "unsafeName": "MovieID", + "safeName": "MovieID" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "imdb", + "camelCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "snakeCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "screamingSnakeCase": { + "unsafeName": "IMDB", + "safeName": "IMDB" + }, + "pascalCase": { + "unsafeName": "Imdb", + "safeName": "Imdb" + } + } + ], + "packagePath": [], + "file": { + "originalName": "imdb", + "camelCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "snakeCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "screamingSnakeCase": { + "unsafeName": "IMDB", + "safeName": "IMDB" + }, + "pascalCase": { + "unsafeName": "Imdb", + "safeName": "Imdb" + } + } + } + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + "type_imdb:Movie": { + "type": "object", + "declaration": { + "name": { + "originalName": "Movie", + "camelCase": { + "unsafeName": "movie", + "safeName": "movie" + }, + "snakeCase": { + "unsafeName": "movie", + "safeName": "movie" + }, + "screamingSnakeCase": { + "unsafeName": "MOVIE", + "safeName": "MOVIE" + }, + "pascalCase": { + "unsafeName": "Movie", + "safeName": "Movie" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "imdb", + "camelCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "snakeCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "screamingSnakeCase": { + "unsafeName": "IMDB", + "safeName": "IMDB" + }, + "pascalCase": { + "unsafeName": "Imdb", + "safeName": "Imdb" + } + } + ], + "packagePath": [], + "file": { + "originalName": "imdb", + "camelCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "snakeCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "screamingSnakeCase": { + "unsafeName": "IMDB", + "safeName": "IMDB" + }, + "pascalCase": { + "unsafeName": "Imdb", + "safeName": "Imdb" + } + } + } + }, + "properties": [ + { + "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": "named", + "value": "type_imdb:MovieId" + } + }, + { + "name": { + "name": { + "originalName": "title", + "camelCase": { + "unsafeName": "title", + "safeName": "title" + }, + "snakeCase": { + "unsafeName": "title", + "safeName": "title" + }, + "screamingSnakeCase": { + "unsafeName": "TITLE", + "safeName": "TITLE" + }, + "pascalCase": { + "unsafeName": "Title", + "safeName": "Title" + } + }, + "wireValue": "title" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "rating", + "camelCase": { + "unsafeName": "rating", + "safeName": "rating" + }, + "snakeCase": { + "unsafeName": "rating", + "safeName": "rating" + }, + "screamingSnakeCase": { + "unsafeName": "RATING", + "safeName": "RATING" + }, + "pascalCase": { + "unsafeName": "Rating", + "safeName": "Rating" + } + }, + "wireValue": "rating" + }, + "typeReference": { + "type": "primitive", + "value": "DOUBLE" + } + } + ] + }, + "type_imdb:CreateMovieRequest": { + "type": "object", + "declaration": { + "name": { + "originalName": "CreateMovieRequest", + "camelCase": { + "unsafeName": "createMovieRequest", + "safeName": "createMovieRequest" + }, + "snakeCase": { + "unsafeName": "create_movie_request", + "safeName": "create_movie_request" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_MOVIE_REQUEST", + "safeName": "CREATE_MOVIE_REQUEST" + }, + "pascalCase": { + "unsafeName": "CreateMovieRequest", + "safeName": "CreateMovieRequest" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "imdb", + "camelCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "snakeCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "screamingSnakeCase": { + "unsafeName": "IMDB", + "safeName": "IMDB" + }, + "pascalCase": { + "unsafeName": "Imdb", + "safeName": "Imdb" + } + } + ], + "packagePath": [], + "file": { + "originalName": "imdb", + "camelCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "snakeCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "screamingSnakeCase": { + "unsafeName": "IMDB", + "safeName": "IMDB" + }, + "pascalCase": { + "unsafeName": "Imdb", + "safeName": "Imdb" + } + } + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "title", + "camelCase": { + "unsafeName": "title", + "safeName": "title" + }, + "snakeCase": { + "unsafeName": "title", + "safeName": "title" + }, + "screamingSnakeCase": { + "unsafeName": "TITLE", + "safeName": "TITLE" + }, + "pascalCase": { + "unsafeName": "Title", + "safeName": "Title" + } + }, + "wireValue": "title" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "rating", + "camelCase": { + "unsafeName": "rating", + "safeName": "rating" + }, + "snakeCase": { + "unsafeName": "rating", + "safeName": "rating" + }, + "screamingSnakeCase": { + "unsafeName": "RATING", + "safeName": "RATING" + }, + "pascalCase": { + "unsafeName": "Rating", + "safeName": "Rating" + } + }, + "wireValue": "rating" + }, + "typeReference": { + "type": "primitive", + "value": "DOUBLE" + } + } + ] + } + }, + "headers": [], + "endpoints": { + "endpoint_imdb.createMovie": { + "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": "createMovie", + "camelCase": { + "unsafeName": "createMovie", + "safeName": "createMovie" + }, + "snakeCase": { + "unsafeName": "create_movie", + "safeName": "create_movie" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_MOVIE", + "safeName": "CREATE_MOVIE" + }, + "pascalCase": { + "unsafeName": "CreateMovie", + "safeName": "CreateMovie" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "imdb", + "camelCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "snakeCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "screamingSnakeCase": { + "unsafeName": "IMDB", + "safeName": "IMDB" + }, + "pascalCase": { + "unsafeName": "Imdb", + "safeName": "Imdb" + } + } + ], + "packagePath": [], + "file": { + "originalName": "imdb", + "camelCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "snakeCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "screamingSnakeCase": { + "unsafeName": "IMDB", + "safeName": "IMDB" + }, + "pascalCase": { + "unsafeName": "Imdb", + "safeName": "Imdb" + } + } + } + }, + "location": { + "method": "POST", + "path": "/movies/create-movie" + }, + "request": { + "type": "body", + "pathParameters": [], + "body": { + "type": "typeReference", + "value": { + "type": "named", + "value": "type_imdb:CreateMovieRequest" + } + } + }, + "response": { + "type": "json" + } + }, + "endpoint_imdb.getMovie": { + "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": "getMovie", + "camelCase": { + "unsafeName": "getMovie", + "safeName": "getMovie" + }, + "snakeCase": { + "unsafeName": "get_movie", + "safeName": "get_movie" + }, + "screamingSnakeCase": { + "unsafeName": "GET_MOVIE", + "safeName": "GET_MOVIE" + }, + "pascalCase": { + "unsafeName": "GetMovie", + "safeName": "GetMovie" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "imdb", + "camelCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "snakeCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "screamingSnakeCase": { + "unsafeName": "IMDB", + "safeName": "IMDB" + }, + "pascalCase": { + "unsafeName": "Imdb", + "safeName": "Imdb" + } + } + ], + "packagePath": [], + "file": { + "originalName": "imdb", + "camelCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "snakeCase": { + "unsafeName": "imdb", + "safeName": "imdb" + }, + "screamingSnakeCase": { + "unsafeName": "IMDB", + "safeName": "IMDB" + }, + "pascalCase": { + "unsafeName": "Imdb", + "safeName": "Imdb" + } + } + } + }, + "location": { + "method": "GET", + "path": "/movies/{movieId}" + }, + "request": { + "type": "body", + "pathParameters": [ + { + "name": { + "name": { + "originalName": "movieId", + "camelCase": { + "unsafeName": "movieID", + "safeName": "movieID" + }, + "snakeCase": { + "unsafeName": "movie_id", + "safeName": "movie_id" + }, + "screamingSnakeCase": { + "unsafeName": "MOVIE_ID", + "safeName": "MOVIE_ID" + }, + "pascalCase": { + "unsafeName": "MovieID", + "safeName": "MovieID" + } + }, + "wireValue": "movieId" + }, + "typeReference": { + "type": "named", + "value": "type_imdb:MovieId" + } + } + ], + "body": null + }, + "response": { + "type": "json" + } + } + }, + "environments": null +} \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/license.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/license.json index 5d396836335..84650210f24 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/license.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/license.json @@ -104,5 +104,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/literal.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/literal.json index f92557afdcb..dd649402d90 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/literal.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/literal.json @@ -2110,5 +2110,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/mixed-case.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/mixed-case.json index 5141eb2b08d..492c5c5bcff 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/mixed-case.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/mixed-case.json @@ -1019,5 +1019,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/mixed-file-directory.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/mixed-file-directory.json index 7d0cb7f5219..69af883b27f 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/mixed-file-directory.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/mixed-file-directory.json @@ -1665,5 +1665,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-line-docs.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-line-docs.json index 29b22536351..6688d8d4872 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-line-docs.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-line-docs.json @@ -577,5 +577,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-url-environment-no-default.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-url-environment-no-default.json index 5df5bdacabd..47641b0ddde 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-url-environment-no-default.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-url-environment-no-default.json @@ -407,5 +407,113 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": null, + "environments": { + "type": "multipleBaseUrls", + "baseUrls": [ + { + "id": "ec2", + "name": { + "originalName": "ec2", + "camelCase": { + "unsafeName": "ec2", + "safeName": "ec2" + }, + "snakeCase": { + "unsafeName": "ec2", + "safeName": "ec2" + }, + "screamingSnakeCase": { + "unsafeName": "EC2", + "safeName": "EC2" + }, + "pascalCase": { + "unsafeName": "Ec2", + "safeName": "Ec2" + } + } + }, + { + "id": "s3", + "name": { + "originalName": "s3", + "camelCase": { + "unsafeName": "s3", + "safeName": "s3" + }, + "snakeCase": { + "unsafeName": "s3", + "safeName": "s3" + }, + "screamingSnakeCase": { + "unsafeName": "S3", + "safeName": "S3" + }, + "pascalCase": { + "unsafeName": "S3", + "safeName": "S3" + } + } + } + ], + "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" + } + }, + "urls": { + "ec2": "https://ec2.aws.com", + "s3": "https://s3.aws.com" + }, + "docs": null + }, + { + "id": "Staging", + "name": { + "originalName": "Staging", + "camelCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "snakeCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "screamingSnakeCase": { + "unsafeName": "STAGING", + "safeName": "STAGING" + }, + "pascalCase": { + "unsafeName": "Staging", + "safeName": "Staging" + } + }, + "urls": { + "ec2": "https://staging.ec2.aws.com", + "s3": "https://staging.s3.aws.com" + }, + "docs": null + } + ] + } } } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-url-environment.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-url-environment.json index 5df5bdacabd..ed974349854 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-url-environment.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/multi-url-environment.json @@ -407,5 +407,113 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": "Production", + "environments": { + "type": "multipleBaseUrls", + "baseUrls": [ + { + "id": "ec2", + "name": { + "originalName": "ec2", + "camelCase": { + "unsafeName": "ec2", + "safeName": "ec2" + }, + "snakeCase": { + "unsafeName": "ec2", + "safeName": "ec2" + }, + "screamingSnakeCase": { + "unsafeName": "EC2", + "safeName": "EC2" + }, + "pascalCase": { + "unsafeName": "Ec2", + "safeName": "Ec2" + } + } + }, + { + "id": "s3", + "name": { + "originalName": "s3", + "camelCase": { + "unsafeName": "s3", + "safeName": "s3" + }, + "snakeCase": { + "unsafeName": "s3", + "safeName": "s3" + }, + "screamingSnakeCase": { + "unsafeName": "S3", + "safeName": "S3" + }, + "pascalCase": { + "unsafeName": "S3", + "safeName": "S3" + } + } + } + ], + "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" + } + }, + "urls": { + "ec2": "https://ec2.aws.com", + "s3": "https://s3.aws.com" + }, + "docs": null + }, + { + "id": "Staging", + "name": { + "originalName": "Staging", + "camelCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "snakeCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "screamingSnakeCase": { + "unsafeName": "STAGING", + "safeName": "STAGING" + }, + "pascalCase": { + "unsafeName": "Staging", + "safeName": "Staging" + } + }, + "urls": { + "ec2": "https://staging.ec2.aws.com", + "s3": "https://staging.s3.aws.com" + }, + "docs": null + } + ] + } } } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/no-environment.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/no-environment.json index f3907b4fc1c..b88549f524f 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/no-environment.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/no-environment.json @@ -103,5 +103,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-default.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-default.json index 797e8707f2f..f166ce9a50a 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-default.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-default.json @@ -369,5 +369,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-environment-variables.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-environment-variables.json index b18a65347db..96c83bf00e9 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-environment-variables.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-environment-variables.json @@ -792,5 +792,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-nested-root.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-nested-root.json index 215b2f64660..4a8c2dba9f3 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-nested-root.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials-nested-root.json @@ -468,5 +468,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials.json index b18a65347db..96c83bf00e9 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/oauth-client-credentials.json @@ -792,5 +792,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/object.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/object.json index b208ee5cbee..d7e85e1fe83 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/object.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/object.json @@ -805,5 +805,6 @@ } }, "headers": [], - "endpoints": {} + "endpoints": {}, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/objects-with-imports.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/objects-with-imports.json index 3fe89d7732d..c798ee31b8c 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/objects-with-imports.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/objects-with-imports.json @@ -833,5 +833,6 @@ } }, "headers": [], - "endpoints": {} + "endpoints": {}, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/optional.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/optional.json index f6ea5942fa0..2f909d9d873 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/optional.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/optional.json @@ -97,5 +97,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/package-yml.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/package-yml.json index 33bc1aac005..52e12f6b5a9 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/package-yml.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/package-yml.json @@ -303,5 +303,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/pagination.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/pagination.json index 1d28d4a50f4..dd2f46606c7 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/pagination.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/pagination.json @@ -4300,5 +4300,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/path-parameters.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/path-parameters.json index e1fb4f86c63..cb7e45297e2 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/path-parameters.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/path-parameters.json @@ -1172,5 +1172,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/plain-text.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/plain-text.json index 52fa3253355..26cc2e15b89 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/plain-text.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/plain-text.json @@ -82,5 +82,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/query-parameters.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/query-parameters.json index 9c24f863198..59ba5c2d848 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/query-parameters.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/query-parameters.json @@ -824,5 +824,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/reserved-keywords.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/reserved-keywords.json index ea803a7a4ed..722b2f0f89f 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/reserved-keywords.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/reserved-keywords.json @@ -411,5 +411,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/response-property.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/response-property.json index c2a1c46b2ba..1463222b76d 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/response-property.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/response-property.json @@ -1216,5 +1216,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/server-sent-event-examples.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/server-sent-event-examples.json index 299cfa12c7d..0b885b6ae24 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/server-sent-event-examples.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/server-sent-event-examples.json @@ -313,5 +313,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/server-sent-events.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/server-sent-events.json index 299cfa12c7d..0b885b6ae24 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/server-sent-events.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/server-sent-events.json @@ -313,5 +313,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/simple-fhir.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/simple-fhir.json index a1763de6a39..86a72555172 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/simple-fhir.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/simple-fhir.json @@ -1130,5 +1130,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/single-url-environment-default.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/single-url-environment-default.json index f3907b4fc1c..ed0e11d10cd 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/single-url-environment-default.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/single-url-environment-default.json @@ -103,5 +103,61 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": "Production", + "environments": { + "type": "singleBaseUrl", + "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": "https://production.com/api", + "docs": null + }, + { + "id": "Staging", + "name": { + "originalName": "Staging", + "camelCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "snakeCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "screamingSnakeCase": { + "unsafeName": "STAGING", + "safeName": "STAGING" + }, + "pascalCase": { + "unsafeName": "Staging", + "safeName": "Staging" + } + }, + "url": "https://staging.com/api", + "docs": null + } + ] + } } } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/single-url-environment-no-default.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/single-url-environment-no-default.json index f3907b4fc1c..9373f42b196 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/single-url-environment-no-default.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/single-url-environment-no-default.json @@ -103,5 +103,61 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": null, + "environments": { + "type": "singleBaseUrl", + "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": "https://production.com/api", + "docs": null + }, + { + "id": "Staging", + "name": { + "originalName": "Staging", + "camelCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "snakeCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "screamingSnakeCase": { + "unsafeName": "STAGING", + "safeName": "STAGING" + }, + "pascalCase": { + "unsafeName": "Staging", + "safeName": "Staging" + } + }, + "url": "https://staging.com/api", + "docs": null + } + ] + } } } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/streaming-parameter.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/streaming-parameter.json index 5e63838401b..d7cc4266b4a 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/streaming-parameter.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/streaming-parameter.json @@ -469,5 +469,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/streaming.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/streaming.json index eff45f03fd5..536a36c7df6 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/streaming.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/streaming.json @@ -556,5 +556,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/trace.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/trace.json index 676d1e7bf61..0567ea56e98 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/trace.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/trace.json @@ -41282,5 +41282,37 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": "Prod", + "environments": { + "type": "singleBaseUrl", + "environments": [ + { + "id": "Prod", + "name": { + "originalName": "Prod", + "camelCase": { + "unsafeName": "prod", + "safeName": "prod" + }, + "snakeCase": { + "unsafeName": "prod", + "safeName": "prod" + }, + "screamingSnakeCase": { + "unsafeName": "PROD", + "safeName": "PROD" + }, + "pascalCase": { + "unsafeName": "Prod", + "safeName": "Prod" + } + }, + "url": "https://api.trace.come", + "docs": null + } + ] + } } } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/ts-express-casing.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/ts-express-casing.json index 73a68bba5e0..f823355efb9 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/ts-express-casing.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/ts-express-casing.json @@ -615,5 +615,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/ts-inline-types.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/ts-inline-types.json new file mode 100644 index 00000000000..7d7882e4ae6 --- /dev/null +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/ts-inline-types.json @@ -0,0 +1,3207 @@ +{ + "version": "1.0.0", + "types": { + "type_:AliasMapInline": { + "type": "alias", + "declaration": { + "name": { + "originalName": "AliasMapInline", + "camelCase": { + "unsafeName": "aliasMapInline", + "safeName": "aliasMapInline" + }, + "snakeCase": { + "unsafeName": "alias_map_inline", + "safeName": "alias_map_inline" + }, + "screamingSnakeCase": { + "unsafeName": "ALIAS_MAP_INLINE", + "safeName": "ALIAS_MAP_INLINE" + }, + "pascalCase": { + "unsafeName": "AliasMapInline", + "safeName": "AliasMapInline" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "typeReference": { + "type": "map", + "key": { + "type": "primitive", + "value": "STRING" + }, + "value": { + "type": "named", + "value": "type_:AliasInlineValue" + } + } + }, + "type_:AliasSetInline": { + "type": "alias", + "declaration": { + "name": { + "originalName": "AliasSetInline", + "camelCase": { + "unsafeName": "aliasSetInline", + "safeName": "aliasSetInline" + }, + "snakeCase": { + "unsafeName": "alias_set_inline", + "safeName": "alias_set_inline" + }, + "screamingSnakeCase": { + "unsafeName": "ALIAS_SET_INLINE", + "safeName": "ALIAS_SET_INLINE" + }, + "pascalCase": { + "unsafeName": "AliasSetInline", + "safeName": "AliasSetInline" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "typeReference": { + "type": "set", + "value": { + "type": "named", + "value": "type_:AliasInlineValue" + } + } + }, + "type_:AliasListInline": { + "type": "alias", + "declaration": { + "name": { + "originalName": "AliasListInline", + "camelCase": { + "unsafeName": "aliasListInline", + "safeName": "aliasListInline" + }, + "snakeCase": { + "unsafeName": "alias_list_inline", + "safeName": "alias_list_inline" + }, + "screamingSnakeCase": { + "unsafeName": "ALIAS_LIST_INLINE", + "safeName": "ALIAS_LIST_INLINE" + }, + "pascalCase": { + "unsafeName": "AliasListInline", + "safeName": "AliasListInline" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "typeReference": { + "type": "list", + "value": { + "type": "named", + "value": "type_:AliasInlineValue" + } + } + }, + "type_:AliasInlineValue": { + "type": "object", + "declaration": { + "name": { + "originalName": "AliasInlineValue", + "camelCase": { + "unsafeName": "aliasInlineValue", + "safeName": "aliasInlineValue" + }, + "snakeCase": { + "unsafeName": "alias_inline_value", + "safeName": "alias_inline_value" + }, + "screamingSnakeCase": { + "unsafeName": "ALIAS_INLINE_VALUE", + "safeName": "ALIAS_INLINE_VALUE" + }, + "pascalCase": { + "unsafeName": "AliasInlineValue", + "safeName": "AliasInlineValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "bar", + "camelCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "snakeCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "screamingSnakeCase": { + "unsafeName": "BAR", + "safeName": "BAR" + }, + "pascalCase": { + "unsafeName": "Bar", + "safeName": "Bar" + } + }, + "wireValue": "bar" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + } + ] + }, + "type_:RequestTypeInlineType1": { + "type": "object", + "declaration": { + "name": { + "originalName": "RequestTypeInlineType1", + "camelCase": { + "unsafeName": "requestTypeInlineType1", + "safeName": "requestTypeInlineType1" + }, + "snakeCase": { + "unsafeName": "request_type_inline_type1", + "safeName": "request_type_inline_type1" + }, + "screamingSnakeCase": { + "unsafeName": "REQUEST_TYPE_INLINE_TYPE1", + "safeName": "REQUEST_TYPE_INLINE_TYPE1" + }, + "pascalCase": { + "unsafeName": "RequestTypeInlineType1", + "safeName": "RequestTypeInlineType1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + } + ] + }, + "type_:RootType1": { + "type": "object", + "declaration": { + "name": { + "originalName": "RootType1", + "camelCase": { + "unsafeName": "rootType1", + "safeName": "rootType1" + }, + "snakeCase": { + "unsafeName": "root_type1", + "safeName": "root_type1" + }, + "screamingSnakeCase": { + "unsafeName": "ROOT_TYPE1", + "safeName": "ROOT_TYPE1" + }, + "pascalCase": { + "unsafeName": "RootType1", + "safeName": "RootType1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "bar", + "camelCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "snakeCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "screamingSnakeCase": { + "unsafeName": "BAR", + "safeName": "BAR" + }, + "pascalCase": { + "unsafeName": "Bar", + "safeName": "Bar" + } + }, + "wireValue": "bar" + }, + "typeReference": { + "type": "named", + "value": "type_:RootType1InlineType1" + } + }, + { + "name": { + "name": { + "originalName": "fooMap", + "camelCase": { + "unsafeName": "fooMap", + "safeName": "fooMap" + }, + "snakeCase": { + "unsafeName": "foo_map", + "safeName": "foo_map" + }, + "screamingSnakeCase": { + "unsafeName": "FOO_MAP", + "safeName": "FOO_MAP" + }, + "pascalCase": { + "unsafeName": "FooMap", + "safeName": "FooMap" + } + }, + "wireValue": "fooMap" + }, + "typeReference": { + "type": "map", + "key": { + "type": "primitive", + "value": "STRING" + }, + "value": { + "type": "named", + "value": "type_:RootType1FooMapValue" + } + } + }, + { + "name": { + "name": { + "originalName": "fooList", + "camelCase": { + "unsafeName": "fooList", + "safeName": "fooList" + }, + "snakeCase": { + "unsafeName": "foo_list", + "safeName": "foo_list" + }, + "screamingSnakeCase": { + "unsafeName": "FOO_LIST", + "safeName": "FOO_LIST" + }, + "pascalCase": { + "unsafeName": "FooList", + "safeName": "FooList" + } + }, + "wireValue": "fooList" + }, + "typeReference": { + "type": "list", + "value": { + "type": "named", + "value": "type_:RootType1FooListItem" + } + } + }, + { + "name": { + "name": { + "originalName": "fooSet", + "camelCase": { + "unsafeName": "fooSet", + "safeName": "fooSet" + }, + "snakeCase": { + "unsafeName": "foo_set", + "safeName": "foo_set" + }, + "screamingSnakeCase": { + "unsafeName": "FOO_SET", + "safeName": "FOO_SET" + }, + "pascalCase": { + "unsafeName": "FooSet", + "safeName": "FooSet" + } + }, + "wireValue": "fooSet" + }, + "typeReference": { + "type": "set", + "value": { + "type": "named", + "value": "type_:RootType1FooSetItem" + } + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:RootType1FooMapValue": { + "type": "object", + "declaration": { + "name": { + "originalName": "RootType1FooMapValue", + "camelCase": { + "unsafeName": "rootType1FooMapValue", + "safeName": "rootType1FooMapValue" + }, + "snakeCase": { + "unsafeName": "root_type1foo_map_value", + "safeName": "root_type1foo_map_value" + }, + "screamingSnakeCase": { + "unsafeName": "ROOT_TYPE1FOO_MAP_VALUE", + "safeName": "ROOT_TYPE1FOO_MAP_VALUE" + }, + "pascalCase": { + "unsafeName": "RootType1FooMapValue", + "safeName": "RootType1FooMapValue" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:RootType1FooListItem": { + "type": "object", + "declaration": { + "name": { + "originalName": "RootType1FooListItem", + "camelCase": { + "unsafeName": "rootType1FooListItem", + "safeName": "rootType1FooListItem" + }, + "snakeCase": { + "unsafeName": "root_type1foo_list_item", + "safeName": "root_type1foo_list_item" + }, + "screamingSnakeCase": { + "unsafeName": "ROOT_TYPE1FOO_LIST_ITEM", + "safeName": "ROOT_TYPE1FOO_LIST_ITEM" + }, + "pascalCase": { + "unsafeName": "RootType1FooListItem", + "safeName": "RootType1FooListItem" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:RootType1FooSetItem": { + "type": "object", + "declaration": { + "name": { + "originalName": "RootType1FooSetItem", + "camelCase": { + "unsafeName": "rootType1FooSetItem", + "safeName": "rootType1FooSetItem" + }, + "snakeCase": { + "unsafeName": "root_type1foo_set_item", + "safeName": "root_type1foo_set_item" + }, + "screamingSnakeCase": { + "unsafeName": "ROOT_TYPE1FOO_SET_ITEM", + "safeName": "ROOT_TYPE1FOO_SET_ITEM" + }, + "pascalCase": { + "unsafeName": "RootType1FooSetItem", + "safeName": "RootType1FooSetItem" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:RootType1InlineType1": { + "type": "object", + "declaration": { + "name": { + "originalName": "RootType1InlineType1", + "camelCase": { + "unsafeName": "rootType1InlineType1", + "safeName": "rootType1InlineType1" + }, + "snakeCase": { + "unsafeName": "root_type1inline_type1", + "safeName": "root_type1inline_type1" + }, + "screamingSnakeCase": { + "unsafeName": "ROOT_TYPE1INLINE_TYPE1", + "safeName": "ROOT_TYPE1INLINE_TYPE1" + }, + "pascalCase": { + "unsafeName": "RootType1InlineType1", + "safeName": "RootType1InlineType1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "bar", + "camelCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "snakeCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "screamingSnakeCase": { + "unsafeName": "BAR", + "safeName": "BAR" + }, + "pascalCase": { + "unsafeName": "Bar", + "safeName": "Bar" + } + }, + "wireValue": "bar" + }, + "typeReference": { + "type": "named", + "value": "type_:RootType1InlineType1NestedInlineType1" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:RootType1InlineType1NestedInlineType1": { + "type": "object", + "declaration": { + "name": { + "originalName": "RootType1InlineType1NestedInlineType1", + "camelCase": { + "unsafeName": "rootType1InlineType1NestedInlineType1", + "safeName": "rootType1InlineType1NestedInlineType1" + }, + "snakeCase": { + "unsafeName": "root_type1inline_type1nested_inline_type1", + "safeName": "root_type1inline_type1nested_inline_type1" + }, + "screamingSnakeCase": { + "unsafeName": "ROOT_TYPE1INLINE_TYPE1NESTED_INLINE_TYPE1", + "safeName": "ROOT_TYPE1INLINE_TYPE1NESTED_INLINE_TYPE1" + }, + "pascalCase": { + "unsafeName": "RootType1InlineType1NestedInlineType1", + "safeName": "RootType1InlineType1NestedInlineType1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "bar", + "camelCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "snakeCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "screamingSnakeCase": { + "unsafeName": "BAR", + "safeName": "BAR" + }, + "pascalCase": { + "unsafeName": "Bar", + "safeName": "Bar" + } + }, + "wireValue": "bar" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "myEnum", + "camelCase": { + "unsafeName": "myEnum", + "safeName": "myEnum" + }, + "snakeCase": { + "unsafeName": "my_enum", + "safeName": "my_enum" + }, + "screamingSnakeCase": { + "unsafeName": "MY_ENUM", + "safeName": "MY_ENUM" + }, + "pascalCase": { + "unsafeName": "MyEnum", + "safeName": "MyEnum" + } + }, + "wireValue": "myEnum" + }, + "typeReference": { + "type": "named", + "value": "type_:InlineEnum1" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:DiscriminatedUnion1": { + "type": "discriminatedUnion", + "declaration": { + "name": { + "originalName": "DiscriminatedUnion1", + "camelCase": { + "unsafeName": "discriminatedUnion1", + "safeName": "discriminatedUnion1" + }, + "snakeCase": { + "unsafeName": "discriminated_union1", + "safeName": "discriminated_union1" + }, + "screamingSnakeCase": { + "unsafeName": "DISCRIMINATED_UNION1", + "safeName": "DISCRIMINATED_UNION1" + }, + "pascalCase": { + "unsafeName": "DiscriminatedUnion1", + "safeName": "DiscriminatedUnion1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "discriminant": { + "name": { + "originalName": "type", + "camelCase": { + "unsafeName": "type", + "safeName": "type" + }, + "snakeCase": { + "unsafeName": "type", + "safeName": "type" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE", + "safeName": "TYPE" + }, + "pascalCase": { + "unsafeName": "Type", + "safeName": "Type" + } + }, + "wireValue": "type" + }, + "types": { + "type1": { + "type": "samePropertiesAsObject", + "typeId": "type_:DiscriminatedUnion1InlineType1", + "discriminantValue": { + "name": { + "originalName": "type1", + "camelCase": { + "unsafeName": "type1", + "safeName": "type1" + }, + "snakeCase": { + "unsafeName": "type1", + "safeName": "type1" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE1", + "safeName": "TYPE1" + }, + "pascalCase": { + "unsafeName": "Type1", + "safeName": "Type1" + } + }, + "wireValue": "type1" + }, + "properties": [] + }, + "type2": { + "type": "samePropertiesAsObject", + "typeId": "type_:DiscriminatedUnion1InlineType2", + "discriminantValue": { + "name": { + "originalName": "type2", + "camelCase": { + "unsafeName": "type2", + "safeName": "type2" + }, + "snakeCase": { + "unsafeName": "type2", + "safeName": "type2" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE2", + "safeName": "TYPE2" + }, + "pascalCase": { + "unsafeName": "Type2", + "safeName": "Type2" + } + }, + "wireValue": "type2" + }, + "properties": [] + }, + "ref": { + "type": "samePropertiesAsObject", + "typeId": "type_:ReferenceType", + "discriminantValue": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "properties": [] + } + } + }, + "type_:DiscriminatedUnion1InlineType1": { + "type": "object", + "declaration": { + "name": { + "originalName": "DiscriminatedUnion1InlineType1", + "camelCase": { + "unsafeName": "discriminatedUnion1InlineType1", + "safeName": "discriminatedUnion1InlineType1" + }, + "snakeCase": { + "unsafeName": "discriminated_union1inline_type1", + "safeName": "discriminated_union1inline_type1" + }, + "screamingSnakeCase": { + "unsafeName": "DISCRIMINATED_UNION1INLINE_TYPE1", + "safeName": "DISCRIMINATED_UNION1INLINE_TYPE1" + }, + "pascalCase": { + "unsafeName": "DiscriminatedUnion1InlineType1", + "safeName": "DiscriminatedUnion1InlineType1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "bar", + "camelCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "snakeCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "screamingSnakeCase": { + "unsafeName": "BAR", + "safeName": "BAR" + }, + "pascalCase": { + "unsafeName": "Bar", + "safeName": "Bar" + } + }, + "wireValue": "bar" + }, + "typeReference": { + "type": "named", + "value": "type_:DiscriminatedUnion1InlineType1InlineType1" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:DiscriminatedUnion1InlineType1InlineType1": { + "type": "object", + "declaration": { + "name": { + "originalName": "DiscriminatedUnion1InlineType1InlineType1", + "camelCase": { + "unsafeName": "discriminatedUnion1InlineType1InlineType1", + "safeName": "discriminatedUnion1InlineType1InlineType1" + }, + "snakeCase": { + "unsafeName": "discriminated_union1inline_type1inline_type1", + "safeName": "discriminated_union1inline_type1inline_type1" + }, + "screamingSnakeCase": { + "unsafeName": "DISCRIMINATED_UNION1INLINE_TYPE1INLINE_TYPE1", + "safeName": "DISCRIMINATED_UNION1INLINE_TYPE1INLINE_TYPE1" + }, + "pascalCase": { + "unsafeName": "DiscriminatedUnion1InlineType1InlineType1", + "safeName": "DiscriminatedUnion1InlineType1InlineType1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:DiscriminatedUnion1InlineType2": { + "type": "object", + "declaration": { + "name": { + "originalName": "DiscriminatedUnion1InlineType2", + "camelCase": { + "unsafeName": "discriminatedUnion1InlineType2", + "safeName": "discriminatedUnion1InlineType2" + }, + "snakeCase": { + "unsafeName": "discriminated_union1inline_type2", + "safeName": "discriminated_union1inline_type2" + }, + "screamingSnakeCase": { + "unsafeName": "DISCRIMINATED_UNION1INLINE_TYPE2", + "safeName": "DISCRIMINATED_UNION1INLINE_TYPE2" + }, + "pascalCase": { + "unsafeName": "DiscriminatedUnion1InlineType2", + "safeName": "DiscriminatedUnion1InlineType2" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "baz", + "camelCase": { + "unsafeName": "baz", + "safeName": "baz" + }, + "snakeCase": { + "unsafeName": "baz", + "safeName": "baz" + }, + "screamingSnakeCase": { + "unsafeName": "BAZ", + "safeName": "BAZ" + }, + "pascalCase": { + "unsafeName": "Baz", + "safeName": "Baz" + } + }, + "wireValue": "baz" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:UndiscriminatedUnion1": { + "type": "undiscriminatedUnion", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1", + "camelCase": { + "unsafeName": "undiscriminatedUnion1", + "safeName": "undiscriminatedUnion1" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1", + "safeName": "undiscriminated_union1" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1", + "safeName": "UNDISCRIMINATED_UNION1" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1", + "safeName": "UndiscriminatedUnion1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "types": [ + { + "type": "named", + "value": "type_:UndiscriminatedUnion1InlineType1" + }, + { + "type": "named", + "value": "type_:UndiscriminatedUnion1InlineType2" + }, + { + "type": "named", + "value": "type_:UndiscriminatedUnion1DiscriminatedUnion1" + }, + { + "type": "named", + "value": "type_:UndiscriminatedUnion1DiscriminatedUnion1" + }, + { + "type": "named", + "value": "type_:UndiscriminatedUnion1InlineEnum1" + }, + { + "type": "named", + "value": "type_:UserId" + }, + { + "type": "list", + "value": { + "type": "named", + "value": "type_:UndiscriminatedUnion1InlineListItem1" + } + }, + { + "type": "set", + "value": { + "type": "named", + "value": "type_:UndiscriminatedUnion1InlineSetItem1" + } + }, + { + "type": "map", + "key": { + "type": "primitive", + "value": "STRING" + }, + "value": { + "type": "named", + "value": "type_:UndiscriminatedUnion1InlineMapItem1" + } + }, + { + "type": "named", + "value": "type_:ReferenceType" + } + ] + }, + "type_:UndiscriminatedUnion1InlineType1": { + "type": "object", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1InlineType1", + "camelCase": { + "unsafeName": "undiscriminatedUnion1InlineType1", + "safeName": "undiscriminatedUnion1InlineType1" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1inline_type1", + "safeName": "undiscriminated_union1inline_type1" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1INLINE_TYPE1", + "safeName": "UNDISCRIMINATED_UNION1INLINE_TYPE1" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1InlineType1", + "safeName": "UndiscriminatedUnion1InlineType1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "bar", + "camelCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "snakeCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "screamingSnakeCase": { + "unsafeName": "BAR", + "safeName": "BAR" + }, + "pascalCase": { + "unsafeName": "Bar", + "safeName": "Bar" + } + }, + "wireValue": "bar" + }, + "typeReference": { + "type": "named", + "value": "type_:UndiscriminatedUnion1InlineType1InlineType1" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:UndiscriminatedUnion1InlineType1InlineType1": { + "type": "object", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1InlineType1InlineType1", + "camelCase": { + "unsafeName": "undiscriminatedUnion1InlineType1InlineType1", + "safeName": "undiscriminatedUnion1InlineType1InlineType1" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1inline_type1inline_type1", + "safeName": "undiscriminated_union1inline_type1inline_type1" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1INLINE_TYPE1INLINE_TYPE1", + "safeName": "UNDISCRIMINATED_UNION1INLINE_TYPE1INLINE_TYPE1" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1InlineType1InlineType1", + "safeName": "UndiscriminatedUnion1InlineType1InlineType1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:UndiscriminatedUnion1InlineType2": { + "type": "object", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1InlineType2", + "camelCase": { + "unsafeName": "undiscriminatedUnion1InlineType2", + "safeName": "undiscriminatedUnion1InlineType2" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1inline_type2", + "safeName": "undiscriminated_union1inline_type2" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1INLINE_TYPE2", + "safeName": "UNDISCRIMINATED_UNION1INLINE_TYPE2" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1InlineType2", + "safeName": "UndiscriminatedUnion1InlineType2" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "baz", + "camelCase": { + "unsafeName": "baz", + "safeName": "baz" + }, + "snakeCase": { + "unsafeName": "baz", + "safeName": "baz" + }, + "screamingSnakeCase": { + "unsafeName": "BAZ", + "safeName": "BAZ" + }, + "pascalCase": { + "unsafeName": "Baz", + "safeName": "Baz" + } + }, + "wireValue": "baz" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:InlineEnum1": { + "type": "enum", + "declaration": { + "name": { + "originalName": "InlineEnum1", + "camelCase": { + "unsafeName": "inlineEnum1", + "safeName": "inlineEnum1" + }, + "snakeCase": { + "unsafeName": "inline_enum1", + "safeName": "inline_enum1" + }, + "screamingSnakeCase": { + "unsafeName": "INLINE_ENUM1", + "safeName": "INLINE_ENUM1" + }, + "pascalCase": { + "unsafeName": "InlineEnum1", + "safeName": "InlineEnum1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "values": [ + { + "name": { + "originalName": "SUNNY", + "camelCase": { + "unsafeName": "sunny", + "safeName": "sunny" + }, + "snakeCase": { + "unsafeName": "sunny", + "safeName": "sunny" + }, + "screamingSnakeCase": { + "unsafeName": "SUNNY", + "safeName": "SUNNY" + }, + "pascalCase": { + "unsafeName": "Sunny", + "safeName": "Sunny" + } + }, + "wireValue": "SUNNY" + }, + { + "name": { + "originalName": "CLOUDY", + "camelCase": { + "unsafeName": "cloudy", + "safeName": "cloudy" + }, + "snakeCase": { + "unsafeName": "cloudy", + "safeName": "cloudy" + }, + "screamingSnakeCase": { + "unsafeName": "CLOUDY", + "safeName": "CLOUDY" + }, + "pascalCase": { + "unsafeName": "Cloudy", + "safeName": "Cloudy" + } + }, + "wireValue": "CLOUDY" + }, + { + "name": { + "originalName": "RAINING", + "camelCase": { + "unsafeName": "raining", + "safeName": "raining" + }, + "snakeCase": { + "unsafeName": "raining", + "safeName": "raining" + }, + "screamingSnakeCase": { + "unsafeName": "RAINING", + "safeName": "RAINING" + }, + "pascalCase": { + "unsafeName": "Raining", + "safeName": "Raining" + } + }, + "wireValue": "RAINING" + }, + { + "name": { + "originalName": "SNOWING", + "camelCase": { + "unsafeName": "snowing", + "safeName": "snowing" + }, + "snakeCase": { + "unsafeName": "snowing", + "safeName": "snowing" + }, + "screamingSnakeCase": { + "unsafeName": "SNOWING", + "safeName": "SNOWING" + }, + "pascalCase": { + "unsafeName": "Snowing", + "safeName": "Snowing" + } + }, + "wireValue": "SNOWING" + } + ] + }, + "type_:UndiscriminatedUnion1DiscriminatedUnion1": { + "type": "discriminatedUnion", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1DiscriminatedUnion1", + "camelCase": { + "unsafeName": "undiscriminatedUnion1DiscriminatedUnion1", + "safeName": "undiscriminatedUnion1DiscriminatedUnion1" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1discriminated_union1", + "safeName": "undiscriminated_union1discriminated_union1" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1DISCRIMINATED_UNION1", + "safeName": "UNDISCRIMINATED_UNION1DISCRIMINATED_UNION1" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1DiscriminatedUnion1", + "safeName": "UndiscriminatedUnion1DiscriminatedUnion1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "discriminant": { + "name": { + "originalName": "type", + "camelCase": { + "unsafeName": "type", + "safeName": "type" + }, + "snakeCase": { + "unsafeName": "type", + "safeName": "type" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE", + "safeName": "TYPE" + }, + "pascalCase": { + "unsafeName": "Type", + "safeName": "Type" + } + }, + "wireValue": "type" + }, + "types": { + "type1": { + "type": "samePropertiesAsObject", + "typeId": "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType1", + "discriminantValue": { + "name": { + "originalName": "type1", + "camelCase": { + "unsafeName": "type1", + "safeName": "type1" + }, + "snakeCase": { + "unsafeName": "type1", + "safeName": "type1" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE1", + "safeName": "TYPE1" + }, + "pascalCase": { + "unsafeName": "Type1", + "safeName": "Type1" + } + }, + "wireValue": "type1" + }, + "properties": [] + }, + "type2": { + "type": "samePropertiesAsObject", + "typeId": "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType2", + "discriminantValue": { + "name": { + "originalName": "type2", + "camelCase": { + "unsafeName": "type2", + "safeName": "type2" + }, + "snakeCase": { + "unsafeName": "type2", + "safeName": "type2" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE2", + "safeName": "TYPE2" + }, + "pascalCase": { + "unsafeName": "Type2", + "safeName": "Type2" + } + }, + "wireValue": "type2" + }, + "properties": [] + }, + "ref": { + "type": "samePropertiesAsObject", + "typeId": "type_:ReferenceType", + "discriminantValue": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "properties": [] + } + } + }, + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType1": { + "type": "object", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1DiscriminatedUnion1InlineType1", + "camelCase": { + "unsafeName": "undiscriminatedUnion1DiscriminatedUnion1InlineType1", + "safeName": "undiscriminatedUnion1DiscriminatedUnion1InlineType1" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1discriminated_union1inline_type1", + "safeName": "undiscriminated_union1discriminated_union1inline_type1" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1DISCRIMINATED_UNION1INLINE_TYPE1", + "safeName": "UNDISCRIMINATED_UNION1DISCRIMINATED_UNION1INLINE_TYPE1" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1DiscriminatedUnion1InlineType1", + "safeName": "UndiscriminatedUnion1DiscriminatedUnion1InlineType1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "bar", + "camelCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "snakeCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "screamingSnakeCase": { + "unsafeName": "BAR", + "safeName": "BAR" + }, + "pascalCase": { + "unsafeName": "Bar", + "safeName": "Bar" + } + }, + "wireValue": "bar" + }, + "typeReference": { + "type": "named", + "value": "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1": { + "type": "object", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1", + "camelCase": { + "unsafeName": "undiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1", + "safeName": "undiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1discriminated_union1inline_type1inline_type1", + "safeName": "undiscriminated_union1discriminated_union1inline_type1inline_type1" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1DISCRIMINATED_UNION1INLINE_TYPE1INLINE_TYPE1", + "safeName": "UNDISCRIMINATED_UNION1DISCRIMINATED_UNION1INLINE_TYPE1INLINE_TYPE1" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1", + "safeName": "UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType2": { + "type": "object", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1DiscriminatedUnion1InlineType2", + "camelCase": { + "unsafeName": "undiscriminatedUnion1DiscriminatedUnion1InlineType2", + "safeName": "undiscriminatedUnion1DiscriminatedUnion1InlineType2" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1discriminated_union1inline_type2", + "safeName": "undiscriminated_union1discriminated_union1inline_type2" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1DISCRIMINATED_UNION1INLINE_TYPE2", + "safeName": "UNDISCRIMINATED_UNION1DISCRIMINATED_UNION1INLINE_TYPE2" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1DiscriminatedUnion1InlineType2", + "safeName": "UndiscriminatedUnion1DiscriminatedUnion1InlineType2" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "baz", + "camelCase": { + "unsafeName": "baz", + "safeName": "baz" + }, + "snakeCase": { + "unsafeName": "baz", + "safeName": "baz" + }, + "screamingSnakeCase": { + "unsafeName": "BAZ", + "safeName": "BAZ" + }, + "pascalCase": { + "unsafeName": "Baz", + "safeName": "Baz" + } + }, + "wireValue": "baz" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:UndiscriminatedUnion1InlineEnum1": { + "type": "enum", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1InlineEnum1", + "camelCase": { + "unsafeName": "undiscriminatedUnion1InlineEnum1", + "safeName": "undiscriminatedUnion1InlineEnum1" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1inline_enum1", + "safeName": "undiscriminated_union1inline_enum1" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1INLINE_ENUM1", + "safeName": "UNDISCRIMINATED_UNION1INLINE_ENUM1" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1InlineEnum1", + "safeName": "UndiscriminatedUnion1InlineEnum1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "values": [ + { + "name": { + "originalName": "SUNNY", + "camelCase": { + "unsafeName": "sunny", + "safeName": "sunny" + }, + "snakeCase": { + "unsafeName": "sunny", + "safeName": "sunny" + }, + "screamingSnakeCase": { + "unsafeName": "SUNNY", + "safeName": "SUNNY" + }, + "pascalCase": { + "unsafeName": "Sunny", + "safeName": "Sunny" + } + }, + "wireValue": "SUNNY" + }, + { + "name": { + "originalName": "CLOUDY", + "camelCase": { + "unsafeName": "cloudy", + "safeName": "cloudy" + }, + "snakeCase": { + "unsafeName": "cloudy", + "safeName": "cloudy" + }, + "screamingSnakeCase": { + "unsafeName": "CLOUDY", + "safeName": "CLOUDY" + }, + "pascalCase": { + "unsafeName": "Cloudy", + "safeName": "Cloudy" + } + }, + "wireValue": "CLOUDY" + }, + { + "name": { + "originalName": "RAINING", + "camelCase": { + "unsafeName": "raining", + "safeName": "raining" + }, + "snakeCase": { + "unsafeName": "raining", + "safeName": "raining" + }, + "screamingSnakeCase": { + "unsafeName": "RAINING", + "safeName": "RAINING" + }, + "pascalCase": { + "unsafeName": "Raining", + "safeName": "Raining" + } + }, + "wireValue": "RAINING" + }, + { + "name": { + "originalName": "SNOWING", + "camelCase": { + "unsafeName": "snowing", + "safeName": "snowing" + }, + "snakeCase": { + "unsafeName": "snowing", + "safeName": "snowing" + }, + "screamingSnakeCase": { + "unsafeName": "SNOWING", + "safeName": "SNOWING" + }, + "pascalCase": { + "unsafeName": "Snowing", + "safeName": "Snowing" + } + }, + "wireValue": "SNOWING" + } + ] + }, + "type_:UserId": { + "type": "alias", + "declaration": { + "name": { + "originalName": "UserId", + "camelCase": { + "unsafeName": "userID", + "safeName": "userID" + }, + "snakeCase": { + "unsafeName": "user_id", + "safeName": "user_id" + }, + "screamingSnakeCase": { + "unsafeName": "USER_ID", + "safeName": "USER_ID" + }, + "pascalCase": { + "unsafeName": "UserID", + "safeName": "UserID" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + "type_:UndiscriminatedUnion1InlineListItem1": { + "type": "object", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1InlineListItem1", + "camelCase": { + "unsafeName": "undiscriminatedUnion1InlineListItem1", + "safeName": "undiscriminatedUnion1InlineListItem1" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1inline_list_item1", + "safeName": "undiscriminated_union1inline_list_item1" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1INLINE_LIST_ITEM1", + "safeName": "UNDISCRIMINATED_UNION1INLINE_LIST_ITEM1" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1InlineListItem1", + "safeName": "UndiscriminatedUnion1InlineListItem1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:UndiscriminatedUnion1InlineSetItem1": { + "type": "object", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1InlineSetItem1", + "camelCase": { + "unsafeName": "undiscriminatedUnion1InlineSetItem1", + "safeName": "undiscriminatedUnion1InlineSetItem1" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1inline_set_item1", + "safeName": "undiscriminated_union1inline_set_item1" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1INLINE_SET_ITEM1", + "safeName": "UNDISCRIMINATED_UNION1INLINE_SET_ITEM1" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1InlineSetItem1", + "safeName": "UndiscriminatedUnion1InlineSetItem1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:UndiscriminatedUnion1InlineMapItem1": { + "type": "object", + "declaration": { + "name": { + "originalName": "UndiscriminatedUnion1InlineMapItem1", + "camelCase": { + "unsafeName": "undiscriminatedUnion1InlineMapItem1", + "safeName": "undiscriminatedUnion1InlineMapItem1" + }, + "snakeCase": { + "unsafeName": "undiscriminated_union1inline_map_item1", + "safeName": "undiscriminated_union1inline_map_item1" + }, + "screamingSnakeCase": { + "unsafeName": "UNDISCRIMINATED_UNION1INLINE_MAP_ITEM1", + "safeName": "UNDISCRIMINATED_UNION1INLINE_MAP_ITEM1" + }, + "pascalCase": { + "unsafeName": "UndiscriminatedUnion1InlineMapItem1", + "safeName": "UndiscriminatedUnion1InlineMapItem1" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + }, + { + "name": { + "name": { + "originalName": "ref", + "camelCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "snakeCase": { + "unsafeName": "ref", + "safeName": "ref" + }, + "screamingSnakeCase": { + "unsafeName": "REF", + "safeName": "REF" + }, + "pascalCase": { + "unsafeName": "Ref", + "safeName": "Ref" + } + }, + "wireValue": "ref" + }, + "typeReference": { + "type": "named", + "value": "type_:ReferenceType" + } + } + ] + }, + "type_:ReferenceType": { + "type": "object", + "declaration": { + "name": { + "originalName": "ReferenceType", + "camelCase": { + "unsafeName": "referenceType", + "safeName": "referenceType" + }, + "snakeCase": { + "unsafeName": "reference_type", + "safeName": "reference_type" + }, + "screamingSnakeCase": { + "unsafeName": "REFERENCE_TYPE", + "safeName": "REFERENCE_TYPE" + }, + "pascalCase": { + "unsafeName": "ReferenceType", + "safeName": "ReferenceType" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "properties": [ + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + } + ] + } + }, + "headers": [], + "endpoints": { + "endpoint_.getRoot": { + "auth": null, + "declaration": { + "name": { + "originalName": "getRoot", + "camelCase": { + "unsafeName": "getRoot", + "safeName": "getRoot" + }, + "snakeCase": { + "unsafeName": "get_root", + "safeName": "get_root" + }, + "screamingSnakeCase": { + "unsafeName": "GET_ROOT", + "safeName": "GET_ROOT" + }, + "pascalCase": { + "unsafeName": "GetRoot", + "safeName": "GetRoot" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "location": { + "method": "POST", + "path": "/root/root" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "PostRootRequest", + "camelCase": { + "unsafeName": "postRootRequest", + "safeName": "postRootRequest" + }, + "snakeCase": { + "unsafeName": "post_root_request", + "safeName": "post_root_request" + }, + "screamingSnakeCase": { + "unsafeName": "POST_ROOT_REQUEST", + "safeName": "POST_ROOT_REQUEST" + }, + "pascalCase": { + "unsafeName": "PostRootRequest", + "safeName": "PostRootRequest" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "body": { + "type": "properties", + "value": [ + { + "name": { + "name": { + "originalName": "bar", + "camelCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "snakeCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "screamingSnakeCase": { + "unsafeName": "BAR", + "safeName": "BAR" + }, + "pascalCase": { + "unsafeName": "Bar", + "safeName": "Bar" + } + }, + "wireValue": "bar" + }, + "typeReference": { + "type": "named", + "value": "type_:RequestTypeInlineType1" + } + }, + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + } + ] + }, + "metadata": { + "includePathParameters": false, + "onlyPathParameters": false + } + }, + "response": { + "type": "json" + } + }, + "endpoint_.getDiscriminatedUnion": { + "auth": null, + "declaration": { + "name": { + "originalName": "getDiscriminatedUnion", + "camelCase": { + "unsafeName": "getDiscriminatedUnion", + "safeName": "getDiscriminatedUnion" + }, + "snakeCase": { + "unsafeName": "get_discriminated_union", + "safeName": "get_discriminated_union" + }, + "screamingSnakeCase": { + "unsafeName": "GET_DISCRIMINATED_UNION", + "safeName": "GET_DISCRIMINATED_UNION" + }, + "pascalCase": { + "unsafeName": "GetDiscriminatedUnion", + "safeName": "GetDiscriminatedUnion" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "location": { + "method": "POST", + "path": "/root/discriminated-union" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "GetDiscriminatedUnionRequest", + "camelCase": { + "unsafeName": "getDiscriminatedUnionRequest", + "safeName": "getDiscriminatedUnionRequest" + }, + "snakeCase": { + "unsafeName": "get_discriminated_union_request", + "safeName": "get_discriminated_union_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_DISCRIMINATED_UNION_REQUEST", + "safeName": "GET_DISCRIMINATED_UNION_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetDiscriminatedUnionRequest", + "safeName": "GetDiscriminatedUnionRequest" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "body": { + "type": "properties", + "value": [ + { + "name": { + "name": { + "originalName": "bar", + "camelCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "snakeCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "screamingSnakeCase": { + "unsafeName": "BAR", + "safeName": "BAR" + }, + "pascalCase": { + "unsafeName": "Bar", + "safeName": "Bar" + } + }, + "wireValue": "bar" + }, + "typeReference": { + "type": "named", + "value": "type_:DiscriminatedUnion1" + } + }, + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + } + ] + }, + "metadata": { + "includePathParameters": false, + "onlyPathParameters": false + } + }, + "response": { + "type": "json" + } + }, + "endpoint_.getUndiscriminatedUnion": { + "auth": null, + "declaration": { + "name": { + "originalName": "getUndiscriminatedUnion", + "camelCase": { + "unsafeName": "getUndiscriminatedUnion", + "safeName": "getUndiscriminatedUnion" + }, + "snakeCase": { + "unsafeName": "get_undiscriminated_union", + "safeName": "get_undiscriminated_union" + }, + "screamingSnakeCase": { + "unsafeName": "GET_UNDISCRIMINATED_UNION", + "safeName": "GET_UNDISCRIMINATED_UNION" + }, + "pascalCase": { + "unsafeName": "GetUndiscriminatedUnion", + "safeName": "GetUndiscriminatedUnion" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "location": { + "method": "POST", + "path": "/root/undiscriminated-union" + }, + "request": { + "type": "inlined", + "declaration": { + "name": { + "originalName": "GetUndiscriminatedUnionRequest", + "camelCase": { + "unsafeName": "getUndiscriminatedUnionRequest", + "safeName": "getUndiscriminatedUnionRequest" + }, + "snakeCase": { + "unsafeName": "get_undiscriminated_union_request", + "safeName": "get_undiscriminated_union_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_UNDISCRIMINATED_UNION_REQUEST", + "safeName": "GET_UNDISCRIMINATED_UNION_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetUndiscriminatedUnionRequest", + "safeName": "GetUndiscriminatedUnionRequest" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [], + "file": null + } + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "body": { + "type": "properties", + "value": [ + { + "name": { + "name": { + "originalName": "bar", + "camelCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "snakeCase": { + "unsafeName": "bar", + "safeName": "bar" + }, + "screamingSnakeCase": { + "unsafeName": "BAR", + "safeName": "BAR" + }, + "pascalCase": { + "unsafeName": "Bar", + "safeName": "Bar" + } + }, + "wireValue": "bar" + }, + "typeReference": { + "type": "named", + "value": "type_:UndiscriminatedUnion1" + } + }, + { + "name": { + "name": { + "originalName": "foo", + "camelCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "snakeCase": { + "unsafeName": "foo", + "safeName": "foo" + }, + "screamingSnakeCase": { + "unsafeName": "FOO", + "safeName": "FOO" + }, + "pascalCase": { + "unsafeName": "Foo", + "safeName": "Foo" + } + }, + "wireValue": "foo" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + } + } + ] + }, + "metadata": { + "includePathParameters": false, + "onlyPathParameters": false + } + }, + "response": { + "type": "json" + } + } + }, + "environments": null +} \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/undiscriminated-unions.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/undiscriminated-unions.json index 2befe8304a5..d736cfb76f8 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/undiscriminated-unions.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/undiscriminated-unions.json @@ -647,5 +647,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/unions.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/unions.json index b18d1424d4a..76f7e5f3b62 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/unions.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/unions.json @@ -2504,5 +2504,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/unknown.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/unknown.json index 23d6aa2a8d3..ce3db35df41 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/unknown.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/unknown.json @@ -339,5 +339,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/validation.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/validation.json index 583f0abec23..91d6c5cb33b 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/validation.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/validation.json @@ -756,5 +756,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/variables.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/variables.json index 5a1b91b9a7f..124d368a128 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/variables.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/variables.json @@ -111,5 +111,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/version-no-default.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/version-no-default.json index 4b63ff3864c..6dbf48a612c 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/version-no-default.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/version-no-default.json @@ -308,5 +308,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/version.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/version.json index 4b63ff3864c..6dbf48a612c 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/version.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/version.json @@ -308,5 +308,6 @@ "type": "json" } } - } + }, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/websocket.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/websocket.json index 9b5b435bd08..6fdf0c0440a 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/websocket.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/websocket.json @@ -2,5 +2,6 @@ "version": "1.0.0", "types": {}, "headers": [], - "endpoints": {} + "endpoints": {}, + "environments": null } \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/audiences.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/audiences.json index ebab16cb0fc..d3f450a626c 100644 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/audiences.json +++ b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/audiences.json @@ -1732,6 +1732,38 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": null, + "environments": { + "type": "singleBaseUrl", + "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": "https://www.yoursite.com", + "docs": null + } + ] + } } }, "subpackages": { diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/availability.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/availability.json index 1fa0c0e9355..3e24f0ddfc3 100644 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/availability.json +++ b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/availability.json @@ -830,7 +830,8 @@ "type": "json" } } - } + }, + "environments": null }, "subpackages": { "subpackage_service": { diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/docs.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/docs.json index d42a883db4f..2055787cc57 100644 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/docs.json +++ b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/docs.json @@ -1050,7 +1050,8 @@ "type": "json" } } - } + }, + "environments": null }, "subpackages": { "subpackage_service": { diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiences.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiences.json index 9bf83d69b61..6b895f0a604 100644 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiences.json +++ b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiences.json @@ -5583,6 +5583,62 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": null, + "environments": { + "type": "singleBaseUrl", + "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": "https://www.yoursite.com", + "docs": null + }, + { + "id": "Staging", + "name": { + "originalName": "Staging", + "camelCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "snakeCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "screamingSnakeCase": { + "unsafeName": "STAGING", + "safeName": "STAGING" + }, + "pascalCase": { + "unsafeName": "Staging", + "safeName": "Staging" + } + }, + "url": "https://www.staging.yoursite.com", + "docs": "This staging environment is helpful for testing!" + } + ] + } } }, "subpackages": { diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiencesAllHack.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiencesAllHack.json index c43ca5d5e30..df49eff4ff5 100644 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiencesAllHack.json +++ b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiencesAllHack.json @@ -4376,6 +4376,62 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": null, + "environments": { + "type": "singleBaseUrl", + "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": "https://www.yoursite.com", + "docs": null + }, + { + "id": "Staging", + "name": { + "originalName": "Staging", + "camelCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "snakeCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "screamingSnakeCase": { + "unsafeName": "STAGING", + "safeName": "STAGING" + }, + "pascalCase": { + "unsafeName": "Staging", + "safeName": "Staging" + } + }, + "url": "https://www.staging.yoursite.com", + "docs": null + } + ] + } } }, "subpackages": { diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiencesSelectHack.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiencesSelectHack.json index 0fa1df7a63a..2e29198eb07 100644 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiencesSelectHack.json +++ b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/environmentAudiencesSelectHack.json @@ -1756,6 +1756,62 @@ "type": "json" } } + }, + "environments": { + "defaultEnvironment": null, + "environments": { + "type": "singleBaseUrl", + "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": "https://www.yoursite.com", + "docs": null + }, + { + "id": "Staging", + "name": { + "originalName": "Staging", + "camelCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "snakeCase": { + "unsafeName": "staging", + "safeName": "staging" + }, + "screamingSnakeCase": { + "unsafeName": "STAGING", + "safeName": "STAGING" + }, + "pascalCase": { + "unsafeName": "Staging", + "safeName": "Staging" + } + }, + "url": "https://www.staging.yoursite.com", + "docs": null + } + ] + } } }, "subpackages": { diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/generics.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/generics.json index bd4236ed49d..c8645de04a8 100644 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/generics.json +++ b/packages/cli/generation/ir-generator-tests/src/ir/__test__/irs/generics.json @@ -2941,7 +2941,8 @@ } }, "headers": [], - "endpoints": {} + "endpoints": {}, + "environments": null }, "subpackages": { "subpackage_imdb": { diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/inline-types.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/inline-types.json deleted file mode 100644 index 47a24189178..00000000000 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/inline-types.json +++ /dev/null @@ -1,3316 +0,0 @@ -{ - "fdrApiDefinitionId": null, - "apiVersion": null, - "apiName": { - "originalName": "object", - "camelCase": { - "unsafeName": "object", - "safeName": "object" - }, - "snakeCase": { - "unsafeName": "object", - "safeName": "object" - }, - "screamingSnakeCase": { - "unsafeName": "OBJECT", - "safeName": "OBJECT" - }, - "pascalCase": { - "unsafeName": "Object", - "safeName": "Object" - } - }, - "apiDisplayName": null, - "apiDocs": null, - "auth": { - "requirement": "ALL", - "schemes": [], - "docs": null - }, - "headers": [], - "idempotencyHeaders": [], - "types": { - "type_:RootType1": { - "inline": null, - "name": { - "name": { - "originalName": "RootType1", - "camelCase": { - "unsafeName": "rootType1", - "safeName": "rootType1" - }, - "snakeCase": { - "unsafeName": "root_type1", - "safeName": "root_type1" - }, - "screamingSnakeCase": { - "unsafeName": "ROOT_TYPE1", - "safeName": "ROOT_TYPE1" - }, - "pascalCase": { - "unsafeName": "RootType1", - "safeName": "RootType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:RootType1" - }, - "shape": { - "_type": "object", - "extends": [], - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "valueType": { - "_type": "primitive", - "primitive": { - "v1": "STRING", - "v2": { - "type": "string", - "default": null, - "validation": null - } - } - }, - "availability": null, - "docs": null - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "valueType": { - "_type": "named", - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1", - "default": null, - "inline": null - }, - "availability": null, - "docs": null - } - ], - "extra-properties": false, - "extendedProperties": [] - }, - "referencedTypes": [ - "type_:InlineType1", - "type_:NestedInlineType1", - "type_:InlineEnum" - ], - "encoding": { - "json": {}, - "proto": null - }, - "source": null, - "userProvidedExamples": [], - "autogeneratedExamples": [], - "availability": null, - "docs": null - }, - "type_:InlineType1": { - "inline": true, - "name": { - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1" - }, - "shape": { - "_type": "object", - "extends": [], - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "valueType": { - "_type": "primitive", - "primitive": { - "v1": "STRING", - "v2": { - "type": "string", - "default": null, - "validation": null - } - } - }, - "availability": null, - "docs": null - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "valueType": { - "_type": "named", - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:NestedInlineType1", - "default": null, - "inline": null - }, - "availability": null, - "docs": null - } - ], - "extra-properties": false, - "extendedProperties": [] - }, - "referencedTypes": [ - "type_:NestedInlineType1", - "type_:InlineEnum" - ], - "encoding": { - "json": {}, - "proto": null - }, - "source": null, - "userProvidedExamples": [], - "autogeneratedExamples": [], - "availability": null, - "docs": null - }, - "type_:InlineType2": { - "inline": true, - "name": { - "name": { - "originalName": "InlineType2", - "camelCase": { - "unsafeName": "inlineType2", - "safeName": "inlineType2" - }, - "snakeCase": { - "unsafeName": "inline_type2", - "safeName": "inline_type2" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE2", - "safeName": "INLINE_TYPE2" - }, - "pascalCase": { - "unsafeName": "InlineType2", - "safeName": "InlineType2" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType2" - }, - "shape": { - "_type": "object", - "extends": [], - "properties": [ - { - "name": { - "name": { - "originalName": "baz", - "camelCase": { - "unsafeName": "baz", - "safeName": "baz" - }, - "snakeCase": { - "unsafeName": "baz", - "safeName": "baz" - }, - "screamingSnakeCase": { - "unsafeName": "BAZ", - "safeName": "BAZ" - }, - "pascalCase": { - "unsafeName": "Baz", - "safeName": "Baz" - } - }, - "wireValue": "baz" - }, - "valueType": { - "_type": "primitive", - "primitive": { - "v1": "STRING", - "v2": { - "type": "string", - "default": null, - "validation": null - } - } - }, - "availability": null, - "docs": null - } - ], - "extra-properties": false, - "extendedProperties": [] - }, - "referencedTypes": [], - "encoding": { - "json": {}, - "proto": null - }, - "source": null, - "userProvidedExamples": [], - "autogeneratedExamples": [], - "availability": null, - "docs": null - }, - "type_:NestedInlineType1": { - "inline": true, - "name": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:NestedInlineType1" - }, - "shape": { - "_type": "object", - "extends": [], - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "valueType": { - "_type": "primitive", - "primitive": { - "v1": "STRING", - "v2": { - "type": "string", - "default": null, - "validation": null - } - } - }, - "availability": null, - "docs": null - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "valueType": { - "_type": "primitive", - "primitive": { - "v1": "STRING", - "v2": { - "type": "string", - "default": null, - "validation": null - } - } - }, - "availability": null, - "docs": null - }, - { - "name": { - "name": { - "originalName": "myEnum", - "camelCase": { - "unsafeName": "myEnum", - "safeName": "myEnum" - }, - "snakeCase": { - "unsafeName": "my_enum", - "safeName": "my_enum" - }, - "screamingSnakeCase": { - "unsafeName": "MY_ENUM", - "safeName": "MY_ENUM" - }, - "pascalCase": { - "unsafeName": "MyEnum", - "safeName": "MyEnum" - } - }, - "wireValue": "myEnum" - }, - "valueType": { - "_type": "named", - "name": { - "originalName": "InlineEnum", - "camelCase": { - "unsafeName": "inlineEnum", - "safeName": "inlineEnum" - }, - "snakeCase": { - "unsafeName": "inline_enum", - "safeName": "inline_enum" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_ENUM", - "safeName": "INLINE_ENUM" - }, - "pascalCase": { - "unsafeName": "InlineEnum", - "safeName": "InlineEnum" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineEnum", - "default": null, - "inline": null - }, - "availability": null, - "docs": null - } - ], - "extra-properties": false, - "extendedProperties": [] - }, - "referencedTypes": [ - "type_:InlineEnum" - ], - "encoding": { - "json": {}, - "proto": null - }, - "source": null, - "userProvidedExamples": [], - "autogeneratedExamples": [], - "availability": null, - "docs": null - }, - "type_:InlinedDiscriminatedUnion1": { - "inline": true, - "name": { - "name": { - "originalName": "InlinedDiscriminatedUnion1", - "camelCase": { - "unsafeName": "inlinedDiscriminatedUnion1", - "safeName": "inlinedDiscriminatedUnion1" - }, - "snakeCase": { - "unsafeName": "inlined_discriminated_union1", - "safeName": "inlined_discriminated_union1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINED_DISCRIMINATED_UNION1", - "safeName": "INLINED_DISCRIMINATED_UNION1" - }, - "pascalCase": { - "unsafeName": "InlinedDiscriminatedUnion1", - "safeName": "InlinedDiscriminatedUnion1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlinedDiscriminatedUnion1" - }, - "shape": { - "_type": "union", - "discriminant": { - "name": { - "originalName": "type", - "camelCase": { - "unsafeName": "type", - "safeName": "type" - }, - "snakeCase": { - "unsafeName": "type", - "safeName": "type" - }, - "screamingSnakeCase": { - "unsafeName": "TYPE", - "safeName": "TYPE" - }, - "pascalCase": { - "unsafeName": "Type", - "safeName": "Type" - } - }, - "wireValue": "type" - }, - "extends": [], - "baseProperties": [], - "types": [ - { - "discriminantValue": { - "name": { - "originalName": "type1", - "camelCase": { - "unsafeName": "type1", - "safeName": "type1" - }, - "snakeCase": { - "unsafeName": "type1", - "safeName": "type1" - }, - "screamingSnakeCase": { - "unsafeName": "TYPE1", - "safeName": "TYPE1" - }, - "pascalCase": { - "unsafeName": "Type1", - "safeName": "Type1" - } - }, - "wireValue": "type1" - }, - "shape": { - "_type": "samePropertiesAsObject", - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1" - }, - "displayName": null, - "availability": null, - "docs": null - }, - { - "discriminantValue": { - "name": { - "originalName": "type2", - "camelCase": { - "unsafeName": "type2", - "safeName": "type2" - }, - "snakeCase": { - "unsafeName": "type2", - "safeName": "type2" - }, - "screamingSnakeCase": { - "unsafeName": "TYPE2", - "safeName": "TYPE2" - }, - "pascalCase": { - "unsafeName": "Type2", - "safeName": "Type2" - } - }, - "wireValue": "type2" - }, - "shape": { - "_type": "samePropertiesAsObject", - "name": { - "originalName": "InlineType2", - "camelCase": { - "unsafeName": "inlineType2", - "safeName": "inlineType2" - }, - "snakeCase": { - "unsafeName": "inline_type2", - "safeName": "inline_type2" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE2", - "safeName": "INLINE_TYPE2" - }, - "pascalCase": { - "unsafeName": "InlineType2", - "safeName": "InlineType2" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType2" - }, - "displayName": null, - "availability": null, - "docs": null - } - ] - }, - "referencedTypes": [ - "type_:InlineType1", - "type_:NestedInlineType1", - "type_:InlineEnum", - "type_:InlineType2" - ], - "encoding": { - "json": {}, - "proto": null - }, - "source": null, - "userProvidedExamples": [], - "autogeneratedExamples": [], - "availability": null, - "docs": null - }, - "type_:InlinedUndiscriminatedUnion1": { - "inline": true, - "name": { - "name": { - "originalName": "InlinedUndiscriminatedUnion1", - "camelCase": { - "unsafeName": "inlinedUndiscriminatedUnion1", - "safeName": "inlinedUndiscriminatedUnion1" - }, - "snakeCase": { - "unsafeName": "inlined_undiscriminated_union1", - "safeName": "inlined_undiscriminated_union1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINED_UNDISCRIMINATED_UNION1", - "safeName": "INLINED_UNDISCRIMINATED_UNION1" - }, - "pascalCase": { - "unsafeName": "InlinedUndiscriminatedUnion1", - "safeName": "InlinedUndiscriminatedUnion1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlinedUndiscriminatedUnion1" - }, - "shape": { - "_type": "undiscriminatedUnion", - "members": [ - { - "type": { - "_type": "named", - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1", - "default": null, - "inline": null - }, - "docs": null - }, - { - "type": { - "_type": "named", - "name": { - "originalName": "InlineType2", - "camelCase": { - "unsafeName": "inlineType2", - "safeName": "inlineType2" - }, - "snakeCase": { - "unsafeName": "inline_type2", - "safeName": "inline_type2" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE2", - "safeName": "INLINE_TYPE2" - }, - "pascalCase": { - "unsafeName": "InlineType2", - "safeName": "InlineType2" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType2", - "default": null, - "inline": null - }, - "docs": null - } - ] - }, - "referencedTypes": [ - "type_:InlineType1", - "type_:NestedInlineType1", - "type_:InlineEnum", - "type_:InlineType2" - ], - "encoding": { - "json": {}, - "proto": null - }, - "source": null, - "userProvidedExamples": [], - "autogeneratedExamples": [], - "availability": null, - "docs": null - }, - "type_:InlineEnum": { - "inline": true, - "name": { - "name": { - "originalName": "InlineEnum", - "camelCase": { - "unsafeName": "inlineEnum", - "safeName": "inlineEnum" - }, - "snakeCase": { - "unsafeName": "inline_enum", - "safeName": "inline_enum" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_ENUM", - "safeName": "INLINE_ENUM" - }, - "pascalCase": { - "unsafeName": "InlineEnum", - "safeName": "InlineEnum" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineEnum" - }, - "shape": { - "_type": "enum", - "default": null, - "values": [ - { - "name": { - "name": { - "originalName": "SUNNY", - "camelCase": { - "unsafeName": "sunny", - "safeName": "sunny" - }, - "snakeCase": { - "unsafeName": "sunny", - "safeName": "sunny" - }, - "screamingSnakeCase": { - "unsafeName": "SUNNY", - "safeName": "SUNNY" - }, - "pascalCase": { - "unsafeName": "Sunny", - "safeName": "Sunny" - } - }, - "wireValue": "SUNNY" - }, - "availability": null, - "docs": null - }, - { - "name": { - "name": { - "originalName": "CLOUDY", - "camelCase": { - "unsafeName": "cloudy", - "safeName": "cloudy" - }, - "snakeCase": { - "unsafeName": "cloudy", - "safeName": "cloudy" - }, - "screamingSnakeCase": { - "unsafeName": "CLOUDY", - "safeName": "CLOUDY" - }, - "pascalCase": { - "unsafeName": "Cloudy", - "safeName": "Cloudy" - } - }, - "wireValue": "CLOUDY" - }, - "availability": null, - "docs": null - }, - { - "name": { - "name": { - "originalName": "RAINING", - "camelCase": { - "unsafeName": "raining", - "safeName": "raining" - }, - "snakeCase": { - "unsafeName": "raining", - "safeName": "raining" - }, - "screamingSnakeCase": { - "unsafeName": "RAINING", - "safeName": "RAINING" - }, - "pascalCase": { - "unsafeName": "Raining", - "safeName": "Raining" - } - }, - "wireValue": "RAINING" - }, - "availability": null, - "docs": null - }, - { - "name": { - "name": { - "originalName": "SNOWING", - "camelCase": { - "unsafeName": "snowing", - "safeName": "snowing" - }, - "snakeCase": { - "unsafeName": "snowing", - "safeName": "snowing" - }, - "screamingSnakeCase": { - "unsafeName": "SNOWING", - "safeName": "SNOWING" - }, - "pascalCase": { - "unsafeName": "Snowing", - "safeName": "Snowing" - } - }, - "wireValue": "SNOWING" - }, - "availability": null, - "docs": null - } - ] - }, - "referencedTypes": [], - "encoding": { - "json": {}, - "proto": null - }, - "source": null, - "userProvidedExamples": [], - "autogeneratedExamples": [], - "availability": null, - "docs": null - } - }, - "errors": {}, - "services": { - "service_": { - "availability": null, - "name": { - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "displayName": null, - "basePath": { - "head": "/root", - "parts": [] - }, - "headers": [], - "pathParameters": [], - "encoding": { - "json": {}, - "proto": null - }, - "transport": { - "type": "http" - }, - "endpoints": [ - { - "id": "endpoint_.getRoot", - "name": { - "originalName": "getRoot", - "camelCase": { - "unsafeName": "getRoot", - "safeName": "getRoot" - }, - "snakeCase": { - "unsafeName": "get_root", - "safeName": "get_root" - }, - "screamingSnakeCase": { - "unsafeName": "GET_ROOT", - "safeName": "GET_ROOT" - }, - "pascalCase": { - "unsafeName": "GetRoot", - "safeName": "GetRoot" - } - }, - "displayName": null, - "auth": false, - "idempotent": false, - "baseUrl": null, - "method": "POST", - "basePath": null, - "path": { - "head": "/root", - "parts": [] - }, - "fullPath": { - "head": "/root/root", - "parts": [] - }, - "pathParameters": [], - "allPathParameters": [], - "queryParameters": [], - "headers": [], - "requestBody": { - "type": "inlinedRequestBody", - "name": { - "originalName": "PostRootRequest", - "camelCase": { - "unsafeName": "postRootRequest", - "safeName": "postRootRequest" - }, - "snakeCase": { - "unsafeName": "post_root_request", - "safeName": "post_root_request" - }, - "screamingSnakeCase": { - "unsafeName": "POST_ROOT_REQUEST", - "safeName": "POST_ROOT_REQUEST" - }, - "pascalCase": { - "unsafeName": "PostRootRequest", - "safeName": "PostRootRequest" - } - }, - "extends": [], - "contentType": "application/json", - "properties": [ - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "valueType": { - "_type": "named", - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1", - "default": null, - "inline": null - }, - "availability": null, - "docs": null - }, - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "valueType": { - "_type": "primitive", - "primitive": { - "v1": "STRING", - "v2": { - "type": "string", - "default": null, - "validation": null - } - } - }, - "availability": null, - "docs": null - } - ], - "extra-properties": false, - "extendedProperties": [], - "docs": null - }, - "sdkRequest": { - "shape": { - "type": "wrapper", - "wrapperName": { - "originalName": "PostRootRequest", - "camelCase": { - "unsafeName": "postRootRequest", - "safeName": "postRootRequest" - }, - "snakeCase": { - "unsafeName": "post_root_request", - "safeName": "post_root_request" - }, - "screamingSnakeCase": { - "unsafeName": "POST_ROOT_REQUEST", - "safeName": "POST_ROOT_REQUEST" - }, - "pascalCase": { - "unsafeName": "PostRootRequest", - "safeName": "PostRootRequest" - } - }, - "bodyKey": { - "originalName": "body", - "camelCase": { - "unsafeName": "body", - "safeName": "body" - }, - "snakeCase": { - "unsafeName": "body", - "safeName": "body" - }, - "screamingSnakeCase": { - "unsafeName": "BODY", - "safeName": "BODY" - }, - "pascalCase": { - "unsafeName": "Body", - "safeName": "Body" - } - }, - "includePathParameters": false, - "onlyPathParameters": false - }, - "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": "RootType1", - "camelCase": { - "unsafeName": "rootType1", - "safeName": "rootType1" - }, - "snakeCase": { - "unsafeName": "root_type1", - "safeName": "root_type1" - }, - "screamingSnakeCase": { - "unsafeName": "ROOT_TYPE1", - "safeName": "ROOT_TYPE1" - }, - "pascalCase": { - "unsafeName": "RootType1", - "safeName": "RootType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:RootType1", - "default": null, - "inline": null - }, - "docs": null - } - }, - "status-code": null - }, - "errors": [], - "userSpecifiedExamples": [], - "autogeneratedExamples": [ - { - "example": { - "id": "9cd41e603ec7775a338b95cab82902d42d7df333", - "url": "/root/root", - "name": null, - "endpointHeaders": [], - "endpointPathParameters": [], - "queryParameters": [], - "servicePathParameters": [], - "serviceHeaders": [], - "rootPathParameters": [], - "request": { - "type": "inlinedRequestBody", - "properties": [ - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "originalTypeDeclaration": null, - "value": { - "shape": { - "type": "named", - "shape": { - "type": "object", - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1" - }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "foo" - } - } - }, - "jsonExample": "foo" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1" - }, - "value": { - "shape": { - "type": "named", - "shape": { - "type": "object", - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:NestedInlineType1" - }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "foo" - } - } - }, - "jsonExample": "foo" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:NestedInlineType1" - }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "bar" - } - } - }, - "jsonExample": "bar" - } - }, - { - "name": { - "name": { - "originalName": "myEnum", - "camelCase": { - "unsafeName": "myEnum", - "safeName": "myEnum" - }, - "snakeCase": { - "unsafeName": "my_enum", - "safeName": "my_enum" - }, - "screamingSnakeCase": { - "unsafeName": "MY_ENUM", - "safeName": "MY_ENUM" - }, - "pascalCase": { - "unsafeName": "MyEnum", - "safeName": "MyEnum" - } - }, - "wireValue": "myEnum" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:NestedInlineType1" - }, - "value": { - "shape": { - "type": "named", - "shape": { - "type": "enum", - "value": { - "name": { - "originalName": "SUNNY", - "camelCase": { - "unsafeName": "sunny", - "safeName": "sunny" - }, - "snakeCase": { - "unsafeName": "sunny", - "safeName": "sunny" - }, - "screamingSnakeCase": { - "unsafeName": "SUNNY", - "safeName": "SUNNY" - }, - "pascalCase": { - "unsafeName": "Sunny", - "safeName": "Sunny" - } - }, - "wireValue": "SUNNY" - } - }, - "typeName": { - "name": { - "originalName": "InlineEnum", - "camelCase": { - "unsafeName": "inlineEnum", - "safeName": "inlineEnum" - }, - "snakeCase": { - "unsafeName": "inline_enum", - "safeName": "inline_enum" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_ENUM", - "safeName": "INLINE_ENUM" - }, - "pascalCase": { - "unsafeName": "InlineEnum", - "safeName": "InlineEnum" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineEnum" - } - }, - "jsonExample": "SUNNY" - } - } - ] - }, - "typeName": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:NestedInlineType1" - } - }, - "jsonExample": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - } - } - ] - }, - "typeName": { - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1" - } - }, - "jsonExample": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - } - } - }, - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "originalTypeDeclaration": null, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "foo" - } - } - }, - "jsonExample": "foo" - } - } - ], - "jsonExample": { - "bar": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - }, - "foo": "foo" - } - }, - "response": { - "type": "ok", - "value": { - "type": "body", - "value": { - "shape": { - "type": "named", - "shape": { - "type": "object", - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "RootType1", - "camelCase": { - "unsafeName": "rootType1", - "safeName": "rootType1" - }, - "snakeCase": { - "unsafeName": "root_type1", - "safeName": "root_type1" - }, - "screamingSnakeCase": { - "unsafeName": "ROOT_TYPE1", - "safeName": "ROOT_TYPE1" - }, - "pascalCase": { - "unsafeName": "RootType1", - "safeName": "RootType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:RootType1" - }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "foo" - } - } - }, - "jsonExample": "foo" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "RootType1", - "camelCase": { - "unsafeName": "rootType1", - "safeName": "rootType1" - }, - "snakeCase": { - "unsafeName": "root_type1", - "safeName": "root_type1" - }, - "screamingSnakeCase": { - "unsafeName": "ROOT_TYPE1", - "safeName": "ROOT_TYPE1" - }, - "pascalCase": { - "unsafeName": "RootType1", - "safeName": "RootType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:RootType1" - }, - "value": { - "shape": { - "type": "named", - "shape": { - "type": "object", - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1" - }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "foo" - } - } - }, - "jsonExample": "foo" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1" - }, - "value": { - "shape": { - "type": "named", - "shape": { - "type": "object", - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:NestedInlineType1" - }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "foo" - } - } - }, - "jsonExample": "foo" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:NestedInlineType1" - }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "bar" - } - } - }, - "jsonExample": "bar" - } - }, - { - "name": { - "name": { - "originalName": "myEnum", - "camelCase": { - "unsafeName": "myEnum", - "safeName": "myEnum" - }, - "snakeCase": { - "unsafeName": "my_enum", - "safeName": "my_enum" - }, - "screamingSnakeCase": { - "unsafeName": "MY_ENUM", - "safeName": "MY_ENUM" - }, - "pascalCase": { - "unsafeName": "MyEnum", - "safeName": "MyEnum" - } - }, - "wireValue": "myEnum" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:NestedInlineType1" - }, - "value": { - "shape": { - "type": "named", - "shape": { - "type": "enum", - "value": { - "name": { - "originalName": "SUNNY", - "camelCase": { - "unsafeName": "sunny", - "safeName": "sunny" - }, - "snakeCase": { - "unsafeName": "sunny", - "safeName": "sunny" - }, - "screamingSnakeCase": { - "unsafeName": "SUNNY", - "safeName": "SUNNY" - }, - "pascalCase": { - "unsafeName": "Sunny", - "safeName": "Sunny" - } - }, - "wireValue": "SUNNY" - } - }, - "typeName": { - "name": { - "originalName": "InlineEnum", - "camelCase": { - "unsafeName": "inlineEnum", - "safeName": "inlineEnum" - }, - "snakeCase": { - "unsafeName": "inline_enum", - "safeName": "inline_enum" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_ENUM", - "safeName": "INLINE_ENUM" - }, - "pascalCase": { - "unsafeName": "InlineEnum", - "safeName": "InlineEnum" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineEnum" - } - }, - "jsonExample": "SUNNY" - } - } - ] - }, - "typeName": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:NestedInlineType1" - } - }, - "jsonExample": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - } - } - ] - }, - "typeName": { - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:InlineType1" - } - }, - "jsonExample": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - } - } - } - ] - }, - "typeName": { - "name": { - "originalName": "RootType1", - "camelCase": { - "unsafeName": "rootType1", - "safeName": "rootType1" - }, - "snakeCase": { - "unsafeName": "root_type1", - "safeName": "root_type1" - }, - "screamingSnakeCase": { - "unsafeName": "ROOT_TYPE1", - "safeName": "ROOT_TYPE1" - }, - "pascalCase": { - "unsafeName": "RootType1", - "safeName": "RootType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "typeId": "type_:RootType1" - } - }, - "jsonExample": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - } - } - } - } - }, - "docs": null - } - } - ], - "pagination": null, - "transport": null, - "availability": null, - "docs": null - } - ] - } - }, - "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": null, - "errorDiscriminationStrategy": { - "type": "statusCode" - }, - "basePath": null, - "pathParameters": [], - "variables": [], - "serviceTypeReferenceInfo": { - "typesReferencedOnlyByService": { - "service_": [ - "type_:RootType1", - "type_:InlineType1", - "type_:NestedInlineType1", - "type_:InlineEnum" - ] - }, - "sharedTypes": [ - "type_:InlineType2", - "type_:InlinedDiscriminatedUnion1", - "type_:InlinedUndiscriminatedUnion1" - ] - }, - "webhookGroups": {}, - "websocketChannels": {}, - "readmeConfig": null, - "sourceConfig": null, - "publishConfig": null, - "dynamic": { - "version": "1.0.0", - "types": { - "type_:RootType1": { - "type": "object", - "declaration": { - "name": { - "originalName": "RootType1", - "camelCase": { - "unsafeName": "rootType1", - "safeName": "rootType1" - }, - "snakeCase": { - "unsafeName": "root_type1", - "safeName": "root_type1" - }, - "screamingSnakeCase": { - "unsafeName": "ROOT_TYPE1", - "safeName": "ROOT_TYPE1" - }, - "pascalCase": { - "unsafeName": "RootType1", - "safeName": "RootType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "typeReference": { - "_type": "primitive", - "value": "STRING" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "typeReference": { - "_type": "named", - "value": "type_:InlineType1" - } - } - ] - }, - "type_:InlineType1": { - "type": "object", - "declaration": { - "name": { - "originalName": "InlineType1", - "camelCase": { - "unsafeName": "inlineType1", - "safeName": "inlineType1" - }, - "snakeCase": { - "unsafeName": "inline_type1", - "safeName": "inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE1", - "safeName": "INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "InlineType1", - "safeName": "InlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "typeReference": { - "_type": "primitive", - "value": "STRING" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "typeReference": { - "_type": "named", - "value": "type_:NestedInlineType1" - } - } - ] - }, - "type_:InlineType2": { - "type": "object", - "declaration": { - "name": { - "originalName": "InlineType2", - "camelCase": { - "unsafeName": "inlineType2", - "safeName": "inlineType2" - }, - "snakeCase": { - "unsafeName": "inline_type2", - "safeName": "inline_type2" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_TYPE2", - "safeName": "INLINE_TYPE2" - }, - "pascalCase": { - "unsafeName": "InlineType2", - "safeName": "InlineType2" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "properties": [ - { - "name": { - "name": { - "originalName": "baz", - "camelCase": { - "unsafeName": "baz", - "safeName": "baz" - }, - "snakeCase": { - "unsafeName": "baz", - "safeName": "baz" - }, - "screamingSnakeCase": { - "unsafeName": "BAZ", - "safeName": "BAZ" - }, - "pascalCase": { - "unsafeName": "Baz", - "safeName": "Baz" - } - }, - "wireValue": "baz" - }, - "typeReference": { - "_type": "primitive", - "value": "STRING" - } - } - ] - }, - "type_:NestedInlineType1": { - "type": "object", - "declaration": { - "name": { - "originalName": "NestedInlineType1", - "camelCase": { - "unsafeName": "nestedInlineType1", - "safeName": "nestedInlineType1" - }, - "snakeCase": { - "unsafeName": "nested_inline_type1", - "safeName": "nested_inline_type1" - }, - "screamingSnakeCase": { - "unsafeName": "NESTED_INLINE_TYPE1", - "safeName": "NESTED_INLINE_TYPE1" - }, - "pascalCase": { - "unsafeName": "NestedInlineType1", - "safeName": "NestedInlineType1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "properties": [ - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "typeReference": { - "_type": "primitive", - "value": "STRING" - } - }, - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "typeReference": { - "_type": "primitive", - "value": "STRING" - } - }, - { - "name": { - "name": { - "originalName": "myEnum", - "camelCase": { - "unsafeName": "myEnum", - "safeName": "myEnum" - }, - "snakeCase": { - "unsafeName": "my_enum", - "safeName": "my_enum" - }, - "screamingSnakeCase": { - "unsafeName": "MY_ENUM", - "safeName": "MY_ENUM" - }, - "pascalCase": { - "unsafeName": "MyEnum", - "safeName": "MyEnum" - } - }, - "wireValue": "myEnum" - }, - "typeReference": { - "_type": "named", - "value": "type_:InlineEnum" - } - } - ] - }, - "type_:InlinedDiscriminatedUnion1": { - "type": "discriminatedUnion", - "declaration": { - "name": { - "originalName": "InlinedDiscriminatedUnion1", - "camelCase": { - "unsafeName": "inlinedDiscriminatedUnion1", - "safeName": "inlinedDiscriminatedUnion1" - }, - "snakeCase": { - "unsafeName": "inlined_discriminated_union1", - "safeName": "inlined_discriminated_union1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINED_DISCRIMINATED_UNION1", - "safeName": "INLINED_DISCRIMINATED_UNION1" - }, - "pascalCase": { - "unsafeName": "InlinedDiscriminatedUnion1", - "safeName": "InlinedDiscriminatedUnion1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "discriminant": { - "name": { - "originalName": "type", - "camelCase": { - "unsafeName": "type", - "safeName": "type" - }, - "snakeCase": { - "unsafeName": "type", - "safeName": "type" - }, - "screamingSnakeCase": { - "unsafeName": "TYPE", - "safeName": "TYPE" - }, - "pascalCase": { - "unsafeName": "Type", - "safeName": "Type" - } - }, - "wireValue": "type" - }, - "types": { - "type1": { - "type": "samePropertiesAsObject", - "typeId": "type_:InlineType1", - "discriminantValue": { - "name": { - "originalName": "type1", - "camelCase": { - "unsafeName": "type1", - "safeName": "type1" - }, - "snakeCase": { - "unsafeName": "type1", - "safeName": "type1" - }, - "screamingSnakeCase": { - "unsafeName": "TYPE1", - "safeName": "TYPE1" - }, - "pascalCase": { - "unsafeName": "Type1", - "safeName": "Type1" - } - }, - "wireValue": "type1" - }, - "properties": [] - }, - "type2": { - "type": "samePropertiesAsObject", - "typeId": "type_:InlineType2", - "discriminantValue": { - "name": { - "originalName": "type2", - "camelCase": { - "unsafeName": "type2", - "safeName": "type2" - }, - "snakeCase": { - "unsafeName": "type2", - "safeName": "type2" - }, - "screamingSnakeCase": { - "unsafeName": "TYPE2", - "safeName": "TYPE2" - }, - "pascalCase": { - "unsafeName": "Type2", - "safeName": "Type2" - } - }, - "wireValue": "type2" - }, - "properties": [] - } - } - }, - "type_:InlinedUndiscriminatedUnion1": { - "type": "undiscriminatedUnion", - "declaration": { - "name": { - "originalName": "InlinedUndiscriminatedUnion1", - "camelCase": { - "unsafeName": "inlinedUndiscriminatedUnion1", - "safeName": "inlinedUndiscriminatedUnion1" - }, - "snakeCase": { - "unsafeName": "inlined_undiscriminated_union1", - "safeName": "inlined_undiscriminated_union1" - }, - "screamingSnakeCase": { - "unsafeName": "INLINED_UNDISCRIMINATED_UNION1", - "safeName": "INLINED_UNDISCRIMINATED_UNION1" - }, - "pascalCase": { - "unsafeName": "InlinedUndiscriminatedUnion1", - "safeName": "InlinedUndiscriminatedUnion1" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "types": [ - { - "_type": "named", - "value": "type_:InlineType1" - }, - { - "_type": "named", - "value": "type_:InlineType2" - } - ] - }, - "type_:InlineEnum": { - "type": "enum", - "declaration": { - "name": { - "originalName": "InlineEnum", - "camelCase": { - "unsafeName": "inlineEnum", - "safeName": "inlineEnum" - }, - "snakeCase": { - "unsafeName": "inline_enum", - "safeName": "inline_enum" - }, - "screamingSnakeCase": { - "unsafeName": "INLINE_ENUM", - "safeName": "INLINE_ENUM" - }, - "pascalCase": { - "unsafeName": "InlineEnum", - "safeName": "InlineEnum" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "values": [ - { - "name": { - "originalName": "SUNNY", - "camelCase": { - "unsafeName": "sunny", - "safeName": "sunny" - }, - "snakeCase": { - "unsafeName": "sunny", - "safeName": "sunny" - }, - "screamingSnakeCase": { - "unsafeName": "SUNNY", - "safeName": "SUNNY" - }, - "pascalCase": { - "unsafeName": "Sunny", - "safeName": "Sunny" - } - }, - "wireValue": "SUNNY" - }, - { - "name": { - "originalName": "CLOUDY", - "camelCase": { - "unsafeName": "cloudy", - "safeName": "cloudy" - }, - "snakeCase": { - "unsafeName": "cloudy", - "safeName": "cloudy" - }, - "screamingSnakeCase": { - "unsafeName": "CLOUDY", - "safeName": "CLOUDY" - }, - "pascalCase": { - "unsafeName": "Cloudy", - "safeName": "Cloudy" - } - }, - "wireValue": "CLOUDY" - }, - { - "name": { - "originalName": "RAINING", - "camelCase": { - "unsafeName": "raining", - "safeName": "raining" - }, - "snakeCase": { - "unsafeName": "raining", - "safeName": "raining" - }, - "screamingSnakeCase": { - "unsafeName": "RAINING", - "safeName": "RAINING" - }, - "pascalCase": { - "unsafeName": "Raining", - "safeName": "Raining" - } - }, - "wireValue": "RAINING" - }, - { - "name": { - "originalName": "SNOWING", - "camelCase": { - "unsafeName": "snowing", - "safeName": "snowing" - }, - "snakeCase": { - "unsafeName": "snowing", - "safeName": "snowing" - }, - "screamingSnakeCase": { - "unsafeName": "SNOWING", - "safeName": "SNOWING" - }, - "pascalCase": { - "unsafeName": "Snowing", - "safeName": "Snowing" - } - }, - "wireValue": "SNOWING" - } - ] - } - }, - "headers": [], - "endpoints": { - "endpoint_.getRoot": { - "auth": null, - "declaration": { - "name": { - "originalName": "getRoot", - "camelCase": { - "unsafeName": "getRoot", - "safeName": "getRoot" - }, - "snakeCase": { - "unsafeName": "get_root", - "safeName": "get_root" - }, - "screamingSnakeCase": { - "unsafeName": "GET_ROOT", - "safeName": "GET_ROOT" - }, - "pascalCase": { - "unsafeName": "GetRoot", - "safeName": "GetRoot" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "location": { - "method": "POST", - "path": "/root/root" - }, - "request": { - "type": "inlined", - "declaration": { - "name": { - "originalName": "PostRootRequest", - "camelCase": { - "unsafeName": "postRootRequest", - "safeName": "postRootRequest" - }, - "snakeCase": { - "unsafeName": "post_root_request", - "safeName": "post_root_request" - }, - "screamingSnakeCase": { - "unsafeName": "POST_ROOT_REQUEST", - "safeName": "POST_ROOT_REQUEST" - }, - "pascalCase": { - "unsafeName": "PostRootRequest", - "safeName": "PostRootRequest" - } - }, - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - } - }, - "pathParameters": [], - "queryParameters": [], - "headers": [], - "body": { - "type": "properties", - "value": [ - { - "name": { - "name": { - "originalName": "bar", - "camelCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "snakeCase": { - "unsafeName": "bar", - "safeName": "bar" - }, - "screamingSnakeCase": { - "unsafeName": "BAR", - "safeName": "BAR" - }, - "pascalCase": { - "unsafeName": "Bar", - "safeName": "Bar" - } - }, - "wireValue": "bar" - }, - "typeReference": { - "_type": "named", - "value": "type_:InlineType1" - } - }, - { - "name": { - "name": { - "originalName": "foo", - "camelCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "snakeCase": { - "unsafeName": "foo", - "safeName": "foo" - }, - "screamingSnakeCase": { - "unsafeName": "FOO", - "safeName": "FOO" - }, - "pascalCase": { - "unsafeName": "Foo", - "safeName": "Foo" - } - }, - "wireValue": "foo" - }, - "typeReference": { - "_type": "primitive", - "value": "STRING" - } - } - ] - }, - "metadata": { - "includePathParameters": false, - "onlyPathParameters": false - } - }, - "response": { - "type": "json" - } - } - } - }, - "subpackages": {}, - "rootPackage": { - "fernFilepath": { - "allParts": [], - "packagePath": [], - "file": null - }, - "websocket": null, - "service": "service_", - "types": [ - "type_:RootType1", - "type_:InlineType1", - "type_:InlineType2", - "type_:NestedInlineType1", - "type_:InlinedDiscriminatedUnion1", - "type_:InlinedUndiscriminatedUnion1", - "type_:InlineEnum" - ], - "errors": [], - "subpackages": [], - "webhooks": null, - "navigationConfig": null, - "hasEndpointsInTree": true, - "docs": null - }, - "sdkConfig": { - "isAuthMandatory": false, - "hasStreamingEndpoints": false, - "hasPaginatedEndpoints": false, - "hasFileDownloadEndpoints": false, - "platformHeaders": { - "language": "X-Fern-Language", - "sdkName": "X-Fern-SDK-Name", - "sdkVersion": "X-Fern-SDK-Version", - "userAgent": null - } - } -} \ No newline at end of file diff --git a/packages/cli/generation/ir-generator/src/converters/services/convertHttpResponse.ts b/packages/cli/generation/ir-generator/src/converters/services/convertHttpResponse.ts index dfa46f3ccd4..da228af6915 100644 --- a/packages/cli/generation/ir-generator/src/converters/services/convertHttpResponse.ts +++ b/packages/cli/generation/ir-generator/src/converters/services/convertHttpResponse.ts @@ -6,7 +6,13 @@ import { NonStreamHttpResponseBody, StreamingResponse } from "@fern-api/ir-sdk"; -import { isRawTextType, parseRawFileType, parseRawTextType, RawSchemas } from "@fern-api/fern-definition-schema"; +import { + isRawTextType, + parseRawFileType, + parseRawTextType, + parseRawBytesType, + RawSchemas +} from "@fern-api/fern-definition-schema"; import { FernFileContext } from "../../FernFileContext"; import { TypeResolver } from "../../resolvers/TypeResolver"; import { getObjectPropertyFromResolvedType } from "./getObjectPropertyFromResolvedType"; @@ -69,6 +75,10 @@ export function convertHttpResponseBody({ nonStreamResponse = NonStreamHttpResponseBody.text({ ...response }); break; } + case "bytes": { + nonStreamResponse = NonStreamHttpResponseBody.bytes({ ...response }); + break; + } default: assertNever(response); } @@ -93,7 +103,7 @@ export function convertNonStreamHttpResponseBody({ endpoint: RawSchemas.HttpEndpointSchema; file: FernFileContext; typeResolver: TypeResolver; -}): HttpResponseBody.FileDownload | HttpResponseBody.Text | HttpResponseBody.Json | undefined { +}): HttpResponseBody.FileDownload | HttpResponseBody.Text | HttpResponseBody.Json | HttpResponseBody.Bytes | undefined { const { response } = endpoint; if (response != null) { @@ -108,6 +118,10 @@ export function convertNonStreamHttpResponseBody({ return HttpResponseBody.text({ docs }); + } else if (parseRawBytesType(responseType) != null) { + return HttpResponseBody.bytes({ + docs + }); } else { return convertJsonResponse(response, docs, file, typeResolver); } diff --git a/packages/cli/generation/ir-generator/src/dynamic-snippets/DynamicSnippetsConverter.ts b/packages/cli/generation/ir-generator/src/dynamic-snippets/DynamicSnippetsConverter.ts index 21b878d9e50..68a80703db0 100644 --- a/packages/cli/generation/ir-generator/src/dynamic-snippets/DynamicSnippetsConverter.ts +++ b/packages/cli/generation/ir-generator/src/dynamic-snippets/DynamicSnippetsConverter.ts @@ -59,7 +59,8 @@ export class DynamicSnippetsConverter { version: Version, types: this.convertNamedTypes(), headers: this.convertHeaders(), - endpoints: this.convertEndpoints() + endpoints: this.convertEndpoints(), + environments: this.ir.environments }; } diff --git a/packages/cli/generation/ir-generator/src/examples/generator/generateSuccessEndpointExample.ts b/packages/cli/generation/ir-generator/src/examples/generator/generateSuccessEndpointExample.ts index 404577d87a2..1ba3b1dbba1 100644 --- a/packages/cli/generation/ir-generator/src/examples/generator/generateSuccessEndpointExample.ts +++ b/packages/cli/generation/ir-generator/src/examples/generator/generateSuccessEndpointExample.ts @@ -262,6 +262,8 @@ export function generateEndpointExample({ return { type: "failure", message: "Streaming unsupported" }; case "text": return { type: "failure", message: "Text unsupported" }; + case "bytes": + return { type: "failure", message: "Bytes unsupported" }; default: assertNever(endpoint.response.body); } diff --git a/packages/cli/generation/ir-generator/src/filtered-ir/IrGraph.ts b/packages/cli/generation/ir-generator/src/filtered-ir/IrGraph.ts index 62d354b627b..292fcd2a04b 100644 --- a/packages/cli/generation/ir-generator/src/filtered-ir/IrGraph.ts +++ b/packages/cli/generation/ir-generator/src/filtered-ir/IrGraph.ts @@ -257,6 +257,7 @@ export class IrGraph { } }, text: noop, + bytes: noop, _other: () => { throw new Error("Unknown HttpResponse: " + httpEndpoint.response?.body?.type); } diff --git a/packages/cli/generation/ir-migrations/package.json b/packages/cli/generation/ir-migrations/package.json index 471f9dd1dae..367cf824191 100644 --- a/packages/cli/generation/ir-migrations/package.json +++ b/packages/cli/generation/ir-migrations/package.json @@ -86,6 +86,7 @@ "@fern-fern/ir-v50-sdk": "0.0.3", "@fern-fern/ir-v51-sdk": "0.0.1", "@fern-fern/ir-v52-sdk": "0.0.1", + "@fern-fern/ir-v53-sdk": "0.0.1", "@fern-fern/ir-v6-model": "0.0.33", "@fern-fern/ir-v7-model": "0.0.2", "@fern-fern/ir-v8-model": "0.0.1", diff --git a/packages/cli/generation/ir-migrations/src/IntermediateRepresentationMigrator.ts b/packages/cli/generation/ir-migrations/src/IntermediateRepresentationMigrator.ts index a1f0f50fb13..b09f640b32e 100644 --- a/packages/cli/generation/ir-migrations/src/IntermediateRepresentationMigrator.ts +++ b/packages/cli/generation/ir-migrations/src/IntermediateRepresentationMigrator.ts @@ -51,6 +51,7 @@ import { V50_TO_V49_MIGRATION } from "./migrations/v50-to-v49/migrateFromV50ToV4 import { V51_TO_V50_MIGRATION } from "./migrations/v51-to-v50/migrateFromV51ToV50"; import { V52_TO_V51_MIGRATION } from "./migrations/v52-to-v51/migrateFromV52ToV51"; import { V53_TO_V52_MIGRATION } from "./migrations/v53-to-v52/migrateFromV53ToV52"; +import { V54_TO_V53_MIGRATION } from "./migrations/v54-to-v53/migrateFromV54ToV53"; import { V6_TO_V5_MIGRATION } from "./migrations/v6-to-v5/migrateFromV6ToV5"; import { V7_TO_V6_MIGRATION } from "./migrations/v7-to-v6/migrateFromV7ToV6"; import { V8_TO_V7_MIGRATION } from "./migrations/v8-to-v7/migrateFromV8ToV7"; @@ -279,6 +280,7 @@ const IntermediateRepresentationMigrator = { const INTERMEDIATE_REPRESENTATION_MIGRATOR = IntermediateRepresentationMigrator.Builder // put new migrations here + .withMigration(V54_TO_V53_MIGRATION) .withMigration(V53_TO_V52_MIGRATION) .withMigration(V52_TO_V51_MIGRATION) .withMigration(V51_TO_V50_MIGRATION) diff --git a/packages/cli/generation/ir-migrations/src/ir-serialization/IrSerialization.ts b/packages/cli/generation/ir-migrations/src/ir-serialization/IrSerialization.ts index db32068c4be..d56ae8a7bbd 100644 --- a/packages/cli/generation/ir-migrations/src/ir-serialization/IrSerialization.ts +++ b/packages/cli/generation/ir-migrations/src/ir-serialization/IrSerialization.ts @@ -1,4 +1,4 @@ -export { serialization as V53 } from "@fern-api/ir-sdk"; +export { serialization as V54 } from "@fern-api/ir-sdk"; export * as V23 from "@fern-fern/ir-v23-sdk/serialization"; export * as V24 from "@fern-fern/ir-v24-sdk/serialization"; export * as V25 from "@fern-fern/ir-v25-sdk/serialization"; @@ -29,3 +29,4 @@ export * as V49 from "@fern-fern/ir-v49-sdk/serialization"; export * as V50 from "@fern-fern/ir-v50-sdk/serialization"; export * as V51 from "@fern-fern/ir-v51-sdk/serialization"; export * as V52 from "@fern-fern/ir-v52-sdk/serialization"; +export * as V53 from "@fern-fern/ir-v53-sdk/serialization"; diff --git a/packages/cli/generation/ir-migrations/src/ir-versions/IrVersions.ts b/packages/cli/generation/ir-migrations/src/ir-versions/IrVersions.ts index ca71ce96416..4644622a225 100644 --- a/packages/cli/generation/ir-migrations/src/ir-versions/IrVersions.ts +++ b/packages/cli/generation/ir-migrations/src/ir-versions/IrVersions.ts @@ -1,4 +1,4 @@ -export { FernIr as V53 } from "@fern-api/ir-sdk"; +export { FernIr as V54 } from "@fern-api/ir-sdk"; export * as V1 from "@fern-fern/ir-v1-model"; export * as V10 from "@fern-fern/ir-v10-model"; export * as V11 from "@fern-fern/ir-v11-model"; @@ -47,6 +47,7 @@ export * as V5 from "@fern-fern/ir-v5-model"; export { FernIrV50 as V50 } from "@fern-fern/ir-v50-sdk"; export { FernIrV51 as V51 } from "@fern-fern/ir-v51-sdk"; export { FernIrV52 as V52 } from "@fern-fern/ir-v52-sdk"; +export { FernIrV53 as V53 } from "@fern-fern/ir-v53-sdk"; export * as V6 from "@fern-fern/ir-v6-model"; export * as V7 from "@fern-fern/ir-v7-model"; export * as V8 from "@fern-fern/ir-v8-model"; diff --git a/packages/cli/generation/ir-migrations/src/migrations/v53-to-v52/migrateFromV53ToV52.ts b/packages/cli/generation/ir-migrations/src/migrations/v53-to-v52/migrateFromV53ToV52.ts index c3b8f9ed1e7..8c31f8eff9a 100644 --- a/packages/cli/generation/ir-migrations/src/migrations/v53-to-v52/migrateFromV53ToV52.ts +++ b/packages/cli/generation/ir-migrations/src/migrations/v53-to-v52/migrateFromV53ToV52.ts @@ -22,9 +22,9 @@ export const V53_TO_V52_MIGRATION: IrMigration< [GeneratorName.TYPESCRIPT_SDK]: "0.38.0-rc0", [GeneratorName.TYPESCRIPT_EXPRESS]: "0.17.3", [GeneratorName.JAVA]: GeneratorWasNeverUpdatedToConsumeNewIR, - [GeneratorName.JAVA_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR, - [GeneratorName.JAVA_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR, - [GeneratorName.JAVA_SPRING]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.JAVA_MODEL]: "1.3.0", + [GeneratorName.JAVA_SDK]: "2.5.0", + [GeneratorName.JAVA_SPRING]: "1.3.0", [GeneratorName.PYTHON_FASTAPI]: "1.1.0-rc0", [GeneratorName.PYTHON_PYDANTIC]: "1.1.0-rc0", [GeneratorName.OPENAPI_PYTHON_CLIENT]: GeneratorWasNeverUpdatedToConsumeNewIR, diff --git a/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/__snapshots__/migrateFromV53ToV52.test.ts.snap b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/__snapshots__/migrateFromV53ToV52.test.ts.snap new file mode 100644 index 00000000000..b044632e6b1 --- /dev/null +++ b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/__snapshots__/migrateFromV53ToV52.test.ts.snap @@ -0,0 +1,1001 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`migrateFromV54ToV53 > simple 1`] = ` +{ + "apiDisplayName": null, + "apiDocs": null, + "apiName": { + "camelCase": { + "safeName": "simpleAPI", + "unsafeName": "simpleAPI", + }, + "originalName": "simple-api", + "pascalCase": { + "safeName": "SimpleAPI", + "unsafeName": "SimpleAPI", + }, + "screamingSnakeCase": { + "safeName": "SIMPLE_API", + "unsafeName": "SIMPLE_API", + }, + "snakeCase": { + "safeName": "simple_api", + "unsafeName": "simple_api", + }, + }, + "apiVersion": null, + "auth": { + "docs": null, + "requirement": "ALL", + "schemes": [ + { + "_type": "bearer", + "docs": null, + "token": { + "camelCase": { + "safeName": "token", + "unsafeName": "token", + }, + "originalName": "token", + "pascalCase": { + "safeName": "Token", + "unsafeName": "Token", + }, + "screamingSnakeCase": { + "safeName": "TOKEN", + "unsafeName": "TOKEN", + }, + "snakeCase": { + "safeName": "token", + "unsafeName": "token", + }, + }, + "tokenEnvVar": null, + }, + ], + }, + "basePath": null, + "constants": { + "errorInstanceIdKey": { + "name": { + "camelCase": { + "safeName": "errorInstanceID", + "unsafeName": "errorInstanceID", + }, + "originalName": "errorInstanceId", + "pascalCase": { + "safeName": "ErrorInstanceID", + "unsafeName": "ErrorInstanceID", + }, + "screamingSnakeCase": { + "safeName": "ERROR_INSTANCE_ID", + "unsafeName": "ERROR_INSTANCE_ID", + }, + "snakeCase": { + "safeName": "error_instance_id", + "unsafeName": "error_instance_id", + }, + }, + "wireValue": "errorInstanceId", + }, + }, + "dynamic": { + "endpoints": { + "endpoint_service.getAudioFile": { + "auth": { + "token": { + "camelCase": { + "safeName": "token", + "unsafeName": "token", + }, + "originalName": "token", + "pascalCase": { + "safeName": "Token", + "unsafeName": "Token", + }, + "screamingSnakeCase": { + "safeName": "TOKEN", + "unsafeName": "TOKEN", + }, + "snakeCase": { + "safeName": "token", + "unsafeName": "token", + }, + }, + "type": "bearer", + }, + "declaration": { + "fernFilepath": { + "allParts": [ + { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + ], + "file": { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + "packagePath": [], + }, + "name": { + "camelCase": { + "safeName": "getAudioFile", + "unsafeName": "getAudioFile", + }, + "originalName": "getAudioFile", + "pascalCase": { + "safeName": "GetAudioFile", + "unsafeName": "GetAudioFile", + }, + "screamingSnakeCase": { + "safeName": "GET_AUDIO_FILE", + "unsafeName": "GET_AUDIO_FILE", + }, + "snakeCase": { + "safeName": "get_audio_file", + "unsafeName": "get_audio_file", + }, + }, + }, + "location": { + "method": "GET", + "path": "/audio", + }, + "request": { + "body": null, + "declaration": { + "fernFilepath": { + "allParts": [ + { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + ], + "file": { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + "packagePath": [], + }, + "name": { + "camelCase": { + "safeName": "getAudioRequest", + "unsafeName": "getAudioRequest", + }, + "originalName": "GetAudioRequest", + "pascalCase": { + "safeName": "GetAudioRequest", + "unsafeName": "GetAudioRequest", + }, + "screamingSnakeCase": { + "safeName": "GET_AUDIO_REQUEST", + "unsafeName": "GET_AUDIO_REQUEST", + }, + "snakeCase": { + "safeName": "get_audio_request", + "unsafeName": "get_audio_request", + }, + }, + }, + "headers": [], + "metadata": { + "includePathParameters": false, + "onlyPathParameters": false, + }, + "pathParameters": [], + "queryParameters": [ + { + "name": { + "name": { + "camelCase": { + "safeName": "format", + "unsafeName": "format", + }, + "originalName": "format", + "pascalCase": { + "safeName": "Format", + "unsafeName": "Format", + }, + "screamingSnakeCase": { + "safeName": "FORMAT", + "unsafeName": "FORMAT", + }, + "snakeCase": { + "safeName": "format", + "unsafeName": "format", + }, + }, + "wireValue": "format", + }, + "typeReference": { + "type": "named", + "value": "type_service:AudioFormat", + }, + }, + ], + "type": "inlined", + }, + "response": { + "type": "json", + }, + }, + }, + "headers": [], + "types": { + "type_service:AudioFormat": { + "declaration": { + "fernFilepath": { + "allParts": [ + { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + ], + "file": { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + "packagePath": [], + }, + "name": { + "camelCase": { + "safeName": "audioFormat", + "unsafeName": "audioFormat", + }, + "originalName": "AudioFormat", + "pascalCase": { + "safeName": "AudioFormat", + "unsafeName": "AudioFormat", + }, + "screamingSnakeCase": { + "safeName": "AUDIO_FORMAT", + "unsafeName": "AUDIO_FORMAT", + }, + "snakeCase": { + "safeName": "audio_format", + "unsafeName": "audio_format", + }, + }, + }, + "type": "enum", + "values": [ + { + "name": { + "camelCase": { + "safeName": "mp3", + "unsafeName": "mp3", + }, + "originalName": "MP3", + "pascalCase": { + "safeName": "Mp3", + "unsafeName": "Mp3", + }, + "screamingSnakeCase": { + "safeName": "MP3", + "unsafeName": "MP3", + }, + "snakeCase": { + "safeName": "mp3", + "unsafeName": "mp3", + }, + }, + "wireValue": "MP3", + }, + { + "name": { + "camelCase": { + "safeName": "wav", + "unsafeName": "wav", + }, + "originalName": "WAV", + "pascalCase": { + "safeName": "Wav", + "unsafeName": "Wav", + }, + "screamingSnakeCase": { + "safeName": "WAV", + "unsafeName": "WAV", + }, + "snakeCase": { + "safeName": "wav", + "unsafeName": "wav", + }, + }, + "wireValue": "WAV", + }, + { + "name": { + "camelCase": { + "safeName": "ogg", + "unsafeName": "ogg", + }, + "originalName": "OGG", + "pascalCase": { + "safeName": "Ogg", + "unsafeName": "Ogg", + }, + "screamingSnakeCase": { + "safeName": "OGG", + "unsafeName": "OGG", + }, + "snakeCase": { + "safeName": "ogg", + "unsafeName": "ogg", + }, + }, + "wireValue": "OGG", + }, + ], + }, + }, + "version": "1.0.0", + }, + "environments": null, + "errorDiscriminationStrategy": { + "type": "statusCode", + }, + "errors": {}, + "fdrApiDefinitionId": null, + "headers": [], + "idempotencyHeaders": [], + "pathParameters": [], + "publishConfig": null, + "readmeConfig": null, + "rootPackage": { + "docs": null, + "errors": [], + "fernFilepath": { + "allParts": [], + "file": null, + "packagePath": [], + }, + "hasEndpointsInTree": true, + "navigationConfig": null, + "service": null, + "subpackages": [ + "subpackage_service", + ], + "types": [], + "webhooks": null, + "websocket": null, + }, + "sdkConfig": { + "hasFileDownloadEndpoints": false, + "hasPaginatedEndpoints": false, + "hasStreamingEndpoints": false, + "isAuthMandatory": false, + "platformHeaders": { + "language": "X-Fern-Language", + "sdkName": "X-Fern-SDK-Name", + "sdkVersion": "X-Fern-SDK-Version", + "userAgent": null, + }, + }, + "serviceTypeReferenceInfo": { + "sharedTypes": [], + "typesReferencedOnlyByService": { + "service_service": [ + "type_service:AudioFormat", + ], + }, + }, + "services": { + "service_service": { + "availability": null, + "basePath": { + "head": "/", + "parts": [], + }, + "displayName": null, + "encoding": { + "json": {}, + "proto": null, + }, + "endpoints": [ + { + "allPathParameters": [], + "auth": false, + "autogeneratedExamples": [], + "availability": null, + "basePath": null, + "baseUrl": null, + "displayName": null, + "docs": null, + "errors": [], + "fullPath": { + "head": "/audio", + "parts": [], + }, + "headers": [], + "id": "endpoint_service.getAudioFile", + "idempotent": false, + "method": "GET", + "name": { + "camelCase": { + "safeName": "getAudioFile", + "unsafeName": "getAudioFile", + }, + "originalName": "getAudioFile", + "pascalCase": { + "safeName": "GetAudioFile", + "unsafeName": "GetAudioFile", + }, + "screamingSnakeCase": { + "safeName": "GET_AUDIO_FILE", + "unsafeName": "GET_AUDIO_FILE", + }, + "snakeCase": { + "safeName": "get_audio_file", + "unsafeName": "get_audio_file", + }, + }, + "pagination": null, + "path": { + "head": "/audio", + "parts": [], + }, + "pathParameters": [], + "queryParameters": [ + { + "allowMultiple": false, + "availability": null, + "docs": null, + "name": { + "name": { + "camelCase": { + "safeName": "format", + "unsafeName": "format", + }, + "originalName": "format", + "pascalCase": { + "safeName": "Format", + "unsafeName": "Format", + }, + "screamingSnakeCase": { + "safeName": "FORMAT", + "unsafeName": "FORMAT", + }, + "snakeCase": { + "safeName": "format", + "unsafeName": "format", + }, + }, + "wireValue": "format", + }, + "valueType": { + "_type": "named", + "default": null, + "fernFilepath": { + "allParts": [ + { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + ], + "file": { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + "packagePath": [], + }, + "inline": null, + "name": { + "camelCase": { + "safeName": "audioFormat", + "unsafeName": "audioFormat", + }, + "originalName": "AudioFormat", + "pascalCase": { + "safeName": "AudioFormat", + "unsafeName": "AudioFormat", + }, + "screamingSnakeCase": { + "safeName": "AUDIO_FORMAT", + "unsafeName": "AUDIO_FORMAT", + }, + "snakeCase": { + "safeName": "audio_format", + "unsafeName": "audio_format", + }, + }, + "typeId": "type_service:AudioFormat", + }, + }, + ], + "requestBody": null, + "response": { + "body": { + "docs": null, + "type": "fileDownload", + }, + "status-code": null, + }, + "sdkRequest": { + "requestParameterName": { + "camelCase": { + "safeName": "request", + "unsafeName": "request", + }, + "originalName": "request", + "pascalCase": { + "safeName": "Request", + "unsafeName": "Request", + }, + "screamingSnakeCase": { + "safeName": "REQUEST", + "unsafeName": "REQUEST", + }, + "snakeCase": { + "safeName": "request", + "unsafeName": "request", + }, + }, + "shape": { + "bodyKey": { + "camelCase": { + "safeName": "body", + "unsafeName": "body", + }, + "originalName": "body", + "pascalCase": { + "safeName": "Body", + "unsafeName": "Body", + }, + "screamingSnakeCase": { + "safeName": "BODY", + "unsafeName": "BODY", + }, + "snakeCase": { + "safeName": "body", + "unsafeName": "body", + }, + }, + "includePathParameters": false, + "onlyPathParameters": false, + "type": "wrapper", + "wrapperName": { + "camelCase": { + "safeName": "getAudioRequest", + "unsafeName": "getAudioRequest", + }, + "originalName": "GetAudioRequest", + "pascalCase": { + "safeName": "GetAudioRequest", + "unsafeName": "GetAudioRequest", + }, + "screamingSnakeCase": { + "safeName": "GET_AUDIO_REQUEST", + "unsafeName": "GET_AUDIO_REQUEST", + }, + "snakeCase": { + "safeName": "get_audio_request", + "unsafeName": "get_audio_request", + }, + }, + }, + "streamParameter": null, + }, + "transport": null, + "userSpecifiedExamples": [], + }, + ], + "headers": [], + "name": { + "fernFilepath": { + "allParts": [ + { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + ], + "file": { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + "packagePath": [], + }, + }, + "pathParameters": [], + "transport": { + "type": "http", + }, + }, + }, + "sourceConfig": null, + "subpackages": { + "subpackage_service": { + "docs": null, + "errors": [], + "fernFilepath": { + "allParts": [ + { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + ], + "file": { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + "packagePath": [], + }, + "hasEndpointsInTree": true, + "name": { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + "navigationConfig": null, + "service": "service_service", + "subpackages": [], + "types": [ + "type_service:AudioFormat", + ], + "webhooks": null, + "websocket": null, + }, + }, + "types": { + "type_service:AudioFormat": { + "autogeneratedExamples": [], + "availability": null, + "docs": null, + "encoding": { + "json": {}, + "proto": null, + }, + "inline": null, + "name": { + "fernFilepath": { + "allParts": [ + { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + ], + "file": { + "camelCase": { + "safeName": "service", + "unsafeName": "service", + }, + "originalName": "service", + "pascalCase": { + "safeName": "Service", + "unsafeName": "Service", + }, + "screamingSnakeCase": { + "safeName": "SERVICE", + "unsafeName": "SERVICE", + }, + "snakeCase": { + "safeName": "service", + "unsafeName": "service", + }, + }, + "packagePath": [], + }, + "name": { + "camelCase": { + "safeName": "audioFormat", + "unsafeName": "audioFormat", + }, + "originalName": "AudioFormat", + "pascalCase": { + "safeName": "AudioFormat", + "unsafeName": "AudioFormat", + }, + "screamingSnakeCase": { + "safeName": "AUDIO_FORMAT", + "unsafeName": "AUDIO_FORMAT", + }, + "snakeCase": { + "safeName": "audio_format", + "unsafeName": "audio_format", + }, + }, + "typeId": "type_service:AudioFormat", + }, + "referencedTypes": [], + "shape": { + "_type": "enum", + "default": null, + "values": [ + { + "availability": null, + "docs": null, + "name": { + "name": { + "camelCase": { + "safeName": "mp3", + "unsafeName": "mp3", + }, + "originalName": "MP3", + "pascalCase": { + "safeName": "Mp3", + "unsafeName": "Mp3", + }, + "screamingSnakeCase": { + "safeName": "MP3", + "unsafeName": "MP3", + }, + "snakeCase": { + "safeName": "mp3", + "unsafeName": "mp3", + }, + }, + "wireValue": "MP3", + }, + }, + { + "availability": null, + "docs": null, + "name": { + "name": { + "camelCase": { + "safeName": "wav", + "unsafeName": "wav", + }, + "originalName": "WAV", + "pascalCase": { + "safeName": "Wav", + "unsafeName": "Wav", + }, + "screamingSnakeCase": { + "safeName": "WAV", + "unsafeName": "WAV", + }, + "snakeCase": { + "safeName": "wav", + "unsafeName": "wav", + }, + }, + "wireValue": "WAV", + }, + }, + { + "availability": null, + "docs": null, + "name": { + "name": { + "camelCase": { + "safeName": "ogg", + "unsafeName": "ogg", + }, + "originalName": "OGG", + "pascalCase": { + "safeName": "Ogg", + "unsafeName": "Ogg", + }, + "screamingSnakeCase": { + "safeName": "OGG", + "unsafeName": "OGG", + }, + "snakeCase": { + "safeName": "ogg", + "unsafeName": "ogg", + }, + }, + "wireValue": "OGG", + }, + }, + ], + }, + "source": null, + "userProvidedExamples": [], + }, + }, + "variables": [], + "webhookGroups": {}, + "websocketChannels": {}, +} +`; diff --git a/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/fixtures/simple/definition/api.yml b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/fixtures/simple/definition/api.yml new file mode 100644 index 00000000000..cc1ca43b9bc --- /dev/null +++ b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/fixtures/simple/definition/api.yml @@ -0,0 +1,2 @@ +name: simple-api +auth: bearer \ No newline at end of file diff --git a/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/fixtures/simple/definition/service.yml b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/fixtures/simple/definition/service.yml new file mode 100644 index 00000000000..8a4f7668597 --- /dev/null +++ b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/fixtures/simple/definition/service.yml @@ -0,0 +1,21 @@ +types: + AudioFormat: + enum: + - MP3 + - WAV + - OGG + +service: + auth: false + base-path: / + endpoints: + getAudioFile: + method: GET + path: /audio + request: + name: GetAudioRequest + query-parameters: + format: + type: AudioFormat + default: MP3 + response: bytes \ No newline at end of file diff --git a/seed/csharp-model/inline-types/.mock/generators.yml b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/fixtures/simple/generators.yml similarity index 100% rename from seed/csharp-model/inline-types/.mock/generators.yml rename to packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/fixtures/simple/generators.yml diff --git a/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/migrateFromV53ToV52.test.ts b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/migrateFromV53ToV52.test.ts new file mode 100644 index 00000000000..0dcd1e0ce0d --- /dev/null +++ b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/__test__/migrateFromV53ToV52.test.ts @@ -0,0 +1,15 @@ +import { AbsoluteFilePath, join, RelativeFilePath } from "@fern-api/fs-utils"; +import { createMigrationTester } from "../../../__test__/utils/createMigrationTester"; +import { V54_TO_V53_MIGRATION } from "../migrateFromV54ToV53"; + +const runMigration = createMigrationTester(V54_TO_V53_MIGRATION); + +describe("migrateFromV54ToV53", () => { + it("simple", async () => { + const pathToFixture = join(AbsoluteFilePath.of(__dirname), RelativeFilePath.of("./fixtures/simple")); + const migrated = await runMigration({ + pathToFixture + }); + expect(await migrated.jsonify()).toMatchSnapshot(); + }); +}); diff --git a/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/migrateFromV54ToV53.ts b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/migrateFromV54ToV53.ts new file mode 100644 index 00000000000..75a644233f3 --- /dev/null +++ b/packages/cli/generation/ir-migrations/src/migrations/v54-to-v53/migrateFromV54ToV53.ts @@ -0,0 +1,82 @@ +import { GeneratorName } from "@fern-api/configuration-loader"; +import { mapValues } from "lodash-es"; +import { IrSerialization } from "../../ir-serialization"; +import { IrVersions } from "../../ir-versions"; +import { + GeneratorWasNeverUpdatedToConsumeNewIR, + GeneratorWasNotCreatedYet, + IrMigration +} from "../../types/IrMigration"; + +export const V54_TO_V53_MIGRATION: IrMigration< + IrVersions.V54.ir.IntermediateRepresentation, + IrVersions.V53.ir.IntermediateRepresentation +> = { + laterVersion: "v54", + earlierVersion: "v53", + firstGeneratorVersionToConsumeNewIR: { + [GeneratorName.TYPESCRIPT_NODE_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.TYPESCRIPT_BROWSER_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.TYPESCRIPT]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.TYPESCRIPT_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.TYPESCRIPT_EXPRESS]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.JAVA]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.JAVA_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.JAVA_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.JAVA_SPRING]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.PYTHON_FASTAPI]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.PYTHON_PYDANTIC]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.OPENAPI_PYTHON_CLIENT]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.OPENAPI]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.STOPLIGHT]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.POSTMAN]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.PYTHON_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.GO_FIBER]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.GO_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.GO_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.RUBY_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.RUBY_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.CSHARP_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.CSHARP_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.SWIFT_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR, + [GeneratorName.SWIFT_SDK]: GeneratorWasNotCreatedYet, + [GeneratorName.PHP_MODEL]: GeneratorWasNotCreatedYet, + [GeneratorName.PHP_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR + }, + jsonifyEarlierVersion: (ir) => + IrSerialization.V53.IntermediateRepresentation.jsonOrThrow(ir, { + unrecognizedObjectKeys: "strip", + skipValidation: true + }), + migrateBackwards: (v54): IrVersions.V53.ir.IntermediateRepresentation => { + return { + ...v54, + services: mapValues(v54.services, (service) => ({ + ...service, + endpoints: service.endpoints.map((endpoint) => ({ + ...endpoint, + response: convertHttpResponse(endpoint.response) + })) + })) + }; + } +}; + +function convertHttpResponse( + response: IrVersions.V54.HttpResponse | undefined +): IrVersions.V53.HttpResponse | undefined { + if (response == null) { + return undefined; + } + + return { + statusCode: response.statusCode, + body: + response.body?.type === "bytes" + ? IrVersions.V53.HttpResponseBody.fileDownload({ + docs: undefined + }) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (response.body as any) + }; +} diff --git a/packages/cli/generation/local-generation/local-workspace-runner/src/dynamic-snippets/generateDynamicSnippetsTestSuite.ts b/packages/cli/generation/local-generation/local-workspace-runner/src/dynamic-snippets/generateDynamicSnippetsTestSuite.ts index b47f7f4806c..95496759207 100644 --- a/packages/cli/generation/local-generation/local-workspace-runner/src/dynamic-snippets/generateDynamicSnippetsTestSuite.ts +++ b/packages/cli/generation/local-generation/local-workspace-runner/src/dynamic-snippets/generateDynamicSnippetsTestSuite.ts @@ -36,6 +36,8 @@ function getEndpointSnippetRequests({ for (const example of [...endpoint.userSpecifiedExamples, ...endpoint.autogeneratedExamples]) { requests.push({ endpoint: location, + baseUrl: undefined, + environment: undefined, auth, headers: Object.fromEntries( [...(example.example?.serviceHeaders ?? []), ...(example.example?.endpointHeaders ?? [])].map( diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/basic-auth-environment-variables.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/basic-auth-environment-variables.json index aa1be2f0001..5ef5910a71e 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/basic-auth-environment-variables.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/basic-auth-environment-variables.json @@ -55,8 +55,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -131,8 +130,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/basic-auth.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/basic-auth.json index aa1be2f0001..5ef5910a71e 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/basic-auth.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/basic-auth.json @@ -55,8 +55,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -131,8 +130,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/circular-references.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/circular-references.json index d7fd6e09180..9b49361cc29 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/circular-references.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/circular-references.json @@ -223,8 +223,7 @@ "type": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json index 634f816b847..90d90a3d042 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto-exhaustive.json @@ -703,8 +703,7 @@ "type": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -956,8 +955,7 @@ "itemType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -1448,8 +1446,7 @@ "itemType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -1461,8 +1458,7 @@ "itemType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json index c8de10bcf11..fabc7176383 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/csharp-grpc-proto.json @@ -154,8 +154,7 @@ "type": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/custom-auth.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/custom-auth.json index 7167f3250e5..50d0449f61f 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/custom-auth.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/custom-auth.json @@ -55,8 +55,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -131,8 +130,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/examples.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/examples.json index b1207334c6c..fdafa9c337c 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/examples.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/examples.json @@ -222,8 +222,7 @@ "valueType": { "type": "primitive", "value": { - "type": "base64", - "default": "0" + "type": "base64" } } } @@ -357,8 +356,7 @@ "valueType": { "type": "primitive", "value": { - "type": "long", - "default": 0 + "type": "long" } } } @@ -533,8 +531,7 @@ "valueType": { "type": "primitive", "value": { - "type": "date", - "default": "1970-01-01T00:00:00.000Z" + "type": "date" } } }, @@ -543,8 +540,7 @@ "valueType": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } } @@ -998,8 +994,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -1016,8 +1011,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -1588,8 +1582,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -1890,8 +1883,7 @@ "itemType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/exhaustive.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/exhaustive.json index ea81707de3f..51205c2b20c 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/exhaustive.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/exhaustive.json @@ -79,8 +79,7 @@ "itemType": { "type": "primitive", "value": { - "type": "long", - "default": 0 + "type": "long" } } } @@ -104,8 +103,7 @@ "itemType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -117,8 +115,7 @@ "itemType": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } } @@ -130,8 +127,7 @@ "itemType": { "type": "primitive", "value": { - "type": "date", - "default": "1970-01-01T00:00:00.000Z" + "type": "date" } } } @@ -155,8 +151,7 @@ "itemType": { "type": "primitive", "value": { - "type": "base64", - "default": "0" + "type": "base64" } } } @@ -219,8 +214,7 @@ "itemType": { "type": "primitive", "value": { - "type": "bigInteger", - "default": "0" + "type": "bigInteger" } } } @@ -437,8 +431,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -468,8 +461,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -1806,8 +1798,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -3022,8 +3013,7 @@ "value": { "type": "primitive", "value": { - "type": "long", - "default": 0 + "type": "long" } } } @@ -3035,8 +3025,7 @@ "value": { "type": "primitive", "value": { - "type": "long", - "default": 0 + "type": "long" } } } @@ -3162,8 +3151,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -3175,8 +3163,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -3233,8 +3220,7 @@ "value": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } } @@ -3246,8 +3232,7 @@ "value": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } } @@ -3304,8 +3289,7 @@ "value": { "type": "primitive", "value": { - "type": "date", - "default": "1970-01-01T00:00:00.000Z" + "type": "date" } } } @@ -3317,8 +3301,7 @@ "value": { "type": "primitive", "value": { - "type": "date", - "default": "1970-01-01T00:00:00.000Z" + "type": "date" } } } @@ -3444,8 +3427,7 @@ "value": { "type": "primitive", "value": { - "type": "base64", - "default": "0" + "type": "base64" } } } @@ -3457,8 +3439,7 @@ "value": { "type": "primitive", "value": { - "type": "base64", - "default": "0" + "type": "base64" } } } @@ -3800,8 +3781,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/inline-types.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/inline-types.json deleted file mode 100644 index bcdd5f5231b..00000000000 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/inline-types.json +++ /dev/null @@ -1,326 +0,0 @@ -{ - "types": { - "type_:RootType1": { - "name": "RootType1", - "shape": { - "type": "object", - "extends": [], - "properties": [ - { - "key": "foo", - "valueType": { - "type": "primitive", - "value": { - "type": "string" - } - } - }, - { - "key": "bar", - "valueType": { - "type": "id", - "value": "type_:InlineType1" - } - } - ], - "extraProperties": { - "type": "unknown" - } - } - }, - "type_:InlineType1": { - "name": "InlineType1", - "shape": { - "type": "object", - "extends": [], - "properties": [ - { - "key": "foo", - "valueType": { - "type": "primitive", - "value": { - "type": "string" - } - } - }, - { - "key": "bar", - "valueType": { - "type": "id", - "value": "type_:NestedInlineType1" - } - } - ], - "extraProperties": { - "type": "unknown" - } - } - }, - "type_:InlineType2": { - "name": "InlineType2", - "shape": { - "type": "object", - "extends": [], - "properties": [ - { - "key": "baz", - "valueType": { - "type": "primitive", - "value": { - "type": "string" - } - } - } - ], - "extraProperties": { - "type": "unknown" - } - } - }, - "type_:NestedInlineType1": { - "name": "NestedInlineType1", - "shape": { - "type": "object", - "extends": [], - "properties": [ - { - "key": "foo", - "valueType": { - "type": "primitive", - "value": { - "type": "string" - } - } - }, - { - "key": "bar", - "valueType": { - "type": "primitive", - "value": { - "type": "string" - } - } - }, - { - "key": "myEnum", - "valueType": { - "type": "id", - "value": "type_:InlineEnum" - } - } - ], - "extraProperties": { - "type": "unknown" - } - } - }, - "type_:InlinedDiscriminatedUnion1": { - "name": "InlinedDiscriminatedUnion1", - "shape": { - "type": "discriminatedUnion", - "discriminant": "type", - "variants": [ - { - "discriminantValue": "type1", - "additionalProperties": { - "extends": [ - "type_:InlineType1" - ], - "properties": [] - } - }, - { - "discriminantValue": "type2", - "additionalProperties": { - "extends": [ - "type_:InlineType2" - ], - "properties": [] - } - } - ] - } - }, - "type_:InlinedUndiscriminatedUnion1": { - "name": "InlinedUndiscriminatedUnion1", - "shape": { - "type": "undiscriminatedUnion", - "variants": [ - { - "typeName": "InlineType1", - "type": { - "type": "id", - "value": "type_:InlineType1" - } - }, - { - "typeName": "InlineType2", - "type": { - "type": "id", - "value": "type_:InlineType2" - } - } - ] - } - }, - "type_:InlineEnum": { - "name": "InlineEnum", - "shape": { - "type": "enum", - "values": [ - { - "value": "SUNNY" - }, - { - "value": "CLOUDY" - }, - { - "value": "RAINING" - }, - { - "value": "SNOWING" - } - ] - } - } - }, - "subpackages": {}, - "rootPackage": { - "endpoints": [ - { - "auth": false, - "method": "POST", - "id": "getRoot", - "originalEndpointId": "endpoint_.getRoot", - "name": "Get Root", - "path": { - "pathParameters": [], - "parts": [ - { - "type": "literal", - "value": "/root" - }, - { - "type": "literal", - "value": "/root" - } - ] - }, - "queryParameters": [], - "headers": [], - "request": { - "type": { - "type": "json", - "contentType": "application/json", - "shape": { - "type": "object", - "extends": [], - "properties": [ - { - "key": "bar", - "valueType": { - "type": "id", - "value": "type_:InlineType1" - } - }, - { - "key": "foo", - "valueType": { - "type": "primitive", - "value": { - "type": "string" - } - } - } - ] - } - } - }, - "response": { - "type": { - "type": "reference", - "value": { - "type": "id", - "value": "type_:RootType1" - } - } - }, - "errorsV2": [], - "examples": [ - { - "path": "/root/root", - "pathParameters": {}, - "queryParameters": {}, - "headers": {}, - "requestBody": { - "bar": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - }, - "foo": "foo" - }, - "requestBodyV3": { - "type": "json", - "value": { - "bar": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - }, - "foo": "foo" - } - }, - "responseStatusCode": 200, - "responseBody": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - } - }, - "responseBodyV3": { - "type": "json", - "value": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - } - } - }, - "codeSamples": [] - } - ] - } - ], - "webhooks": [], - "websockets": [], - "types": [ - "type_:RootType1", - "type_:InlineType1", - "type_:InlineType2", - "type_:NestedInlineType1", - "type_:InlinedDiscriminatedUnion1", - "type_:InlinedUndiscriminatedUnion1", - "type_:InlineEnum" - ], - "subpackages": [] - }, - "snippetsConfiguration": {}, - "globalHeaders": [] -} \ No newline at end of file diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/java-custom-package-prefix.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/java-custom-package-prefix.json new file mode 100644 index 00000000000..26a4be39886 --- /dev/null +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/java-custom-package-prefix.json @@ -0,0 +1,274 @@ +{ + "types": { + "type_imdb:MovieId": { + "name": "MovieId", + "shape": { + "type": "alias", + "value": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + "type_imdb:Movie": { + "name": "Movie", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "id", + "valueType": { + "type": "id", + "value": "type_imdb:MovieId" + } + }, + { + "key": "title", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "The rating scale is one to five stars", + "key": "rating", + "valueType": { + "type": "primitive", + "value": { + "type": "double" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_imdb:CreateMovieRequest": { + "name": "CreateMovieRequest", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "title", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "key": "rating", + "valueType": { + "type": "primitive", + "value": { + "type": "double" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + } + }, + "subpackages": { + "subpackage_imdb": { + "subpackageId": "subpackage_imdb", + "name": "imdb", + "endpoints": [ + { + "auth": false, + "description": "Add a movie to the database", + "method": "POST", + "id": "createMovie", + "originalEndpointId": "endpoint_imdb.createMovie", + "name": "Create Movie", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "/movies" + }, + { + "type": "literal", + "value": "/create-movie" + } + ] + }, + "queryParameters": [], + "headers": [], + "request": { + "type": { + "type": "json", + "contentType": "application/json", + "shape": { + "type": "reference", + "value": { + "type": "id", + "value": "type_imdb:CreateMovieRequest" + } + } + } + }, + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_imdb:MovieId" + } + }, + "statusCode": 201 + }, + "errorsV2": [], + "examples": [ + { + "path": "/movies/create-movie", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": { + "title": "title", + "rating": 1.1 + }, + "requestBodyV3": { + "type": "json", + "value": { + "title": "title", + "rating": 1.1 + } + }, + "responseStatusCode": 200, + "responseBody": "string", + "responseBodyV3": { + "type": "json", + "value": "string" + }, + "codeSamples": [] + } + ] + }, + { + "auth": false, + "method": "GET", + "id": "getMovie", + "originalEndpointId": "endpoint_imdb.getMovie", + "name": "Get Movie", + "path": { + "pathParameters": [ + { + "key": "movieId", + "type": { + "type": "id", + "value": "type_imdb:MovieId" + } + } + ], + "parts": [ + { + "type": "literal", + "value": "/movies" + }, + { + "type": "literal", + "value": "/" + }, + { + "type": "pathParameter", + "value": "movieId" + }, + { + "type": "literal", + "value": "" + } + ] + }, + "queryParameters": [], + "headers": [], + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_imdb:Movie" + } + } + }, + "errorsV2": [ + { + "type": { + "type": "alias", + "value": { + "type": "id", + "value": "type_imdb:MovieId" + } + }, + "statusCode": 404, + "name": "MovieDoesNotExistError", + "examples": [] + } + ], + "examples": [ + { + "path": "/movies/movieId", + "pathParameters": { + "movieId": "movieId" + }, + "queryParameters": {}, + "headers": {}, + "responseStatusCode": 200, + "responseBody": { + "id": "id", + "title": "title", + "rating": 1.1 + }, + "responseBodyV3": { + "type": "json", + "value": { + "id": "id", + "title": "title", + "rating": 1.1 + } + }, + "codeSamples": [] + } + ] + } + ], + "webhooks": [], + "websockets": [], + "types": [ + "type_imdb:MovieId", + "type_imdb:Movie", + "type_imdb:CreateMovieRequest" + ], + "subpackages": [] + } + }, + "rootPackage": { + "endpoints": [], + "webhooks": [], + "websockets": [], + "types": [], + "subpackages": [ + "subpackage_imdb" + ] + }, + "auth": { + "type": "bearerAuth", + "tokenName": "token" + }, + "snippetsConfiguration": {}, + "globalHeaders": [] +} \ No newline at end of file diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/mixed-case.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/mixed-case.json index e7db1908d39..a8f44f83270 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/mixed-case.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/mixed-case.json @@ -287,8 +287,7 @@ "type": { "type": "primitive", "value": { - "type": "date", - "default": "1970-01-01T00:00:00.000Z" + "type": "date" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/object.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/object.json index aaa0e393f32..9dc5e8268af 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/object.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/object.json @@ -39,8 +39,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } }, @@ -49,8 +48,7 @@ "valueType": { "type": "primitive", "value": { - "type": "long", - "default": 0 + "type": "long" } } }, @@ -59,8 +57,7 @@ "valueType": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } }, @@ -69,8 +66,7 @@ "valueType": { "type": "primitive", "value": { - "type": "date", - "default": "1970-01-01T00:00:00.000Z" + "type": "date" } } }, @@ -88,8 +84,7 @@ "valueType": { "type": "primitive", "value": { - "type": "base64", - "default": "0" + "type": "base64" } } }, @@ -130,8 +125,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -143,8 +137,7 @@ "itemType": { "type": "primitive", "value": { - "type": "long", - "default": 0 + "type": "long" } } } @@ -255,8 +248,7 @@ "valueType": { "type": "primitive", "value": { - "type": "bigInteger", - "default": "0" + "type": "bigInteger" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/pagination.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/pagination.json index 803d98d8edb..855dba516b7 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/pagination.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/pagination.json @@ -311,8 +311,7 @@ "itemType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/query-parameters.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/query-parameters.json index 916fa36778c..7eb51884568 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/query-parameters.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/query-parameters.json @@ -110,8 +110,7 @@ "type": { "type": "primitive", "value": { - "type": "date", - "default": "1970-01-01T00:00:00.000Z" + "type": "date" } } }, @@ -120,8 +119,7 @@ "type": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } }, @@ -130,8 +128,7 @@ "type": { "type": "primitive", "value": { - "type": "base64", - "default": "0" + "type": "base64" } } }, @@ -159,8 +156,7 @@ "itemType": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/streaming-parameter.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/streaming-parameter.json index 50f6b6613f8..bf18e1197bb 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/streaming-parameter.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/streaming-parameter.json @@ -106,8 +106,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } }, diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/trace.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/trace.json index 95f629c7e72..d640ebb93bb 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/trace.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/trace.json @@ -16,8 +16,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -34,8 +33,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -185,8 +183,7 @@ "itemType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -256,8 +253,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -412,8 +408,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -1421,8 +1416,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -2664,8 +2658,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -2686,8 +2679,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } }, @@ -2906,8 +2898,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -3747,8 +3738,7 @@ "valueType": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } }, @@ -3847,8 +3837,7 @@ "valueType": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } }, @@ -4522,8 +4511,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } }, @@ -4624,8 +4612,7 @@ "itemType": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } } @@ -4782,8 +4769,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -4904,8 +4890,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -5514,8 +5499,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -5787,8 +5771,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -6136,8 +6119,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -6258,8 +6240,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -6868,8 +6849,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -7141,8 +7121,7 @@ "valueType": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } @@ -8689,8 +8668,7 @@ "type": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } }, @@ -8701,8 +8679,7 @@ "itemType": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/ts-inline-types.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/ts-inline-types.json new file mode 100644 index 00000000000..be312f99f23 --- /dev/null +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/ts-inline-types.json @@ -0,0 +1,1436 @@ +{ + "types": { + "type_:AliasMapInline": { + "name": "AliasMapInline", + "shape": { + "type": "alias", + "value": { + "type": "map", + "keyType": { + "type": "primitive", + "value": { + "type": "string" + } + }, + "valueType": { + "type": "id", + "value": "type_:AliasInlineValue" + } + } + } + }, + "type_:AliasSetInline": { + "name": "AliasSetInline", + "shape": { + "type": "alias", + "value": { + "type": "set", + "itemType": { + "type": "id", + "value": "type_:AliasInlineValue" + } + } + } + }, + "type_:AliasListInline": { + "name": "AliasListInline", + "shape": { + "type": "alias", + "value": { + "type": "list", + "itemType": { + "type": "id", + "value": "type_:AliasInlineValue" + } + } + } + }, + "type_:AliasInlineValue": { + "name": "AliasInlineValue", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "key": "bar", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:RequestTypeInlineType1": { + "description": "lorem ipsum", + "name": "RequestTypeInlineType1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:RootType1": { + "description": "lorem ipsum", + "name": "RootType1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "bar", + "valueType": { + "type": "id", + "value": "type_:RootType1InlineType1" + } + }, + { + "description": "lorem ipsum", + "key": "fooMap", + "valueType": { + "type": "map", + "keyType": { + "type": "primitive", + "value": { + "type": "string" + } + }, + "valueType": { + "type": "id", + "value": "type_:RootType1FooMapValue" + } + } + }, + { + "description": "lorem ipsum", + "key": "fooList", + "valueType": { + "type": "list", + "itemType": { + "type": "id", + "value": "type_:RootType1FooListItem" + } + } + }, + { + "description": "lorem ipsum", + "key": "fooSet", + "valueType": { + "type": "set", + "itemType": { + "type": "id", + "value": "type_:RootType1FooSetItem" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:RootType1FooMapValue": { + "description": "lorem ipsum", + "name": "RootType1FooMapValue", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:RootType1FooListItem": { + "description": "lorem ipsum", + "name": "RootType1FooListItem", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:RootType1FooSetItem": { + "description": "lorem ipsum", + "name": "RootType1FooSetItem", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:RootType1InlineType1": { + "description": "lorem ipsum", + "name": "RootType1InlineType1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "bar", + "valueType": { + "type": "id", + "value": "type_:RootType1InlineType1NestedInlineType1" + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:RootType1InlineType1NestedInlineType1": { + "description": "lorem ipsum", + "name": "RootType1InlineType1NestedInlineType1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "bar", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "myEnum", + "valueType": { + "type": "id", + "value": "type_:InlineEnum1" + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:DiscriminatedUnion1": { + "description": "lorem ipsum", + "name": "DiscriminatedUnion1", + "shape": { + "type": "discriminatedUnion", + "discriminant": "type", + "variants": [ + { + "description": "lorem ipsum", + "discriminantValue": "type1", + "additionalProperties": { + "extends": [ + "type_:DiscriminatedUnion1InlineType1" + ], + "properties": [] + } + }, + { + "description": "lorem ipsum", + "discriminantValue": "type2", + "additionalProperties": { + "extends": [ + "type_:DiscriminatedUnion1InlineType2" + ], + "properties": [] + } + }, + { + "description": "lorem ipsum", + "discriminantValue": "ref", + "additionalProperties": { + "extends": [ + "type_:ReferenceType" + ], + "properties": [] + } + } + ] + } + }, + "type_:DiscriminatedUnion1InlineType1": { + "description": "lorem ipsum", + "name": "DiscriminatedUnion1InlineType1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "bar", + "valueType": { + "type": "id", + "value": "type_:DiscriminatedUnion1InlineType1InlineType1" + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:DiscriminatedUnion1InlineType1InlineType1": { + "description": "lorem ipsum", + "name": "DiscriminatedUnion1InlineType1InlineType1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:DiscriminatedUnion1InlineType2": { + "description": "lorem ipsum", + "name": "DiscriminatedUnion1InlineType2", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "baz", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UndiscriminatedUnion1": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1", + "shape": { + "type": "undiscriminatedUnion", + "variants": [ + { + "typeName": "UndiscriminatedUnion1InlineType1", + "description": "lorem ipsum", + "type": { + "type": "id", + "value": "type_:UndiscriminatedUnion1InlineType1" + } + }, + { + "typeName": "UndiscriminatedUnion1InlineType2", + "description": "lorem ipsum", + "type": { + "type": "id", + "value": "type_:UndiscriminatedUnion1InlineType2" + } + }, + { + "typeName": "UndiscriminatedUnion1DiscriminatedUnion1", + "description": "lorem ipsum", + "type": { + "type": "id", + "value": "type_:UndiscriminatedUnion1DiscriminatedUnion1" + } + }, + { + "typeName": "UndiscriminatedUnion1DiscriminatedUnion1", + "description": "lorem ipsum", + "type": { + "type": "id", + "value": "type_:UndiscriminatedUnion1DiscriminatedUnion1" + } + }, + { + "typeName": "UndiscriminatedUnion1InlineEnum1", + "description": "lorem ipsum", + "type": { + "type": "id", + "value": "type_:UndiscriminatedUnion1InlineEnum1" + } + }, + { + "typeName": "UserId", + "description": "lorem ipsum", + "type": { + "type": "id", + "value": "type_:UserId" + } + }, + { + "description": "lorem ipsum", + "type": { + "type": "list", + "itemType": { + "type": "id", + "value": "type_:UndiscriminatedUnion1InlineListItem1" + } + } + }, + { + "description": "lorem ipsum", + "type": { + "type": "set", + "itemType": { + "type": "id", + "value": "type_:UndiscriminatedUnion1InlineSetItem1" + } + } + }, + { + "description": "lorem ipsum", + "type": { + "type": "map", + "keyType": { + "type": "primitive", + "value": { + "type": "string" + } + }, + "valueType": { + "type": "id", + "value": "type_:UndiscriminatedUnion1InlineMapItem1" + } + } + }, + { + "typeName": "ReferenceType", + "description": "lorem ipsum", + "type": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ] + } + }, + "type_:UndiscriminatedUnion1InlineType1": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1InlineType1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "bar", + "valueType": { + "type": "id", + "value": "type_:UndiscriminatedUnion1InlineType1InlineType1" + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UndiscriminatedUnion1InlineType1InlineType1": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1InlineType1InlineType1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UndiscriminatedUnion1InlineType2": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1InlineType2", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "baz", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:InlineEnum1": { + "description": "lorem ipsum", + "name": "InlineEnum1", + "shape": { + "type": "enum", + "values": [ + { + "value": "SUNNY" + }, + { + "value": "CLOUDY" + }, + { + "value": "RAINING" + }, + { + "value": "SNOWING" + } + ] + } + }, + "type_:UndiscriminatedUnion1DiscriminatedUnion1": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1DiscriminatedUnion1", + "shape": { + "type": "discriminatedUnion", + "discriminant": "type", + "variants": [ + { + "description": "lorem ipsum", + "discriminantValue": "type1", + "additionalProperties": { + "extends": [ + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType1" + ], + "properties": [] + } + }, + { + "description": "lorem ipsum", + "discriminantValue": "type2", + "additionalProperties": { + "extends": [ + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType2" + ], + "properties": [] + } + }, + { + "description": "lorem ipsum", + "discriminantValue": "ref", + "additionalProperties": { + "extends": [ + "type_:ReferenceType" + ], + "properties": [] + } + } + ] + } + }, + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType1": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1DiscriminatedUnion1InlineType1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "bar", + "valueType": { + "type": "id", + "value": "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1" + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType2": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1DiscriminatedUnion1InlineType2", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "baz", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UndiscriminatedUnion1InlineEnum1": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1InlineEnum1", + "shape": { + "type": "enum", + "values": [ + { + "value": "SUNNY" + }, + { + "value": "CLOUDY" + }, + { + "value": "RAINING" + }, + { + "value": "SNOWING" + } + ] + } + }, + "type_:UserId": { + "description": "lorem ipsum", + "name": "UserId", + "shape": { + "type": "alias", + "value": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + }, + "type_:UndiscriminatedUnion1InlineListItem1": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1InlineListItem1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UndiscriminatedUnion1InlineSetItem1": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1InlineSetItem1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:UndiscriminatedUnion1InlineMapItem1": { + "description": "lorem ipsum", + "name": "UndiscriminatedUnion1InlineMapItem1", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + }, + { + "description": "lorem ipsum", + "key": "ref", + "valueType": { + "type": "id", + "value": "type_:ReferenceType" + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + }, + "type_:ReferenceType": { + "description": "lorem ipsum", + "name": "ReferenceType", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "description": "lorem ipsum", + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + ], + "extraProperties": { + "type": "unknown" + } + } + } + }, + "subpackages": {}, + "rootPackage": { + "endpoints": [ + { + "auth": false, + "method": "POST", + "id": "getRoot", + "originalEndpointId": "endpoint_.getRoot", + "name": "Get Root", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "/root" + }, + { + "type": "literal", + "value": "/root" + } + ] + }, + "queryParameters": [], + "headers": [], + "request": { + "type": { + "type": "json", + "contentType": "application/json", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "bar", + "valueType": { + "type": "id", + "value": "type_:RequestTypeInlineType1" + } + }, + { + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + ] + } + } + }, + "response": { + "type": { + "type": "reference", + "value": { + "type": "id", + "value": "type_:RootType1" + } + } + }, + "errorsV2": [], + "examples": [ + { + "path": "/root/root", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": { + "bar": { + "foo": "foo" + }, + "foo": "foo" + }, + "requestBodyV3": { + "type": "json", + "value": { + "bar": { + "foo": "foo" + }, + "foo": "foo" + } + }, + "responseStatusCode": 200, + "responseBody": { + "foo": "foo", + "bar": { + "foo": "foo", + "bar": { + "foo": "foo", + "bar": "bar", + "myEnum": "SUNNY", + "ref": { + "foo": "foo" + } + }, + "ref": { + "foo": "foo" + } + }, + "fooMap": { + "fooMap": { + "foo": "foo", + "ref": { + "foo": "foo" + } + } + }, + "fooList": [ + { + "foo": "foo", + "ref": { + "foo": "foo" + } + }, + { + "foo": "foo", + "ref": { + "foo": "foo" + } + } + ], + "fooSet": [ + { + "foo": "foo", + "ref": { + "foo": "foo" + } + } + ], + "ref": { + "foo": "foo" + } + }, + "responseBodyV3": { + "type": "json", + "value": { + "foo": "foo", + "bar": { + "foo": "foo", + "bar": { + "foo": "foo", + "bar": "bar", + "myEnum": "SUNNY", + "ref": { + "foo": "foo" + } + }, + "ref": { + "foo": "foo" + } + }, + "fooMap": { + "fooMap": { + "foo": "foo", + "ref": { + "foo": "foo" + } + } + }, + "fooList": [ + { + "foo": "foo", + "ref": { + "foo": "foo" + } + }, + { + "foo": "foo", + "ref": { + "foo": "foo" + } + } + ], + "fooSet": [ + { + "foo": "foo", + "ref": { + "foo": "foo" + } + } + ], + "ref": { + "foo": "foo" + } + } + }, + "codeSamples": [] + } + ] + }, + { + "auth": false, + "method": "POST", + "id": "getDiscriminatedUnion", + "originalEndpointId": "endpoint_.getDiscriminatedUnion", + "name": "Get Discriminated Union", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "/root" + }, + { + "type": "literal", + "value": "/discriminated-union" + } + ] + }, + "queryParameters": [], + "headers": [], + "request": { + "type": { + "type": "json", + "contentType": "application/json", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "bar", + "valueType": { + "type": "id", + "value": "type_:DiscriminatedUnion1" + } + }, + { + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + ] + } + } + }, + "errorsV2": [], + "examples": [ + { + "path": "/root/discriminated-union", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": { + "bar": { + "type": "type1", + "foo": "foo", + "bar": { + "foo": "foo", + "ref": { + "foo": "foo" + } + }, + "ref": { + "foo": "foo" + } + }, + "foo": "foo" + }, + "requestBodyV3": { + "type": "json", + "value": { + "bar": { + "type": "type1", + "foo": "foo", + "bar": { + "foo": "foo", + "ref": { + "foo": "foo" + } + }, + "ref": { + "foo": "foo" + } + }, + "foo": "foo" + } + }, + "responseStatusCode": 204, + "codeSamples": [] + } + ] + }, + { + "auth": false, + "method": "POST", + "id": "getUndiscriminatedUnion", + "originalEndpointId": "endpoint_.getUndiscriminatedUnion", + "name": "Get Undiscriminated Union", + "path": { + "pathParameters": [], + "parts": [ + { + "type": "literal", + "value": "/root" + }, + { + "type": "literal", + "value": "/undiscriminated-union" + } + ] + }, + "queryParameters": [], + "headers": [], + "request": { + "type": { + "type": "json", + "contentType": "application/json", + "shape": { + "type": "object", + "extends": [], + "properties": [ + { + "key": "bar", + "valueType": { + "type": "id", + "value": "type_:UndiscriminatedUnion1" + } + }, + { + "key": "foo", + "valueType": { + "type": "primitive", + "value": { + "type": "string" + } + } + } + ] + } + } + }, + "errorsV2": [], + "examples": [ + { + "path": "/root/undiscriminated-union", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": { + "bar": { + "foo": "foo", + "bar": { + "foo": "foo", + "ref": { + "foo": "foo" + } + }, + "ref": { + "foo": "foo" + } + }, + "foo": "foo" + }, + "requestBodyV3": { + "type": "json", + "value": { + "bar": { + "foo": "foo", + "bar": { + "foo": "foo", + "ref": { + "foo": "foo" + } + }, + "ref": { + "foo": "foo" + } + }, + "foo": "foo" + } + }, + "responseStatusCode": 204, + "codeSamples": [] + } + ] + } + ], + "webhooks": [], + "websockets": [], + "types": [ + "type_:AliasMapInline", + "type_:AliasSetInline", + "type_:AliasListInline", + "type_:AliasInlineValue", + "type_:RequestTypeInlineType1", + "type_:RootType1", + "type_:RootType1FooMapValue", + "type_:RootType1FooListItem", + "type_:RootType1FooSetItem", + "type_:RootType1InlineType1", + "type_:RootType1InlineType1NestedInlineType1", + "type_:DiscriminatedUnion1", + "type_:DiscriminatedUnion1InlineType1", + "type_:DiscriminatedUnion1InlineType1InlineType1", + "type_:DiscriminatedUnion1InlineType2", + "type_:UndiscriminatedUnion1", + "type_:UndiscriminatedUnion1InlineType1", + "type_:UndiscriminatedUnion1InlineType1InlineType1", + "type_:UndiscriminatedUnion1InlineType2", + "type_:InlineEnum1", + "type_:UndiscriminatedUnion1DiscriminatedUnion1", + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType1", + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1", + "type_:UndiscriminatedUnion1DiscriminatedUnion1InlineType2", + "type_:UndiscriminatedUnion1InlineEnum1", + "type_:UserId", + "type_:UndiscriminatedUnion1InlineListItem1", + "type_:UndiscriminatedUnion1InlineSetItem1", + "type_:UndiscriminatedUnion1InlineMapItem1", + "type_:ReferenceType" + ], + "subpackages": [] + }, + "snippetsConfiguration": {}, + "globalHeaders": [] +} \ No newline at end of file diff --git a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/unions.json b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/unions.json index 2f93a2002fa..08d7785016a 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/unions.json +++ b/packages/cli/register/src/ir-to-fdr-converter/__test__/__snapshots__/unions.json @@ -326,8 +326,7 @@ "valueType": { "type": "primitive", "value": { - "type": "date", - "default": "1970-01-01T00:00:00.000Z" + "type": "date" } } } @@ -344,8 +343,7 @@ "valueType": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } } @@ -373,8 +371,7 @@ "itemType": { "type": "primitive", "value": { - "type": "date", - "default": "1970-01-01T00:00:00.000Z" + "type": "date" } } } @@ -394,8 +391,7 @@ "itemType": { "type": "primitive", "value": { - "type": "datetime", - "default": "1970-01-01T00:00:00.000Z" + "type": "datetime" } } } @@ -717,8 +713,7 @@ "value": { "type": "primitive", "value": { - "type": "boolean", - "default": false + "type": "boolean" } } } diff --git a/packages/cli/register/src/ir-to-fdr-converter/convertPackage.ts b/packages/cli/register/src/ir-to-fdr-converter/convertPackage.ts index a6f1b96a28f..cbd95fb57a9 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/convertPackage.ts +++ b/packages/cli/register/src/ir-to-fdr-converter/convertPackage.ts @@ -520,6 +520,7 @@ function convertResponse(irResponse: Ir.http.HttpResponse): FdrCjsSdk.api.v1.reg }; }, text: () => undefined, // TODO: support text/plain in FDR + bytes: () => undefined, // TODO: support text/plain in FDR streamParameter: () => undefined, // TODO: support stream parameter in FDR streaming: (streamingResponse) => { if (streamingResponse.type === "text") { diff --git a/packages/cli/register/src/ir-to-fdr-converter/convertTypeShape.ts b/packages/cli/register/src/ir-to-fdr-converter/convertTypeShape.ts index 476327f9eb0..cec4d3bd395 100644 --- a/packages/cli/register/src/ir-to-fdr-converter/convertTypeShape.ts +++ b/packages/cli/register/src/ir-to-fdr-converter/convertTypeShape.ts @@ -207,7 +207,7 @@ export function convertTypeReference(irTypeReference: Ir.types.TypeReference): F long: () => { return { type: "long", - default: 0, + default: primitive.v2?.type === "long" ? primitive.v2.default : undefined, minimum: undefined, maximum: undefined }; @@ -215,19 +215,19 @@ export function convertTypeReference(irTypeReference: Ir.types.TypeReference): F boolean: () => { return { type: "boolean", - default: false + default: primitive.v2?.type === "boolean" ? primitive.v2.default : undefined }; }, dateTime: () => { return { type: "datetime", - default: new Date(0).toISOString() + default: undefined }; }, date: () => { return { type: "date", - default: new Date(0).toISOString() + default: undefined }; }, uuid: () => { @@ -239,13 +239,13 @@ export function convertTypeReference(irTypeReference: Ir.types.TypeReference): F base64: () => { return { type: "base64", - default: (0x00).toString() + default: undefined }; }, bigInteger: () => { return { type: "bigInteger", - default: BigInt(0).toString() + default: primitive.v2?.type === "bigInteger" ? primitive.v2.default : undefined }; }, uint: () => { diff --git a/packages/cli/workspace/browser-compatible-fern-workspace/src/InMemoryOpenAPILoader.ts b/packages/cli/workspace/browser-compatible-fern-workspace/src/InMemoryOpenAPILoader.ts index cb2b5010b38..23c293ef52e 100644 --- a/packages/cli/workspace/browser-compatible-fern-workspace/src/InMemoryOpenAPILoader.ts +++ b/packages/cli/workspace/browser-compatible-fern-workspace/src/InMemoryOpenAPILoader.ts @@ -21,7 +21,7 @@ export class InMemoryOpenAPILoader { overrides }: { openapi: OpenAPI.Document; - overrides: OpenAPI.Document | undefined; + overrides: Partial | undefined; }): OpenAPIV3.Document { if (isOpenAPIV2(openapi)) { throw new Error("Swagger v2.0 is not supported in the browser"); diff --git a/packages/cli/workspace/browser-compatible-fern-workspace/src/OpenAPIWorkspace.ts b/packages/cli/workspace/browser-compatible-fern-workspace/src/OpenAPIWorkspace.ts index b4566984dbc..b9a515a98fa 100644 --- a/packages/cli/workspace/browser-compatible-fern-workspace/src/OpenAPIWorkspace.ts +++ b/packages/cli/workspace/browser-compatible-fern-workspace/src/OpenAPIWorkspace.ts @@ -23,7 +23,7 @@ export declare namespace OpenAPIWorkspace { export interface Spec { parsed: OpenAPI.Document; - overrides?: OpenAPI.Document; + overrides?: Partial; settings?: Settings; } diff --git a/packages/commons/core-utils/src/index.ts b/packages/commons/core-utils/src/index.ts index f130697333c..7035a1d36e5 100644 --- a/packages/commons/core-utils/src/index.ts +++ b/packages/commons/core-utils/src/index.ts @@ -27,3 +27,4 @@ export { stripLeadingSlash } from "./stripLeadingSlash"; export { parseEndpointLocator } from "./parseEndpointLocator"; export { removeSuffix } from "./removeSuffix"; export { validateAgainstJsonSchema } from "./validateAgainstJsonSchema"; +export { type SetRequired } from "./setRequired"; diff --git a/packages/commons/core-utils/src/setRequired.ts b/packages/commons/core-utils/src/setRequired.ts new file mode 100644 index 00000000000..308165d6797 --- /dev/null +++ b/packages/commons/core-utils/src/setRequired.ts @@ -0,0 +1,3 @@ +type Required = T & { [P in K]-?: T[P] }; + +export type SetRequired = Pick> & Required; diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/VERSION b/packages/ir-sdk/fern/apis/ir-types-latest/VERSION index cee221857a4..89d18917ebe 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/VERSION +++ b/packages/ir-sdk/fern/apis/ir-types-latest/VERSION @@ -1 +1 @@ -53.23.0 +54.0.0 diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md b/packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md index 34631de1847..bdeacf8dd51 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md +++ b/packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v54.0.0] - 2024-12-11 + +- Break: The HttpResponse type in the IR now supports bytes responses. This is useful for different languages - + for example TypeScript can return an `ArrayBuffer` instead of `stream.Readable` in this case. + +## [v53.24.0] - 2024-11-04 + +- Feature: The dynamic snippets IR supports a configurable baseURL and/or environment. + ## [v53.23.0] - 2024-11-04 - Internal: Update the Dynamic IR discriminator so that the generated types are unaffected diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/environment.yml b/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/environment.yml new file mode 100644 index 00000000000..130c93a6bbe --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/environment.yml @@ -0,0 +1,21 @@ +imports: + environment: ../environment.yml +types: + EnvironmentValues: + docs: | + Represents the value to use for a specific environment. There are three cases: + + 1. When sent as an EnvironmentId string, the generator assumes the value matches the name of the + environment (e.g. "Staging"), and returns an error otherwise. + + 2. If the API supports multiple environment URLs, send a map of URLs, e.g. + { + "ec2": "https://staging.ec2.aws.com", + "s3": "https://staging.s3.aws.com" + } + discriminated: false + union: + - environment.EnvironmentId + - MultipleEnvironmentUrlValues + + MultipleEnvironmentUrlValues: map \ No newline at end of file diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/ir.yml b/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/ir.yml index ef78d99015d..7577bd975d5 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/ir.yml +++ b/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/ir.yml @@ -1,6 +1,7 @@ imports: commons: ../commons.yml endpoints: ./endpoints.yml + environment: ../environment.yml types: ./types.yml types: DynamicIntermediateRepresentation: @@ -24,3 +25,4 @@ types: The headers that are required on every request. These headers are typically included in the SDK's client constructor. type: optional> + environments: optional diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/snippets.yml b/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/snippets.yml index ddb48eb3905..c000cc755c0 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/snippets.yml +++ b/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/snippets.yml @@ -1,6 +1,7 @@ imports: auth: ./auth.yml endpoints: ./endpoints.yml + environment: ./environment.yml types: ErrorSeverity: @@ -34,6 +35,8 @@ types: The user-facing request type used to generate a dynamic snippet. properties: endpoint: endpoints.EndpointLocation + baseURL: optional + environment: optional auth: optional pathParameters: optional queryParameters: optional diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml b/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml index 01185fd04ab..820550e8f88 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml +++ b/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml @@ -194,12 +194,14 @@ types: json: JsonResponse fileDownload: FileDownloadResponse text: TextResponse + bytes: BytesResponse HttpResponseBody: union: json: JsonResponse fileDownload: FileDownloadResponse text: TextResponse + bytes: BytesResponse streaming: StreamingResponse streamParameter: type: StreamParameterResponse @@ -235,6 +237,9 @@ types: TextResponse: extends: commons.WithDocs + + BytesResponse: + extends: commons.WithDocs StreamParameterResponse: properties: diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/VERSION b/packages/ir-sdk/fern/apis/ir-types-v53/VERSION new file mode 100644 index 00000000000..cee221857a4 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/VERSION @@ -0,0 +1 @@ +53.23.0 diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/changelog/CHANGELOG.md b/packages/ir-sdk/fern/apis/ir-types-v53/changelog/CHANGELOG.md new file mode 100644 index 00000000000..34631de1847 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/changelog/CHANGELOG.md @@ -0,0 +1,221 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v53.23.0] - 2024-11-04 + +- Internal: Update the Dynamic IR discriminator so that the generated types are unaffected + when `noSerdeLayer` is enabled. + +## [v53.22.0] - 2024-11-04 + +- Redacted: Use v53.23.0 instead. +- Internal: Add the `dynamic` property to the IR. This should be + made requried in IRv54. + +## [v53.21.0] - 2024-11-04 + +- Internal: Add the `includePathParameters` and `onlyPathParameters` properties to the dynamic + IR within the `InlinedRequestMetadata` type. + +## [v53.20.0] - 2024-11-04 + +- Internal: Add `includePathParameters` and `onlyPathParameters` property to the wrapped request. + + With this, the generator can determine whether or not the path parameters should be included in + the wrapped request, or if the wrapped request can be omitted entirely. + +## [v53.19.0] - 2024-11-04 + +- Internal: Add errors property to dynamic `EndpointSnippetResponse`. + +## [v53.18.0] - 2024-11-04 + +- Internal: Add `transport` to `HttpEndpoint`. `transport` on the endpoint overrides the `transport` on the `HttpService`. + +## [v53.17.0] - 2024-11-01 + +- Internal: Add dynamic audience to endpoint snippet request and response. + +## [v53.16.0] - 2024-10-31 + +- Internal: Publish @fern-api/dynamic-ir-sdk + +## [v53.15.0] - 2024-10-23 + +- Internal: Introduce dynamic IR types. + +## [v53.14.0] - 2024-10-16 + +- Feature: Add `inline` to type declarations so that generators can nest unnamed types. + +## [v53.13.0] - 2024-10-07 + +- Feature: Add `contentType` to file upload body properties. + +## [v53.12.0] - 2024-09-13 + +- Feature: Add `contentType` to file upload body properties. + +## [v53.11.0] - 2024-09-13 + +- Fix: Add `availability` to inline websocket, webhook, and http body parameter properties. + +## [v53.10.0] - 2024-09-12 + +- Feature: Add `display-name` to discriminated union values for use with displaying docs. + +## [v53.9.0] - 2024-08-29 (TODO: Make required in next major) + +- Feature: Introduce a `PublishingConfig` to the IR instead of trying to go through Fiddle. + +## [v53.8.0] - 2024-08-23 (TODO: Make required in next major) + +- Fix: Include the raw datetime alongside the parsed datetime in `ExamplePrimitive`. + +## [v53.7.2] - 2024-08-12 + +- Fix: Upgrade the Pydantic generator so that `enum_type` is set to `python_enums` + +## [v53.7.1] - 2024-08-12 + +- Fix: Upgrade the Pydantic generator so that `unknown` properties that are missing do not throw. + +## [v53.7.0] - 2024-08-12 + +- Improvement: The IR now contains a `shape` field on the `ExampleQueryParameter` type that denotes whether the parameter + allows multiple values, and if so, whether they should be comma-separated or exploded. + +## [v53.6.0] - 2024-08-05 + +- Internal: Bump to the latest typescript SDK generator. + +## [v53.5.0] - 2024-08-05 \*\* (TODO: Make required in next major) + +- Feature: Support a `hasNextPage` property for offset pagination. + +## [v53.4.0] - 2024-08-05 \*\* (TODO: Make required in next major) + +- Feature: Add `User-Agent` header so that SDK generators can start sending the user agent. + +## [v53.3.0] - 2024-08-05 + +- Feature: Add gRPC/Protobuf types (defined in `proto.yml`) to generate gRPC/Protobuf mappers. + +## [v53.2.0] - 2024-07-30 + +- Improvement: The IR now contains an `extendedProperties` field where all properties from extended types are denormalized. This removes logic + that generator authors were consistently reimplementing. + +## [v53.1.0] - 2024-07-30 + +- Improvement: The IR now contains the API Definition ID such that the generators may specify this ID when uploading snippet templates. This is necessary for resolving union snippets. + +## [v53.0.0] - 2024-07-30 + +- Feature: Add `float` and `bytes` primitive types. +- Feature: Add a `PrimitiveTypeV2` variant for every `PrimitiveTypeV1`. + +## [v52.0.0] - 2024-07-23 + +- Feature: Add `uint` and `uint64` primitive types. +- Feature: Add support for default enum values. +- Feature: Add support for in-lined type references (e.g. enums). + +## [v51.0.0] - 2024-07-18 + +- Improvement: Add `TypeReference`s to `ExampleContainer` types, especially helpful in the case of empty container + examples. +- Improvement: The `TypeDeclaration` type now has `userDefinedExamples` in place of the previous `example` field. It + also now has an `autogeneratedExamples` field that will be populated with autogenerated examples in a future PR. + +## [v50.2.0] - 2024-07-16 + +- Feature: Add `ApiVersionScheme`, which is used to model API version headers as an top-level enum. + +## [v50.1.0] - 2024-07-16 + +- No changes. + +## [v50.0.0] - 2024-06-20 + +- Improvement: add PrimitiveType V2 for Boolean, Long and Big Int types, allowing for default values to be specified + +## [v49.0.0] - 2024-06-20 + +- Feature: Support generating code with `stream` param for endpoints like chat completion. + +## [v48.1.0] - 2024-06-20 + +- Feature: Add an optional `introduction` field to the `ReadmeConfig`, which is configurable + in the user's `generators.yml`. + +## [v48.0.0] - 2024-06-17 + +- Fix: The unique webhook id is now required. +- Improvement: Pagination endpoints now support request body properties. +- Improvement: Offset pagination now supports a configurable `step` size request property, which + is useful for offset values that represent the element's global index (e.g. the 500th element), + rather than the page number (e.g the 5th page). + +## [v47.1.0] - 2024-06-09 + +- Fix: Introduce a unique id for all generated webhooks. This is being added as optional but should + be made required in v48. + +## [v47.0.0] - 2024-06-09 + +- Feature: Introduce `autogeneratedExamples` and `userProvidedExamples` fields on the HTTPEndpoint. In the + `userProvidedExample` its now possible for the user to only provide code samples and no structured + example with input and output. + + Generators should opt to use the code sample provided from the user if that is the case. + +## [v46.2.0] - 2024-06-09 + +- Feature: Add support for webhook examples. + +## [v46.1.1] - 2024-06-09 + +- Fix: Generate the Python SDK for IR using just pydantic v1 + +## [v46] - 2024-06-04 + +- Feature: Add support for README.md configuration. + +## [v45] - 2024-05-15 + +- Feature: Support `bigint` primitive types. +- Feature: Add support for default values and validation rules. + +## [v44] - 2024-05-10 + +- Improvement: Support stream and server-sent event response examples. + +## [v43] - 2024-05-08 + +- Improvement: Support custom status codes for success respones. + +## [v42] - 2024-05-07 + +- Improvement: Update OAuth customizability (e.g. configurable `clientId` property). + +## [v41] - 2024-05-07 + +- Feature: Add error examples. + +## [v40] - 2024-04-23 + +- Feature: Add support for extra properties on objects and in-lined requests. + +## [v39] - 2024-04-19 + +- Feature: Add support for OAuth client credentials flow. + +## [v38] - 2024-04-17 + +- Feature: Add support for Server-Sent-Events to Streaming HTTP Responses + Read more about SSE here: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events. diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/api.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/api.yml new file mode 100644 index 00000000000..df8a217c3d7 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/api.yml @@ -0,0 +1,9 @@ +name: ir-v53 +audiences: + - dynamic + +# Notes: +# - Add dynamic IR and generator-exec config. +# - Add `float` primitive type. +# - Add a `PrimitiveTypeV2` variant for every `PrimitiveTypeV1`. +# - Add gRPC/Protobuf types. \ No newline at end of file diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/auth.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/auth.yml new file mode 100644 index 00000000000..be4c49e7ff4 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/auth.yml @@ -0,0 +1,99 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json + +imports: + http: http.yml + types: types.yml + commons: commons.yml +types: + EnvironmentVariable: string + ApiAuth: + extends: commons.WithDocs + properties: + requirement: AuthSchemesRequirement + schemes: list + AuthSchemesRequirement: + enum: + - ALL + - ANY + AuthScheme: + discriminant: + value: _type + name: type + union: + bearer: BearerAuthScheme + basic: BasicAuthScheme + header: HeaderAuthScheme + oauth: OAuthScheme + BearerAuthScheme: + extends: commons.WithDocs + properties: + token: commons.Name + tokenEnvVar: + type: optional + docs: The environment variable the SDK should use to read the token. + + OAuthScheme: + extends: commons.WithDocs + docs: | + We currently assume the resultant token is leveraged as a bearer token, e.g. "Authorization Bearer" + properties: + configuration: OAuthConfiguration + OAuthConfiguration: + union: + clientCredentials: OAuthClientCredentials + OAuthClientCredentials: + properties: + clientIdEnvVar: optional + clientSecretEnvVar: optional + tokenPrefix: optional + tokenHeader: optional + scopes: optional> + tokenEndpoint: OAuthTokenEndpoint + refreshEndpoint: optional + OAuthTokenEndpoint: + properties: + endpointReference: commons.EndpointReference + requestProperties: OAuthAccessTokenRequestProperties + responseProperties: OAuthAccessTokenResponseProperties + OAuthRefreshEndpoint: + properties: + endpointReference: commons.EndpointReference + requestProperties: OAuthRefreshTokenRequestProperties + responseProperties: OAuthAccessTokenResponseProperties + OAuthAccessTokenRequestProperties: + docs: The properties required to retrieve an OAuth token. + properties: + clientId: http.RequestProperty + clientSecret: http.RequestProperty + scopes: optional + OAuthAccessTokenResponseProperties: + docs: The properties to map to the corresponding OAuth token primitive. + properties: + accessToken: http.ResponseProperty + expiresIn: optional + refreshToken: optional + OAuthRefreshTokenRequestProperties: + docs: The properties required to retrieve an OAuth refresh token. + properties: + refreshToken: http.RequestProperty + + BasicAuthScheme: + extends: commons.WithDocs + properties: + username: commons.Name + usernameEnvVar: + type: optional + docs: The environment variable the SDK should use to read the username. + password: commons.Name + passwordEnvVar: + type: optional + docs: The environment variable the SDK should use to read the password. + HeaderAuthScheme: + extends: commons.WithDocs + properties: + name: commons.NameAndWireValue + valueType: types.TypeReference + prefix: optional + headerEnvVar: + type: optional + docs: The environment variable the SDK should use to read the header. diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/commons.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/commons.yml new file mode 100644 index 00000000000..781c25fa1ce --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/commons.yml @@ -0,0 +1,93 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json + +types: + WithDocs: + properties: + docs: optional + WithDocsAndAvailability: + extends: WithDocs + properties: + availability: optional + FernFilepath: + properties: + allParts: list + packagePath: list + file: optional + + # names + + Name: + properties: + originalName: string + camelCase: SafeAndUnsafeString + pascalCase: SafeAndUnsafeString + snakeCase: SafeAndUnsafeString + screamingSnakeCase: SafeAndUnsafeString + NameAndWireValue: + properties: + wireValue: string + name: Name + SafeAndUnsafeString: + properties: + unsafeName: + docs: this name might overlap with reserved keywords of the language being + generated + type: string + safeName: + docs: this name will NOT overlap with reserved keywords of the language being + generated + type: string + EscapedString: + docs: | + Defines the original string, and its escaped-equivalent (depending on the target programming language). + This is paricularly relevant to example string literals. + + For example, in Python we escape strings that contain single or double quotes by using triple quotes, + in Go we use backticks, etc. + properties: + original: string + + WithJsonExample: + properties: + jsonExample: unknown + + # ids + + SubpackageId: string + ServiceId: string + EndpointId: string + TypeId: string + ErrorId: string + WebhookGroupId: string + WebhookId: string + WebSocketChannelId: string + FeatureId: string + + # declarations + + Declaration: + extends: WithDocs + properties: + availability: optional + Availability: + properties: + status: AvailabilityStatus + message: optional + AvailabilityStatus: + enum: + - IN_DEVELOPMENT + - PRE_RELEASE + - GENERAL_AVAILABILITY + - DEPRECATED + + # references + + EndpointReference: + properties: + endpointId: EndpointId + serviceId: ServiceId + subpackageId: + type: optional + docs: | + The subpackage that defines the endpoint. If empty, the endpoint is + defined in the root package. diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/constants.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/constants.yml new file mode 100644 index 00000000000..8ceb53bb12b --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/constants.yml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json +imports: + commons: commons.yml +types: + Constants: + properties: + errorInstanceIdKey: commons.NameAndWireValue diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/auth.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/auth.yml new file mode 100644 index 00000000000..9df1bc0585c --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/auth.yml @@ -0,0 +1,42 @@ +imports: + commons: ../commons.yml + types: ./types.yml + +types: + Auth: + union: + basic: BasicAuth + bearer: BearerAuth + header: HeaderAuth + + AuthValues: + union: + basic: BasicAuthValues + bearer: BearerAuthValues + header: HeaderAuthValues + + BasicAuth: + properties: + username: commons.Name + password: commons.Name + + BasicAuthValues: + properties: + username: string + password: string + + BearerAuth: + properties: + token: commons.Name + + BearerAuthValues: + properties: + token: string + + HeaderAuth: + properties: + header: types.NamedParameter + + HeaderAuthValues: + properties: + value: unknown \ No newline at end of file diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/declaration.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/declaration.yml new file mode 100644 index 00000000000..903ca06a542 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/declaration.yml @@ -0,0 +1,7 @@ +imports: + commons: ../commons.yml +types: + Declaration: + properties: + fernFilepath: commons.FernFilepath + name: commons.Name diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/endpoints.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/endpoints.yml new file mode 100644 index 00000000000..82b479d5863 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/endpoints.yml @@ -0,0 +1,97 @@ +imports: + auth: ./auth.yml + commons: ../commons.yml + declaration: ./declaration.yml + http: ../http.yml + types: ./types.yml +types: + EndpointLocation: + docs: | + Represents the endpoint location (e.g. "POST /users"). + properties: + method: http.HttpMethod + path: string + + Endpoint: + properties: + auth: optional + declaration: declaration.Declaration + location: EndpointLocation + request: Request + response: Response + + Request: + docs: | + Reperesents the request parameters required to call a specific endpoiont. + union: + body: BodyRequest + inlined: InlinedRequest + + Response: + docs: | + Reperesents the response returned by a specific endpoint. + + For now, we only support json responses, but this is set up to support a + variety of other endpoint response types (e.g. file download, pagination, + streaming, etc). + union: + json: {} + + BodyRequest: + properties: + pathParameters: optional> + body: optional + + InlinedRequest: + properties: + declaration: declaration.Declaration + pathParameters: optional> + queryParameters: optional> + headers: optional> + body: optional + metadata: optional + + InlinedRequestMetadata: + properties: + includePathParameters: + docs: | + If true, the path parameters should be included as properties in the + inlined request type, but only if the generator is explicitly configured + to do so. + + By default, the path parameters are generated as positional parameters. + type: boolean + onlyPathParameters: + docs: | + If true, the path parameters are the only parameters specified in the + inlined request. + + In combination with inludePathParameters, this influences whether or not the + inlined request type should be generated at all. + type: boolean + + InlinedRequestBody: + union: + properties: list + referenced: ReferencedRequestBody + fileUpload: FileUploadRequestBody + + ReferencedRequestBody: + properties: + bodyKey: commons.Name + bodyType: ReferencedRequestBodyType + + ReferencedRequestBodyType: + union: + bytes: {} + typeReference: types.TypeReference + + FileUploadRequestBody: + properties: + properties: list + + FileUploadRequestBodyProperty: + union: + file: commons.NameAndWireValue + fileArray: commons.NameAndWireValue + bodyProperty: types.NamedParameter diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/ir.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/ir.yml new file mode 100644 index 00000000000..ef78d99015d --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/ir.yml @@ -0,0 +1,26 @@ +imports: + commons: ../commons.yml + endpoints: ./endpoints.yml + types: ./types.yml +types: + DynamicIntermediateRepresentation: + audiences: + - dynamic + docs: | + This represents the IR required to generate dynamic snippets. + + This IR minimizes the space required to generate snippets in a variety + of environments (e.g. web, offline, etc). + properties: + version: + docs: | + The version of the dynamic IR. This is independent from the verison + of the primary IR. + type: literal<"1.0.0"> + types: map + endpoints: map + headers: + docs: | + The headers that are required on every request. These headers + are typically included in the SDK's client constructor. + type: optional> diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/snippets.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/snippets.yml new file mode 100644 index 00000000000..ddb48eb3905 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/snippets.yml @@ -0,0 +1,54 @@ +imports: + auth: ./auth.yml + endpoints: ./endpoints.yml + +types: + ErrorSeverity: + audiences: + - dynamic + enum: + - CRITICAL + - WARNING + + Error: + audiences: + - dynamic + properties: + severity: ErrorSeverity + message: string + + Values: + audiences: + - dynamic + docs: | + Snippet values are represented as arbitrary key, value + pairs (i.e. JSON objects). The keys are expected to be + in the parameter's wire representation. For path parameters, + the name will match the parameter name. + type: map + + EndpointSnippetRequest: + audiences: + - dynamic + docs: | + The user-facing request type used to generate a dynamic snippet. + properties: + endpoint: endpoints.EndpointLocation + auth: optional + pathParameters: optional + queryParameters: optional + headers: optional + requestBody: optional + + EndpointSnippetResponse: + audiences: + - dynamic + docs: | + The user-facing response type containing the generated snippet. + + If there are any errors, the snippet will still sometimes represent a + partial and/or valid result. This is useful for rendering a snippet alongside + error messages the user can use to diagnose and resolve the problem. + properties: + snippet: string + errors: optional> diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/types.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/types.yml new file mode 100644 index 00000000000..635de0246ac --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/dynamic/types.yml @@ -0,0 +1,104 @@ +imports: + commons: ../commons.yml + declaration: ./declaration.yml + root: ../types.yml +types: + NamedParameter: + properties: + name: commons.NameAndWireValue + typeReference: TypeReference + + NamedType: + docs: | + Represents the type of a parameter that can be used to generate a dynamic type. + union: + alias: AliasType + enum: EnumType + object: ObjectType + discriminatedUnion: DiscriminatedUnionType + undiscriminatedUnion: UndiscriminatedUnionType + + TypeReference: + union: + list: TypeReference + literal: LiteralType + map: MapType + named: commons.TypeId + optional: TypeReference + primitive: root.PrimitiveTypeV1 + set: TypeReference + unknown: {} + + AliasType: + properties: + declaration: declaration.Declaration + typeReference: TypeReference + + EnumType: + properties: + declaration: declaration.Declaration + values: list + + MapType: + properties: + key: TypeReference + value: TypeReference + + ObjectType: + properties: + declaration: declaration.Declaration + properties: list + + DiscriminatedUnionType: + properties: + declaration: declaration.Declaration + discriminant: commons.NameAndWireValue + types: + docs: | + Map from the discriminant value (e.g. "user") to the type (e.g. User). + type: map + + SingleDiscriminatedUnionType: + union: + samePropertiesAsObject: SingleDiscriminatedUnionTypeObject + singleProperty: SingleDiscriminatedUnionTypeSingleProperty + noProperties: SingleDiscriminatedUnionTypeNoProperties + + SingleDiscriminatedUnionTypeObject: + properties: + typeId: commons.TypeId + discriminantValue: commons.NameAndWireValue + properties: + docs: | + Any properties included here are the base and/or extended properties from the union. + type: list + + SingleDiscriminatedUnionTypeSingleProperty: + properties: + typeReference: TypeReference + discriminantValue: commons.NameAndWireValue + properties: + docs: | + Any properties included here are the base and/or extended properties from the union. + type: optional> + + SingleDiscriminatedUnionTypeNoProperties: + properties: + discriminantValue: commons.NameAndWireValue + properties: + docs: | + Any properties included here are the base and/or extended properties from the union. + type: optional> + + UndiscriminatedUnionType: + properties: + declaration: declaration.Declaration + types: + docs: | + The dynamic type will be rendered with the first type that matches. + type: list + + LiteralType: + union: + boolean: boolean + string: string \ No newline at end of file diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/environment.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/environment.yml new file mode 100644 index 00000000000..3f076c5a466 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/environment.yml @@ -0,0 +1,39 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json + +imports: + commons: commons.yml +types: + EnvironmentId: string + EnvironmentBaseUrlId: string + EnvironmentUrl: string + EnvironmentsConfig: + properties: + defaultEnvironment: optional + environments: Environments + Environments: + union: + singleBaseUrl: SingleBaseUrlEnvironments + multipleBaseUrls: MultipleBaseUrlsEnvironments + SingleBaseUrlEnvironments: + properties: + environments: list + SingleBaseUrlEnvironment: + extends: commons.WithDocs + properties: + id: EnvironmentId + name: commons.Name + url: EnvironmentUrl + MultipleBaseUrlsEnvironments: + properties: + baseUrls: list + environments: list + MultipleBaseUrlsEnvironment: + extends: commons.WithDocs + properties: + id: EnvironmentId + name: commons.Name + urls: map + EnvironmentBaseUrlWithId: + properties: + id: EnvironmentBaseUrlId + name: commons.Name diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/errors.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/errors.yml new file mode 100644 index 00000000000..3888562cbc0 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/errors.yml @@ -0,0 +1,34 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json + +imports: + commons: commons.yml + types: types.yml + +types: + ErrorDeclaration: + extends: commons.WithDocs + properties: + name: DeclaredErrorName + discriminantValue: commons.NameAndWireValue + type: optional + statusCode: integer + examples: list + ErrorDeclarationDiscriminantValue: + union: + property: commons.NameAndWireValue + statusCode: {} + DeclaredErrorName: + properties: + errorId: commons.ErrorId + fernFilepath: commons.FernFilepath + name: commons.Name + + # examples + + ExampleError: + extends: + - commons.WithJsonExample + - commons.WithDocs + properties: + name: optional + shape: types.ExampleTypeReference diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/generator-exec/config.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/generator-exec/config.yml new file mode 100644 index 00000000000..22846a5f8fa --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/generator-exec/config.yml @@ -0,0 +1,224 @@ +types: + GeneratorConfig: + audiences: + - dynamic + properties: + dryRun: boolean + irFilepath: string + originalReadmeFilepath: optional + license: optional + output: GeneratorOutputConfig + publish: + type: optional + docs: Deprecated. Use output.mode instead. + workspaceName: string + organization: string + customConfig: unknown + environment: GeneratorEnvironment + whitelabel: boolean + writeUnitTests: boolean + generatePaginatedClients: optional + generateOauthClients: boolean + LicenseConfig: + union: + basic: BasicLicense + custom: CustomLicense + BasicLicense: + properties: + id: LicenseId + LicenseId: + enum: + - MIT + - name: apache2 + value: Apache-2.0 + CustomLicense: + properties: + filename: string + GeneratorOutputConfig: + properties: + path: string + snippetFilepath: optional + snippetTemplateFilepath: optional + publishingMetadata: optional + mode: OutputMode + OutputMode: + union: + publish: GeneratorPublishConfig + downloadFiles: {} + github: GithubOutputMode + GeneratorPublishConfig: + properties: + registries: + type: GeneratorRegistriesConfig + docs: Deprecated, use publishTargets instead. + registriesV2: + type: GeneratorRegistriesConfigV2 + docs: Deprecated, use publishTargets instead. + publishTarget: optional + version: string + GithubOutputMode: + properties: + version: string + repoUrl: + type: string + docs: A full repo url (i.e. https://github.com/fern-api/fern) + installationToken: + type: optional + docs: | + The token scoped to installing the repository. If not specified, the generator + should NOT attempt to clone the repository. + publishInfo: optional + OutputMetadataAuthor: + properties: + name: string + email: string + OutputMetadata: + properties: + description: optional + authors: optional> + PublishingMetadata: + docs: This should effectively be deprecated in favor of a more specific configuration per-output mode (pypi, maven, etc.). + properties: + package_description: optional + publisher_email: optional + reference_url: optional + publisher_name: optional + GithubPublishInfo: + union: + npm: NpmGithubPublishInfo + maven: MavenGithubPublishInfo + postman: PostmanGithubPublishInfo + pypi: PypiGithubPublishInfo + rubygems: RubyGemsGithubPublishInfo + nuget: NugetGithubPublishInfo + EnvironmentVariable: string + NpmGithubPublishInfo: + properties: + registryUrl: string + packageName: string + tokenEnvironmentVariable: EnvironmentVariable + shouldGeneratePublishWorkflow: optional + MavenCentralSignatureGithubInfo: + properties: + keyIdEnvironmentVariable: EnvironmentVariable + passwordEnvironmentVariable: EnvironmentVariable + secretKeyEnvironmentVariable: EnvironmentVariable + MavenGithubPublishInfo: + properties: + registryUrl: string + coordinate: string + usernameEnvironmentVariable: EnvironmentVariable + passwordEnvironmentVariable: EnvironmentVariable + signature: optional + shouldGeneratePublishWorkflow: optional + PostmanGithubPublishInfo: + properties: + apiKeyEnvironmentVariable: EnvironmentVariable + workspaceIdEnvironmentVariable: EnvironmentVariable + PypiMetadata: + extends: OutputMetadata + properties: + keywords: optional> + documentationLink: optional + homepageLink: optional + PypiGithubPublishInfo: + properties: + registryUrl: string + packageName: string + usernameEnvironmentVariable: EnvironmentVariable + passwordEnvironmentVariable: EnvironmentVariable + pypiMetadata: optional + shouldGeneratePublishWorkflow: optional + RubyGemsGithubPublishInfo: + properties: + registryUrl: string + packageName: string + apiKeyEnvironmentVariable: EnvironmentVariable + shouldGeneratePublishWorkflow: optional + NugetGithubPublishInfo: + properties: + registryUrl: string + packageName: string + apiKeyEnvironmentVariable: EnvironmentVariable + shouldGeneratePublishWorkflow: optional + GeneratorRegistriesConfig: + properties: + maven: MavenRegistryConfig + npm: NpmRegistryConfig + MavenCentralSignature: + properties: + keyId: string + password: string + secretKey: string + MavenRegistryConfig: + properties: + registryUrl: string + username: string + password: string + group: string + signature: optional + NpmRegistryConfig: + properties: + registryUrl: string + token: string + scope: string + GeneratorRegistriesConfigV2: + properties: + maven: MavenRegistryConfigV2 + npm: NpmRegistryConfigV2 + pypi: PypiRegistryConfig + rubygems: RubyGemsRegistryConfig + nuget: NugetRegistryConfig + GeneratorPublishTarget: + union: + maven: MavenRegistryConfigV2 + npm: NpmRegistryConfigV2 + pypi: PypiRegistryConfig + postman: PostmanConfig + rubygems: RubyGemsRegistryConfig + nuget: NugetRegistryConfig + MavenRegistryConfigV2: + properties: + registryUrl: string + username: string + password: string + coordinate: string + signature: optional + NpmRegistryConfigV2: + properties: + registryUrl: string + token: string + packageName: string + PypiRegistryConfig: + properties: + registryUrl: string + username: string + password: string + packageName: string + pypiMetadata: optional + RubyGemsRegistryConfig: + properties: + registryUrl: string + apiKey: string + packageName: string + NugetRegistryConfig: + properties: + registryUrl: string + apiKey: string + packageName: string + PostmanConfig: + properties: + apiKey: string + workspaceId: string + GeneratorEnvironment: + discriminant: + value: _type + name: type + union: + local: {} + remote: RemoteGeneratorEnvironment + RemoteGeneratorEnvironment: + properties: + coordinatorUrl: string + coordinatorUrlV2: string + id: string \ No newline at end of file diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/http.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/http.yml new file mode 100644 index 00000000000..01185fd04ab --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/http.yml @@ -0,0 +1,473 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json + +imports: + commons: commons.yml + environment: environment.yml + errors: errors.yml + proto: proto.yml + types: types.yml + variables: variables.yml +types: + HttpService: + properties: + availability: optional + name: DeclaredServiceName + displayName: optional + basePath: HttpPath + endpoints: list + headers: list + pathParameters: list + encoding: optional + transport: optional + DeclaredServiceName: + properties: + fernFilepath: commons.FernFilepath + + Transport: + union: + http: {} + grpc: GrpcTransport + + GrpcTransport: + properties: + service: proto.ProtobufService + + HttpEndpoint: + extends: commons.Declaration + properties: + id: commons.EndpointId + name: EndpointName + displayName: optional + method: HttpMethod + headers: list + baseUrl: optional + basePath: + type: optional + docs: Overrides the service and endpoint level base paths + path: HttpPath + fullPath: HttpPath + pathParameters: list + allPathParameters: list + queryParameters: list + requestBody: optional + sdkRequest: optional + response: optional + errors: ResponseErrors + auth: boolean + idempotent: boolean + pagination: optional + userSpecifiedExamples: list + autogeneratedExamples: list + transport: optional + + EndpointName: commons.Name + HttpPath: + properties: + head: string + parts: list + HttpPathPart: + properties: + pathParameter: string + tail: string + HttpMethod: + enum: + - GET + - POST + - PUT + - PATCH + - DELETE + HttpHeader: + extends: commons.Declaration + properties: + name: commons.NameAndWireValue + valueType: types.TypeReference + env: optional + PathParameter: + extends: commons.WithDocs + properties: + name: commons.Name + valueType: types.TypeReference + location: PathParameterLocation + variable: optional + PathParameterLocation: + enum: + - ROOT + - SERVICE + - ENDPOINT + QueryParameter: + extends: commons.Declaration + properties: + name: commons.NameAndWireValue + valueType: types.TypeReference + allowMultiple: boolean + HttpRequestBody: + union: + inlinedRequestBody: InlinedRequestBody + reference: HttpRequestBodyReference + fileUpload: FileUploadRequest + bytes: BytesRequest + InlinedRequestBody: + extends: commons.WithDocs + properties: + name: commons.Name + extends: list + properties: list + extendedProperties: + type: optional> + docs: A list of properties that all the parents of this request have. + contentType: optional + extra-properties: + docs: Whether to allow extra properties on the request. + type: boolean + InlinedRequestBodyProperty: + extends: commons.WithDocsAndAvailability + properties: + name: commons.NameAndWireValue + valueType: types.TypeReference + FileUploadRequest: + extends: commons.WithDocs + properties: + name: commons.Name + properties: list + BytesRequest: + extends: commons.WithDocs + properties: + isOptional: boolean + contentType: optional + FileUploadRequestProperty: + union: + file: FileProperty + bodyProperty: FileUploadBodyProperty + FileUploadBodyProperty: + extends: InlinedRequestBodyProperty + properties: + contentType: optional + FileProperty: + union: + file: FilePropertySingle + fileArray: FilePropertyArray + FilePropertySingle: + properties: + key: commons.NameAndWireValue + isOptional: boolean + contentType: optional + FilePropertyArray: + properties: + key: commons.NameAndWireValue + isOptional: boolean + contentType: optional + HttpRequestBodyReference: + extends: commons.WithDocs + properties: + requestBodyType: types.TypeReference + contentType: optional + SdkRequestBodyType: + union: + typeReference: HttpRequestBodyReference + bytes: BytesRequest + SdkRequest: + properties: + streamParameter: + type: optional + docs: | + The request property that controls whether or not the response is streamed. + requestParameterName: commons.Name + shape: SdkRequestShape + SdkRequestShape: + union: + justRequestBody: SdkRequestBodyType + wrapper: SdkRequestWrapper + SdkRequestWrapper: + properties: + wrapperName: commons.Name + bodyKey: commons.Name + includePathParameters: optional + onlyPathParameters: optional + + HttpResponse: + properties: + status-code: optional + body: optional + + NonStreamHttpResponseBody: + union: + json: JsonResponse + fileDownload: FileDownloadResponse + text: TextResponse + + HttpResponseBody: + union: + json: JsonResponse + fileDownload: FileDownloadResponse + text: TextResponse + streaming: StreamingResponse + streamParameter: + type: StreamParameterResponse + docs: | + If there is a parameter that controls whether the response is streaming or not. Note + that if this is the response then `sdkRequest.streamParameter` will always be populated. + + JsonResponse: + union: + response: JsonResponseBody + nestedPropertyAsResponse: JsonResponseBodyWithProperty + + JsonResponseBody: + extends: commons.WithDocs + properties: + responseBodyType: types.TypeReference + + JsonResponseBodyWithProperty: + extends: commons.WithDocs + properties: + responseBodyType: types.TypeReference + responseProperty: + docs: | + If set, the SDK will return this property from + the response, rather than the response itself. + + This is particularly useful for JSON API structures + (e.g. configure 'data' to return 'response.data'). + type: optional + + FileDownloadResponse: + extends: commons.WithDocs + + TextResponse: + extends: commons.WithDocs + + StreamParameterResponse: + properties: + nonStreamResponse: NonStreamHttpResponseBody + streamResponse: StreamingResponse + + StreamingResponse: + union: + json: JsonStreamChunk + text: TextStreamChunk + sse: SseStreamChunk + + TextStreamChunk: + extends: commons.WithDocs + properties: {} + + JsonStreamChunk: + extends: commons.WithDocs + properties: + payload: types.TypeReference + terminator: optional + + SseStreamChunk: + extends: commons.WithDocs + properties: + payload: types.TypeReference + terminator: optional + + ResponseErrors: list + ResponseError: + extends: commons.WithDocs + properties: + error: errors.DeclaredErrorName + + Pagination: + docs: | + If set, the endpoint will be generated with auto-pagination features. + union: + cursor: CursorPagination + offset: OffsetPagination + + CursorPagination: + docs: | + If set, the endpoint will be generated with auto-pagination features. + + The page must be defined as a property defined on the request, whereas + the next page and results are resolved from properties defined on the + response. + properties: + page: RequestProperty + next: ResponseProperty + results: ResponseProperty + + OffsetPagination: + docs: | + The page must be defined as a query parameter included in the request, + whereas the results are resolved from properties defined on the response. + + The page index is auto-incremented between every additional page request. + properties: + page: RequestProperty + results: ResponseProperty + hasNextPage: + docs: A response property that indicates whether there is a next page or not. + type: optional + step: + docs: | + The step size used to increment the page offset between every new page. + type: optional + + # shared properties + RequestPropertyValue: + union: + query: QueryParameter + body: types.ObjectProperty + + RequestProperty: + docs: | + A property associated with an endpoint's request. + properties: + propertyPath: + docs: | + If empty, the property is defined at the top-level. + Otherwise, the property is defined on the nested object identified + by the path. + type: optional> + property: RequestPropertyValue + + ResponseProperty: + docs: | + A property associated with a paginated endpoint's request or response. + properties: + propertyPath: + docs: | + If empty, the property is defined at the top-level. + Otherwise, the property is defined on the nested object identified + by the path. + type: optional> + property: types.ObjectProperty + + # examples + AutogeneratedEndpointExample: + properties: + example: ExampleEndpointCall + + UserSpecifiedEndpointExample: + properties: + codeSamples: + type: optional> + docs: Manually written code samples specified by the user + example: + type: optional + docs: Manually written example specified by the user + + ExampleEndpointCall: + extends: commons.WithDocs + properties: + id: optional + name: optional + url: string + rootPathParameters: list + servicePathParameters: list + endpointPathParameters: list + serviceHeaders: list + endpointHeaders: list + queryParameters: list + request: optional + response: ExampleResponse + + ExampleCodeSample: + availability: in-development + union: + language: ExampleCodeSampleLanguage + sdk: ExampleCodeSampleSdk + + ExampleCodeSampleLanguage: + docs: | + This is intended to co-exist with the auto-generated code samples. + extends: commons.WithDocs + properties: + name: + type: optional + docs: Override the example name. + language: string + code: string + install: + type: optional + docs: | + The command to install the dependencies for the code sample. + For example, `npm install` or `pip install -r requirements.txt`. + + ExampleCodeSampleSdk: + docs: | + This will be used to replace the auto-generated code samples. + extends: commons.WithDocs + properties: + name: + type: optional + docs: Override the example name. + sdk: SupportedSdkLanguage + code: string + + # be sure to keep this in sync with the list of supported Fern SDK languages + SupportedSdkLanguage: + enum: + - curl + - python + - javascript + - typescript + - go + - ruby + - csharp + - java + + ExamplePathParameter: + properties: + name: commons.Name + value: types.ExampleTypeReference + + ExampleQueryParameter: + properties: + name: commons.NameAndWireValue + value: types.ExampleTypeReference + shape: optional + + ExampleQueryParameterShape: + union: + single: {} + exploded: {} + commaSeparated: {} + + ExampleHeader: + properties: + name: commons.NameAndWireValue + value: types.ExampleTypeReference + + ExampleRequestBody: + union: + inlinedRequestBody: ExampleInlinedRequestBody + reference: types.ExampleTypeReference + + ExampleInlinedRequestBody: + extends: commons.WithJsonExample + properties: + properties: list + + ExampleInlinedRequestBodyProperty: + properties: + name: commons.NameAndWireValue + value: types.ExampleTypeReference + originalTypeDeclaration: + docs: | + This property may have been brought in via extension. originalTypeDeclaration + is the name of the type that contains this property + type: optional + + ExampleResponse: + union: + ok: ExampleEndpointSuccessResponse + error: ExampleEndpointErrorResponse + + ExampleEndpointSuccessResponse: + union: + body: optional + stream: list + sse: list + + ExampleServerSideEvent: + properties: + event: string + data: types.ExampleTypeReference + + ExampleEndpointErrorResponse: + properties: + error: errors.DeclaredErrorName + body: optional diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/ir.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/ir.yml new file mode 100644 index 00000000000..ef42039791a --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/ir.yml @@ -0,0 +1,179 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json + +imports: + auth: auth.yml + commons: commons.yml + constants: constants.yml + dynamic: dynamic/ir.yml + environment: environment.yml + errors: errors.yml + http: http.yml + proto: proto.yml + types: types.yml + variables: variables.yml + webhooks: webhooks.yml + websocket: websocket.yml + publish: publish.yml + +types: + IntermediateRepresentation: + docs: "Complete representation of the API schema" + properties: + fdrApiDefinitionId: + type: optional + docs: The unique identifier for the API definition used within FDR. This is retrieved once a definition has been registered. + apiVersion: optional + apiName: + type: commons.Name + docs: This is the human readable unique id for the API. + apiDisplayName: optional + apiDocs: optional + auth: auth.ApiAuth + headers: + docs: API Wide headers that are sent on every request + type: list + idempotencyHeaders: + docs: Headers that are sent for idempotent endpoints + type: list + types: + docs: "The types described by this API" + type: map + services: + docs: "The services exposed by this API" + type: map + webhookGroups: + docs: "The webhooks sent by this API" + type: map + websocketChannels: + docs: "The websocket channels served by this API" + type: optional> + errors: map + subpackages: map + rootPackage: Package + constants: constants.Constants + environments: optional + basePath: optional + pathParameters: list + errorDiscriminationStrategy: ErrorDiscriminationStrategy + sdkConfig: SdkConfig + variables: list + serviceTypeReferenceInfo: ServiceTypeReferenceInfo + readmeConfig: optional + sourceConfig: optional + publishConfig: optional + dynamic: optional + + ReadmeConfig: + docs: | + The configuration used to generate a README.md file. If present, the generator + should call the generator-cli to produce a README.md. + properties: + defaultEndpoint: + docs: | + If specified, this enpdoint should be used in every snippet (if possible). + Note that some endpoints aren't suitable for every feature (e.g. a non-list + endpoint for pagination), so the default is a no-op in those cases. + type: optional + bannerLink: optional + introduction: optional + apiReferenceLink: optional + features: + docs: | + If specified, configures the list of endpoints to associate + with each feature. + type: optional>> + SourceConfig: + properties: + sources: + docs: The raw API definitions that produced the IR. + type: list + ApiDefinitionSourceId: + docs: | + Uniquely identifies a specific API definition source. This allows us to clearly identify + what source a given type, endpoint, etc was derived from. + type: string + ApiDefinitionSource: + union: + proto: ProtoSource + openapi: {} + ProtoSource: + properties: + id: ApiDefinitionSourceId + protoRootUrl: + docs: | + The URL containing the `.proto` root directory source. This can be used + to pull down the original `.proto` source files during code generation. + type: string + SdkConfig: + properties: + isAuthMandatory: boolean + hasStreamingEndpoints: boolean + hasPaginatedEndpoints: boolean + hasFileDownloadEndpoints: boolean + platformHeaders: PlatformHeaders + PlatformHeaders: + properties: + language: string + sdkName: string + sdkVersion: string + userAgent: optional + UserAgent: + properties: + header: + type: literal<"User-Agent"> + docs: The user agent header for ease of access to generators. + value: + type: string + docs: Formatted as "/" + + ApiVersionScheme: + docs: | + The available set of versions for the API. This is used to generate a special + enum that can be used to specify the version of the API to use. + union: + header: HeaderApiVersionScheme + HeaderApiVersionScheme: + docs: | + The version information is sent as an HTTP header (e.g. X-API-Version) on every request. + + If the enum does _not_ define a default value, the version should be treated like + a required global header parameter. The version header should also support any + environment variable scanning specified by the header. + properties: + header: http.HttpHeader + value: types.EnumTypeDeclaration + ErrorDiscriminationStrategy: + union: + statusCode: {} + property: ErrorDiscriminationByPropertyStrategy + ErrorDiscriminationByPropertyStrategy: + properties: + discriminant: commons.NameAndWireValue + contentProperty: commons.NameAndWireValue + Package: + extends: commons.WithDocs + properties: + fernFilepath: commons.FernFilepath + service: optional + types: list + errors: list + webhooks: optional + websocket: optional + subpackages: list + hasEndpointsInTree: boolean + navigationConfig: optional + Subpackage: + extends: Package + properties: + name: commons.Name + PackageNavigationConfig: + properties: + pointsTo: commons.SubpackageId + ServiceTypeReferenceInfo: + properties: + typesReferencedOnlyByService: + docs: "Types referenced by exactly one service." + type: map> + sharedTypes: + docs: "Types referenced by either zero or multiple services." + type: list diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/proto.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/proto.yml new file mode 100644 index 00000000000..75f82571326 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/proto.yml @@ -0,0 +1,156 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json + +imports: + commons: commons.yml + +types: + ProtobufService: + docs: | + Defines the information related to a Protobuf service declaration. This is + primarily meant to be used to instantiate the internal gRPC client used by + the SDK. + + For example, consider the following C# snippet which instantiates a + `UserService` gRPC client: + + ```csharp + using User.Grpc; + + public class RawGrpcClient + { + public UserService.UserServiceClient UserServiceClient; + + public RawGrpcClient(...) + { + GrpcChannel channel = GrpcChannel.ForAddress(...); + UserServiceClient = new UserService.UserServiceClient(channel); + } + } + ``` + properties: + file: + docs: | + The `.proto` source file that defines this service. + type: ProtobufFile + name: + docs: | + The name of the service defined in the `.proto` file (e.g. UserService). + type: commons.Name + + ProtobufType: + docs: | + A Protobuf type declaration. + union: + wellKnown: WellKnownProtobufType + userDefined: UserDefinedProtobufType + + UserDefinedProtobufType: + docs: | + Defines the information related to the original `.proto` source file + that defines this type. This is primarily meant to be used to generate + Protobuf mapper methods, which are used in gRPC-compatbile SDKs. + + For example, consider the following Go snippet which requires the + `go_package` setting: + + ```go + import "github.com/acme/acme-go/proto" + + type GetUserRequest struct { + Username string + Email string + } + + func (u *GetUserRequest) ToProto() *proto.GetUserRequest { + if u == nil { + return nil + } + return &proto.GetUserRequest{ + Username u.Username, + Email: u.Email, + } + } + ``` + properties: + file: + docs: | + The `.proto` source file that defines this type. + type: ProtobufFile + name: + docs: | + This name is _usually_ equivalent to the associated DeclaredTypeName's name. + However, its repeated here just in case the naming convention differs, which + is most relevant for APIs that specify `smart-casing`. + type: commons.Name + + WellKnownProtobufType: + docs: | + The set of well-known types supported by Protobuf. These types are often included + in the target runtime library, so they usually require special handling. + + The full list of well-known types can be found at https://protobuf.dev/reference/protobuf/google.protobuf + union: + any: {} + api: {} + boolValue: {} + bytesValue: {} + doubleValue: {} + duration: {} + empty: {} + enum: {} + enumValue: {} + field: {} + fieldCardinality: {} + fieldKind: {} + fieldMask: {} + floatValue: {} + int32Value: {} + int64Value: {} + listValue: {} + method: {} + mixin: {} + nullValue: {} + option: {} + sourceContext: {} + stringValue: {} + struct: {} + syntax: {} + timestamp: {} + type: {} + uint32Value: {} + uint64Value: {} + value: {} + + ProtobufFile: + properties: + filepath: + docs: | + The `.proto` source path, relative to the Protobuf root directory. + This is how the file is referenced in `import` statements. + type: string + packageName: + docs: | + The `.proto` package name. If not specified, a package name was not declared. + type: optional + options: + docs: | + Specifies a variety of language-specific options. + type: optional + + ProtobufFileOptions: + properties: + csharp: optional + + CsharpProtobufFileOptions: + properties: + namespace: + docs: | + Populated by the `csharp_namespace` file option, e.g. + + ```protobuf + option csharp_namespace = Grpc.Health.V1; + ``` + + This is used to determine what import path is required to reference the + associated type(s). + type: string diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/publish.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/publish.yml new file mode 100644 index 00000000000..54c523899bd --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/publish.yml @@ -0,0 +1,29 @@ +types: + PublishingConfig: + union: + github: + type: GithubPublish + docs: Publish via syncing to a GitHub repo and triggering GitHub workflows + direct: + type: DirectPublish + docs: Publish directly from the generator + + GithubPublish: + properties: + owner: string + repo: string + target: PublishTarget + + DirectPublish: + properties: + target: PublishTarget + + PublishTarget: + union: + postman: PostmanPublishTarget + + PostmanPublishTarget: + properties: + apiKey: string + workspaceId: string + collectionId: optional \ No newline at end of file diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/types.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/types.yml new file mode 100644 index 00000000000..48c0f173782 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/types.yml @@ -0,0 +1,493 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json + +imports: + commons: commons.yml + proto: proto.yml +types: + Source: + docs: | + The original source of the declared type (e.g. a `.proto` file). + union: + proto: proto.ProtobufType + + Encoding: + properties: + json: optional + proto: optional + + JsonEncoding: + properties: {} + + ProtoEncoding: + properties: {} + + TypeDeclaration: + docs: "A type, which is a name and a shape" + extends: commons.Declaration + properties: + name: DeclaredTypeName + shape: Type + autogeneratedExamples: list + userProvidedExamples: list + referencedTypes: + docs: All other named types that this type references (directly or indirectly) + type: set + encoding: optional + source: optional + inline: + type: optional + docs: Whether to try and inline the type declaration + + DeclaredTypeName: + properties: + typeId: commons.TypeId + fernFilepath: commons.FernFilepath + name: commons.Name + + Type: + discriminant: + value: _type + name: type + union: + alias: AliasTypeDeclaration + enum: EnumTypeDeclaration + object: ObjectTypeDeclaration + union: UnionTypeDeclaration + undiscriminatedUnion: UndiscriminatedUnionTypeDeclaration + + AliasTypeDeclaration: + properties: + aliasOf: TypeReference + resolvedType: ResolvedTypeReference + ResolvedTypeReference: + discriminant: + value: _type + name: type + union: + container: + type: ContainerType + key: container + named: ResolvedNamedType + primitive: + type: PrimitiveType + key: primitive + unknown: {} + ResolvedNamedType: + properties: + name: DeclaredTypeName + shape: ShapeType + + ShapeType: + enum: + - ENUM + - OBJECT + - UNION + - UNDISCRIMINATED_UNION + EnumTypeDeclaration: + properties: + default: optional + values: list + EnumValue: + extends: commons.Declaration + properties: + name: commons.NameAndWireValue + + ObjectTypeDeclaration: + properties: + extends: + docs: A list of other types to inherit from + type: list + properties: list + extendedProperties: + type: optional> + docs: A list of properties that all the parents of this object have. + extra-properties: + docs: Whether to allow extra properties on the object. + type: boolean + ObjectProperty: + extends: commons.Declaration + properties: + name: commons.NameAndWireValue + valueType: TypeReference + + UnionTypeDeclaration: + properties: + discriminant: commons.NameAndWireValue + extends: + docs: "A list of other types to inherit from" + type: list + types: list + baseProperties: list + SingleUnionType: + extends: commons.WithDocs + properties: + discriminantValue: commons.NameAndWireValue + shape: SingleUnionTypeProperties + displayName: optional + availability: optional + SingleUnionTypeProperties: + discriminant: + value: _type + name: propertiesType + union: + samePropertiesAsObject: DeclaredTypeName + singleProperty: SingleUnionTypeProperty + noProperties: {} + SingleUnionTypeProperty: + properties: + name: commons.NameAndWireValue + type: TypeReference + + UndiscriminatedUnionTypeDeclaration: + properties: + members: list + UndiscriminatedUnionMember: + extends: commons.WithDocs + properties: + type: TypeReference + + TypeReference: + discriminant: + value: _type + name: type + union: + container: + type: ContainerType + key: container + named: NamedType + primitive: + type: PrimitiveType + key: primitive + unknown: {} + + NamedType: + docs: | + A reference to a named type. For backwards compatbility, this type must be fully compatible + with the DeclaredTypeName. + properties: + typeId: commons.TypeId + fernFilepath: commons.FernFilepath + name: commons.Name + default: optional + inline: + type: optional + availability: deprecated + docs: Use the inline property on the TypeDeclaration instead. + + NamedTypeDefault: + union: + enum: EnumValue + + EnumTypeReference: + properties: + default: optional + name: DeclaredTypeName + + ContainerType: + discriminant: + value: _type + name: type + union: + list: + type: TypeReference + key: list + map: MapType + optional: + type: TypeReference + key: optional + set: + type: TypeReference + key: set + literal: + type: Literal + key: literal + MapType: + properties: + keyType: TypeReference + valueType: TypeReference + + PrimitiveType: + properties: + v1: PrimitiveTypeV1 + v2: optional + PrimitiveTypeV1: + enum: + - INTEGER + - value: LONG + docs: "Within the range -2^53 to 2^53" + - UINT + - UINT_64 + - FLOAT + - DOUBLE + - BOOLEAN + - STRING + - DATE + - DATE_TIME + - UUID + - BASE_64 + - BIG_INTEGER + PrimitiveTypeV2: + union: + integer: IntegerType + long: LongType + uint: UintType + uint64: Uint64Type + float: FloatType + double: DoubleType + boolean: BooleanType + string: StringType + date: DateType + dateTime: DateTimeType + uuid: UuidType + base64: Base64Type + bigInteger: BigIntegerType + + IntegerType: + properties: + default: optional + validation: optional + IntegerValidationRules: + properties: + min: optional + max: optional + exclusiveMin: optional + exclusiveMax: optional + multipleOf: optional + LongType: + properties: + default: optional + UintType: + properties: {} + Uint64Type: + properties: {} + FloatType: + properties: {} + DoubleType: + properties: + default: optional + validation: optional + DoubleValidationRules: + properties: + min: optional + max: optional + exclusiveMin: optional + exclusiveMax: optional + multipleOf: optional + BooleanType: + properties: + default: optional + StringType: + properties: + default: optional + validation: optional + StringValidationRules: + properties: + format: optional + pattern: optional + minLength: optional + maxLength: optional + DateType: + properties: {} + DateTimeType: + properties: {} + UuidType: + properties: {} + Base64Type: + properties: {} + BigIntegerType: + properties: + default: optional + + Literal: + union: + string: + type: string + key: string + boolean: + type: boolean + key: boolean + + # examples + + ExampleType: + extends: + - commons.WithJsonExample + - commons.WithDocs + properties: + name: optional + shape: ExampleTypeShape + + ExampleTypeShape: + union: + alias: ExampleAliasType + enum: ExampleEnumType + object: ExampleObjectType + union: ExampleUnionType + undiscriminatedUnion: ExampleUndiscriminatedUnionType + + ExampleAliasType: + properties: + value: ExampleTypeReference + + ExampleEnumType: + properties: + value: commons.NameAndWireValue + + ExampleObjectType: + properties: + properties: list + + ExampleObjectProperty: + properties: + name: commons.NameAndWireValue + value: ExampleTypeReference + originalTypeDeclaration: + docs: | + This property may have been brought in via extension. originalTypeDeclaration + is the name of the type that contains this property. + type: DeclaredTypeName + + ExampleUnionType: + properties: + discriminant: commons.NameAndWireValue + singleUnionType: ExampleSingleUnionType + + ExampleUndiscriminatedUnionType: + properties: + index: + type: integer + docs: | + The zero-based index of the undiscriminated union variant. + For the following undiscriminated union + ``` + MyUnion: + discriminated: false + union: + - string + - integer + ``` + a string example would have an index 0 and an integer example + would have an index 1. + singleUnionType: ExampleTypeReference + + ExampleSingleUnionType: + properties: + wireDiscriminantValue: commons.NameAndWireValue + shape: ExampleSingleUnionTypeProperties + + ExampleSingleUnionTypeProperties: + union: + samePropertiesAsObject: ExampleObjectTypeWithTypeId + singleProperty: ExampleTypeReference + noProperties: {} + + ExampleTypeReference: + extends: commons.WithJsonExample + properties: + shape: ExampleTypeReferenceShape + + ExampleTypeReferenceShape: + union: + primitive: + type: ExamplePrimitive + key: primitive + container: + type: ExampleContainer + key: container + unknown: + type: unknown + key: unknown + named: ExampleNamedType + + ExampleContainer: + union: + list: ExampleListContainer + set: ExampleSetContainer + optional: ExampleOptionalContainer + map: ExampleMapContainer + literal: ExampleLiteralContainer + + ExampleListContainer: + properties: + list: list + itemType: TypeReference + + ExampleSetContainer: + properties: + set: list + itemType: TypeReference + + ExampleOptionalContainer: + properties: + optional: optional + valueType: TypeReference + + ExampleMapContainer: + properties: + map: list + keyType: TypeReference + valueType: TypeReference + + ExampleLiteralContainer: + properties: + literal: ExamplePrimitive + + ExampleKeyValuePair: + properties: + key: ExampleTypeReference + value: ExampleTypeReference + + ExamplePrimitive: + union: + integer: + type: integer + key: integer + long: + type: long + key: long + uint: + type: uint + key: uint + uint64: + type: uint64 + key: uint64 + float: + type: double # TODO: Refactor the following to be a float once we have a float type. + key: float + double: + type: double + key: double + boolean: + type: boolean + key: boolean + string: + type: commons.EscapedString + key: string + date: + type: date + key: date + datetime: ExampleDatetime + uuid: + type: uuid + key: uuid + base64: + type: base64 + key: base64 + bigInteger: + type: bigint + key: bigInteger + + ExampleDatetime: + properties: + datetime: datetime + raw: optional + + ExampleNamedType: + properties: + typeName: DeclaredTypeName + shape: ExampleTypeShape + + ExampleObjectTypeWithTypeId: + properties: + typeId: commons.TypeId + object: ExampleObjectType diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/variables.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/variables.yml new file mode 100644 index 00000000000..2c196becb01 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/variables.yml @@ -0,0 +1,13 @@ +imports: + commons: commons.yml + types: types.yml + +types: + VariableId: string + + VariableDeclaration: + extends: commons.WithDocs + properties: + id: VariableId + name: commons.Name + type: types.TypeReference diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/webhooks.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/webhooks.yml new file mode 100644 index 00000000000..13d33bd6883 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/webhooks.yml @@ -0,0 +1,56 @@ +imports: + commons: commons.yml + types: types.yml + http: http.yml +types: + WebhookGroup: list + + Webhook: + extends: commons.Declaration + properties: + id: commons.WebhookId + name: WebhookName + displayName: optional + method: WebhookHttpMethod + headers: list + payload: WebhookPayload + examples: optional> + + WebhookName: commons.Name + + WebhookPayload: + union: + inlinedPayload: InlinedWebhookPayload + reference: WebhookPayloadReference + + WebhookPayloadReference: + extends: commons.WithDocs + properties: + payloadType: types.TypeReference + + InlinedWebhookPayload: + properties: + name: commons.Name + extends: list + properties: list + + InlinedWebhookPayloadProperty: + extends: commons.WithDocsAndAvailability + properties: + name: commons.NameAndWireValue + valueType: types.TypeReference + + WebhookHttpMethod: + enum: + - GET + - POST + + ExampleWebhookCall: + docs: | + An example webhook call. For now, this only includes the payload, + but it can be easily extended to support other endpoint properties + (e.g. headers). + extends: commons.WithDocs + properties: + name: optional + payload: types.ExampleTypeReference diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/definition/websocket.yml b/packages/ir-sdk/fern/apis/ir-types-v53/definition/websocket.yml new file mode 100644 index 00000000000..98b427e60f5 --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/definition/websocket.yml @@ -0,0 +1,79 @@ +imports: + commons: commons.yml + types: types.yml + http: http.yml + +types: + WebSocketMessageId: string + + WebSocketChannel: + extends: commons.Declaration + properties: + name: WebSocketName + displayName: optional + path: http.HttpPath + auth: boolean + headers: list + queryParameters: list + pathParameters: list + messages: + docs: "The messages that can be sent and received on this channel" + type: list + examples: list + + WebSocketName: commons.Name + + WebSocketMessage: + extends: commons.Declaration + properties: + type: WebSocketMessageId + displayName: optional + origin: WebSocketMessageOrigin + body: WebSocketMessageBody + + WebSocketMessageOrigin: + enum: + - client + - server + + WebSocketMessageBody: + union: + inlinedBody: InlinedWebSocketMessageBody + reference: WebSocketMessageBodyReference + + InlinedWebSocketMessageBody: + properties: + name: commons.Name + extends: list + properties: list + + InlinedWebSocketMessageBodyProperty: + extends: commons.WithDocsAndAvailability + properties: + name: commons.NameAndWireValue + valueType: types.TypeReference + + WebSocketMessageBodyReference: + extends: commons.WithDocs + properties: + bodyType: types.TypeReference + + ExampleWebSocketSession: + extends: commons.WithDocs + properties: + name: optional + url: string + pathParameters: list + headers: list + queryParameters: list + messages: list + + ExampleWebSocketMessage: + properties: + type: WebSocketMessageId + body: ExampleWebSocketMessageBody + + ExampleWebSocketMessageBody: + union: + inlinedBody: http.ExampleInlinedRequestBody + reference: types.ExampleTypeReference diff --git a/packages/ir-sdk/fern/apis/ir-types-v53/generators.yml b/packages/ir-sdk/fern/apis/ir-types-v53/generators.yml new file mode 100644 index 00000000000..d797db4b66e --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-v53/generators.yml @@ -0,0 +1,57 @@ +default-group: local +groups: + dynamic-ir: + audiences: + - dynamic + generators: + - name: fernapi/fern-typescript-node-sdk + version: 0.38.6 + output: + location: npm + package-name: "@fern-api/dynamic-ir-sdk" + token: ${NPM_TOKEN} + config: + noOptionalProperties: true + noSerdeLayer: true + node: + generators: + - name: fernapi/fern-typescript-node-sdk + version: 0.8.13 + output: + location: npm + url: npm.buildwithfern.com + package-name: "@fern-fern/ir-v53-sdk" + config: + includeUtilsOnUnionMembers: true + noOptionalProperties: true + java: + generators: + - name: fernapi/java-model + version: 0.5.20 + output: + location: maven + url: maven.buildwithfern.com + coordinate: com.fern.fern:irV53 + config: + wrapped-aliases: true + enable-forward-compatible-enums: true + python: + generators: + - name: fernapi/fern-pydantic-model + version: 1.4.2 + output: + location: pypi + url: pypi.buildwithfern.com + package-name: fern_fern_ir_v53 + config: + # wrapped_aliases: true + include_union_utils: true + frozen: true + version: v2 + enum_type: python_enums + go: + generators: + - name: fernapi/fern-go-model + version: 0.9.3 + github: + repository: fern-api/ir-go diff --git a/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/index.ts b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/index.ts new file mode 100644 index 00000000000..eea524d6557 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/types/EnvironmentValues.ts b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/types/EnvironmentValues.ts new file mode 100644 index 00000000000..08c2423a0b5 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/types/EnvironmentValues.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +/** + * Represents the value to use for a specific environment. There are three cases: + * + * 1. When sent as an EnvironmentId string, the generator assumes the value matches the name of the + * environment (e.g. "Staging"), and returns an error otherwise. + * + * 2. If the API supports multiple environment URLs, send a map of URLs, e.g. + * { + * "ec2": "https://staging.ec2.aws.com", + * "s3": "https://staging.s3.aws.com" + * } + */ +export type EnvironmentValues = FernIr.EnvironmentId | FernIr.dynamic.MultipleEnvironmentUrlValues; diff --git a/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/types/MultipleEnvironmentUrlValues.ts b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/types/MultipleEnvironmentUrlValues.ts new file mode 100644 index 00000000000..eefb8134e15 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/types/MultipleEnvironmentUrlValues.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export type MultipleEnvironmentUrlValues = Record; diff --git a/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/types/index.ts b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/types/index.ts new file mode 100644 index 00000000000..697269a9d64 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/environment/types/index.ts @@ -0,0 +1,2 @@ +export * from "./EnvironmentValues"; +export * from "./MultipleEnvironmentUrlValues"; diff --git a/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/index.ts b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/index.ts index 28be8c6f5da..dcac11efb59 100644 --- a/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/index.ts +++ b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/index.ts @@ -4,6 +4,8 @@ export * as declaration from "./declaration"; export * from "./declaration/types"; export * as endpoints from "./endpoints"; export * from "./endpoints/types"; +export * as environment from "./environment"; +export * from "./environment/types"; export * as ir from "./ir"; export * from "./ir/types"; export * as snippets from "./snippets"; diff --git a/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.ts b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.ts index 695b03535e3..66e62b14cd4 100644 --- a/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.ts +++ b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.ts @@ -23,4 +23,5 @@ export interface DynamicIntermediateRepresentation { * are typically included in the SDK's client constructor. */ headers: FernIr.dynamic.NamedParameter[] | undefined; + environments: FernIr.EnvironmentsConfig | undefined; } diff --git a/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.ts b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.ts index 96db3383e28..d852311fa90 100644 --- a/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.ts +++ b/packages/ir-sdk/src/sdk/api/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.ts @@ -9,6 +9,8 @@ import * as FernIr from "../../../../../index"; */ export interface EndpointSnippetRequest { endpoint: FernIr.dynamic.EndpointLocation; + baseUrl: string | undefined; + environment: FernIr.dynamic.EnvironmentValues | undefined; auth: FernIr.dynamic.AuthValues | undefined; pathParameters: FernIr.dynamic.Values | undefined; queryParameters: FernIr.dynamic.Values | undefined; diff --git a/packages/ir-sdk/src/sdk/api/resources/http/types/BytesResponse.ts b/packages/ir-sdk/src/sdk/api/resources/http/types/BytesResponse.ts new file mode 100644 index 00000000000..69a078881e9 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/http/types/BytesResponse.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../index"; + +export interface BytesResponse extends FernIr.WithDocs {} diff --git a/packages/ir-sdk/src/sdk/api/resources/http/types/HttpResponseBody.ts b/packages/ir-sdk/src/sdk/api/resources/http/types/HttpResponseBody.ts index 55b819dc128..1544b316dc6 100644 --- a/packages/ir-sdk/src/sdk/api/resources/http/types/HttpResponseBody.ts +++ b/packages/ir-sdk/src/sdk/api/resources/http/types/HttpResponseBody.ts @@ -8,6 +8,7 @@ export type HttpResponseBody = | FernIr.HttpResponseBody.Json | FernIr.HttpResponseBody.FileDownload | FernIr.HttpResponseBody.Text + | FernIr.HttpResponseBody.Bytes | FernIr.HttpResponseBody.Streaming /** * If there is a parameter that controls whether the response is streaming or not. Note @@ -29,6 +30,10 @@ export declare namespace HttpResponseBody { type: "text"; } + interface Bytes extends FernIr.BytesResponse, _Utils { + type: "bytes"; + } + interface Streaming extends _Utils { type: "streaming"; value: FernIr.StreamingResponse; @@ -46,6 +51,7 @@ export declare namespace HttpResponseBody { json: (value: FernIr.JsonResponse) => _Result; fileDownload: (value: FernIr.FileDownloadResponse) => _Result; text: (value: FernIr.TextResponse) => _Result; + bytes: (value: FernIr.BytesResponse) => _Result; streaming: (value: FernIr.StreamingResponse) => _Result; streamParameter: (value: FernIr.StreamParameterResponse) => _Result; _other: (value: { type: string }) => _Result; @@ -92,6 +98,19 @@ export const HttpResponseBody = { }; }, + bytes: (value: FernIr.BytesResponse): FernIr.HttpResponseBody.Bytes => { + return { + ...value, + type: "bytes", + _visit: function <_Result>( + this: FernIr.HttpResponseBody.Bytes, + visitor: FernIr.HttpResponseBody._Visitor<_Result> + ) { + return FernIr.HttpResponseBody._visit(this, visitor); + }, + }; + }, + streaming: (value: FernIr.StreamingResponse): FernIr.HttpResponseBody.Streaming => { return { value: value, @@ -126,6 +145,8 @@ export const HttpResponseBody = { return visitor.fileDownload(value); case "text": return visitor.text(value); + case "bytes": + return visitor.bytes(value); case "streaming": return visitor.streaming(value.value); case "streamParameter": diff --git a/packages/ir-sdk/src/sdk/api/resources/http/types/NonStreamHttpResponseBody.ts b/packages/ir-sdk/src/sdk/api/resources/http/types/NonStreamHttpResponseBody.ts index e3cdb7bfb6f..4fef4b32994 100644 --- a/packages/ir-sdk/src/sdk/api/resources/http/types/NonStreamHttpResponseBody.ts +++ b/packages/ir-sdk/src/sdk/api/resources/http/types/NonStreamHttpResponseBody.ts @@ -7,7 +7,8 @@ import * as FernIr from "../../../index"; export type NonStreamHttpResponseBody = | FernIr.NonStreamHttpResponseBody.Json | FernIr.NonStreamHttpResponseBody.FileDownload - | FernIr.NonStreamHttpResponseBody.Text; + | FernIr.NonStreamHttpResponseBody.Text + | FernIr.NonStreamHttpResponseBody.Bytes; export declare namespace NonStreamHttpResponseBody { interface Json extends _Utils { @@ -23,6 +24,10 @@ export declare namespace NonStreamHttpResponseBody { type: "text"; } + interface Bytes extends FernIr.BytesResponse, _Utils { + type: "bytes"; + } + interface _Utils { _visit: <_Result>(visitor: FernIr.NonStreamHttpResponseBody._Visitor<_Result>) => _Result; } @@ -31,6 +36,7 @@ export declare namespace NonStreamHttpResponseBody { json: (value: FernIr.JsonResponse) => _Result; fileDownload: (value: FernIr.FileDownloadResponse) => _Result; text: (value: FernIr.TextResponse) => _Result; + bytes: (value: FernIr.BytesResponse) => _Result; _other: (value: { type: string }) => _Result; } } @@ -75,6 +81,19 @@ export const NonStreamHttpResponseBody = { }; }, + bytes: (value: FernIr.BytesResponse): FernIr.NonStreamHttpResponseBody.Bytes => { + return { + ...value, + type: "bytes", + _visit: function <_Result>( + this: FernIr.NonStreamHttpResponseBody.Bytes, + visitor: FernIr.NonStreamHttpResponseBody._Visitor<_Result> + ) { + return FernIr.NonStreamHttpResponseBody._visit(this, visitor); + }, + }; + }, + _visit: <_Result>( value: FernIr.NonStreamHttpResponseBody, visitor: FernIr.NonStreamHttpResponseBody._Visitor<_Result> @@ -86,6 +105,8 @@ export const NonStreamHttpResponseBody = { return visitor.fileDownload(value); case "text": return visitor.text(value); + case "bytes": + return visitor.bytes(value); default: return visitor._other(value as any); } diff --git a/packages/ir-sdk/src/sdk/api/resources/http/types/index.ts b/packages/ir-sdk/src/sdk/api/resources/http/types/index.ts index ecc9c093dc5..849ed56935f 100644 --- a/packages/ir-sdk/src/sdk/api/resources/http/types/index.ts +++ b/packages/ir-sdk/src/sdk/api/resources/http/types/index.ts @@ -34,6 +34,7 @@ export * from "./JsonResponseBody"; export * from "./JsonResponseBodyWithProperty"; export * from "./FileDownloadResponse"; export * from "./TextResponse"; +export * from "./BytesResponse"; export * from "./StreamParameterResponse"; export * from "./StreamingResponse"; export * from "./TextStreamChunk"; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/index.ts b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/index.ts new file mode 100644 index 00000000000..eea524d6557 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/types/EnvironmentValues.ts b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/types/EnvironmentValues.ts new file mode 100644 index 00000000000..75c01f1c5fa --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/types/EnvironmentValues.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { EnvironmentId } from "../../../../environment/types/EnvironmentId"; +import { MultipleEnvironmentUrlValues } from "./MultipleEnvironmentUrlValues"; + +export const EnvironmentValues: core.serialization.Schema< + serializers.dynamic.EnvironmentValues.Raw, + FernIr.dynamic.EnvironmentValues +> = core.serialization.undiscriminatedUnion([EnvironmentId, MultipleEnvironmentUrlValues]); + +export declare namespace EnvironmentValues { + type Raw = EnvironmentId.Raw | MultipleEnvironmentUrlValues.Raw; +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/types/MultipleEnvironmentUrlValues.ts b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/types/MultipleEnvironmentUrlValues.ts new file mode 100644 index 00000000000..9285f807bba --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/types/MultipleEnvironmentUrlValues.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { EnvironmentBaseUrlId } from "../../../../environment/types/EnvironmentBaseUrlId"; +import { EnvironmentUrl } from "../../../../environment/types/EnvironmentUrl"; + +export const MultipleEnvironmentUrlValues: core.serialization.Schema< + serializers.dynamic.MultipleEnvironmentUrlValues.Raw, + FernIr.dynamic.MultipleEnvironmentUrlValues +> = core.serialization.record(EnvironmentBaseUrlId, EnvironmentUrl); + +export declare namespace MultipleEnvironmentUrlValues { + type Raw = Record; +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/types/index.ts b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/types/index.ts new file mode 100644 index 00000000000..697269a9d64 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/environment/types/index.ts @@ -0,0 +1,2 @@ +export * from "./EnvironmentValues"; +export * from "./MultipleEnvironmentUrlValues"; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/index.ts b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/index.ts index 28be8c6f5da..dcac11efb59 100644 --- a/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/index.ts +++ b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/index.ts @@ -4,6 +4,8 @@ export * as declaration from "./declaration"; export * from "./declaration/types"; export * as endpoints from "./endpoints"; export * from "./endpoints/types"; +export * as environment from "./environment"; +export * from "./environment/types"; export * as ir from "./ir"; export * from "./ir/types"; export * as snippets from "./snippets"; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.ts b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.ts index 30f7027e878..78c654db0cd 100644 --- a/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.ts +++ b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.ts @@ -10,6 +10,7 @@ import { NamedType } from "../../types/types/NamedType"; import { EndpointId } from "../../../../commons/types/EndpointId"; import { Endpoint } from "../../endpoints/types/Endpoint"; import { NamedParameter } from "../../types/types/NamedParameter"; +import { EnvironmentsConfig } from "../../../../environment/types/EnvironmentsConfig"; export const DynamicIntermediateRepresentation: core.serialization.ObjectSchema< serializers.dynamic.DynamicIntermediateRepresentation.Raw, @@ -19,6 +20,7 @@ export const DynamicIntermediateRepresentation: core.serialization.ObjectSchema< types: core.serialization.record(TypeId, NamedType), endpoints: core.serialization.record(EndpointId, Endpoint), headers: core.serialization.list(NamedParameter).optional(), + environments: EnvironmentsConfig.optional(), }); export declare namespace DynamicIntermediateRepresentation { @@ -27,5 +29,6 @@ export declare namespace DynamicIntermediateRepresentation { types: Record; endpoints: Record; headers?: NamedParameter.Raw[] | null; + environments?: EnvironmentsConfig.Raw | null; } } diff --git a/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.ts b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.ts index 052e1bcffdb..5e4b632f1e9 100644 --- a/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.ts +++ b/packages/ir-sdk/src/sdk/serialization/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.ts @@ -6,6 +6,7 @@ import * as serializers from "../../../../../index"; import * as FernIr from "../../../../../../api/index"; import * as core from "../../../../../../core"; import { EndpointLocation } from "../../endpoints/types/EndpointLocation"; +import { EnvironmentValues } from "../../environment/types/EnvironmentValues"; import { AuthValues } from "../../auth/types/AuthValues"; import { Values } from "./Values"; @@ -14,6 +15,8 @@ export const EndpointSnippetRequest: core.serialization.ObjectSchema< FernIr.dynamic.EndpointSnippetRequest > = core.serialization.objectWithoutOptionalProperties({ endpoint: EndpointLocation, + baseUrl: core.serialization.property("baseURL", core.serialization.string().optional()), + environment: EnvironmentValues.optional(), auth: AuthValues.optional(), pathParameters: Values.optional(), queryParameters: Values.optional(), @@ -24,6 +27,8 @@ export const EndpointSnippetRequest: core.serialization.ObjectSchema< export declare namespace EndpointSnippetRequest { interface Raw { endpoint: EndpointLocation.Raw; + baseURL?: string | null; + environment?: EnvironmentValues.Raw | null; auth?: AuthValues.Raw | null; pathParameters?: Values.Raw | null; queryParameters?: Values.Raw | null; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/http/types/BytesResponse.ts b/packages/ir-sdk/src/sdk/serialization/resources/http/types/BytesResponse.ts new file mode 100644 index 00000000000..5e1b094c8e8 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/http/types/BytesResponse.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as FernIr from "../../../../api/index"; +import * as core from "../../../../core"; +import { WithDocs } from "../../commons/types/WithDocs"; + +export const BytesResponse: core.serialization.ObjectSchema = + core.serialization.objectWithoutOptionalProperties({}).extend(WithDocs); + +export declare namespace BytesResponse { + interface Raw extends WithDocs.Raw {} +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/http/types/HttpResponseBody.ts b/packages/ir-sdk/src/sdk/serialization/resources/http/types/HttpResponseBody.ts index 4895950f199..108eac746c6 100644 --- a/packages/ir-sdk/src/sdk/serialization/resources/http/types/HttpResponseBody.ts +++ b/packages/ir-sdk/src/sdk/serialization/resources/http/types/HttpResponseBody.ts @@ -8,6 +8,7 @@ import * as core from "../../../../core"; import { JsonResponse } from "./JsonResponse"; import { FileDownloadResponse } from "./FileDownloadResponse"; import { TextResponse } from "./TextResponse"; +import { BytesResponse } from "./BytesResponse"; import { StreamingResponse } from "./StreamingResponse"; import { StreamParameterResponse } from "./StreamParameterResponse"; @@ -19,6 +20,7 @@ export const HttpResponseBody: core.serialization.Schema({ transform: (value) => { @@ -29,6 +31,8 @@ export const NonStreamHttpResponseBody: core.serialization.Schema< return FernIr.NonStreamHttpResponseBody.fileDownload(value); case "text": return FernIr.NonStreamHttpResponseBody.text(value); + case "bytes": + return FernIr.NonStreamHttpResponseBody.bytes(value); default: return value as FernIr.NonStreamHttpResponseBody; } @@ -37,7 +41,11 @@ export const NonStreamHttpResponseBody: core.serialization.Schema< }); export declare namespace NonStreamHttpResponseBody { - type Raw = NonStreamHttpResponseBody.Json | NonStreamHttpResponseBody.FileDownload | NonStreamHttpResponseBody.Text; + type Raw = + | NonStreamHttpResponseBody.Json + | NonStreamHttpResponseBody.FileDownload + | NonStreamHttpResponseBody.Text + | NonStreamHttpResponseBody.Bytes; interface Json { type: "json"; @@ -51,4 +59,8 @@ export declare namespace NonStreamHttpResponseBody { interface Text extends TextResponse.Raw { type: "text"; } + + interface Bytes extends BytesResponse.Raw { + type: "bytes"; + } } diff --git a/packages/ir-sdk/src/sdk/serialization/resources/http/types/index.ts b/packages/ir-sdk/src/sdk/serialization/resources/http/types/index.ts index ecc9c093dc5..849ed56935f 100644 --- a/packages/ir-sdk/src/sdk/serialization/resources/http/types/index.ts +++ b/packages/ir-sdk/src/sdk/serialization/resources/http/types/index.ts @@ -34,6 +34,7 @@ export * from "./JsonResponseBody"; export * from "./JsonResponseBodyWithProperty"; export * from "./FileDownloadResponse"; export * from "./TextResponse"; +export * from "./BytesResponse"; export * from "./StreamParameterResponse"; export * from "./StreamingResponse"; export * from "./TextStreamChunk"; diff --git a/packages/snippets/core/build.cjs b/packages/snippets/core/build.cjs index a65f9dac03d..8f3eb027fd2 100644 --- a/packages/snippets/core/build.cjs +++ b/packages/snippets/core/build.cjs @@ -1,26 +1,45 @@ +const { NodeModulesPolyfillPlugin } = require('@esbuild-plugins/node-modules-polyfill'); +const { NodeGlobalsPolyfillPlugin } = require('@esbuild-plugins/node-globals-polyfill'); const packageJson = require("./package.json"); const tsup = require('tsup'); -const { writeFile, rename } = require("fs/promises"); +const { writeFile, mkdir } = require("fs/promises"); const path = require("path"); main(); async function main() { - await tsup.build({ + const config = { entry: ['src/**/*.ts', '!src/__test__'], - format: ['cjs'], - clean: true, + target: "es2017", minify: true, dts: true, - outDir: 'dist', - target: "es2017", + esbuildPlugins: [ + NodeModulesPolyfillPlugin(), + NodeGlobalsPolyfillPlugin({ + process: true, + buffer: true, + util: true + }) + ], tsconfig: "./build.tsconfig.json" + }; + + await tsup.build({ + ...config, + format: ['cjs'], + outDir: 'dist/cjs', + clean: true, }); - process.chdir(path.join(__dirname, "dist")); + await tsup.build({ + ...config, + format: ['esm'], + outDir: 'dist/esm', + clean: false, + }); - // The module expects the imports defined in the index.d.ts file. - await rename("index.d.cts", "index.d.ts"); + await mkdir(path.join(__dirname, "dist"), { recursive: true }); + process.chdir(path.join(__dirname, "dist")); await writeFile( "package.json", @@ -29,9 +48,26 @@ async function main() { name: packageJson.name, version: process.argv[2] || packageJson.version, repository: packageJson.repository, - main: "index.cjs", - types: "index.d.ts", - files: ["index.cjs", "index.d.ts"] + type: "module", + exports: { + // Conditional exports for ESM and CJS. + "import": { + "types": "./esm/index.d.ts", + "default": "./esm/index.js" + }, + "require": { + "types": "./cjs/index.d.cts", + "default": "./cjs/index.cjs" + } + }, + // Fallback for older tooling or direct imports. + main: "./cjs/index.cjs", + module: "./esm/index.js", + types: "./cjs/index.d.cts", + files: [ + "cjs", + "esm" + ] }, undefined, 2 diff --git a/packages/snippets/core/package.json b/packages/snippets/core/package.json index f53760f3a3e..1e4a37e1100 100644 --- a/packages/snippets/core/package.json +++ b/packages/snippets/core/package.json @@ -29,6 +29,8 @@ "dist": "pnpm compile && node build.cjs" }, "devDependencies": { + "@esbuild-plugins/node-globals-polyfill": "^0.2.3", + "@esbuild-plugins/node-modules-polyfill": "^0.2.2", "@fern-api/api-workspace-commons": "workspace:*", "@fern-api/browser-compatible-fern-workspace": "workspace:*", "@fern-api/configuration": "workspace:*", @@ -37,14 +39,14 @@ "@fern-api/source-resolver": "workspace:*", "@fern-api/task-context": "workspace:*", "@types/jest": "^29.5.12", - "openapi-types": "^12.1.3", "depcheck": "^1.4.6", "eslint": "^8.56.0", - "vitest": "^2.1.4", + "openapi-types": "^12.1.3", "organize-imports-cli": "^0.10.0", "prettier": "^2.7.1", "string.prototype.replaceall": "^1.0.10", "tsup": "^8.3.5", - "typescript": "4.6.4" + "typescript": "4.6.4", + "vitest": "^2.1.4" } } \ No newline at end of file diff --git a/packages/snippets/core/src/Spec.ts b/packages/snippets/core/src/Spec.ts index 57be9954ec8..071eedd190d 100644 --- a/packages/snippets/core/src/Spec.ts +++ b/packages/snippets/core/src/Spec.ts @@ -6,6 +6,6 @@ export type Spec = OpenAPISpec; export interface OpenAPISpec { type: "openapi"; openapi: OpenAPITypes.Document; - overrides?: OpenAPITypes.Document; + overrides?: Partial; settings?: OpenAPIWorkspace.Settings; } diff --git a/packages/snippets/core/src/__test__/__snapshots__/generateDynamicIR.test.ts.snap b/packages/snippets/core/src/__test__/__snapshots__/generateDynamicIR.test.ts.snap index b44f35fb09e..624488b2c95 100644 --- a/packages/snippets/core/src/__test__/__snapshots__/generateDynamicIR.test.ts.snap +++ b/packages/snippets/core/src/__test__/__snapshots__/generateDynamicIR.test.ts.snap @@ -47,6 +47,7 @@ exports[`generateDynamicIR > go 1`] = ` }, }, }, + "environments": undefined, "headers": [], "types": { "type_:GetTestDataResponse": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 78dc0d32efc..6a7a17c668d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -425,8 +425,8 @@ importers: specifier: workspace:* version: link:../../../packages/commons/path-utils '@fern-fern/ir-sdk': - specifier: ^53.23.0 - version: 53.23.0 + specifier: ^53.24.0 + version: 53.24.0 zod: specifier: ^3.22.3 version: 3.23.8 @@ -497,6 +497,12 @@ importers: generators/go-v2/dynamic-snippets: devDependencies: + '@esbuild-plugins/node-globals-polyfill': + specifier: ^0.2.3 + version: 0.2.3(esbuild@0.24.0) + '@esbuild-plugins/node-modules-polyfill': + specifier: ^0.2.2 + version: 0.2.2(esbuild@0.24.0) '@fern-api/browser-compatible-base-generator': specifier: workspace:* version: link:../../browser-compatible-base @@ -516,8 +522,8 @@ importers: specifier: workspace:* version: link:../../../packages/commons/path-utils '@fern-fern/ir-sdk': - specifier: ^53.23.0 - version: 53.23.0 + specifier: ^53.24.0 + version: 53.24.0 '@types/jest': specifier: ^29.5.12 version: 29.5.12 @@ -1393,8 +1399,8 @@ importers: specifier: workspace:* version: link:../../../packages/commons/core-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@types/jest': specifier: ^29.5.12 version: 29.5.12 @@ -1426,8 +1432,8 @@ importers: specifier: ^0.0.898 version: 0.0.898 '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-generator-cli': specifier: workspace:* version: link:../../utils/abstract-generator-cli @@ -1492,8 +1498,8 @@ importers: specifier: workspace:* version: link:../../../../packages/commons/core-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-schema-generator': specifier: workspace:* version: link:../../utils/abstract-schema-generator @@ -1535,8 +1541,8 @@ importers: generators/typescript/express/express-error-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-error-class-generator': specifier: workspace:* version: link:../../utils/abstract-error-class-generator @@ -1581,8 +1587,8 @@ importers: specifier: workspace:* version: link:../../../../packages/commons/core-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-schema-generator': specifier: workspace:* version: link:../../utils/abstract-schema-generator @@ -1624,8 +1630,8 @@ importers: generators/typescript/express/express-inlined-request-body-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -1661,8 +1667,8 @@ importers: generators/typescript/express/express-inlined-request-body-schema-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-schema-generator': specifier: workspace:* version: link:../../utils/abstract-schema-generator @@ -1704,8 +1710,8 @@ importers: generators/typescript/express/express-register-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -1753,8 +1759,8 @@ importers: generators/typescript/express/express-service-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -1801,9 +1807,12 @@ importers: '@fern-api/fs-utils': specifier: workspace:* version: link:../../../../packages/commons/fs-utils + '@fern-api/logger': + specifier: workspace:* + version: link:../../../../packages/cli/logger '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -1921,8 +1930,8 @@ importers: generators/typescript/model/type-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -1963,9 +1972,12 @@ importers: generators/typescript/model/type-reference-converters: dependencies: + '@fern-api/core-utils': + specifier: workspace:* + version: link:../../../../packages/commons/core-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -2007,8 +2019,8 @@ importers: specifier: workspace:* version: link:../../../../packages/commons/core-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -2047,8 +2059,8 @@ importers: generators/typescript/model/type-schema-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-schema-generator': specifier: workspace:* version: link:../../utils/abstract-schema-generator @@ -2096,8 +2108,8 @@ importers: specifier: workspace:* version: link:../../../../packages/commons/core-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -2136,8 +2148,8 @@ importers: generators/typescript/model/union-schema-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-schema-generator': specifier: workspace:* version: link:../../utils/abstract-schema-generator @@ -2261,8 +2273,8 @@ importers: specifier: workspace:* version: link:../../../../packages/commons/fs-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-generator-cli': specifier: workspace:* version: link:../../utils/abstract-generator-cli @@ -2327,8 +2339,8 @@ importers: specifier: workspace:* version: link:../../../../packages/commons/core-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -2373,8 +2385,8 @@ importers: generators/typescript/sdk/endpoint-error-union-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -2419,8 +2431,8 @@ importers: generators/typescript/sdk/environments-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -2480,8 +2492,8 @@ importers: specifier: ^0.0.898 version: 0.0.898 '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-fern/snippet-sdk': specifier: ^0.0.5526 version: 0.0.5526 @@ -2629,8 +2641,8 @@ importers: specifier: workspace:* version: link:../../../../packages/commons/core-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../../utils/commons @@ -2672,8 +2684,8 @@ importers: specifier: workspace:* version: link:../../../../packages/commons/core-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-schema-generator': specifier: workspace:* version: link:../../utils/abstract-schema-generator @@ -2721,8 +2733,8 @@ importers: generators/typescript/sdk/sdk-error-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-error-class-generator': specifier: workspace:* version: link:../../utils/abstract-error-class-generator @@ -2767,8 +2779,8 @@ importers: specifier: workspace:* version: link:../../../../packages/commons/core-utils '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-schema-generator': specifier: workspace:* version: link:../../utils/abstract-schema-generator @@ -2810,8 +2822,8 @@ importers: generators/typescript/sdk/sdk-inlined-request-body-schema-generator: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/abstract-schema-generator': specifier: workspace:* version: link:../../utils/abstract-schema-generator @@ -2902,8 +2914,8 @@ importers: specifier: ^0.0.898 version: 0.0.898 '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../commons @@ -2988,8 +3000,8 @@ importers: specifier: workspace:* version: link:../../../../packages/commons/logging-execa '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/fetcher': specifier: workspace:* version: link:../core-utilities/fetcher @@ -3082,8 +3094,8 @@ importers: specifier: ^0.0.898 version: 0.0.898 '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../commons @@ -3358,8 +3370,8 @@ importers: generators/typescript/utils/resolvers: dependencies: '@fern-fern/ir-sdk': - specifier: 53.8.0 - version: 53.8.0 + specifier: 53.23.0 + version: 53.23.0 '@fern-typescript/commons': specifier: workspace:* version: link:../commons @@ -3792,6 +3804,9 @@ importers: '@fern-api/core-utils': specifier: workspace:* version: link:../../commons/core-utils + '@fern-api/docs-parsers': + specifier: ^0.0.10 + version: 0.0.10(@types/node@18.7.18)(jsdom@20.0.3)(sass@1.72.0)(terser@5.31.5)(typescript@4.6.4) '@fern-api/docs-preview': specifier: workspace:* version: link:../docs-preview @@ -3969,6 +3984,9 @@ importers: lodash-es: specifier: ^4.17.21 version: 4.17.21 + openapi-types: + specifier: ^12.1.3 + version: 12.1.3 ora: specifier: ^7.0.1 version: 7.0.1 @@ -4627,12 +4645,18 @@ importers: execa: specifier: ^5.1.1 version: 5.1.1 + express: + specifier: ^4.20.0 + version: 4.21.1 js-yaml: specifier: ^4.1.0 version: 4.1.0 node-fetch: specifier: 2.7.0 version: 2.7.0 + openapi-types: + specifier: ^12.1.3 + version: 12.1.3 strip-ansi: specifier: ^7.1.0 version: 7.1.0 @@ -4640,6 +4664,9 @@ importers: specifier: ^3.0.3 version: 3.0.3 devDependencies: + '@types/express': + specifier: ^4.17.21 + version: 4.17.21 '@types/jest': specifier: ^29.5.12 version: 29.5.12 @@ -5185,6 +5212,9 @@ importers: '@fern-fern/ir-v52-sdk': specifier: 0.0.1 version: 0.0.1 + '@fern-fern/ir-v53-sdk': + specifier: 0.0.1 + version: 0.0.1 '@fern-fern/ir-v6-model': specifier: 0.0.33 version: 0.0.33 @@ -6848,6 +6878,12 @@ importers: packages/snippets/core: devDependencies: + '@esbuild-plugins/node-globals-polyfill': + specifier: ^0.2.3 + version: 0.2.3(esbuild@0.24.0) + '@esbuild-plugins/node-modules-polyfill': + specifier: ^0.2.2 + version: 0.2.2(esbuild@0.24.0) '@fern-api/api-workspace-commons': specifier: workspace:* version: link:../../cli/workspace/commons @@ -7674,6 +7710,16 @@ packages: peerDependencies: postcss-selector-parser: ^6.0.13 + '@esbuild-plugins/node-globals-polyfill@0.2.3': + resolution: {integrity: sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==} + peerDependencies: + esbuild: '*' + + '@esbuild-plugins/node-modules-polyfill@0.2.2': + resolution: {integrity: sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==} + peerDependencies: + esbuild: '*' + '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -7977,15 +8023,27 @@ packages: '@exodus/schemasafe@1.0.0': resolution: {integrity: sha512-2cyupPIZI69HQxEAPllLXBjQp4njDKkOjYRCYxvMZe3/LY9pp9fBM3Tb1wiFAdP6Emo4v3OEbCLGj6u73Q5KLw==} + '@fern-api/core-utils@0.4.24-rc1': + resolution: {integrity: sha512-aYu4lQK2qZIKzTF9TeFrICTPJ/zGEZUEWQmZt6pJeHu+R6afrcCBNkUleWU1OpHlDbe+xXUUBOktRg0PM9Hywg==} + + '@fern-api/docs-parsers@0.0.10': + resolution: {integrity: sha512-TO+XxWDSEq2PIirkNTWdsIX5zTrQMjVg+sdTmdTIICpQVAboupC0bG6IfAU+D933VYoy4ajrkqZbCYQSUjMOhg==} + '@fern-api/fdr-sdk@0.126.1-444264056': resolution: {integrity: sha512-Xl1Ctteav1GOulX40756FLEoJAI7VCn6zgkdDb6RRSZhm9Z8fjaBRv/cdMo1saupqHNd62Hm5b8FdmGjwWFAPw==} + '@fern-api/logger@0.4.24-rc1': + resolution: {integrity: sha512-yh0E2F3K3IPnJZcE4dv+u8I51iKgTgv/reinKo4K5YmYEG1iLtw5vBEYMOPkQmsYFPAKIh++OMB/6TrsahMWew==} + '@fern-api/sdk@0.12.3': resolution: {integrity: sha512-sexxpQEHBmsAXW3UHo5x7NW8Z9TrHWYLGo/J7eFqHYSH8Sq9LA3vRlR0ni9h4FNlKnPDu9Y55L0BhsQVXYqPKA==} '@fern-api/template-resolver@0.7.5': resolution: {integrity: sha512-hmvSxuhyWMjn1DxJJS/R+CIaZcF5c+UBEyFqFOw+laoBtdDvNgEyCu7XP5cILVMABPHmt7kkIO5KbrsCS5S2kw==} + '@fern-api/ui-core-utils@0.0.0': + resolution: {integrity: sha512-8T3YLd+n8z5Vs+WNRIwH6PUW31ZC4/lkRD5G2+qyBcdePfOVYV3CHp3eiUrSSArOr0SJmzN/mQwPm3iAaey7nw==} + '@fern-api/ui-core-utils@0.126.1-444264056': resolution: {integrity: sha512-9L3Tgl83nGaw9Jug17ZXSkPL7ZTeOP3SukG/Fz2Y2Aa/GqEToCrexuGkTO090nwuv2zO9gi7CYDHvQOEl5IIMQ==} @@ -8028,12 +8086,12 @@ packages: '@fern-fern/ir-sdk@53.23.0': resolution: {integrity: sha512-9U6uGs9WFDnVg57VyM7s6LKCkA30JOYDQwuLrNh50Meme0m8ce4GDZ/naVncfhrGjWfxt7PSjy1vlVLBi+PKZA==} + '@fern-fern/ir-sdk@53.24.0': + resolution: {integrity: sha512-cR/GIvqLaK8Oeql0WLv8nUsYNfplBHXKHoHv49CJfRP0xMr/RLmiQCZm2RAH+hnMha282oEMXYQeZDoZhatjKw==} + '@fern-fern/ir-sdk@53.7.0': resolution: {integrity: sha512-PoCj8yOep3kFeDZYORAzqPwVtCSNmbT2SfR/AoxKCcikeZ5i+4Um4ZXx1e6UaAy7dIYF5kWeRc6lptFBRoj7Gw==} - '@fern-fern/ir-sdk@53.8.0': - resolution: {integrity: sha512-h5q0DuXyeCs61Nl0ueBYMtNhG5uiSKJqdqtgTON5RWjGH0aJAhGMfoRXoq5Sar4HLWHhbK/t/290O/iCJLE0hQ==} - '@fern-fern/ir-sdk@53.9.0': resolution: {integrity: sha512-WAXXL+XVnDO4a3nfZRbRTr0+xz88jIYEZYTbJ7sYWLS7DLjmU780EFMMwO8ySmCdI0R2yRfeSY0qaGvuomXg6g==} @@ -8181,6 +8239,9 @@ packages: '@fern-fern/ir-v52-sdk@0.0.1': resolution: {integrity: sha512-UGmPWWaGAAAXUSq/A/uUuDl/iMO2+rJJ6ICBmXMlUFA/AAeSLhpxjbywGz3YU0NLgOBrVe0D00ZO9aW9TNx2/A==} + '@fern-fern/ir-v53-sdk@0.0.1': + resolution: {integrity: sha512-7KNvdLlWyYkkhVsplvVmVKm6+LCGKTQJxE7jqjmjg+1AUBC75zcGAkiHylDLB8gkOCLN3Qcs2RHljC0yHVLlOw==} + '@fern-fern/ir-v6-model@0.0.33': resolution: {integrity: sha512-I3KLvdrRzSrh5CcpU0v/Mjn4ywZhzVwhqJC8IDIQiP1yPvsCnjgbTBNwLRG8KdJqHfLOgdt/hfVzjeuFugSlGA==} @@ -10289,6 +10350,9 @@ packages: estree-util-visit@2.0.0: resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} + estree-walker@0.6.1: + resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==} + estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} @@ -12638,6 +12702,16 @@ packages: engines: {node: '>=14'} hasBin: true + rollup-plugin-inject@3.0.2: + resolution: {integrity: sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==} + deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject. + + rollup-plugin-node-polyfills@0.2.1: + resolution: {integrity: sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==} + + rollup-pluginutils@2.8.2: + resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==} + rollup@4.24.0: resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -14057,7 +14131,7 @@ snapshots: '@babel/core': 7.25.2 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 - debug: 4.3.6 + debug: 4.3.7 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -14893,6 +14967,16 @@ snapshots: dependencies: postcss-selector-parser: 6.0.15 + '@esbuild-plugins/node-globals-polyfill@0.2.3(esbuild@0.24.0)': + dependencies: + esbuild: 0.24.0 + + '@esbuild-plugins/node-modules-polyfill@0.2.2(esbuild@0.24.0)': + dependencies: + esbuild: 0.24.0 + escape-string-regexp: 4.0.0 + rollup-plugin-node-polyfills: 0.2.1 + '@esbuild/aix-ppc64@0.21.5': optional: true @@ -15059,6 +15143,39 @@ snapshots: '@exodus/schemasafe@1.0.0': {} + '@fern-api/core-utils@0.4.24-rc1': + dependencies: + lodash-es: 4.17.21 + strip-ansi: 7.1.0 + + '@fern-api/docs-parsers@0.0.10(@types/node@18.7.18)(jsdom@20.0.3)(sass@1.72.0)(terser@5.31.5)(typescript@4.6.4)': + dependencies: + '@fern-api/logger': 0.4.24-rc1 + '@fern-api/ui-core-utils': 0.0.0 + es-toolkit: 1.26.0 + openapi-types: 12.1.3 + ts-essentials: 10.0.1(typescript@4.6.4) + uuid: 9.0.1 + vitest: 2.1.4(@types/node@18.7.18)(jsdom@20.0.3)(sass@1.72.0)(terser@5.31.5) + whatwg-mimetype: 4.0.0 + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@types/node' + - '@vitest/browser' + - '@vitest/ui' + - happy-dom + - jsdom + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - typescript + '@fern-api/fdr-sdk@0.126.1-444264056(typescript@4.6.4)': dependencies: '@fern-api/ui-core-utils': 0.126.1-444264056 @@ -15079,6 +15196,11 @@ snapshots: - encoding - typescript + '@fern-api/logger@0.4.24-rc1': + dependencies: + '@fern-api/core-utils': 0.4.24-rc1 + chalk: 5.3.0 + '@fern-api/sdk@0.12.3': dependencies: '@fern-api/template-resolver': 0.7.5 @@ -15095,6 +15217,12 @@ snapshots: dependencies: prettier: 3.3.3 + '@fern-api/ui-core-utils@0.0.0': + dependencies: + strip-ansi: 7.1.0 + title: 3.5.3 + ua-parser-js: 1.0.37 + '@fern-api/ui-core-utils@0.126.1-444264056': dependencies: strip-ansi: 7.1.0 @@ -15186,9 +15314,9 @@ snapshots: '@fern-fern/ir-sdk@53.23.0': {} - '@fern-fern/ir-sdk@53.7.0': {} + '@fern-fern/ir-sdk@53.24.0': {} - '@fern-fern/ir-sdk@53.8.0': {} + '@fern-fern/ir-sdk@53.7.0': {} '@fern-fern/ir-sdk@53.9.0': {} @@ -15288,6 +15416,8 @@ snapshots: '@fern-fern/ir-v52-sdk@0.0.1': {} + '@fern-fern/ir-v53-sdk@0.0.1': {} + '@fern-fern/ir-v6-model@0.0.33': {} '@fern-fern/ir-v7-model@0.0.2': {} @@ -16184,7 +16314,7 @@ snapshots: '@typescript-eslint/type-utils@5.30.5(eslint@8.56.0)(typescript@4.6.4)': dependencies: '@typescript-eslint/utils': 5.30.5(eslint@8.56.0)(typescript@4.6.4) - debug: 4.3.6 + debug: 4.3.7 eslint: 8.56.0 tsutils: 3.21.0(typescript@4.6.4) optionalDependencies: @@ -16204,7 +16334,7 @@ snapshots: dependencies: '@typescript-eslint/types': 5.30.5 '@typescript-eslint/visitor-keys': 5.30.5 - debug: 4.3.6 + debug: 4.3.7 globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 @@ -16218,7 +16348,7 @@ snapshots: dependencies: '@typescript-eslint/types': 5.32.0 '@typescript-eslint/visitor-keys': 5.32.0 - debug: 4.3.6 + debug: 4.3.7 globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 @@ -16232,7 +16362,7 @@ snapshots: dependencies: '@typescript-eslint/types': 6.20.0 '@typescript-eslint/visitor-keys': 6.20.0 - debug: 4.3.6 + debug: 4.3.7 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -16247,7 +16377,7 @@ snapshots: dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.6 + debug: 4.3.7 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -17896,6 +18026,8 @@ snapshots: '@types/estree-jsx': 1.0.0 '@types/unist': 3.0.2 + estree-walker@0.6.1: {} + estree-walker@2.0.2: {} estree-walker@3.0.3: @@ -18771,7 +18903,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.6 + debug: 4.3.7 istanbul-lib-coverage: 3.2.0 source-map: 0.6.1 transitivePeerDependencies: @@ -19943,7 +20075,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.8 - debug: 4.3.6 + debug: 4.3.7 decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.1 @@ -20850,6 +20982,20 @@ snapshots: dependencies: glob: 10.3.10 + rollup-plugin-inject@3.0.2: + dependencies: + estree-walker: 0.6.1 + magic-string: 0.25.9 + rollup-pluginutils: 2.8.2 + + rollup-plugin-node-polyfills@0.2.1: + dependencies: + rollup-plugin-inject: 3.0.2 + + rollup-pluginutils@2.8.2: + dependencies: + estree-walker: 0.6.1 + rollup@4.24.0: dependencies: '@types/estree': 1.0.6 diff --git a/seed/csharp-model/inline-types/.github/workflows/ci.yml b/seed/csharp-model/inline-types/.github/workflows/ci.yml deleted file mode 100644 index 304921ae0cf..00000000000 --- a/seed/csharp-model/inline-types/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedObject/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-model/inline-types/.gitignore b/seed/csharp-model/inline-types/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-model/inline-types/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-model/inline-types/.mock/definition/__package__.yml b/seed/csharp-model/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/csharp-model/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/csharp-model/inline-types/src/SeedObject.Test/Core/EnumSerializerTests.cs b/seed/csharp-model/inline-types/src/SeedObject.Test/Core/EnumSerializerTests.cs deleted file mode 100644 index 8abc0743d8c..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject.Test/Core/EnumSerializerTests.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; -using NUnit.Framework; -using SeedObject.Core; - -namespace SeedObject.Test.Core -{ - [TestFixture] - public class StringEnumSerializerTests - { - private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true }; - - private const DummyEnum KnownEnumValue2 = DummyEnum.KnownValue2; - private const string KnownEnumValue2String = "known_value2"; - - private static readonly string JsonWithKnownEnum2 = $$""" - { - "enum_property": "{{KnownEnumValue2String}}" - } - """; - - [Test] - public void ShouldParseKnownEnumValue2() - { - var obj = JsonSerializer.Deserialize(JsonWithKnownEnum2, JsonOptions); - Assert.That(obj, Is.Not.Null); - Assert.That(obj.EnumProperty, Is.EqualTo(KnownEnumValue2)); - } - - [Test] - public void ShouldSerializeKnownEnumValue2() - { - var json = JsonSerializer.SerializeToElement( - new DummyObject { EnumProperty = KnownEnumValue2 }, - JsonOptions - ); - TestContext.Out.WriteLine("Serialized JSON: \n" + json); - var enumString = json.GetProperty("enum_property").GetString(); - Assert.That(enumString, Is.Not.Null); - Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); - } - } - - public class DummyObject - { - [JsonPropertyName("enum_property")] - public DummyEnum EnumProperty { get; set; } - } - - [JsonConverter(typeof(EnumSerializer))] - public enum DummyEnum - { - [EnumMember(Value = "known_value1")] - KnownValue1, - - [EnumMember(Value = "known_value2")] - KnownValue2, - } -} diff --git a/seed/csharp-model/inline-types/src/SeedObject.Test/SeedObject.Test.Custom.props b/seed/csharp-model/inline-types/src/SeedObject.Test/SeedObject.Test.Custom.props deleted file mode 100644 index 55e683b0772..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject.Test/SeedObject.Test.Custom.props +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/seed/csharp-model/inline-types/src/SeedObject.Test/SeedObject.Test.csproj b/seed/csharp-model/inline-types/src/SeedObject.Test/SeedObject.Test.csproj deleted file mode 100644 index be19774f42e..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject.Test/SeedObject.Test.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-model/inline-types/src/SeedObject.sln b/seed/csharp-model/inline-types/src/SeedObject.sln deleted file mode 100644 index b97dbe09dea..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObject", "SeedObject\SeedObject.csproj", "{AD1F9DE6-0EEA-4C0F-A203-D87741677FCA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObject.Test", "SeedObject.Test\SeedObject.Test.csproj", "{ADFBEAB6-3110-4762-9E42-1C3308776ED7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AD1F9DE6-0EEA-4C0F-A203-D87741677FCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AD1F9DE6-0EEA-4C0F-A203-D87741677FCA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AD1F9DE6-0EEA-4C0F-A203-D87741677FCA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AD1F9DE6-0EEA-4C0F-A203-D87741677FCA}.Release|Any CPU.Build.0 = Release|Any CPU - {ADFBEAB6-3110-4762-9E42-1C3308776ED7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ADFBEAB6-3110-4762-9E42-1C3308776ED7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ADFBEAB6-3110-4762-9E42-1C3308776ED7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ADFBEAB6-3110-4762-9E42-1C3308776ED7}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/seed/csharp-model/inline-types/src/SeedObject/Core/CollectionItemSerializer.cs b/seed/csharp-model/inline-types/src/SeedObject/Core/CollectionItemSerializer.cs deleted file mode 100644 index b3b87d895b3..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObject.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/Core/Constants.cs b/seed/csharp-model/inline-types/src/SeedObject/Core/Constants.cs deleted file mode 100644 index f1291efd432..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedObject.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/Core/DateTimeSerializer.cs b/seed/csharp-model/inline-types/src/SeedObject/Core/DateTimeSerializer.cs deleted file mode 100644 index 76290bfd825..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObject.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/Core/EnumSerializer.cs b/seed/csharp-model/inline-types/src/SeedObject/Core/EnumSerializer.cs deleted file mode 100644 index 6eda795120b..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/Core/EnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObject.Core; - -internal class EnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public EnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/Core/JsonConfiguration.cs b/seed/csharp-model/inline-types/src/SeedObject/Core/JsonConfiguration.cs deleted file mode 100644 index 5a726af685a..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/Core/JsonConfiguration.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObject.Core; - -internal static partial class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - var options = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - ConfigureJsonSerializerOptions(options); - JsonSerializerOptions = options; - } - - static partial void ConfigureJsonSerializerOptions(JsonSerializerOptions defaultOptions); -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/Core/OneOfSerializer.cs b/seed/csharp-model/inline-types/src/SeedObject/Core/OneOfSerializer.cs deleted file mode 100644 index c6bd432c117..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedObject.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/Core/Public/Version.cs b/seed/csharp-model/inline-types/src/SeedObject/Core/Public/Version.cs deleted file mode 100644 index 4c5cb2f299b..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedObject; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/InlineEnum.cs b/seed/csharp-model/inline-types/src/SeedObject/InlineEnum.cs deleted file mode 100644 index 6eb215679c4..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/InlineEnum.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -[JsonConverter(typeof(EnumSerializer))] -public enum InlineEnum -{ - [EnumMember(Value = "SUNNY")] - Sunny, - - [EnumMember(Value = "CLOUDY")] - Cloudy, - - [EnumMember(Value = "RAINING")] - Raining, - - [EnumMember(Value = "SNOWING")] - Snowing, -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/InlineType1.cs b/seed/csharp-model/inline-types/src/SeedObject/InlineType1.cs deleted file mode 100644 index aa5df854386..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/InlineType1.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public record InlineType1 -{ - [JsonPropertyName("foo")] - public required string Foo { get; set; } - - [JsonPropertyName("bar")] - public required NestedInlineType1 Bar { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/InlineType2.cs b/seed/csharp-model/inline-types/src/SeedObject/InlineType2.cs deleted file mode 100644 index ff1449e5d73..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/InlineType2.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public record InlineType2 -{ - [JsonPropertyName("baz")] - public required string Baz { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/NestedInlineType1.cs b/seed/csharp-model/inline-types/src/SeedObject/NestedInlineType1.cs deleted file mode 100644 index 19ab70d0370..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/NestedInlineType1.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public record NestedInlineType1 -{ - [JsonPropertyName("foo")] - public required string Foo { get; set; } - - [JsonPropertyName("bar")] - public required string Bar { get; set; } - - [JsonPropertyName("myEnum")] - public required InlineEnum MyEnum { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/RootType1.cs b/seed/csharp-model/inline-types/src/SeedObject/RootType1.cs deleted file mode 100644 index 72cfd860d48..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/RootType1.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public record RootType1 -{ - [JsonPropertyName("foo")] - public required string Foo { get; set; } - - [JsonPropertyName("bar")] - public required InlineType1 Bar { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-model/inline-types/src/SeedObject/SeedObject.Custom.props b/seed/csharp-model/inline-types/src/SeedObject/SeedObject.Custom.props deleted file mode 100644 index 70df2849401..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/SeedObject.Custom.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - \ No newline at end of file diff --git a/seed/csharp-model/inline-types/src/SeedObject/SeedObject.csproj b/seed/csharp-model/inline-types/src/SeedObject/SeedObject.csproj deleted file mode 100644 index ceed24758f1..00000000000 --- a/seed/csharp-model/inline-types/src/SeedObject/SeedObject.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - 12 - enable - 0.0.1 - $(Version) - $(Version) - README.md - https://github.com/inline-types/fern - true - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - <_Parameter1>SeedObject.Test - - - - - diff --git a/seed/csharp-sdk/inline-types/.github/workflows/ci.yml b/seed/csharp-sdk/inline-types/.github/workflows/ci.yml deleted file mode 100644 index 304921ae0cf..00000000000 --- a/seed/csharp-sdk/inline-types/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Build Release - run: dotnet build src -c Release /p:ContinuousIntegrationBuild=true - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: actions/checkout@master - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Install tools - run: | - dotnet tool restore - - - name: Run Tests - run: | - dotnet test src - - - publish: - needs: [compile] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.x - - - name: Publish - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} - run: | - dotnet pack src -c Release - dotnet nuget push src/SeedObject/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" diff --git a/seed/csharp-sdk/inline-types/.gitignore b/seed/csharp-sdk/inline-types/.gitignore deleted file mode 100644 index 11014f2b33d..00000000000 --- a/seed/csharp-sdk/inline-types/.gitignore +++ /dev/null @@ -1,484 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -## This is based on `dotnet new gitignore` and customized by Fern - -# dotenv files -.env - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -# [Rr]elease/ (Ignored by Fern) -# [Rr]eleases/ (Ignored by Fern) -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -# [Ll]og/ (Ignored by Fern) -# [Ll]ogs/ (Ignored by Fern) - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# Vim temporary swap files -*.swp diff --git a/seed/csharp-sdk/inline-types/.mock/definition/__package__.yml b/seed/csharp-sdk/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/csharp-sdk/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/csharp-sdk/inline-types/README.md b/seed/csharp-sdk/inline-types/README.md deleted file mode 100644 index 926c91c7595..00000000000 --- a/seed/csharp-sdk/inline-types/README.md +++ /dev/null @@ -1,102 +0,0 @@ -# Seed C# Library - -[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Seed%2FC%23) -[![nuget shield](https://img.shields.io/nuget/v/SeedObject)](https://nuget.org/packages/SeedObject) - -The Seed C# library provides convenient access to the Seed API from C#. - -## Installation - -```sh -nuget install SeedObject -``` - -## Usage - -Instantiate and use the client with the following: - -```csharp -using SeedObject; - -var client = new SeedObjectClient(); -await client.GetRootAsync( - new PostRootRequest - { - Bar = new InlineType1 - { - Foo = "foo", - Bar = new NestedInlineType1 - { - Foo = "foo", - Bar = "bar", - MyEnum = InlineEnum.Sunny, - }, - }, - Foo = "foo", - } -); -``` - -## 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 SeedObject; - -try { - var response = await client.GetRootAsync(...); -} catch (SeedObjectApiException e) { - System.Console.WriteLine(e.Body); - System.Console.WriteLine(e.StatusCode); -} -``` - -## Advanced - -### Retries - -The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long -as the request is deemed retriable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). - -A request is deemed retriable when any of the following HTTP status codes is returned: - -- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) -- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) -- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) - -Use the `MaxRetries` request option to configure this behavior. - -```csharp -var response = await client.GetRootAsync( - ..., - 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.GetRootAsync( - ..., - new RequestOptions { - Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s - } -); -``` - -## Contributing - -While we value open-source contributions to this SDK, this library is generated programmatically. -Additions made directly to this library would have to be moved over to our generation code, -otherwise they would be overwritten upon the next generated release. Feel free to open a PR as -a proof of concept, but know that we will not be able to merge it as-is. We suggest opening -an issue first to discuss with us! - -On the other hand, contributions to the README are always very welcome! \ No newline at end of file diff --git a/seed/csharp-sdk/inline-types/reference.md b/seed/csharp-sdk/inline-types/reference.md deleted file mode 100644 index df8466b60cb..00000000000 --- a/seed/csharp-sdk/inline-types/reference.md +++ /dev/null @@ -1,55 +0,0 @@ -# Reference -
client.GetRootAsync(PostRootRequest { ... }) -> RootType1 -
-
- -#### 🔌 Usage - -
-
- -
-
- -```csharp -await client.GetRootAsync( - new PostRootRequest - { - Bar = new InlineType1 - { - Foo = "foo", - Bar = new NestedInlineType1 - { - Foo = "foo", - Bar = "bar", - MyEnum = InlineEnum.Sunny, - }, - }, - Foo = "foo", - } -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `PostRootRequest` - -
-
-
-
- - -
-
-
diff --git a/seed/csharp-sdk/inline-types/snippet-templates.json b/seed/csharp-sdk/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/csharp-sdk/inline-types/snippet.json b/seed/csharp-sdk/inline-types/snippet.json deleted file mode 100644 index 2799cc5a2ac..00000000000 --- a/seed/csharp-sdk/inline-types/snippet.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "types": {}, - "endpoints": [ - { - "example_identifier": null, - "id": { - "path": "/root/root", - "method": "POST", - "identifier_override": "endpoint_.getRoot" - }, - "snippet": { - "type": "typescript", - "client": "using SeedObject;\n\nvar client = new SeedObjectClient();\nawait client.GetRootAsync(\n new PostRootRequest\n {\n Bar = new InlineType1\n {\n Foo = \"foo\",\n Bar = new NestedInlineType1\n {\n Foo = \"foo\",\n Bar = \"bar\",\n MyEnum = InlineEnum.Sunny,\n },\n },\n Foo = \"foo\",\n }\n);\n" - } - } - ] -} \ No newline at end of file diff --git a/seed/csharp-sdk/inline-types/src/SeedObject.Test/Core/EnumSerializerTests.cs b/seed/csharp-sdk/inline-types/src/SeedObject.Test/Core/EnumSerializerTests.cs deleted file mode 100644 index 8abc0743d8c..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject.Test/Core/EnumSerializerTests.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; -using NUnit.Framework; -using SeedObject.Core; - -namespace SeedObject.Test.Core -{ - [TestFixture] - public class StringEnumSerializerTests - { - private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true }; - - private const DummyEnum KnownEnumValue2 = DummyEnum.KnownValue2; - private const string KnownEnumValue2String = "known_value2"; - - private static readonly string JsonWithKnownEnum2 = $$""" - { - "enum_property": "{{KnownEnumValue2String}}" - } - """; - - [Test] - public void ShouldParseKnownEnumValue2() - { - var obj = JsonSerializer.Deserialize(JsonWithKnownEnum2, JsonOptions); - Assert.That(obj, Is.Not.Null); - Assert.That(obj.EnumProperty, Is.EqualTo(KnownEnumValue2)); - } - - [Test] - public void ShouldSerializeKnownEnumValue2() - { - var json = JsonSerializer.SerializeToElement( - new DummyObject { EnumProperty = KnownEnumValue2 }, - JsonOptions - ); - TestContext.Out.WriteLine("Serialized JSON: \n" + json); - var enumString = json.GetProperty("enum_property").GetString(); - Assert.That(enumString, Is.Not.Null); - Assert.That(enumString, Is.EqualTo(KnownEnumValue2String)); - } - } - - public class DummyObject - { - [JsonPropertyName("enum_property")] - public DummyEnum EnumProperty { get; set; } - } - - [JsonConverter(typeof(EnumSerializer))] - public enum DummyEnum - { - [EnumMember(Value = "known_value1")] - KnownValue1, - - [EnumMember(Value = "known_value2")] - KnownValue2, - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject.Test/Core/RawClientTests.cs b/seed/csharp-sdk/inline-types/src/SeedObject.Test/Core/RawClientTests.cs deleted file mode 100644 index 4dd06c7b4b5..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject.Test/Core/RawClientTests.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Net.Http; -using FluentAssertions; -using NUnit.Framework; -using SeedObject.Core; -using WireMock.Server; -using SystemTask = System.Threading.Tasks.Task; -using WireMockRequest = WireMock.RequestBuilders.Request; -using WireMockResponse = WireMock.ResponseBuilders.Response; - -namespace SeedObject.Test.Core -{ - [TestFixture] - public class RawClientTests - { - private WireMockServer _server; - private HttpClient _httpClient; - private RawClient _rawClient; - private string _baseUrl; - private const int _maxRetries = 3; - - [SetUp] - public void SetUp() - { - _server = WireMockServer.Start(); - _baseUrl = _server.Url ?? ""; - _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) }; - _rawClient = new RawClient( - new ClientOptions() { HttpClient = _httpClient, MaxRetries = _maxRetries } - ); - } - - [Test] - [TestCase(408)] - [TestCase(429)] - [TestCase(500)] - [TestCase(504)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnRetryableStatusCodes(int statusCode) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Server Error") - .WillSetStateTo("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); - - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WhenStateIs("Success") - .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(200)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Success")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(_maxRetries)); - } - - [Test] - [TestCase(400)] - [TestCase(409)] - public async SystemTask MakeRequestAsync_ShouldRetry_OnNonRetryableStatusCodes( - int statusCode - ) - { - _server - .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) - .InScenario("Retry") - .WillSetStateTo("Server Error") - .RespondWith( - WireMockResponse.Create().WithStatusCode(statusCode).WithBody("Failure") - ); - - var request = new RawClient.BaseApiRequest - { - BaseUrl = _baseUrl, - Method = HttpMethod.Get, - Path = "/test", - }; - - var response = await _rawClient.MakeRequestAsync(request); - Assert.That(response.StatusCode, Is.EqualTo(statusCode)); - - var content = await response.Raw.Content.ReadAsStringAsync(); - Assert.That(content, Is.EqualTo("Failure")); - - Assert.That(_server.LogEntries.Count, Is.EqualTo(1)); - } - - [TearDown] - public void TearDown() - { - _server.Dispose(); - _httpClient.Dispose(); - } - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject.Test/SeedObject.Test.Custom.props b/seed/csharp-sdk/inline-types/src/SeedObject.Test/SeedObject.Test.Custom.props deleted file mode 100644 index 55e683b0772..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject.Test/SeedObject.Test.Custom.props +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/seed/csharp-sdk/inline-types/src/SeedObject.Test/SeedObject.Test.csproj b/seed/csharp-sdk/inline-types/src/SeedObject.Test/SeedObject.Test.csproj deleted file mode 100644 index be19774f42e..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject.Test/SeedObject.Test.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - - net8.0 - enable - enable - - false - true - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/inline-types/src/SeedObject.Test/TestClient.cs b/seed/csharp-sdk/inline-types/src/SeedObject.Test/TestClient.cs deleted file mode 100644 index 307591f8be5..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject.Test/TestClient.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NUnit.Framework; - -#nullable enable - -namespace SeedObject.Test; - -[TestFixture] -public class TestClient { } diff --git a/seed/csharp-sdk/inline-types/src/SeedObject.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/inline-types/src/SeedObject.Test/Unit/MockServer/BaseMockServerTest.cs deleted file mode 100644 index 4e753d16f01..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject.Test/Unit/MockServer/BaseMockServerTest.cs +++ /dev/null @@ -1,40 +0,0 @@ -using NUnit.Framework; -using SeedObject; -using WireMock.Logging; -using WireMock.Server; -using WireMock.Settings; - -#nullable enable - -namespace SeedObject.Test.Unit.MockServer; - -[SetUpFixture] -public class BaseMockServerTest -{ - protected static WireMockServer Server { get; set; } = null!; - - protected static SeedObjectClient Client { get; set; } = null!; - - protected static RequestOptions RequestOptions { get; set; } = null!; - - [OneTimeSetUp] - public void GlobalSetup() - { - // Start the WireMock server - Server = WireMockServer.Start( - new WireMockServerSettings { Logger = new WireMockConsoleLogger() } - ); - - // Initialize the Client - Client = new SeedObjectClient(); - - RequestOptions = new RequestOptions { BaseUrl = Server.Urls[0] }; - } - - [OneTimeTearDown] - public void GlobalTeardown() - { - Server.Stop(); - Server.Dispose(); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject.Test/Unit/MockServer/GetRootTest.cs b/seed/csharp-sdk/inline-types/src/SeedObject.Test/Unit/MockServer/GetRootTest.cs deleted file mode 100644 index 392c7599eed..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject.Test/Unit/MockServer/GetRootTest.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System.Threading.Tasks; -using FluentAssertions.Json; -using Newtonsoft.Json.Linq; -using NUnit.Framework; -using SeedObject; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject.Test.Unit.MockServer; - -[TestFixture] -public class GetRootTest : BaseMockServerTest -{ - [Test] - public async Task MockServerTest() - { - const string requestJson = """ - { - "bar": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - }, - "foo": "foo" - } - """; - - const string mockResponse = """ - { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": { - "foo": "foo", - "bar": "bar", - "myEnum": "SUNNY" - } - } - } - """; - - Server - .Given( - WireMock - .RequestBuilders.Request.Create() - .WithPath("/root/root") - .WithHeader("Content-Type", "application/json") - .UsingPost() - .WithBodyAsJson(requestJson) - ) - .RespondWith( - WireMock - .ResponseBuilders.Response.Create() - .WithStatusCode(200) - .WithBody(mockResponse) - ); - - var response = await Client.GetRootAsync( - new PostRootRequest - { - Bar = new InlineType1 - { - Foo = "foo", - Bar = new NestedInlineType1 - { - Foo = "foo", - Bar = "bar", - MyEnum = InlineEnum.Sunny, - }, - }, - Foo = "foo", - }, - RequestOptions - ); - JToken - .Parse(mockResponse) - .Should() - .BeEquivalentTo(JToken.Parse(JsonUtils.Serialize(response))); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject.sln b/seed/csharp-sdk/inline-types/src/SeedObject.sln deleted file mode 100644 index 04f8293ffea..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObject", "SeedObject\SeedObject.csproj", "{5F954A6C-8849-40D3-8109-615573D3A579}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeedObject.Test", "SeedObject.Test\SeedObject.Test.csproj", "{3D1EA2A5-21F8-41B3-8AFA-F4C664F4CEC8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5F954A6C-8849-40D3-8109-615573D3A579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5F954A6C-8849-40D3-8109-615573D3A579}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5F954A6C-8849-40D3-8109-615573D3A579}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5F954A6C-8849-40D3-8109-615573D3A579}.Release|Any CPU.Build.0 = Release|Any CPU - {3D1EA2A5-21F8-41B3-8AFA-F4C664F4CEC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3D1EA2A5-21F8-41B3-8AFA-F4C664F4CEC8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3D1EA2A5-21F8-41B3-8AFA-F4C664F4CEC8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3D1EA2A5-21F8-41B3-8AFA-F4C664F4CEC8}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/CollectionItemSerializer.cs deleted file mode 100644 index b3b87d895b3..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/CollectionItemSerializer.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObject.Core; - -/// -/// Json collection converter. -/// -/// Type of item to convert. -/// Converter to use for individual items. -internal class CollectionItemSerializer - : JsonConverter> - where TConverterType : JsonConverter -{ - /// - /// Reads a json string and deserializes it into an object. - /// - /// Json reader. - /// Type to convert. - /// Serializer options. - /// Created object. - public override IEnumerable? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - - var jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - var returnValue = new List(); - - while (reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartArray) - { - var item = (TDatatype)( - JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) - ?? throw new Exception( - $"Failed to deserialize collection item of type {typeof(TDatatype)}" - ) - ); - returnValue.Add(item); - } - - reader.Read(); - } - - return returnValue; - } - - /// - /// Writes a json string. - /// - /// Json writer. - /// Value to write. - /// Serializer options. - public override void Write( - Utf8JsonWriter writer, - IEnumerable? value, - JsonSerializerOptions options - ) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions(options); - jsonSerializerOptions.Converters.Clear(); - jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); - - writer.WriteStartArray(); - - foreach (var data in value) - { - JsonSerializer.Serialize(writer, data, jsonSerializerOptions); - } - - writer.WriteEndArray(); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Constants.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/Constants.cs deleted file mode 100644 index f1291efd432..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Constants.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SeedObject.Core; - -internal static class Constants -{ - public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; - public const string DateFormat = "yyyy-MM-dd"; -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/DateTimeSerializer.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/DateTimeSerializer.cs deleted file mode 100644 index 76290bfd825..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/DateTimeSerializer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObject.Core; - -internal class DateTimeSerializer : JsonConverter -{ - public override DateTime Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); - } - - public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/EnumSerializer.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/EnumSerializer.cs deleted file mode 100644 index 6eda795120b..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/EnumSerializer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObject.Core; - -internal class EnumSerializer : JsonConverter - where TEnum : struct, System.Enum -{ - private readonly Dictionary _enumToString = new(); - private readonly Dictionary _stringToEnum = new(); - - public EnumSerializer() - { - var type = typeof(TEnum); - var values = Enum.GetValues(type); - - foreach (var value in values) - { - var enumValue = (TEnum)value; - var enumMember = type.GetMember(enumValue.ToString())[0]; - var attr = enumMember - .GetCustomAttributes(typeof(EnumMemberAttribute), false) - .Cast() - .FirstOrDefault(); - - var stringValue = - attr?.Value - ?? value.ToString() - ?? throw new Exception("Unexpected null enum toString value"); - - _enumToString.Add(enumValue, stringValue); - _stringToEnum.Add(stringValue, enumValue); - } - } - - public override TEnum Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - var stringValue = - reader.GetString() - ?? throw new Exception("The JSON value could not be read as a string."); - return _stringToEnum.TryGetValue(stringValue, out var enumValue) ? enumValue : default; - } - - public override void Write(Utf8JsonWriter writer, TEnum value, JsonSerializerOptions options) - { - writer.WriteStringValue(_enumToString[value]); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Extensions.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/Extensions.cs deleted file mode 100644 index 2539faa7cde..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Extensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Runtime.Serialization; - -namespace SeedObject.Core; - -internal static class Extensions -{ - public static string Stringify(this Enum value) - { - var field = value.GetType().GetField(value.ToString()); - var attribute = (EnumMemberAttribute) - Attribute.GetCustomAttribute(field, typeof(EnumMemberAttribute)); - return attribute?.Value ?? value.ToString(); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/HeaderValue.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/HeaderValue.cs deleted file mode 100644 index 9fd0a6854cf..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/HeaderValue.cs +++ /dev/null @@ -1,17 +0,0 @@ -using OneOf; - -namespace SeedObject.Core; - -internal sealed class HeaderValue(OneOf> value) - : OneOfBase>(value) -{ - public static implicit operator HeaderValue(string value) - { - return new HeaderValue(value); - } - - public static implicit operator HeaderValue(Func value) - { - return new HeaderValue(value); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Headers.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/Headers.cs deleted file mode 100644 index 3015ade82a5..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Headers.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SeedObject.Core; - -internal sealed class Headers : Dictionary -{ - public Headers() { } - - public Headers(Dictionary value) - { - foreach (var kvp in value) - { - this[kvp.Key] = new HeaderValue(kvp.Value); - } - } - - public Headers(IEnumerable> value) - : base(value.ToDictionary(e => e.Key, e => e.Value)) { } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/HttpMethodExtensions.cs deleted file mode 100644 index 01e205d219d..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/HttpMethodExtensions.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Net.Http; - -namespace SeedObject.Core; - -internal static class HttpMethodExtensions -{ - public static readonly HttpMethod Patch = new("PATCH"); -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/IRequestOptions.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/IRequestOptions.cs deleted file mode 100644 index eefa20f04bb..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/IRequestOptions.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Net.Http; - -#nullable enable - -namespace SeedObject.Core; - -internal interface IRequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/JsonConfiguration.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/JsonConfiguration.cs deleted file mode 100644 index 5a726af685a..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/JsonConfiguration.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace SeedObject.Core; - -internal static partial class JsonOptions -{ - public static readonly JsonSerializerOptions JsonSerializerOptions; - - static JsonOptions() - { - var options = new JsonSerializerOptions - { - Converters = { new DateTimeSerializer(), new OneOfSerializer() }, - WriteIndented = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - }; - ConfigureJsonSerializerOptions(options); - JsonSerializerOptions = options; - } - - static partial void ConfigureJsonSerializerOptions(JsonSerializerOptions defaultOptions); -} - -internal static class JsonUtils -{ - public static string Serialize(T obj) - { - return JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); - } - - public static T Deserialize(string json) - { - return JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/OneOfSerializer.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/OneOfSerializer.cs deleted file mode 100644 index c6bd432c117..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/OneOfSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; -using OneOf; - -namespace SeedObject.Core; - -internal class OneOfSerializer : JsonConverter -{ - public override IOneOf? Read( - ref Utf8JsonReader reader, - System.Type typeToConvert, - JsonSerializerOptions options - ) - { - if (reader.TokenType is JsonTokenType.Null) - return default; - - foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) - { - try - { - var readerCopy = reader; - var result = JsonSerializer.Deserialize(ref readerCopy, type, options); - reader.Skip(); - return (IOneOf)cast.Invoke(null, [result])!; - } - catch (JsonException) { } - } - - throw new JsonException( - $"Cannot deserialize into one of the supported types for {typeToConvert}" - ); - } - - public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) - { - JsonSerializer.Serialize(writer, value.Value, options); - } - - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) - { - var casts = typeToConvert - .GetRuntimeMethods() - .Where(m => m.IsSpecialName && m.Name == "op_Implicit") - .ToArray(); - var type = typeToConvert; - while (type != null) - { - if ( - type.IsGenericType - && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) - ) - { - return type.GetGenericArguments() - .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) - .ToArray(); - } - - type = type.BaseType; - } - throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); - } - - public override bool CanConvert(System.Type typeToConvert) - { - return typeof(IOneOf).IsAssignableFrom(typeToConvert); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/ClientOptions.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/ClientOptions.cs deleted file mode 100644 index 31bcb5fab70..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/ClientOptions.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Net.Http; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public partial class ClientOptions -{ - /// - /// The Base URL for the API. - /// - public string BaseUrl { get; init; } = ""; - - /// - /// The http client used to make requests. - /// - public HttpClient HttpClient { get; init; } = new HttpClient(); - - /// - /// The http client used to make requests. - /// - public int MaxRetries { get; init; } = 2; - - /// - /// The timeout for the request. - /// - public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(30); - - /// - /// The http headers sent with the request. - /// - internal Headers Headers { get; init; } = new(); - - /// - /// Clones this and returns a new instance - /// - internal ClientOptions Clone() - { - return new ClientOptions - { - BaseUrl = BaseUrl, - HttpClient = HttpClient, - MaxRetries = MaxRetries, - Timeout = Timeout, - Headers = new Headers(new Dictionary(Headers)), - }; - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/RequestOptions.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/RequestOptions.cs deleted file mode 100644 index b3488378918..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/RequestOptions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Net.Http; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public partial class RequestOptions : IRequestOptions -{ - /// - /// The Base URL for the API. - /// - public string? BaseUrl { get; init; } - - /// - /// The http client used to make requests. - /// - public HttpClient? HttpClient { get; init; } - - /// - /// The http client used to make requests. - /// - public int? MaxRetries { get; init; } - - /// - /// The timeout for the request. - /// - public TimeSpan? Timeout { get; init; } - - /// - /// The http headers sent with the request. - /// - Headers IRequestOptions.Headers { get; init; } = new(); -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/SeedObjectApiException.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/SeedObjectApiException.cs deleted file mode 100644 index 006a14f0735..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/SeedObjectApiException.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace SeedObject; - -/// -/// This exception type will be thrown for any non-2XX API responses. -/// -public class SeedObjectApiException(string message, int statusCode, object body) - : SeedObjectException(message) -{ - /// - /// The error code of the response that triggered the exception. - /// - public int StatusCode => statusCode; - - /// - /// The body of the response that triggered the exception. - /// - public object Body => body; -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/SeedObjectException.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/SeedObjectException.cs deleted file mode 100644 index 640dccfd79a..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/SeedObjectException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -#nullable enable - -namespace SeedObject; - -/// -/// Base exception class for all exceptions thrown by the SDK. -/// -public class SeedObjectException(string message, Exception? innerException = null) - : Exception(message, innerException) { } diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/Version.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/Version.cs deleted file mode 100644 index 4c5cb2f299b..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/Public/Version.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SeedObject; - -internal class Version -{ - public const string Current = "0.0.1"; -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Core/RawClient.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Core/RawClient.cs deleted file mode 100644 index 2e42938980f..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Core/RawClient.cs +++ /dev/null @@ -1,189 +0,0 @@ -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; -using System.Threading; - -namespace SeedObject.Core; - -#nullable enable - -/// -/// Utility class for making raw HTTP requests to the API. -/// -internal class RawClient(ClientOptions clientOptions) -{ - private const int InitialRetryDelayMs = 1000; - private const int MaxRetryDelayMs = 60000; - - /// - /// The client options applied on every request. - /// - public readonly ClientOptions Options = clientOptions; - - public async Task MakeRequestAsync( - BaseApiRequest request, - CancellationToken cancellationToken = default - ) - { - // Apply the request timeout. - var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); - var timeout = request.Options?.Timeout ?? Options.Timeout; - cts.CancelAfter(timeout); - - // Send the request. - return await SendWithRetriesAsync(request, cts.Token); - } - - public record BaseApiRequest - { - public required string BaseUrl { get; init; } - - public required HttpMethod Method { get; init; } - - public required string Path { get; init; } - - public string? ContentType { get; init; } - - public Dictionary Query { get; init; } = new(); - - public Headers Headers { get; init; } = new(); - - public IRequestOptions? Options { get; init; } - } - - /// - /// The request object to be sent for streaming uploads. - /// - public record StreamApiRequest : BaseApiRequest - { - public Stream? Body { get; init; } - } - - /// - /// The request object to be sent for JSON APIs. - /// - public record JsonApiRequest : BaseApiRequest - { - public object? Body { get; init; } - } - - /// - /// The response object returned from the API. - /// - public record ApiResponse - { - public required int StatusCode { get; init; } - - public required HttpResponseMessage Raw { get; init; } - } - - private async Task SendWithRetriesAsync( - BaseApiRequest request, - CancellationToken cancellationToken - ) - { - var httpClient = request.Options?.HttpClient ?? Options.HttpClient; - var maxRetries = request.Options?.MaxRetries ?? Options.MaxRetries; - var response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - for (var i = 0; i < maxRetries; i++) - { - if (!ShouldRetry(response)) - { - break; - } - var delayMs = Math.Min(InitialRetryDelayMs * (int)Math.Pow(2, i), MaxRetryDelayMs); - await System.Threading.Tasks.Task.Delay(delayMs, cancellationToken); - response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); - } - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; - } - - private static bool ShouldRetry(HttpResponseMessage response) - { - var statusCode = (int)response.StatusCode; - return statusCode is 408 or 429 or >= 500; - } - - private HttpRequestMessage BuildHttpRequest(BaseApiRequest request) - { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - switch (request) - { - // Add the request body to the request. - case JsonApiRequest jsonRequest: - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - break; - } - case StreamApiRequest { Body: not null } streamRequest: - httpRequest.Content = new StreamContent(streamRequest.Body); - break; - } - if (request.ContentType != null) - { - httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse( - request.ContentType - ); - } - SetHeaders(httpRequest, Options.Headers); - SetHeaders(httpRequest, request.Headers); - SetHeaders(httpRequest, request.Options?.Headers ?? new Headers()); - - return httpRequest; - } - - private static string BuildUrl(BaseApiRequest request) - { - var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl; - var trimmedBaseUrl = baseUrl.TrimEnd('/'); - var trimmedBasePath = request.Path.TrimStart('/'); - var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; - if (request.Query.Count <= 0) - return url; - url += "?"; - url = request.Query.Aggregate( - url, - (current, queryItem) => - { - if (queryItem.Value is System.Collections.IEnumerable collection and not string) - { - var items = collection - .Cast() - .Select(value => $"{queryItem.Key}={value}") - .ToList(); - if (items.Any()) - { - current += string.Join("&", items) + "&"; - } - } - else - { - current += $"{queryItem.Key}={queryItem.Value}&"; - } - return current; - } - ); - url = url[..^1]; - return url; - } - - private static void SetHeaders(HttpRequestMessage httpRequest, Headers headers) - { - foreach (var header in headers) - { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) - { - httpRequest.Headers.TryAddWithoutValidation(header.Key, value); - } - } - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Requests/PostRootRequest.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Requests/PostRootRequest.cs deleted file mode 100644 index f7f4de3b2b3..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Requests/PostRootRequest.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public record PostRootRequest -{ - [JsonPropertyName("bar")] - public required InlineType1 Bar { get; set; } - - [JsonPropertyName("foo")] - public required string Foo { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/SeedObject.Custom.props b/seed/csharp-sdk/inline-types/src/SeedObject/SeedObject.Custom.props deleted file mode 100644 index 70df2849401..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/SeedObject.Custom.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - \ No newline at end of file diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/SeedObject.csproj b/seed/csharp-sdk/inline-types/src/SeedObject/SeedObject.csproj deleted file mode 100644 index ceed24758f1..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/SeedObject.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - - - net462;net8.0;net7.0;net6.0;netstandard2.0 - enable - 12 - enable - 0.0.1 - $(Version) - $(Version) - README.md - https://github.com/inline-types/fern - true - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - <_Parameter1>SeedObject.Test - - - - - diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/SeedObjectClient.cs b/seed/csharp-sdk/inline-types/src/SeedObject/SeedObjectClient.cs deleted file mode 100644 index a4d257e2d62..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/SeedObjectClient.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System.Net.Http; -using System.Text.Json; -using System.Threading; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public partial class SeedObjectClient -{ - private RawClient _client; - - public SeedObjectClient(ClientOptions? clientOptions = null) - { - var defaultHeaders = new Headers( - new Dictionary() - { - { "X-Fern-Language", "C#" }, - { "X-Fern-SDK-Name", "SeedObject" }, - { "X-Fern-SDK-Version", Version.Current }, - { "User-Agent", "Ferninline-types/0.0.1" }, - } - ); - clientOptions ??= new ClientOptions(); - foreach (var header in defaultHeaders) - { - if (!clientOptions.Headers.ContainsKey(header.Key)) - { - clientOptions.Headers[header.Key] = header.Value; - } - } - _client = new RawClient(clientOptions); - } - - /// - /// - /// await client.GetRootAsync( - /// new PostRootRequest - /// { - /// Bar = new InlineType1 - /// { - /// Foo = "foo", - /// Bar = new NestedInlineType1 - /// { - /// Foo = "foo", - /// Bar = "bar", - /// MyEnum = InlineEnum.Sunny, - /// }, - /// }, - /// Foo = "foo", - /// } - /// ); - /// - /// - public async Task GetRootAsync( - PostRootRequest request, - RequestOptions? options = null, - CancellationToken cancellationToken = default - ) - { - var response = await _client.MakeRequestAsync( - new RawClient.JsonApiRequest - { - BaseUrl = _client.Options.BaseUrl, - Method = HttpMethod.Post, - Path = "/root/root", - Body = request, - ContentType = "application/json", - Options = options, - }, - cancellationToken - ); - var responseBody = await response.Raw.Content.ReadAsStringAsync(); - if (response.StatusCode is >= 200 and < 400) - { - try - { - return JsonUtils.Deserialize(responseBody)!; - } - catch (JsonException e) - { - throw new SeedObjectException("Failed to deserialize response", e); - } - } - - throw new SeedObjectApiException( - $"Error with status code {response.StatusCode}", - response.StatusCode, - responseBody - ); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Types/InlineEnum.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Types/InlineEnum.cs deleted file mode 100644 index 6eb215679c4..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Types/InlineEnum.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Runtime.Serialization; -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -[JsonConverter(typeof(EnumSerializer))] -public enum InlineEnum -{ - [EnumMember(Value = "SUNNY")] - Sunny, - - [EnumMember(Value = "CLOUDY")] - Cloudy, - - [EnumMember(Value = "RAINING")] - Raining, - - [EnumMember(Value = "SNOWING")] - Snowing, -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Types/InlineType1.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Types/InlineType1.cs deleted file mode 100644 index aa5df854386..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Types/InlineType1.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public record InlineType1 -{ - [JsonPropertyName("foo")] - public required string Foo { get; set; } - - [JsonPropertyName("bar")] - public required NestedInlineType1 Bar { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Types/InlineType2.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Types/InlineType2.cs deleted file mode 100644 index ff1449e5d73..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Types/InlineType2.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public record InlineType2 -{ - [JsonPropertyName("baz")] - public required string Baz { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Types/NestedInlineType1.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Types/NestedInlineType1.cs deleted file mode 100644 index 19ab70d0370..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Types/NestedInlineType1.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public record NestedInlineType1 -{ - [JsonPropertyName("foo")] - public required string Foo { get; set; } - - [JsonPropertyName("bar")] - public required string Bar { get; set; } - - [JsonPropertyName("myEnum")] - public required InlineEnum MyEnum { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/csharp-sdk/inline-types/src/SeedObject/Types/RootType1.cs b/seed/csharp-sdk/inline-types/src/SeedObject/Types/RootType1.cs deleted file mode 100644 index 72cfd860d48..00000000000 --- a/seed/csharp-sdk/inline-types/src/SeedObject/Types/RootType1.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Text.Json.Serialization; -using SeedObject.Core; - -#nullable enable - -namespace SeedObject; - -public record RootType1 -{ - [JsonPropertyName("foo")] - public required string Foo { get; set; } - - [JsonPropertyName("bar")] - public required InlineType1 Bar { get; set; } - - public override string ToString() - { - return JsonUtils.Serialize(this); - } -} diff --git a/seed/fastapi/inline-types/.mock/definition/__package__.yml b/seed/fastapi/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/fastapi/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/fastapi/inline-types/__init__.py b/seed/fastapi/inline-types/__init__.py deleted file mode 100644 index 559e53306bb..00000000000 --- a/seed/fastapi/inline-types/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .service import PostRootRequest -from .types import ( - InlineEnum, - InlineType1, - InlineType2, - InlinedDiscriminatedUnion1, - InlinedUndiscriminatedUnion1, - NestedInlineType1, - RootType1, -) - -__all__ = [ - "InlineEnum", - "InlineType1", - "InlineType2", - "InlinedDiscriminatedUnion1", - "InlinedUndiscriminatedUnion1", - "NestedInlineType1", - "PostRootRequest", - "RootType1", -] diff --git a/seed/fastapi/inline-types/core/__init__.py b/seed/fastapi/inline-types/core/__init__.py deleted file mode 100644 index f9c8e44aea0..00000000000 --- a/seed/fastapi/inline-types/core/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .datetime_utils import serialize_datetime -from .exceptions import ( - FernHTTPException, - UnauthorizedException, - default_exception_handler, - fern_http_exception_handler, - http_exception_handler, -) -from .pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - UniversalRootModel, - parse_obj_as, - universal_field_validator, - universal_root_validator, - update_forward_refs, -) -from .route_args import route_args -from .security import BearerToken -from .serialization import FieldMetadata, convert_and_respect_annotation_metadata - -__all__ = [ - "BearerToken", - "FernHTTPException", - "FieldMetadata", - "IS_PYDANTIC_V2", - "UnauthorizedException", - "UniversalBaseModel", - "UniversalRootModel", - "convert_and_respect_annotation_metadata", - "default_exception_handler", - "fern_http_exception_handler", - "http_exception_handler", - "parse_obj_as", - "route_args", - "serialize_datetime", - "universal_field_validator", - "universal_root_validator", - "update_forward_refs", -] diff --git a/seed/fastapi/inline-types/core/abstract_fern_service.py b/seed/fastapi/inline-types/core/abstract_fern_service.py deleted file mode 100644 index 9966b4876da..00000000000 --- a/seed/fastapi/inline-types/core/abstract_fern_service.py +++ /dev/null @@ -1,10 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import abc - -import fastapi - - -class AbstractFernService(abc.ABC): - @classmethod - def _init_fern(cls, router: fastapi.APIRouter) -> None: ... diff --git a/seed/fastapi/inline-types/core/datetime_utils.py b/seed/fastapi/inline-types/core/datetime_utils.py deleted file mode 100644 index 47344e9d9cc..00000000000 --- a/seed/fastapi/inline-types/core/datetime_utils.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt - - -def serialize_datetime(v: dt.datetime) -> str: - """ - Serialize a datetime including timezone info. - - Uses the timezone info provided if present, otherwise uses the current runtime's timezone info. - - UTC datetimes end in "Z" while all other timezones are represented as offset from UTC, e.g. +05:00. - """ - - def _serialize_zoned_datetime(v: dt.datetime) -> str: - if v.tzinfo is not None and v.tzinfo.tzname(None) == dt.timezone.utc.tzname( - None - ): - # UTC is a special case where we use "Z" at the end instead of "+00:00" - return v.isoformat().replace("+00:00", "Z") - else: - # Delegate to the typical +/- offset format - return v.isoformat() - - if v.tzinfo is not None: - return _serialize_zoned_datetime(v) - else: - local_tz = dt.datetime.now().astimezone().tzinfo - localized_dt = v.replace(tzinfo=local_tz) - return _serialize_zoned_datetime(localized_dt) diff --git a/seed/fastapi/inline-types/core/exceptions/__init__.py b/seed/fastapi/inline-types/core/exceptions/__init__.py deleted file mode 100644 index dae4b8980c1..00000000000 --- a/seed/fastapi/inline-types/core/exceptions/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .fern_http_exception import FernHTTPException -from .handlers import ( - default_exception_handler, - fern_http_exception_handler, - http_exception_handler, -) -from .unauthorized import UnauthorizedException - -__all__ = [ - "FernHTTPException", - "UnauthorizedException", - "default_exception_handler", - "fern_http_exception_handler", - "http_exception_handler", -] diff --git a/seed/fastapi/inline-types/core/exceptions/fern_http_exception.py b/seed/fastapi/inline-types/core/exceptions/fern_http_exception.py deleted file mode 100644 index 81610359a7f..00000000000 --- a/seed/fastapi/inline-types/core/exceptions/fern_http_exception.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import abc -import fastapi -import typing - - -class FernHTTPException(abc.ABC, fastapi.HTTPException): - def __init__( - self, - status_code: int, - name: typing.Optional[str] = None, - content: typing.Optional[typing.Any] = None, - ): - super().__init__(status_code=status_code) - self.name = name - self.status_code = status_code - self.content = content - - def to_json_response(self) -> fastapi.responses.JSONResponse: - content = fastapi.encoders.jsonable_encoder(self.content, exclude_none=True) - return fastapi.responses.JSONResponse( - content=content, status_code=self.status_code - ) diff --git a/seed/fastapi/inline-types/core/exceptions/handlers.py b/seed/fastapi/inline-types/core/exceptions/handlers.py deleted file mode 100644 index ae1c2741f06..00000000000 --- a/seed/fastapi/inline-types/core/exceptions/handlers.py +++ /dev/null @@ -1,50 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import logging - -import starlette -import starlette.exceptions - -import fastapi - -from .fern_http_exception import FernHTTPException - - -def fern_http_exception_handler( - request: fastapi.requests.Request, - exc: FernHTTPException, - skip_log: bool = False, -) -> fastapi.responses.JSONResponse: - if not skip_log: - logging.getLogger(__name__).error( - f"{exc.__class__.__name__} in {request.url.path}", exc_info=exc - ) - return exc.to_json_response() - - -def http_exception_handler( - request: fastapi.requests.Request, - exc: starlette.exceptions.HTTPException, - skip_log: bool = False, -) -> fastapi.responses.JSONResponse: - if not skip_log: - logging.getLogger(__name__).error( - f"{exc.__class__.__name__} in {request.url.path}", exc_info=exc - ) - return FernHTTPException( - status_code=exc.status_code, content=exc.detail - ).to_json_response() - - -def default_exception_handler( - request: fastapi.requests.Request, - exc: Exception, - skip_log: bool = False, -) -> fastapi.responses.JSONResponse: - if not skip_log: - logging.getLogger(__name__).error( - f"{exc.__class__.__name__} in {request.url.path}", exc_info=exc - ) - return FernHTTPException( - status_code=500, content="Internal Server Error" - ).to_json_response() diff --git a/seed/fastapi/inline-types/core/exceptions/unauthorized.py b/seed/fastapi/inline-types/core/exceptions/unauthorized.py deleted file mode 100644 index 32d532e5ef2..00000000000 --- a/seed/fastapi/inline-types/core/exceptions/unauthorized.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from .fern_http_exception import FernHTTPException - - -class UnauthorizedException(FernHTTPException): - """ - This is the exception that is thrown by Fern when auth is not present on a - request. - """ - - def __init__(self, content: typing.Optional[str] = None) -> None: - super().__init__(status_code=401, content=content) diff --git a/seed/fastapi/inline-types/core/pydantic_utilities.py b/seed/fastapi/inline-types/core/pydantic_utilities.py deleted file mode 100644 index fe6359cf503..00000000000 --- a/seed/fastapi/inline-types/core/pydantic_utilities.py +++ /dev/null @@ -1,273 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# nopycln: file -import datetime as dt -import typing -from collections import defaultdict - -import typing_extensions - -import pydantic - -from .datetime_utils import serialize_datetime - -IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.") - -if IS_PYDANTIC_V2: - # isort will try to reformat the comments on these imports, which breaks mypy - # isort: off - from pydantic.v1.datetime_parse import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - parse_date as parse_date, - ) - from pydantic.v1.datetime_parse import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - parse_datetime as parse_datetime, - ) - from pydantic.v1.json import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - ENCODERS_BY_TYPE as encoders_by_type, - ) - from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - get_args as get_args, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - get_origin as get_origin, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - is_literal_type as is_literal_type, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - is_union as is_union, - ) - from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 -else: - from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1 - from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore # Pydantic v1 - from pydantic.fields import ModelField as ModelField # type: ignore # Pydantic v1 - from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore # Pydantic v1 - from pydantic.typing import get_args as get_args # type: ignore # Pydantic v1 - from pydantic.typing import get_origin as get_origin # type: ignore # Pydantic v1 - from pydantic.typing import is_literal_type as is_literal_type # type: ignore # Pydantic v1 - from pydantic.typing import is_union as is_union # type: ignore # Pydantic v1 - - # isort: on - - -T = typing.TypeVar("T") -Model = typing.TypeVar("Model", bound=pydantic.BaseModel) - - -def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T: - if IS_PYDANTIC_V2: - adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2 - return adapter.validate_python(object_) - else: - return pydantic.parse_obj_as(type_, object_) - - -def to_jsonable_with_fallback( - obj: typing.Any, fallback_serializer: typing.Callable[[typing.Any], typing.Any] -) -> typing.Any: - if IS_PYDANTIC_V2: - from pydantic_core import to_jsonable_python - - return to_jsonable_python(obj, fallback=fallback_serializer) - else: - return fallback_serializer(obj) - - -class UniversalBaseModel(pydantic.BaseModel): - class Config: - populate_by_name = True - smart_union = True - allow_population_by_field_name = True - json_encoders = {dt.datetime: serialize_datetime} - # Allow fields begining with `model_` to be used in the model - protected_namespaces = () - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = { - "by_alias": True, - "exclude_unset": True, - **kwargs, - } - if IS_PYDANTIC_V2: - return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2 - else: - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - """ - Override the default dict method to `exclude_unset` by default. This function patches - `exclude_unset` to work include fields within non-None default values. - """ - # Note: the logic here is multi-plexed given the levers exposed in Pydantic V1 vs V2 - # Pydantic V1's .dict can be extremely slow, so we do not want to call it twice. - # - # We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models - # that we have less control over, and this is less intrusive than custom serializers for now. - if IS_PYDANTIC_V2: - kwargs_with_defaults_exclude_unset: typing.Any = { - **kwargs, - "by_alias": True, - "exclude_unset": True, - "exclude_none": False, - } - kwargs_with_defaults_exclude_none: typing.Any = { - **kwargs, - "by_alias": True, - "exclude_none": True, - "exclude_unset": False, - } - return deep_union_pydantic_dicts( - super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2 - super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2 - ) - - else: - _fields_set = self.__fields_set__.copy() - - fields = _get_model_fields(self.__class__) - for name, field in fields.items(): - if name not in _fields_set: - default = _get_field_default(field) - - # If the default values are non-null act like they've been set - # This effectively allows exclude_unset to work like exclude_none where - # the latter passes through intentionally set none values. - if default is not None or ( - "exclude_unset" in kwargs and not kwargs["exclude_unset"] - ): - _fields_set.add(name) - - if default is not None: - self.__fields_set__.add(name) - - kwargs_with_defaults_exclude_unset_include_fields: typing.Any = { - "by_alias": True, - "exclude_unset": True, - "include": _fields_set, - **kwargs, - } - - return super().dict(**kwargs_with_defaults_exclude_unset_include_fields) - - -def _union_list_of_pydantic_dicts( - source: typing.List[typing.Any], destination: typing.List[typing.Any] -) -> typing.List[typing.Any]: - converted_list: typing.List[typing.Any] = [] - for i, item in enumerate(source): - destination_value = destination[i] # type: ignore - if isinstance(item, dict): - converted_list.append(deep_union_pydantic_dicts(item, destination_value)) - elif isinstance(item, list): - converted_list.append( - _union_list_of_pydantic_dicts(item, destination_value) - ) - else: - converted_list.append(item) - return converted_list - - -def deep_union_pydantic_dicts( - source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any] -) -> typing.Dict[str, typing.Any]: - for key, value in source.items(): - node = destination.setdefault(key, {}) - if isinstance(value, dict): - deep_union_pydantic_dicts(value, node) - # Note: we do not do this same processing for sets given we do not have sets of models - # and given the sets are unordered, the processing of the set and matching objects would - # be non-trivial. - elif isinstance(value, list): - destination[key] = _union_list_of_pydantic_dicts(value, node) - else: - destination[key] = value - - return destination - - -if IS_PYDANTIC_V2: - - class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2 - pass - - UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore -else: - UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore - - -def encode_by_type(o: typing.Any) -> typing.Any: - encoders_by_class_tuples: typing.Dict[ - typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...] - ] = defaultdict(tuple) - for type_, encoder in encoders_by_type.items(): - encoders_by_class_tuples[encoder] += (type_,) - - if type(o) in encoders_by_type: - return encoders_by_type[type(o)](o) - for encoder, classes_tuple in encoders_by_class_tuples.items(): - if isinstance(o, classes_tuple): - return encoder(o) - - -def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None: - if IS_PYDANTIC_V2: - model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2 - else: - model.update_forward_refs(**localns) - - -# Mirrors Pydantic's internal typing -AnyCallable = typing.Callable[..., typing.Any] - - -def universal_root_validator( - pre: bool = False, -) -> typing.Callable[[AnyCallable], AnyCallable]: - def decorator(func: AnyCallable) -> AnyCallable: - if IS_PYDANTIC_V2: - return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 - else: - return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1 - - return decorator - - -def universal_field_validator( - field_name: str, pre: bool = False -) -> typing.Callable[[AnyCallable], AnyCallable]: - def decorator(func: AnyCallable) -> AnyCallable: - if IS_PYDANTIC_V2: - return pydantic.field_validator( - field_name, mode="before" if pre else "after" - )(func) # type: ignore # Pydantic v2 - else: - return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1 - - return decorator - - -PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo] - - -def _get_model_fields( - model: typing.Type["Model"], -) -> typing.Mapping[str, PydanticField]: - if IS_PYDANTIC_V2: - return model.model_fields # type: ignore # Pydantic v2 - else: - return model.__fields__ # type: ignore # Pydantic v1 - - -def _get_field_default(field: PydanticField) -> typing.Any: - try: - value = field.get_default() # type: ignore # Pydantic < v1.10.15 - except: - value = field.default - if IS_PYDANTIC_V2: - from pydantic_core import PydanticUndefined - - if value == PydanticUndefined: - return None - return value - return value diff --git a/seed/fastapi/inline-types/core/route_args.py b/seed/fastapi/inline-types/core/route_args.py deleted file mode 100644 index bd940bf4ddd..00000000000 --- a/seed/fastapi/inline-types/core/route_args.py +++ /dev/null @@ -1,73 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import enum -import inspect -import typing - -import typing_extensions - -T = typing.TypeVar("T", bound=typing.Callable[..., typing.Any]) - -FERN_CONFIG_KEY = "__fern" - - -class RouteArgs(typing_extensions.TypedDict): - openapi_extra: typing.Optional[typing.Dict[str, typing.Any]] - tags: typing.Optional[typing.List[typing.Union[str, enum.Enum]]] - include_in_schema: bool - - -DEFAULT_ROUTE_ARGS = RouteArgs(openapi_extra=None, tags=None, include_in_schema=True) - - -def get_route_args( - endpoint_function: typing.Callable[..., typing.Any], *, default_tag: str -) -> RouteArgs: - unwrapped = inspect.unwrap( - endpoint_function, stop=(lambda f: hasattr(f, FERN_CONFIG_KEY)) - ) - route_args = typing.cast( - RouteArgs, getattr(unwrapped, FERN_CONFIG_KEY, DEFAULT_ROUTE_ARGS) - ) - if route_args["tags"] is None: - return RouteArgs( - openapi_extra=route_args["openapi_extra"], - tags=[default_tag], - include_in_schema=route_args["include_in_schema"], - ) - return route_args - - -def route_args( - openapi_extra: typing.Optional[typing.Dict[str, typing.Any]] = None, - tags: typing.Optional[typing.List[typing.Union[str, enum.Enum]]] = None, - include_in_schema: bool = True, -) -> typing.Callable[[T], T]: - """ - this decorator allows you to forward certain args to the FastAPI route decorator. - - usage: - @route_args(openapi_extra=...) - def your_endpoint_method(... - - currently supported args: - - openapi_extra - - tags - - if there's another FastAPI route arg you need to pass through, please - contact the Fern team! - """ - - def decorator(endpoint_function: T) -> T: - setattr( - endpoint_function, - FERN_CONFIG_KEY, - RouteArgs( - openapi_extra=openapi_extra, - tags=tags, - include_in_schema=include_in_schema, - ), - ) - return endpoint_function - - return decorator diff --git a/seed/fastapi/inline-types/core/security/__init__.py b/seed/fastapi/inline-types/core/security/__init__.py deleted file mode 100644 index e69ee6d9c5a..00000000000 --- a/seed/fastapi/inline-types/core/security/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .bearer import BearerToken - -__all__ = ["BearerToken"] diff --git a/seed/fastapi/inline-types/core/security/bearer.py b/seed/fastapi/inline-types/core/security/bearer.py deleted file mode 100644 index 023342b668d..00000000000 --- a/seed/fastapi/inline-types/core/security/bearer.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import fastapi - -from ..exceptions import UnauthorizedException - - -class BearerToken: - def __init__(self, token: str): - self.token = token - - -def HTTPBearer(request: fastapi.requests.Request) -> BearerToken: - authorization_header_value = request.headers.get("Authorization") - if not authorization_header_value: - raise UnauthorizedException("Missing Authorization header") - scheme, _, token = authorization_header_value.partition(" ") - if scheme.lower() != "bearer": - raise UnauthorizedException("Authorization header scheme is not bearer") - if not token: - raise UnauthorizedException("Authorization header is missing a token") - return BearerToken(token) diff --git a/seed/fastapi/inline-types/core/serialization.py b/seed/fastapi/inline-types/core/serialization.py deleted file mode 100644 index 5679deb8a56..00000000000 --- a/seed/fastapi/inline-types/core/serialization.py +++ /dev/null @@ -1,276 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import collections -import inspect -import typing - -import typing_extensions - -import pydantic - - -class FieldMetadata: - """ - Metadata class used to annotate fields to provide additional information. - - Example: - class MyDict(TypedDict): - field: typing.Annotated[str, FieldMetadata(alias="field_name")] - - Will serialize: `{"field": "value"}` - To: `{"field_name": "value"}` - """ - - alias: str - - def __init__(self, *, alias: str) -> None: - self.alias = alias - - -def convert_and_respect_annotation_metadata( - *, - object_: typing.Any, - annotation: typing.Any, - inner_type: typing.Optional[typing.Any] = None, - direction: typing.Literal["read", "write"], -) -> typing.Any: - """ - Respect the metadata annotations on a field, such as aliasing. This function effectively - manipulates the dict-form of an object to respect the metadata annotations. This is primarily used for - TypedDicts, which cannot support aliasing out of the box, and can be extended for additional - utilities, such as defaults. - - Parameters - ---------- - object_ : typing.Any - - annotation : type - The type we're looking to apply typing annotations from - - inner_type : typing.Optional[type] - - Returns - ------- - typing.Any - """ - - if object_ is None: - return None - if inner_type is None: - inner_type = annotation - - clean_type = _remove_annotations(inner_type) - # Pydantic models - if ( - inspect.isclass(clean_type) - and issubclass(clean_type, pydantic.BaseModel) - and isinstance(object_, typing.Mapping) - ): - return _convert_mapping(object_, clean_type, direction) - # TypedDicts - if typing_extensions.is_typeddict(clean_type) and isinstance( - object_, typing.Mapping - ): - return _convert_mapping(object_, clean_type, direction) - - if ( - typing_extensions.get_origin(clean_type) == typing.Dict - or typing_extensions.get_origin(clean_type) == dict - or clean_type == typing.Dict - ) and isinstance(object_, typing.Dict): - key_type = typing_extensions.get_args(clean_type)[0] - value_type = typing_extensions.get_args(clean_type)[1] - - return { - key: convert_and_respect_annotation_metadata( - object_=value, - annotation=annotation, - inner_type=value_type, - direction=direction, - ) - for key, value in object_.items() - } - - # If you're iterating on a string, do not bother to coerce it to a sequence. - if not isinstance(object_, str): - if ( - typing_extensions.get_origin(clean_type) == typing.Set - or typing_extensions.get_origin(clean_type) == set - or clean_type == typing.Set - ) and isinstance(object_, typing.Set): - inner_type = typing_extensions.get_args(clean_type)[0] - return { - convert_and_respect_annotation_metadata( - object_=item, - annotation=annotation, - inner_type=inner_type, - direction=direction, - ) - for item in object_ - } - elif ( - ( - typing_extensions.get_origin(clean_type) == typing.List - or typing_extensions.get_origin(clean_type) == list - or clean_type == typing.List - ) - and isinstance(object_, typing.List) - ) or ( - ( - typing_extensions.get_origin(clean_type) == typing.Sequence - or typing_extensions.get_origin(clean_type) == collections.abc.Sequence - or clean_type == typing.Sequence - ) - and isinstance(object_, typing.Sequence) - ): - inner_type = typing_extensions.get_args(clean_type)[0] - return [ - convert_and_respect_annotation_metadata( - object_=item, - annotation=annotation, - inner_type=inner_type, - direction=direction, - ) - for item in object_ - ] - - if typing_extensions.get_origin(clean_type) == typing.Union: - # We should be able to ~relatively~ safely try to convert keys against all - # member types in the union, the edge case here is if one member aliases a field - # of the same name to a different name from another member - # Or if another member aliases a field of the same name that another member does not. - for member in typing_extensions.get_args(clean_type): - object_ = convert_and_respect_annotation_metadata( - object_=object_, - annotation=annotation, - inner_type=member, - direction=direction, - ) - return object_ - - annotated_type = _get_annotation(annotation) - if annotated_type is None: - return object_ - - # If the object is not a TypedDict, a Union, or other container (list, set, sequence, etc.) - # Then we can safely call it on the recursive conversion. - return object_ - - -def _convert_mapping( - object_: typing.Mapping[str, object], - expected_type: typing.Any, - direction: typing.Literal["read", "write"], -) -> typing.Mapping[str, object]: - converted_object: typing.Dict[str, object] = {} - annotations = typing_extensions.get_type_hints(expected_type, include_extras=True) - aliases_to_field_names = _get_alias_to_field_name(annotations) - for key, value in object_.items(): - if direction == "read" and key in aliases_to_field_names: - dealiased_key = aliases_to_field_names.get(key) - if dealiased_key is not None: - type_ = annotations.get(dealiased_key) - else: - type_ = annotations.get(key) - # Note you can't get the annotation by the field name if you're in read mode, so you must check the aliases map - # - # So this is effectively saying if we're in write mode, and we don't have a type, or if we're in read mode and we don't have an alias - # then we can just pass the value through as is - if type_ is None: - converted_object[key] = value - elif direction == "read" and key not in aliases_to_field_names: - converted_object[key] = convert_and_respect_annotation_metadata( - object_=value, annotation=type_, direction=direction - ) - else: - converted_object[ - _alias_key(key, type_, direction, aliases_to_field_names) - ] = convert_and_respect_annotation_metadata( - object_=value, annotation=type_, direction=direction - ) - return converted_object - - -def _get_annotation(type_: typing.Any) -> typing.Optional[typing.Any]: - maybe_annotated_type = typing_extensions.get_origin(type_) - if maybe_annotated_type is None: - return None - - if maybe_annotated_type == typing_extensions.NotRequired: - type_ = typing_extensions.get_args(type_)[0] - maybe_annotated_type = typing_extensions.get_origin(type_) - - if maybe_annotated_type == typing_extensions.Annotated: - return type_ - - return None - - -def _remove_annotations(type_: typing.Any) -> typing.Any: - maybe_annotated_type = typing_extensions.get_origin(type_) - if maybe_annotated_type is None: - return type_ - - if maybe_annotated_type == typing_extensions.NotRequired: - return _remove_annotations(typing_extensions.get_args(type_)[0]) - - if maybe_annotated_type == typing_extensions.Annotated: - return _remove_annotations(typing_extensions.get_args(type_)[0]) - - return type_ - - -def get_alias_to_field_mapping(type_: typing.Any) -> typing.Dict[str, str]: - annotations = typing_extensions.get_type_hints(type_, include_extras=True) - return _get_alias_to_field_name(annotations) - - -def get_field_to_alias_mapping(type_: typing.Any) -> typing.Dict[str, str]: - annotations = typing_extensions.get_type_hints(type_, include_extras=True) - return _get_field_to_alias_name(annotations) - - -def _get_alias_to_field_name( - field_to_hint: typing.Dict[str, typing.Any], -) -> typing.Dict[str, str]: - aliases = {} - for field, hint in field_to_hint.items(): - maybe_alias = _get_alias_from_type(hint) - if maybe_alias is not None: - aliases[maybe_alias] = field - return aliases - - -def _get_field_to_alias_name( - field_to_hint: typing.Dict[str, typing.Any], -) -> typing.Dict[str, str]: - aliases = {} - for field, hint in field_to_hint.items(): - maybe_alias = _get_alias_from_type(hint) - if maybe_alias is not None: - aliases[field] = maybe_alias - return aliases - - -def _get_alias_from_type(type_: typing.Any) -> typing.Optional[str]: - maybe_annotated_type = _get_annotation(type_) - - if maybe_annotated_type is not None: - # The actual annotations are 1 onward, the first is the annotated type - annotations = typing_extensions.get_args(maybe_annotated_type)[1:] - - for annotation in annotations: - if isinstance(annotation, FieldMetadata) and annotation.alias is not None: - return annotation.alias - return None - - -def _alias_key( - key: str, - type_: typing.Any, - direction: typing.Literal["read", "write"], - aliases_to_field_names: typing.Dict[str, str], -) -> str: - if direction == "read": - return aliases_to_field_names.get(key, key) - return _get_alias_from_type(type_=type_) or key diff --git a/seed/fastapi/inline-types/register.py b/seed/fastapi/inline-types/register.py deleted file mode 100644 index ce9f38fa412..00000000000 --- a/seed/fastapi/inline-types/register.py +++ /dev/null @@ -1,48 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import fastapi -from .service.service import AbstractRootService -import typing -from fastapi import params -from .core.exceptions.fern_http_exception import FernHTTPException -from .core.exceptions import fern_http_exception_handler -import starlette.exceptions -from .core.exceptions import http_exception_handler -from .core.exceptions import default_exception_handler -from .core.abstract_fern_service import AbstractFernService -import types -import os -import glob -import importlib - - -def register( - _app: fastapi.FastAPI, - *, - root: AbstractRootService, - dependencies: typing.Optional[typing.Sequence[params.Depends]] = None, -) -> None: - _app.include_router(__register_service(root), dependencies=dependencies) - - _app.add_exception_handler(FernHTTPException, fern_http_exception_handler) # type: ignore - _app.add_exception_handler( - starlette.exceptions.HTTPException, http_exception_handler - ) # type: ignore - _app.add_exception_handler(Exception, default_exception_handler) # type: ignore - - -def __register_service(service: AbstractFernService) -> fastapi.APIRouter: - router = fastapi.APIRouter() - type(service)._init_fern(router) - return router - - -def register_validators(module: types.ModuleType) -> None: - validators_directory: str = os.path.dirname(module.__file__) # type: ignore - for path in glob.glob( - os.path.join(validators_directory, "**/*.py"), recursive=True - ): - if os.path.isfile(path): - relative_path = os.path.relpath(path, start=validators_directory) - module_path = ".".join([module.__name__] + relative_path[:-3].split("/")) - importlib.import_module(module_path) diff --git a/seed/fastapi/inline-types/service/__init__.py b/seed/fastapi/inline-types/service/__init__.py deleted file mode 100644 index 8ff97f9a38d..00000000000 --- a/seed/fastapi/inline-types/service/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .post_root_request import PostRootRequest -from .service import AbstractRootService - -__all__ = ["AbstractRootService", "PostRootRequest"] diff --git a/seed/fastapi/inline-types/service/post_root_request.py b/seed/fastapi/inline-types/service/post_root_request.py deleted file mode 100644 index daa4e9c3328..00000000000 --- a/seed/fastapi/inline-types/service/post_root_request.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -from ..types.inline_type_1 import InlineType1 -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class PostRootRequest(UniversalBaseModel): - bar: InlineType1 - foo: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - extra="forbid" - ) # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.forbid diff --git a/seed/fastapi/inline-types/service/service.py b/seed/fastapi/inline-types/service/service.py deleted file mode 100644 index dd90aa43cd6..00000000000 --- a/seed/fastapi/inline-types/service/service.py +++ /dev/null @@ -1,77 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.abstract_fern_service import AbstractFernService -from .post_root_request import PostRootRequest -from ..types.root_type_1 import RootType1 -import abc -import fastapi -import inspect -import typing -from ..core.exceptions.fern_http_exception import FernHTTPException -import logging -import functools -from ..core.route_args import get_route_args - - -class AbstractRootService(AbstractFernService): - """ - AbstractRootService is an abstract class containing the methods that you should implement. - - Each method is associated with an API route, which will be registered - with FastAPI when you register your implementation using Fern's register() - function. - """ - - @abc.abstractmethod - def get_root(self, *, body: PostRootRequest) -> RootType1: ... - - """ - Below are internal methods used by Fern to register your implementation. - You can ignore them. - """ - - @classmethod - def _init_fern(cls, router: fastapi.APIRouter) -> None: - cls.__init_get_root(router=router) - - @classmethod - def __init_get_root(cls, router: fastapi.APIRouter) -> None: - endpoint_function = inspect.signature(cls.get_root) - new_parameters: typing.List[inspect.Parameter] = [] - for index, (parameter_name, parameter) in enumerate( - endpoint_function.parameters.items() - ): - if index == 0: - new_parameters.append(parameter.replace(default=fastapi.Depends(cls))) - elif parameter_name == "body": - new_parameters.append(parameter.replace(default=fastapi.Body(...))) - else: - new_parameters.append(parameter) - setattr( - cls.get_root, - "__signature__", - endpoint_function.replace(parameters=new_parameters), - ) - - @functools.wraps(cls.get_root) - def wrapper(*args: typing.Any, **kwargs: typing.Any) -> RootType1: - try: - return cls.get_root(*args, **kwargs) - except FernHTTPException as e: - logging.getLogger(f"{cls.__module__}.{cls.__name__}").warn( - f"Endpoint 'get_root' unexpectedly threw {e.__class__.__name__}. " - + f"If this was intentional, please add {e.__class__.__name__} to " - + "the endpoint's errors list in your Fern Definition." - ) - raise e - - # this is necessary for FastAPI to find forward-ref'ed type hints. - # https://github.com/tiangolo/fastapi/pull/5077 - wrapper.__globals__.update(cls.get_root.__globals__) - - router.post( - path="/root/root", - response_model=RootType1, - description=AbstractRootService.get_root.__doc__, - **get_route_args(cls.get_root, default_tag=""), - )(wrapper) diff --git a/seed/fastapi/inline-types/snippet-templates.json b/seed/fastapi/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/fastapi/inline-types/snippet.json b/seed/fastapi/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/fastapi/inline-types/types/__init__.py b/seed/fastapi/inline-types/types/__init__.py deleted file mode 100644 index b143012e4f8..00000000000 --- a/seed/fastapi/inline-types/types/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .inline_enum import InlineEnum -from .inline_type_1 import InlineType1 -from .inline_type_2 import InlineType2 -from .inlined_discriminated_union_1 import InlinedDiscriminatedUnion1 -from .inlined_undiscriminated_union_1 import InlinedUndiscriminatedUnion1 -from .nested_inline_type_1 import NestedInlineType1 -from .root_type_1 import RootType1 - -__all__ = [ - "InlineEnum", - "InlineType1", - "InlineType2", - "InlinedDiscriminatedUnion1", - "InlinedUndiscriminatedUnion1", - "NestedInlineType1", - "RootType1", -] diff --git a/seed/fastapi/inline-types/types/inline_enum.py b/seed/fastapi/inline-types/types/inline_enum.py deleted file mode 100644 index b46f498c663..00000000000 --- a/seed/fastapi/inline-types/types/inline_enum.py +++ /dev/null @@ -1,29 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import enum -import typing - -T_Result = typing.TypeVar("T_Result") - - -class InlineEnum(str, enum.Enum): - SUNNY = "SUNNY" - CLOUDY = "CLOUDY" - RAINING = "RAINING" - SNOWING = "SNOWING" - - def visit( - self, - sunny: typing.Callable[[], T_Result], - cloudy: typing.Callable[[], T_Result], - raining: typing.Callable[[], T_Result], - snowing: typing.Callable[[], T_Result], - ) -> T_Result: - if self is InlineEnum.SUNNY: - return sunny() - if self is InlineEnum.CLOUDY: - return cloudy() - if self is InlineEnum.RAINING: - return raining() - if self is InlineEnum.SNOWING: - return snowing() diff --git a/seed/fastapi/inline-types/types/inline_type_1.py b/seed/fastapi/inline-types/types/inline_type_1.py deleted file mode 100644 index 26b6b8c2cf1..00000000000 --- a/seed/fastapi/inline-types/types/inline_type_1.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -from .nested_inline_type_1 import NestedInlineType1 -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class InlineType1(UniversalBaseModel): - foo: str - bar: NestedInlineType1 - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - extra="forbid" - ) # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.forbid diff --git a/seed/fastapi/inline-types/types/inline_type_2.py b/seed/fastapi/inline-types/types/inline_type_2.py deleted file mode 100644 index 37881d22fa6..00000000000 --- a/seed/fastapi/inline-types/types/inline_type_2.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class InlineType2(UniversalBaseModel): - baz: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - extra="forbid" - ) # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.forbid diff --git a/seed/fastapi/inline-types/types/inlined_discriminated_union_1.py b/seed/fastapi/inline-types/types/inlined_discriminated_union_1.py deleted file mode 100644 index b3bff091fd1..00000000000 --- a/seed/fastapi/inline-types/types/inlined_discriminated_union_1.py +++ /dev/null @@ -1,108 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -from .inline_type_1 import InlineType1 -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from .inline_type_2 import InlineType2 -from ..core.pydantic_utilities import UniversalRootModel -import typing -import typing_extensions -import pydantic -from ..core.pydantic_utilities import update_forward_refs - -T_Result = typing.TypeVar("T_Result") - - -class _Factory: - def type_1(self, value: InlineType1) -> InlinedDiscriminatedUnion1: - if IS_PYDANTIC_V2: - return InlinedDiscriminatedUnion1( - root=_InlinedDiscriminatedUnion1.Type1( - **value.dict(exclude_unset=True), type="type1" - ) - ) # type: ignore - else: - return InlinedDiscriminatedUnion1( - __root__=_InlinedDiscriminatedUnion1.Type1( - **value.dict(exclude_unset=True), type="type1" - ) - ) # type: ignore - - def type_2(self, value: InlineType2) -> InlinedDiscriminatedUnion1: - if IS_PYDANTIC_V2: - return InlinedDiscriminatedUnion1( - root=_InlinedDiscriminatedUnion1.Type2( - **value.dict(exclude_unset=True), type="type2" - ) - ) # type: ignore - else: - return InlinedDiscriminatedUnion1( - __root__=_InlinedDiscriminatedUnion1.Type2( - **value.dict(exclude_unset=True), type="type2" - ) - ) # type: ignore - - -class InlinedDiscriminatedUnion1(UniversalRootModel): - factory: typing.ClassVar[_Factory] = _Factory() - - if IS_PYDANTIC_V2: - root: typing_extensions.Annotated[ - typing.Union[ - _InlinedDiscriminatedUnion1.Type1, _InlinedDiscriminatedUnion1.Type2 - ], - pydantic.Field(discriminator="type"), - ] - - def get_as_union( - self, - ) -> typing.Union[ - _InlinedDiscriminatedUnion1.Type1, _InlinedDiscriminatedUnion1.Type2 - ]: - return self.root - else: - __root__: typing_extensions.Annotated[ - typing.Union[ - _InlinedDiscriminatedUnion1.Type1, _InlinedDiscriminatedUnion1.Type2 - ], - pydantic.Field(discriminator="type"), - ] - - def get_as_union( - self, - ) -> typing.Union[ - _InlinedDiscriminatedUnion1.Type1, _InlinedDiscriminatedUnion1.Type2 - ]: - return self.__root__ - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - if IS_PYDANTIC_V2: - return self.root.dict(**kwargs) - else: - return self.__root__.dict(**kwargs) - - def visit( - self, - type_1: typing.Callable[[InlineType1], T_Result], - type_2: typing.Callable[[InlineType2], T_Result], - ) -> T_Result: - unioned_value = self.get_as_union() - if unioned_value.type == "type1": - return type_1( - InlineType1(**unioned_value.dict(exclude_unset=True, exclude={"type"})) - ) - if unioned_value.type == "type2": - return type_2( - InlineType2(**unioned_value.dict(exclude_unset=True, exclude={"type"})) - ) - - -class _InlinedDiscriminatedUnion1: - class Type1(InlineType1): - type: typing.Literal["type1"] = "type1" - - class Type2(InlineType2): - type: typing.Literal["type2"] = "type2" - - -update_forward_refs(InlinedDiscriminatedUnion1) diff --git a/seed/fastapi/inline-types/types/inlined_undiscriminated_union_1.py b/seed/fastapi/inline-types/types/inlined_undiscriminated_union_1.py deleted file mode 100644 index aaf1f02b5df..00000000000 --- a/seed/fastapi/inline-types/types/inlined_undiscriminated_union_1.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .inline_type_1 import InlineType1 -from .inline_type_2 import InlineType2 - -InlinedUndiscriminatedUnion1 = typing.Union[InlineType1, InlineType2] diff --git a/seed/fastapi/inline-types/types/nested_inline_type_1.py b/seed/fastapi/inline-types/types/nested_inline_type_1.py deleted file mode 100644 index 1e1f501b2a4..00000000000 --- a/seed/fastapi/inline-types/types/nested_inline_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -from .inline_enum import InlineEnum -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing - - -class NestedInlineType1(UniversalBaseModel): - foo: str - bar: str - my_enum: InlineEnum = pydantic.Field(alias="myEnum") - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - extra="forbid" - ) # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.forbid diff --git a/seed/fastapi/inline-types/types/root_type_1.py b/seed/fastapi/inline-types/types/root_type_1.py deleted file mode 100644 index cae376ec55d..00000000000 --- a/seed/fastapi/inline-types/types/root_type_1.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -from .inline_type_1 import InlineType1 -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class RootType1(UniversalBaseModel): - foo: str - bar: InlineType1 - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - extra="forbid" - ) # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.forbid diff --git a/seed/go-fiber/inline-types/.github/workflows/ci.yml b/seed/go-fiber/inline-types/.github/workflows/ci.yml deleted file mode 100644 index d4c0a5dcd95..00000000000 --- a/seed/go-fiber/inline-types/.github/workflows/ci.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Set up go - uses: actions/setup-go@v4 - - - name: Compile - run: go build ./... - test: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Set up go - uses: actions/setup-go@v4 - - - name: Test - run: go test ./... diff --git a/seed/go-fiber/inline-types/.mock/definition/__package__.yml b/seed/go-fiber/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/go-fiber/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/go-fiber/inline-types/.mock/definition/api.yml b/seed/go-fiber/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/go-fiber/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/go-fiber/inline-types/.mock/fern.config.json b/seed/go-fiber/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/go-fiber/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/go-fiber/inline-types/go.mod b/seed/go-fiber/inline-types/go.mod deleted file mode 100644 index bc88e459c8c..00000000000 --- a/seed/go-fiber/inline-types/go.mod +++ /dev/null @@ -1,8 +0,0 @@ -module github.com/inline-types/fern - -go 1.13 - -require ( - github.com/stretchr/testify v1.7.0 - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/seed/go-fiber/inline-types/go.sum b/seed/go-fiber/inline-types/go.sum deleted file mode 100644 index fc3dd9e67e8..00000000000 --- a/seed/go-fiber/inline-types/go.sum +++ /dev/null @@ -1,12 +0,0 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/seed/go-fiber/inline-types/internal/extra_properties.go b/seed/go-fiber/inline-types/internal/extra_properties.go deleted file mode 100644 index 540c3fd89ee..00000000000 --- a/seed/go-fiber/inline-types/internal/extra_properties.go +++ /dev/null @@ -1,141 +0,0 @@ -package internal - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "strings" -) - -// MarshalJSONWithExtraProperty marshals the given value to JSON, including the extra property. -func MarshalJSONWithExtraProperty(marshaler interface{}, key string, value interface{}) ([]byte, error) { - return MarshalJSONWithExtraProperties(marshaler, map[string]interface{}{key: value}) -} - -// MarshalJSONWithExtraProperties marshals the given value to JSON, including any extra properties. -func MarshalJSONWithExtraProperties(marshaler interface{}, extraProperties map[string]interface{}) ([]byte, error) { - bytes, err := json.Marshal(marshaler) - if err != nil { - return nil, err - } - if len(extraProperties) == 0 { - return bytes, nil - } - keys, err := getKeys(marshaler) - if err != nil { - return nil, err - } - for _, key := range keys { - if _, ok := extraProperties[key]; ok { - return nil, fmt.Errorf("cannot add extra property %q because it is already defined on the type", key) - } - } - extraBytes, err := json.Marshal(extraProperties) - if err != nil { - return nil, err - } - if isEmptyJSON(bytes) { - if isEmptyJSON(extraBytes) { - return bytes, nil - } - return extraBytes, nil - } - result := bytes[:len(bytes)-1] - result = append(result, ',') - result = append(result, extraBytes[1:len(extraBytes)-1]...) - result = append(result, '}') - return result, nil -} - -// ExtractExtraProperties extracts any extra properties from the given value. -func ExtractExtraProperties(bytes []byte, value interface{}, exclude ...string) (map[string]interface{}, error) { - val := reflect.ValueOf(value) - for val.Kind() == reflect.Ptr { - if val.IsNil() { - return nil, fmt.Errorf("value must be non-nil to extract extra properties") - } - val = val.Elem() - } - if err := json.Unmarshal(bytes, &value); err != nil { - return nil, err - } - var extraProperties map[string]interface{} - if err := json.Unmarshal(bytes, &extraProperties); err != nil { - return nil, err - } - for i := 0; i < val.Type().NumField(); i++ { - key := jsonKey(val.Type().Field(i)) - if key == "" || key == "-" { - continue - } - delete(extraProperties, key) - } - for _, key := range exclude { - delete(extraProperties, key) - } - if len(extraProperties) == 0 { - return nil, nil - } - return extraProperties, nil -} - -// getKeys returns the keys associated with the given value. The value must be a -// a struct or a map with string keys. -func getKeys(value interface{}) ([]string, error) { - val := reflect.ValueOf(value) - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - if !val.IsValid() { - return nil, nil - } - switch val.Kind() { - case reflect.Struct: - return getKeysForStructType(val.Type()), nil - case reflect.Map: - var keys []string - if val.Type().Key().Kind() != reflect.String { - return nil, fmt.Errorf("cannot extract keys from %T; only structs and maps with string keys are supported", value) - } - for _, key := range val.MapKeys() { - keys = append(keys, key.String()) - } - return keys, nil - default: - return nil, fmt.Errorf("cannot extract keys from %T; only structs and maps with string keys are supported", value) - } -} - -// getKeysForStructType returns all the keys associated with the given struct type, -// visiting embedded fields recursively. -func getKeysForStructType(structType reflect.Type) []string { - if structType.Kind() == reflect.Pointer { - structType = structType.Elem() - } - if structType.Kind() != reflect.Struct { - return nil - } - var keys []string - for i := 0; i < structType.NumField(); i++ { - field := structType.Field(i) - if field.Anonymous { - keys = append(keys, getKeysForStructType(field.Type)...) - continue - } - keys = append(keys, jsonKey(field)) - } - return keys -} - -// jsonKey returns the JSON key from the struct tag of the given field, -// excluding the omitempty flag (if any). -func jsonKey(field reflect.StructField) string { - return strings.TrimSuffix(field.Tag.Get("json"), ",omitempty") -} - -// isEmptyJSON returns true if the given data is empty, the empty JSON object, or -// an explicit null. -func isEmptyJSON(data []byte) bool { - return len(data) <= 2 || bytes.Equal(data, []byte("null")) -} diff --git a/seed/go-fiber/inline-types/internal/extra_properties_test.go b/seed/go-fiber/inline-types/internal/extra_properties_test.go deleted file mode 100644 index aa2510ee512..00000000000 --- a/seed/go-fiber/inline-types/internal/extra_properties_test.go +++ /dev/null @@ -1,228 +0,0 @@ -package internal - -import ( - "encoding/json" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -type testMarshaler struct { - Name string `json:"name"` - BirthDate time.Time `json:"birthDate"` - CreatedAt time.Time `json:"created_at"` -} - -func (t *testMarshaler) MarshalJSON() ([]byte, error) { - type embed testMarshaler - var marshaler = struct { - embed - BirthDate string `json:"birthDate"` - CreatedAt string `json:"created_at"` - }{ - embed: embed(*t), - BirthDate: t.BirthDate.Format("2006-01-02"), - CreatedAt: t.CreatedAt.Format(time.RFC3339), - } - return MarshalJSONWithExtraProperty(marshaler, "type", "test") -} - -func TestMarshalJSONWithExtraProperties(t *testing.T) { - tests := []struct { - desc string - giveMarshaler interface{} - giveExtraProperties map[string]interface{} - wantBytes []byte - wantError string - }{ - { - desc: "invalid type", - giveMarshaler: []string{"invalid"}, - giveExtraProperties: map[string]interface{}{"key": "overwrite"}, - wantError: `cannot extract keys from []string; only structs and maps with string keys are supported`, - }, - { - desc: "invalid key type", - giveMarshaler: map[int]interface{}{42: "value"}, - giveExtraProperties: map[string]interface{}{"key": "overwrite"}, - wantError: `cannot extract keys from map[int]interface {}; only structs and maps with string keys are supported`, - }, - { - desc: "invalid map overwrite", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{"key": "overwrite"}, - wantError: `cannot add extra property "key" because it is already defined on the type`, - }, - { - desc: "invalid struct overwrite", - giveMarshaler: new(testMarshaler), - giveExtraProperties: map[string]interface{}{"birthDate": "2000-01-01"}, - wantError: `cannot add extra property "birthDate" because it is already defined on the type`, - }, - { - desc: "invalid struct overwrite embedded type", - giveMarshaler: new(testMarshaler), - giveExtraProperties: map[string]interface{}{"name": "bob"}, - wantError: `cannot add extra property "name" because it is already defined on the type`, - }, - { - desc: "nil", - giveMarshaler: nil, - giveExtraProperties: nil, - wantBytes: []byte(`null`), - }, - { - desc: "empty", - giveMarshaler: map[string]interface{}{}, - giveExtraProperties: map[string]interface{}{}, - wantBytes: []byte(`{}`), - }, - { - desc: "no extra properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{}, - wantBytes: []byte(`{"key":"value"}`), - }, - { - desc: "only extra properties", - giveMarshaler: map[string]interface{}{}, - giveExtraProperties: map[string]interface{}{"key": "value"}, - wantBytes: []byte(`{"key":"value"}`), - }, - { - desc: "single extra property", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{"extra": "property"}, - wantBytes: []byte(`{"key":"value","extra":"property"}`), - }, - { - desc: "multiple extra properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{"one": 1, "two": 2}, - wantBytes: []byte(`{"key":"value","one":1,"two":2}`), - }, - { - desc: "nested properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{ - "user": map[string]interface{}{ - "age": 42, - "name": "alice", - }, - }, - wantBytes: []byte(`{"key":"value","user":{"age":42,"name":"alice"}}`), - }, - { - desc: "multiple nested properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{ - "metadata": map[string]interface{}{ - "ip": "127.0.0.1", - }, - "user": map[string]interface{}{ - "age": 42, - "name": "alice", - }, - }, - wantBytes: []byte(`{"key":"value","metadata":{"ip":"127.0.0.1"},"user":{"age":42,"name":"alice"}}`), - }, - { - desc: "custom marshaler", - giveMarshaler: &testMarshaler{ - Name: "alice", - BirthDate: time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC), - CreatedAt: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC), - }, - giveExtraProperties: map[string]interface{}{ - "extra": "property", - }, - wantBytes: []byte(`{"name":"alice","birthDate":"2000-01-01","created_at":"2024-01-01T00:00:00Z","type":"test","extra":"property"}`), - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - bytes, err := MarshalJSONWithExtraProperties(tt.giveMarshaler, tt.giveExtraProperties) - if tt.wantError != "" { - require.EqualError(t, err, tt.wantError) - assert.Nil(t, tt.wantBytes) - return - } - require.NoError(t, err) - assert.Equal(t, tt.wantBytes, bytes) - - value := make(map[string]interface{}) - require.NoError(t, json.Unmarshal(bytes, &value)) - }) - } -} - -func TestExtractExtraProperties(t *testing.T) { - t.Run("none", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := &user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice"}`), value) - require.NoError(t, err) - assert.Nil(t, extraProperties) - }) - - t.Run("non-nil pointer", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := &user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - require.NoError(t, err) - assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) - }) - - t.Run("nil pointer", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - var value *user - _, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - assert.EqualError(t, err, "value must be non-nil to extract extra properties") - }) - - t.Run("non-zero value", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - require.NoError(t, err) - assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) - }) - - t.Run("zero value", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - var value user - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - require.NoError(t, err) - assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) - }) - - t.Run("exclude", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := &user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value, "age") - require.NoError(t, err) - assert.Nil(t, extraProperties) - }) -} diff --git a/seed/go-fiber/inline-types/internal/stringer.go b/seed/go-fiber/inline-types/internal/stringer.go deleted file mode 100644 index 312801851e0..00000000000 --- a/seed/go-fiber/inline-types/internal/stringer.go +++ /dev/null @@ -1,13 +0,0 @@ -package internal - -import "encoding/json" - -// StringifyJSON returns a pretty JSON string representation of -// the given value. -func StringifyJSON(value interface{}) (string, error) { - bytes, err := json.MarshalIndent(value, "", " ") - if err != nil { - return "", err - } - return string(bytes), nil -} diff --git a/seed/go-fiber/inline-types/internal/time.go b/seed/go-fiber/inline-types/internal/time.go deleted file mode 100644 index ab0e269fade..00000000000 --- a/seed/go-fiber/inline-types/internal/time.go +++ /dev/null @@ -1,137 +0,0 @@ -package internal - -import ( - "encoding/json" - "time" -) - -const dateFormat = "2006-01-02" - -// DateTime wraps time.Time and adapts its JSON representation -// to conform to a RFC3339 date (e.g. 2006-01-02). -// -// Ref: https://ijmacd.github.io/rfc3339-iso8601 -type Date struct { - t *time.Time -} - -// NewDate returns a new *Date. If the given time.Time -// is nil, nil will be returned. -func NewDate(t time.Time) *Date { - return &Date{t: &t} -} - -// NewOptionalDate returns a new *Date. If the given time.Time -// is nil, nil will be returned. -func NewOptionalDate(t *time.Time) *Date { - if t == nil { - return nil - } - return &Date{t: t} -} - -// Time returns the Date's underlying time, if any. If the -// date is nil, the zero value is returned. -func (d *Date) Time() time.Time { - if d == nil || d.t == nil { - return time.Time{} - } - return *d.t -} - -// TimePtr returns a pointer to the Date's underlying time.Time, if any. -func (d *Date) TimePtr() *time.Time { - if d == nil || d.t == nil { - return nil - } - if d.t.IsZero() { - return nil - } - return d.t -} - -func (d *Date) MarshalJSON() ([]byte, error) { - if d == nil || d.t == nil { - return nil, nil - } - return json.Marshal(d.t.Format(dateFormat)) -} - -func (d *Date) UnmarshalJSON(data []byte) error { - var raw string - if err := json.Unmarshal(data, &raw); err != nil { - return err - } - - parsedTime, err := time.Parse(dateFormat, raw) - if err != nil { - return err - } - - *d = Date{t: &parsedTime} - return nil -} - -// DateTime wraps time.Time and adapts its JSON representation -// to conform to a RFC3339 date-time (e.g. 2017-07-21T17:32:28Z). -// -// Ref: https://ijmacd.github.io/rfc3339-iso8601 -type DateTime struct { - t *time.Time -} - -// NewDateTime returns a new *DateTime. -func NewDateTime(t time.Time) *DateTime { - return &DateTime{t: &t} -} - -// NewOptionalDateTime returns a new *DateTime. If the given time.Time -// is nil, nil will be returned. -func NewOptionalDateTime(t *time.Time) *DateTime { - if t == nil { - return nil - } - return &DateTime{t: t} -} - -// Time returns the DateTime's underlying time, if any. If the -// date-time is nil, the zero value is returned. -func (d *DateTime) Time() time.Time { - if d == nil || d.t == nil { - return time.Time{} - } - return *d.t -} - -// TimePtr returns a pointer to the DateTime's underlying time.Time, if any. -func (d *DateTime) TimePtr() *time.Time { - if d == nil || d.t == nil { - return nil - } - if d.t.IsZero() { - return nil - } - return d.t -} - -func (d *DateTime) MarshalJSON() ([]byte, error) { - if d == nil || d.t == nil { - return nil, nil - } - return json.Marshal(d.t.Format(time.RFC3339)) -} - -func (d *DateTime) UnmarshalJSON(data []byte) error { - var raw string - if err := json.Unmarshal(data, &raw); err != nil { - return err - } - - parsedTime, err := time.Parse(time.RFC3339, raw) - if err != nil { - return err - } - - *d = DateTime{t: &parsedTime} - return nil -} diff --git a/seed/go-fiber/inline-types/snippet-templates.json b/seed/go-fiber/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/go-fiber/inline-types/snippet.json b/seed/go-fiber/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/go-fiber/inline-types/types.go b/seed/go-fiber/inline-types/types.go deleted file mode 100644 index bfd99d439c1..00000000000 --- a/seed/go-fiber/inline-types/types.go +++ /dev/null @@ -1,390 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package object - -import ( - json "encoding/json" - fmt "fmt" - internal "github.com/inline-types/fern/internal" -) - -type PostRootRequest struct { - Bar *InlineType1 `json:"bar,omitempty" url:"-"` - Foo string `json:"foo" url:"-"` -} - -type InlineEnum string - -const ( - InlineEnumSunny InlineEnum = "SUNNY" - InlineEnumCloudy InlineEnum = "CLOUDY" - InlineEnumRaining InlineEnum = "RAINING" - InlineEnumSnowing InlineEnum = "SNOWING" -) - -func NewInlineEnumFromString(s string) (InlineEnum, error) { - switch s { - case "SUNNY": - return InlineEnumSunny, nil - case "CLOUDY": - return InlineEnumCloudy, nil - case "RAINING": - return InlineEnumRaining, nil - case "SNOWING": - return InlineEnumSnowing, nil - } - var t InlineEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i InlineEnum) Ptr() *InlineEnum { - return &i -} - -type InlineType1 struct { - Foo string `json:"foo" url:"foo"` - Bar *NestedInlineType1 `json:"bar,omitempty" url:"bar,omitempty"` - - extraProperties map[string]interface{} -} - -func (i *InlineType1) GetFoo() string { - if i == nil { - return "" - } - return i.Foo -} - -func (i *InlineType1) GetBar() *NestedInlineType1 { - if i == nil { - return nil - } - return i.Bar -} - -func (i *InlineType1) GetExtraProperties() map[string]interface{} { - return i.extraProperties -} - -func (i *InlineType1) UnmarshalJSON(data []byte) error { - type unmarshaler InlineType1 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = InlineType1(value) - extraProperties, err := internal.ExtractExtraProperties(data, *i) - if err != nil { - return err - } - i.extraProperties = extraProperties - return nil -} - -func (i *InlineType1) String() string { - if value, err := internal.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type InlineType2 struct { - Baz string `json:"baz" url:"baz"` - - extraProperties map[string]interface{} -} - -func (i *InlineType2) GetBaz() string { - if i == nil { - return "" - } - return i.Baz -} - -func (i *InlineType2) GetExtraProperties() map[string]interface{} { - return i.extraProperties -} - -func (i *InlineType2) UnmarshalJSON(data []byte) error { - type unmarshaler InlineType2 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = InlineType2(value) - extraProperties, err := internal.ExtractExtraProperties(data, *i) - if err != nil { - return err - } - i.extraProperties = extraProperties - return nil -} - -func (i *InlineType2) String() string { - if value, err := internal.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type InlinedDiscriminatedUnion1 struct { - Type string - Type1 *InlineType1 - Type2 *InlineType2 -} - -func NewInlinedDiscriminatedUnion1FromType1(value *InlineType1) *InlinedDiscriminatedUnion1 { - return &InlinedDiscriminatedUnion1{Type: "type1", Type1: value} -} - -func NewInlinedDiscriminatedUnion1FromType2(value *InlineType2) *InlinedDiscriminatedUnion1 { - return &InlinedDiscriminatedUnion1{Type: "type2", Type2: value} -} - -func (i *InlinedDiscriminatedUnion1) GetType() string { - if i == nil { - return "" - } - return i.Type -} - -func (i *InlinedDiscriminatedUnion1) GetType1() *InlineType1 { - if i == nil { - return nil - } - return i.Type1 -} - -func (i *InlinedDiscriminatedUnion1) GetType2() *InlineType2 { - if i == nil { - return nil - } - return i.Type2 -} - -func (i *InlinedDiscriminatedUnion1) UnmarshalJSON(data []byte) error { - var unmarshaler struct { - Type string `json:"type"` - } - if err := json.Unmarshal(data, &unmarshaler); err != nil { - return err - } - i.Type = unmarshaler.Type - if unmarshaler.Type == "" { - return fmt.Errorf("%T did not include discriminant type", i) - } - switch unmarshaler.Type { - case "type1": - value := new(InlineType1) - if err := json.Unmarshal(data, &value); err != nil { - return err - } - i.Type1 = value - case "type2": - value := new(InlineType2) - if err := json.Unmarshal(data, &value); err != nil { - return err - } - i.Type2 = value - } - return nil -} - -func (i InlinedDiscriminatedUnion1) MarshalJSON() ([]byte, error) { - switch i.Type { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.Type, i) - case "type1": - return internal.MarshalJSONWithExtraProperty(i.Type1, "type", "type1") - case "type2": - return internal.MarshalJSONWithExtraProperty(i.Type2, "type", "type2") - } -} - -type InlinedDiscriminatedUnion1Visitor interface { - VisitType1(*InlineType1) error - VisitType2(*InlineType2) error -} - -func (i *InlinedDiscriminatedUnion1) Accept(visitor InlinedDiscriminatedUnion1Visitor) error { - switch i.Type { - default: - return fmt.Errorf("invalid type %s in %T", i.Type, i) - case "type1": - return visitor.VisitType1(i.Type1) - case "type2": - return visitor.VisitType2(i.Type2) - } -} - -type InlinedUndiscriminatedUnion1 struct { - InlineType1 *InlineType1 - InlineType2 *InlineType2 - - typ string -} - -func NewInlinedUndiscriminatedUnion1FromInlineType1(value *InlineType1) *InlinedUndiscriminatedUnion1 { - return &InlinedUndiscriminatedUnion1{typ: "InlineType1", InlineType1: value} -} - -func NewInlinedUndiscriminatedUnion1FromInlineType2(value *InlineType2) *InlinedUndiscriminatedUnion1 { - return &InlinedUndiscriminatedUnion1{typ: "InlineType2", InlineType2: value} -} - -func (i *InlinedUndiscriminatedUnion1) GetInlineType1() *InlineType1 { - if i == nil { - return nil - } - return i.InlineType1 -} - -func (i *InlinedUndiscriminatedUnion1) GetInlineType2() *InlineType2 { - if i == nil { - return nil - } - return i.InlineType2 -} - -func (i *InlinedUndiscriminatedUnion1) UnmarshalJSON(data []byte) error { - valueInlineType1 := new(InlineType1) - if err := json.Unmarshal(data, &valueInlineType1); err == nil { - i.typ = "InlineType1" - i.InlineType1 = valueInlineType1 - return nil - } - valueInlineType2 := new(InlineType2) - if err := json.Unmarshal(data, &valueInlineType2); err == nil { - i.typ = "InlineType2" - i.InlineType2 = valueInlineType2 - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i InlinedUndiscriminatedUnion1) MarshalJSON() ([]byte, error) { - if i.typ == "InlineType1" || i.InlineType1 != nil { - return json.Marshal(i.InlineType1) - } - if i.typ == "InlineType2" || i.InlineType2 != nil { - return json.Marshal(i.InlineType2) - } - return nil, fmt.Errorf("type %T does not include a non-empty union type", i) -} - -type InlinedUndiscriminatedUnion1Visitor interface { - VisitInlineType1(*InlineType1) error - VisitInlineType2(*InlineType2) error -} - -func (i *InlinedUndiscriminatedUnion1) Accept(visitor InlinedUndiscriminatedUnion1Visitor) error { - if i.typ == "InlineType1" || i.InlineType1 != nil { - return visitor.VisitInlineType1(i.InlineType1) - } - if i.typ == "InlineType2" || i.InlineType2 != nil { - return visitor.VisitInlineType2(i.InlineType2) - } - return fmt.Errorf("type %T does not include a non-empty union type", i) -} - -type NestedInlineType1 struct { - Foo string `json:"foo" url:"foo"` - Bar string `json:"bar" url:"bar"` - MyEnum InlineEnum `json:"myEnum" url:"myEnum"` - - extraProperties map[string]interface{} -} - -func (n *NestedInlineType1) GetFoo() string { - if n == nil { - return "" - } - return n.Foo -} - -func (n *NestedInlineType1) GetBar() string { - if n == nil { - return "" - } - return n.Bar -} - -func (n *NestedInlineType1) GetMyEnum() InlineEnum { - if n == nil { - return "" - } - return n.MyEnum -} - -func (n *NestedInlineType1) GetExtraProperties() map[string]interface{} { - return n.extraProperties -} - -func (n *NestedInlineType1) UnmarshalJSON(data []byte) error { - type unmarshaler NestedInlineType1 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *n = NestedInlineType1(value) - extraProperties, err := internal.ExtractExtraProperties(data, *n) - if err != nil { - return err - } - n.extraProperties = extraProperties - return nil -} - -func (n *NestedInlineType1) String() string { - if value, err := internal.StringifyJSON(n); err == nil { - return value - } - return fmt.Sprintf("%#v", n) -} - -type RootType1 struct { - Foo string `json:"foo" url:"foo"` - Bar *InlineType1 `json:"bar,omitempty" url:"bar,omitempty"` - - extraProperties map[string]interface{} -} - -func (r *RootType1) GetFoo() string { - if r == nil { - return "" - } - return r.Foo -} - -func (r *RootType1) GetBar() *InlineType1 { - if r == nil { - return nil - } - return r.Bar -} - -func (r *RootType1) GetExtraProperties() map[string]interface{} { - return r.extraProperties -} - -func (r *RootType1) UnmarshalJSON(data []byte) error { - type unmarshaler RootType1 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = RootType1(value) - extraProperties, err := internal.ExtractExtraProperties(data, *r) - if err != nil { - return err - } - r.extraProperties = extraProperties - return nil -} - -func (r *RootType1) String() string { - if value, err := internal.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} diff --git a/seed/go-model/inline-types/.github/workflows/ci.yml b/seed/go-model/inline-types/.github/workflows/ci.yml deleted file mode 100644 index d4c0a5dcd95..00000000000 --- a/seed/go-model/inline-types/.github/workflows/ci.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Set up go - uses: actions/setup-go@v4 - - - name: Compile - run: go build ./... - test: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Set up go - uses: actions/setup-go@v4 - - - name: Test - run: go test ./... diff --git a/seed/go-model/inline-types/.mock/definition/__package__.yml b/seed/go-model/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/go-model/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/go-model/inline-types/.mock/definition/api.yml b/seed/go-model/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/go-model/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/go-model/inline-types/.mock/fern.config.json b/seed/go-model/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/go-model/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/go-model/inline-types/go.mod b/seed/go-model/inline-types/go.mod deleted file mode 100644 index bc88e459c8c..00000000000 --- a/seed/go-model/inline-types/go.mod +++ /dev/null @@ -1,8 +0,0 @@ -module github.com/inline-types/fern - -go 1.13 - -require ( - github.com/stretchr/testify v1.7.0 - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/seed/go-model/inline-types/go.sum b/seed/go-model/inline-types/go.sum deleted file mode 100644 index fc3dd9e67e8..00000000000 --- a/seed/go-model/inline-types/go.sum +++ /dev/null @@ -1,12 +0,0 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/seed/go-model/inline-types/internal/extra_properties.go b/seed/go-model/inline-types/internal/extra_properties.go deleted file mode 100644 index 540c3fd89ee..00000000000 --- a/seed/go-model/inline-types/internal/extra_properties.go +++ /dev/null @@ -1,141 +0,0 @@ -package internal - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "strings" -) - -// MarshalJSONWithExtraProperty marshals the given value to JSON, including the extra property. -func MarshalJSONWithExtraProperty(marshaler interface{}, key string, value interface{}) ([]byte, error) { - return MarshalJSONWithExtraProperties(marshaler, map[string]interface{}{key: value}) -} - -// MarshalJSONWithExtraProperties marshals the given value to JSON, including any extra properties. -func MarshalJSONWithExtraProperties(marshaler interface{}, extraProperties map[string]interface{}) ([]byte, error) { - bytes, err := json.Marshal(marshaler) - if err != nil { - return nil, err - } - if len(extraProperties) == 0 { - return bytes, nil - } - keys, err := getKeys(marshaler) - if err != nil { - return nil, err - } - for _, key := range keys { - if _, ok := extraProperties[key]; ok { - return nil, fmt.Errorf("cannot add extra property %q because it is already defined on the type", key) - } - } - extraBytes, err := json.Marshal(extraProperties) - if err != nil { - return nil, err - } - if isEmptyJSON(bytes) { - if isEmptyJSON(extraBytes) { - return bytes, nil - } - return extraBytes, nil - } - result := bytes[:len(bytes)-1] - result = append(result, ',') - result = append(result, extraBytes[1:len(extraBytes)-1]...) - result = append(result, '}') - return result, nil -} - -// ExtractExtraProperties extracts any extra properties from the given value. -func ExtractExtraProperties(bytes []byte, value interface{}, exclude ...string) (map[string]interface{}, error) { - val := reflect.ValueOf(value) - for val.Kind() == reflect.Ptr { - if val.IsNil() { - return nil, fmt.Errorf("value must be non-nil to extract extra properties") - } - val = val.Elem() - } - if err := json.Unmarshal(bytes, &value); err != nil { - return nil, err - } - var extraProperties map[string]interface{} - if err := json.Unmarshal(bytes, &extraProperties); err != nil { - return nil, err - } - for i := 0; i < val.Type().NumField(); i++ { - key := jsonKey(val.Type().Field(i)) - if key == "" || key == "-" { - continue - } - delete(extraProperties, key) - } - for _, key := range exclude { - delete(extraProperties, key) - } - if len(extraProperties) == 0 { - return nil, nil - } - return extraProperties, nil -} - -// getKeys returns the keys associated with the given value. The value must be a -// a struct or a map with string keys. -func getKeys(value interface{}) ([]string, error) { - val := reflect.ValueOf(value) - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - if !val.IsValid() { - return nil, nil - } - switch val.Kind() { - case reflect.Struct: - return getKeysForStructType(val.Type()), nil - case reflect.Map: - var keys []string - if val.Type().Key().Kind() != reflect.String { - return nil, fmt.Errorf("cannot extract keys from %T; only structs and maps with string keys are supported", value) - } - for _, key := range val.MapKeys() { - keys = append(keys, key.String()) - } - return keys, nil - default: - return nil, fmt.Errorf("cannot extract keys from %T; only structs and maps with string keys are supported", value) - } -} - -// getKeysForStructType returns all the keys associated with the given struct type, -// visiting embedded fields recursively. -func getKeysForStructType(structType reflect.Type) []string { - if structType.Kind() == reflect.Pointer { - structType = structType.Elem() - } - if structType.Kind() != reflect.Struct { - return nil - } - var keys []string - for i := 0; i < structType.NumField(); i++ { - field := structType.Field(i) - if field.Anonymous { - keys = append(keys, getKeysForStructType(field.Type)...) - continue - } - keys = append(keys, jsonKey(field)) - } - return keys -} - -// jsonKey returns the JSON key from the struct tag of the given field, -// excluding the omitempty flag (if any). -func jsonKey(field reflect.StructField) string { - return strings.TrimSuffix(field.Tag.Get("json"), ",omitempty") -} - -// isEmptyJSON returns true if the given data is empty, the empty JSON object, or -// an explicit null. -func isEmptyJSON(data []byte) bool { - return len(data) <= 2 || bytes.Equal(data, []byte("null")) -} diff --git a/seed/go-model/inline-types/internal/extra_properties_test.go b/seed/go-model/inline-types/internal/extra_properties_test.go deleted file mode 100644 index aa2510ee512..00000000000 --- a/seed/go-model/inline-types/internal/extra_properties_test.go +++ /dev/null @@ -1,228 +0,0 @@ -package internal - -import ( - "encoding/json" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -type testMarshaler struct { - Name string `json:"name"` - BirthDate time.Time `json:"birthDate"` - CreatedAt time.Time `json:"created_at"` -} - -func (t *testMarshaler) MarshalJSON() ([]byte, error) { - type embed testMarshaler - var marshaler = struct { - embed - BirthDate string `json:"birthDate"` - CreatedAt string `json:"created_at"` - }{ - embed: embed(*t), - BirthDate: t.BirthDate.Format("2006-01-02"), - CreatedAt: t.CreatedAt.Format(time.RFC3339), - } - return MarshalJSONWithExtraProperty(marshaler, "type", "test") -} - -func TestMarshalJSONWithExtraProperties(t *testing.T) { - tests := []struct { - desc string - giveMarshaler interface{} - giveExtraProperties map[string]interface{} - wantBytes []byte - wantError string - }{ - { - desc: "invalid type", - giveMarshaler: []string{"invalid"}, - giveExtraProperties: map[string]interface{}{"key": "overwrite"}, - wantError: `cannot extract keys from []string; only structs and maps with string keys are supported`, - }, - { - desc: "invalid key type", - giveMarshaler: map[int]interface{}{42: "value"}, - giveExtraProperties: map[string]interface{}{"key": "overwrite"}, - wantError: `cannot extract keys from map[int]interface {}; only structs and maps with string keys are supported`, - }, - { - desc: "invalid map overwrite", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{"key": "overwrite"}, - wantError: `cannot add extra property "key" because it is already defined on the type`, - }, - { - desc: "invalid struct overwrite", - giveMarshaler: new(testMarshaler), - giveExtraProperties: map[string]interface{}{"birthDate": "2000-01-01"}, - wantError: `cannot add extra property "birthDate" because it is already defined on the type`, - }, - { - desc: "invalid struct overwrite embedded type", - giveMarshaler: new(testMarshaler), - giveExtraProperties: map[string]interface{}{"name": "bob"}, - wantError: `cannot add extra property "name" because it is already defined on the type`, - }, - { - desc: "nil", - giveMarshaler: nil, - giveExtraProperties: nil, - wantBytes: []byte(`null`), - }, - { - desc: "empty", - giveMarshaler: map[string]interface{}{}, - giveExtraProperties: map[string]interface{}{}, - wantBytes: []byte(`{}`), - }, - { - desc: "no extra properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{}, - wantBytes: []byte(`{"key":"value"}`), - }, - { - desc: "only extra properties", - giveMarshaler: map[string]interface{}{}, - giveExtraProperties: map[string]interface{}{"key": "value"}, - wantBytes: []byte(`{"key":"value"}`), - }, - { - desc: "single extra property", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{"extra": "property"}, - wantBytes: []byte(`{"key":"value","extra":"property"}`), - }, - { - desc: "multiple extra properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{"one": 1, "two": 2}, - wantBytes: []byte(`{"key":"value","one":1,"two":2}`), - }, - { - desc: "nested properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{ - "user": map[string]interface{}{ - "age": 42, - "name": "alice", - }, - }, - wantBytes: []byte(`{"key":"value","user":{"age":42,"name":"alice"}}`), - }, - { - desc: "multiple nested properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{ - "metadata": map[string]interface{}{ - "ip": "127.0.0.1", - }, - "user": map[string]interface{}{ - "age": 42, - "name": "alice", - }, - }, - wantBytes: []byte(`{"key":"value","metadata":{"ip":"127.0.0.1"},"user":{"age":42,"name":"alice"}}`), - }, - { - desc: "custom marshaler", - giveMarshaler: &testMarshaler{ - Name: "alice", - BirthDate: time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC), - CreatedAt: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC), - }, - giveExtraProperties: map[string]interface{}{ - "extra": "property", - }, - wantBytes: []byte(`{"name":"alice","birthDate":"2000-01-01","created_at":"2024-01-01T00:00:00Z","type":"test","extra":"property"}`), - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - bytes, err := MarshalJSONWithExtraProperties(tt.giveMarshaler, tt.giveExtraProperties) - if tt.wantError != "" { - require.EqualError(t, err, tt.wantError) - assert.Nil(t, tt.wantBytes) - return - } - require.NoError(t, err) - assert.Equal(t, tt.wantBytes, bytes) - - value := make(map[string]interface{}) - require.NoError(t, json.Unmarshal(bytes, &value)) - }) - } -} - -func TestExtractExtraProperties(t *testing.T) { - t.Run("none", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := &user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice"}`), value) - require.NoError(t, err) - assert.Nil(t, extraProperties) - }) - - t.Run("non-nil pointer", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := &user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - require.NoError(t, err) - assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) - }) - - t.Run("nil pointer", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - var value *user - _, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - assert.EqualError(t, err, "value must be non-nil to extract extra properties") - }) - - t.Run("non-zero value", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - require.NoError(t, err) - assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) - }) - - t.Run("zero value", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - var value user - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - require.NoError(t, err) - assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) - }) - - t.Run("exclude", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := &user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value, "age") - require.NoError(t, err) - assert.Nil(t, extraProperties) - }) -} diff --git a/seed/go-model/inline-types/internal/stringer.go b/seed/go-model/inline-types/internal/stringer.go deleted file mode 100644 index 312801851e0..00000000000 --- a/seed/go-model/inline-types/internal/stringer.go +++ /dev/null @@ -1,13 +0,0 @@ -package internal - -import "encoding/json" - -// StringifyJSON returns a pretty JSON string representation of -// the given value. -func StringifyJSON(value interface{}) (string, error) { - bytes, err := json.MarshalIndent(value, "", " ") - if err != nil { - return "", err - } - return string(bytes), nil -} diff --git a/seed/go-model/inline-types/internal/time.go b/seed/go-model/inline-types/internal/time.go deleted file mode 100644 index ab0e269fade..00000000000 --- a/seed/go-model/inline-types/internal/time.go +++ /dev/null @@ -1,137 +0,0 @@ -package internal - -import ( - "encoding/json" - "time" -) - -const dateFormat = "2006-01-02" - -// DateTime wraps time.Time and adapts its JSON representation -// to conform to a RFC3339 date (e.g. 2006-01-02). -// -// Ref: https://ijmacd.github.io/rfc3339-iso8601 -type Date struct { - t *time.Time -} - -// NewDate returns a new *Date. If the given time.Time -// is nil, nil will be returned. -func NewDate(t time.Time) *Date { - return &Date{t: &t} -} - -// NewOptionalDate returns a new *Date. If the given time.Time -// is nil, nil will be returned. -func NewOptionalDate(t *time.Time) *Date { - if t == nil { - return nil - } - return &Date{t: t} -} - -// Time returns the Date's underlying time, if any. If the -// date is nil, the zero value is returned. -func (d *Date) Time() time.Time { - if d == nil || d.t == nil { - return time.Time{} - } - return *d.t -} - -// TimePtr returns a pointer to the Date's underlying time.Time, if any. -func (d *Date) TimePtr() *time.Time { - if d == nil || d.t == nil { - return nil - } - if d.t.IsZero() { - return nil - } - return d.t -} - -func (d *Date) MarshalJSON() ([]byte, error) { - if d == nil || d.t == nil { - return nil, nil - } - return json.Marshal(d.t.Format(dateFormat)) -} - -func (d *Date) UnmarshalJSON(data []byte) error { - var raw string - if err := json.Unmarshal(data, &raw); err != nil { - return err - } - - parsedTime, err := time.Parse(dateFormat, raw) - if err != nil { - return err - } - - *d = Date{t: &parsedTime} - return nil -} - -// DateTime wraps time.Time and adapts its JSON representation -// to conform to a RFC3339 date-time (e.g. 2017-07-21T17:32:28Z). -// -// Ref: https://ijmacd.github.io/rfc3339-iso8601 -type DateTime struct { - t *time.Time -} - -// NewDateTime returns a new *DateTime. -func NewDateTime(t time.Time) *DateTime { - return &DateTime{t: &t} -} - -// NewOptionalDateTime returns a new *DateTime. If the given time.Time -// is nil, nil will be returned. -func NewOptionalDateTime(t *time.Time) *DateTime { - if t == nil { - return nil - } - return &DateTime{t: t} -} - -// Time returns the DateTime's underlying time, if any. If the -// date-time is nil, the zero value is returned. -func (d *DateTime) Time() time.Time { - if d == nil || d.t == nil { - return time.Time{} - } - return *d.t -} - -// TimePtr returns a pointer to the DateTime's underlying time.Time, if any. -func (d *DateTime) TimePtr() *time.Time { - if d == nil || d.t == nil { - return nil - } - if d.t.IsZero() { - return nil - } - return d.t -} - -func (d *DateTime) MarshalJSON() ([]byte, error) { - if d == nil || d.t == nil { - return nil, nil - } - return json.Marshal(d.t.Format(time.RFC3339)) -} - -func (d *DateTime) UnmarshalJSON(data []byte) error { - var raw string - if err := json.Unmarshal(data, &raw); err != nil { - return err - } - - parsedTime, err := time.Parse(time.RFC3339, raw) - if err != nil { - return err - } - - *d = DateTime{t: &parsedTime} - return nil -} diff --git a/seed/go-model/inline-types/snippet-templates.json b/seed/go-model/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/go-model/inline-types/snippet.json b/seed/go-model/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/go-model/inline-types/types.go b/seed/go-model/inline-types/types.go deleted file mode 100644 index 44f1e804e10..00000000000 --- a/seed/go-model/inline-types/types.go +++ /dev/null @@ -1,385 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package object - -import ( - json "encoding/json" - fmt "fmt" - internal "github.com/inline-types/fern/internal" -) - -type InlineEnum string - -const ( - InlineEnumSunny InlineEnum = "SUNNY" - InlineEnumCloudy InlineEnum = "CLOUDY" - InlineEnumRaining InlineEnum = "RAINING" - InlineEnumSnowing InlineEnum = "SNOWING" -) - -func NewInlineEnumFromString(s string) (InlineEnum, error) { - switch s { - case "SUNNY": - return InlineEnumSunny, nil - case "CLOUDY": - return InlineEnumCloudy, nil - case "RAINING": - return InlineEnumRaining, nil - case "SNOWING": - return InlineEnumSnowing, nil - } - var t InlineEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i InlineEnum) Ptr() *InlineEnum { - return &i -} - -type InlineType1 struct { - Foo string `json:"foo" url:"foo"` - Bar *NestedInlineType1 `json:"bar,omitempty" url:"bar,omitempty"` - - extraProperties map[string]interface{} -} - -func (i *InlineType1) GetFoo() string { - if i == nil { - return "" - } - return i.Foo -} - -func (i *InlineType1) GetBar() *NestedInlineType1 { - if i == nil { - return nil - } - return i.Bar -} - -func (i *InlineType1) GetExtraProperties() map[string]interface{} { - return i.extraProperties -} - -func (i *InlineType1) UnmarshalJSON(data []byte) error { - type unmarshaler InlineType1 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = InlineType1(value) - extraProperties, err := internal.ExtractExtraProperties(data, *i) - if err != nil { - return err - } - i.extraProperties = extraProperties - return nil -} - -func (i *InlineType1) String() string { - if value, err := internal.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type InlineType2 struct { - Baz string `json:"baz" url:"baz"` - - extraProperties map[string]interface{} -} - -func (i *InlineType2) GetBaz() string { - if i == nil { - return "" - } - return i.Baz -} - -func (i *InlineType2) GetExtraProperties() map[string]interface{} { - return i.extraProperties -} - -func (i *InlineType2) UnmarshalJSON(data []byte) error { - type unmarshaler InlineType2 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = InlineType2(value) - extraProperties, err := internal.ExtractExtraProperties(data, *i) - if err != nil { - return err - } - i.extraProperties = extraProperties - return nil -} - -func (i *InlineType2) String() string { - if value, err := internal.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type InlinedDiscriminatedUnion1 struct { - Type string - Type1 *InlineType1 - Type2 *InlineType2 -} - -func NewInlinedDiscriminatedUnion1FromType1(value *InlineType1) *InlinedDiscriminatedUnion1 { - return &InlinedDiscriminatedUnion1{Type: "type1", Type1: value} -} - -func NewInlinedDiscriminatedUnion1FromType2(value *InlineType2) *InlinedDiscriminatedUnion1 { - return &InlinedDiscriminatedUnion1{Type: "type2", Type2: value} -} - -func (i *InlinedDiscriminatedUnion1) GetType() string { - if i == nil { - return "" - } - return i.Type -} - -func (i *InlinedDiscriminatedUnion1) GetType1() *InlineType1 { - if i == nil { - return nil - } - return i.Type1 -} - -func (i *InlinedDiscriminatedUnion1) GetType2() *InlineType2 { - if i == nil { - return nil - } - return i.Type2 -} - -func (i *InlinedDiscriminatedUnion1) UnmarshalJSON(data []byte) error { - var unmarshaler struct { - Type string `json:"type"` - } - if err := json.Unmarshal(data, &unmarshaler); err != nil { - return err - } - i.Type = unmarshaler.Type - if unmarshaler.Type == "" { - return fmt.Errorf("%T did not include discriminant type", i) - } - switch unmarshaler.Type { - case "type1": - value := new(InlineType1) - if err := json.Unmarshal(data, &value); err != nil { - return err - } - i.Type1 = value - case "type2": - value := new(InlineType2) - if err := json.Unmarshal(data, &value); err != nil { - return err - } - i.Type2 = value - } - return nil -} - -func (i InlinedDiscriminatedUnion1) MarshalJSON() ([]byte, error) { - switch i.Type { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.Type, i) - case "type1": - return internal.MarshalJSONWithExtraProperty(i.Type1, "type", "type1") - case "type2": - return internal.MarshalJSONWithExtraProperty(i.Type2, "type", "type2") - } -} - -type InlinedDiscriminatedUnion1Visitor interface { - VisitType1(*InlineType1) error - VisitType2(*InlineType2) error -} - -func (i *InlinedDiscriminatedUnion1) Accept(visitor InlinedDiscriminatedUnion1Visitor) error { - switch i.Type { - default: - return fmt.Errorf("invalid type %s in %T", i.Type, i) - case "type1": - return visitor.VisitType1(i.Type1) - case "type2": - return visitor.VisitType2(i.Type2) - } -} - -type InlinedUndiscriminatedUnion1 struct { - InlineType1 *InlineType1 - InlineType2 *InlineType2 - - typ string -} - -func NewInlinedUndiscriminatedUnion1FromInlineType1(value *InlineType1) *InlinedUndiscriminatedUnion1 { - return &InlinedUndiscriminatedUnion1{typ: "InlineType1", InlineType1: value} -} - -func NewInlinedUndiscriminatedUnion1FromInlineType2(value *InlineType2) *InlinedUndiscriminatedUnion1 { - return &InlinedUndiscriminatedUnion1{typ: "InlineType2", InlineType2: value} -} - -func (i *InlinedUndiscriminatedUnion1) GetInlineType1() *InlineType1 { - if i == nil { - return nil - } - return i.InlineType1 -} - -func (i *InlinedUndiscriminatedUnion1) GetInlineType2() *InlineType2 { - if i == nil { - return nil - } - return i.InlineType2 -} - -func (i *InlinedUndiscriminatedUnion1) UnmarshalJSON(data []byte) error { - valueInlineType1 := new(InlineType1) - if err := json.Unmarshal(data, &valueInlineType1); err == nil { - i.typ = "InlineType1" - i.InlineType1 = valueInlineType1 - return nil - } - valueInlineType2 := new(InlineType2) - if err := json.Unmarshal(data, &valueInlineType2); err == nil { - i.typ = "InlineType2" - i.InlineType2 = valueInlineType2 - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i InlinedUndiscriminatedUnion1) MarshalJSON() ([]byte, error) { - if i.typ == "InlineType1" || i.InlineType1 != nil { - return json.Marshal(i.InlineType1) - } - if i.typ == "InlineType2" || i.InlineType2 != nil { - return json.Marshal(i.InlineType2) - } - return nil, fmt.Errorf("type %T does not include a non-empty union type", i) -} - -type InlinedUndiscriminatedUnion1Visitor interface { - VisitInlineType1(*InlineType1) error - VisitInlineType2(*InlineType2) error -} - -func (i *InlinedUndiscriminatedUnion1) Accept(visitor InlinedUndiscriminatedUnion1Visitor) error { - if i.typ == "InlineType1" || i.InlineType1 != nil { - return visitor.VisitInlineType1(i.InlineType1) - } - if i.typ == "InlineType2" || i.InlineType2 != nil { - return visitor.VisitInlineType2(i.InlineType2) - } - return fmt.Errorf("type %T does not include a non-empty union type", i) -} - -type NestedInlineType1 struct { - Foo string `json:"foo" url:"foo"` - Bar string `json:"bar" url:"bar"` - MyEnum InlineEnum `json:"myEnum" url:"myEnum"` - - extraProperties map[string]interface{} -} - -func (n *NestedInlineType1) GetFoo() string { - if n == nil { - return "" - } - return n.Foo -} - -func (n *NestedInlineType1) GetBar() string { - if n == nil { - return "" - } - return n.Bar -} - -func (n *NestedInlineType1) GetMyEnum() InlineEnum { - if n == nil { - return "" - } - return n.MyEnum -} - -func (n *NestedInlineType1) GetExtraProperties() map[string]interface{} { - return n.extraProperties -} - -func (n *NestedInlineType1) UnmarshalJSON(data []byte) error { - type unmarshaler NestedInlineType1 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *n = NestedInlineType1(value) - extraProperties, err := internal.ExtractExtraProperties(data, *n) - if err != nil { - return err - } - n.extraProperties = extraProperties - return nil -} - -func (n *NestedInlineType1) String() string { - if value, err := internal.StringifyJSON(n); err == nil { - return value - } - return fmt.Sprintf("%#v", n) -} - -type RootType1 struct { - Foo string `json:"foo" url:"foo"` - Bar *InlineType1 `json:"bar,omitempty" url:"bar,omitempty"` - - extraProperties map[string]interface{} -} - -func (r *RootType1) GetFoo() string { - if r == nil { - return "" - } - return r.Foo -} - -func (r *RootType1) GetBar() *InlineType1 { - if r == nil { - return nil - } - return r.Bar -} - -func (r *RootType1) GetExtraProperties() map[string]interface{} { - return r.extraProperties -} - -func (r *RootType1) UnmarshalJSON(data []byte) error { - type unmarshaler RootType1 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = RootType1(value) - extraProperties, err := internal.ExtractExtraProperties(data, *r) - if err != nil { - return err - } - r.extraProperties = extraProperties - return nil -} - -func (r *RootType1) String() string { - if value, err := internal.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} diff --git a/seed/go-sdk/alias/core/request_option.go b/seed/go-sdk/alias/core/request_option.go index e975914d3cb..5af9dfba2bc 100644 --- a/seed/go-sdk/alias/core/request_option.go +++ b/seed/go-sdk/alias/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/alias/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/alias/fern/0.0.1") return headers } diff --git a/seed/go-sdk/any-auth/core/request_option.go b/seed/go-sdk/any-auth/core/request_option.go index fbfb825ef61..883868da722 100644 --- a/seed/go-sdk/any-auth/core/request_option.go +++ b/seed/go-sdk/any-auth/core/request_option.go @@ -62,6 +62,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/any-auth/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/any-auth/fern/0.0.1") return headers } diff --git a/seed/go-sdk/api-wide-base-path/core/request_option.go b/seed/go-sdk/api-wide-base-path/core/request_option.go index ad2cad430a3..fb69dd65e9a 100644 --- a/seed/go-sdk/api-wide-base-path/core/request_option.go +++ b/seed/go-sdk/api-wide-base-path/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/api-wide-base-path/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/api-wide-base-path/fern/0.0.1") return headers } diff --git a/seed/go-sdk/audiences/core/request_option.go b/seed/go-sdk/audiences/core/request_option.go index 90398890dd0..074f2079078 100644 --- a/seed/go-sdk/audiences/core/request_option.go +++ b/seed/go-sdk/audiences/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/audiences/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/audiences/fern/0.0.1") return headers } diff --git a/seed/go-sdk/auth-environment-variables/core/request_option.go b/seed/go-sdk/auth-environment-variables/core/request_option.go index 1b63430fde9..3dbccf27b31 100644 --- a/seed/go-sdk/auth-environment-variables/core/request_option.go +++ b/seed/go-sdk/auth-environment-variables/core/request_option.go @@ -67,6 +67,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/auth-environment-variables/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/auth-environment-variables/fern/0.0.1") return headers } diff --git a/seed/go-sdk/basic-auth-environment-variables/core/request_option.go b/seed/go-sdk/basic-auth-environment-variables/core/request_option.go index bb4b6d7fc71..811faab7eb3 100644 --- a/seed/go-sdk/basic-auth-environment-variables/core/request_option.go +++ b/seed/go-sdk/basic-auth-environment-variables/core/request_option.go @@ -59,6 +59,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/basic-auth-environment-variables/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/basic-auth-environment-variables/fern/0.0.1") return headers } diff --git a/seed/go-sdk/basic-auth/core/request_option.go b/seed/go-sdk/basic-auth/core/request_option.go index 6023e564a09..74d0ddeb981 100644 --- a/seed/go-sdk/basic-auth/core/request_option.go +++ b/seed/go-sdk/basic-auth/core/request_option.go @@ -59,6 +59,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/basic-auth/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/basic-auth/fern/0.0.1") return headers } diff --git a/seed/go-sdk/bearer-token-environment-variable/core/request_option.go b/seed/go-sdk/bearer-token-environment-variable/core/request_option.go index db06b8303d6..cbbcf4e858f 100644 --- a/seed/go-sdk/bearer-token-environment-variable/core/request_option.go +++ b/seed/go-sdk/bearer-token-environment-variable/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/bearer-token-environment-variable/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/bearer-token-environment-variable/fern/0.0.1") return headers } diff --git a/seed/go-sdk/bytes/core/request_option.go b/seed/go-sdk/bytes/core/request_option.go index 779b12efac7..8f183107e07 100644 --- a/seed/go-sdk/bytes/core/request_option.go +++ b/seed/go-sdk/bytes/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/bytes/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/bytes/fern/0.0.1") return headers } diff --git a/seed/go-sdk/circular-references-advanced/core/request_option.go b/seed/go-sdk/circular-references-advanced/core/request_option.go index be46fb88567..038634019b5 100644 --- a/seed/go-sdk/circular-references-advanced/core/request_option.go +++ b/seed/go-sdk/circular-references-advanced/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/circular-references-advanced/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/circular-references-advanced/fern/0.0.1") return headers } diff --git a/seed/go-sdk/circular-references/core/request_option.go b/seed/go-sdk/circular-references/core/request_option.go index 816ec2dc321..d0c812c17f7 100644 --- a/seed/go-sdk/circular-references/core/request_option.go +++ b/seed/go-sdk/circular-references/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/circular-references/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/circular-references/fern/0.0.1") return headers } diff --git a/seed/go-sdk/cross-package-type-names/core/request_option.go b/seed/go-sdk/cross-package-type-names/core/request_option.go index ba4826f7d53..0644a9753ff 100644 --- a/seed/go-sdk/cross-package-type-names/core/request_option.go +++ b/seed/go-sdk/cross-package-type-names/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/cross-package-type-names/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/cross-package-type-names/fern/0.0.1") return headers } diff --git a/seed/go-sdk/custom-auth/core/request_option.go b/seed/go-sdk/custom-auth/core/request_option.go index df54886580e..ee2176a58cf 100644 --- a/seed/go-sdk/custom-auth/core/request_option.go +++ b/seed/go-sdk/custom-auth/core/request_option.go @@ -58,6 +58,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/custom-auth/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/custom-auth/fern/0.0.1") return headers } diff --git a/seed/go-sdk/enum/core/request_option.go b/seed/go-sdk/enum/core/request_option.go index f9b2adc1c19..81c757214e9 100644 --- a/seed/go-sdk/enum/core/request_option.go +++ b/seed/go-sdk/enum/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/enum/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/enum/fern/0.0.1") return headers } diff --git a/seed/go-sdk/error-property/core/request_option.go b/seed/go-sdk/error-property/core/request_option.go index 80b9ecd36cb..ce644cda330 100644 --- a/seed/go-sdk/error-property/core/request_option.go +++ b/seed/go-sdk/error-property/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/error-property/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/error-property/fern/0.0.1") return headers } diff --git a/seed/go-sdk/examples/always-send-required-properties/core/request_option.go b/seed/go-sdk/examples/always-send-required-properties/core/request_option.go index 94c9c735344..4fe862e0f12 100644 --- a/seed/go-sdk/examples/always-send-required-properties/core/request_option.go +++ b/seed/go-sdk/examples/always-send-required-properties/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/examples/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/examples/fern/0.0.1") return headers } diff --git a/seed/go-sdk/examples/exported-client-name/.fernignore b/seed/go-sdk/examples/exported-client-name/.fernignore new file mode 100644 index 00000000000..f488dd4ced1 --- /dev/null +++ b/seed/go-sdk/examples/exported-client-name/.fernignore @@ -0,0 +1 @@ +client/wrapper.go \ No newline at end of file diff --git a/seed/go-sdk/examples/exported-client-name/client/wrapper.go b/seed/go-sdk/examples/exported-client-name/client/wrapper.go new file mode 100644 index 00000000000..404e4893c72 --- /dev/null +++ b/seed/go-sdk/examples/exported-client-name/client/wrapper.go @@ -0,0 +1,9 @@ +package client + +import option "github.com/examples/fern/option" + +// NewAcmeClient is a wrapper around NewClient that allows you to create +// a new client with the Acme API. +func NewAcmeClient(opts ...option.RequestOption) *Client { + return NewClient(opts...) +} diff --git a/seed/go-sdk/examples/exported-client-name/core/request_option.go b/seed/go-sdk/examples/exported-client-name/core/request_option.go index 94c9c735344..4fe862e0f12 100644 --- a/seed/go-sdk/examples/exported-client-name/core/request_option.go +++ b/seed/go-sdk/examples/exported-client-name/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/examples/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/examples/fern/0.0.1") return headers } diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example0/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example0/snippet.go index bc816172b55..33c87862e87 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example0/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example0/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example1/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example1/snippet.go index 460fdc4c77a..642128d2680 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example1/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example1/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example10/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example10/snippet.go index c9240e62f9e..5e03b4b1012 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example10/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example10/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example11/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example11/snippet.go index c9240e62f9e..5e03b4b1012 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example11/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example11/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example12/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example12/snippet.go index d345c94569a..4c34c4d8dfc 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example12/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example12/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example13/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example13/snippet.go index 4aca3169f72..87d7a3f264d 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example13/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example13/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example14/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example14/snippet.go index b4a9f9083a9..ba60d1c903c 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example14/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example14/snippet.go @@ -8,7 +8,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example15/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example15/snippet.go index 3e00f783dc2..3c0baa82963 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example15/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example15/snippet.go @@ -8,7 +8,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example16/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example16/snippet.go index 3eb00274c89..3f4f658cde4 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example16/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example16/snippet.go @@ -8,7 +8,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example17/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example17/snippet.go index 00dfcb36374..fd42b4f6a1c 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example17/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example17/snippet.go @@ -8,7 +8,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example18/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example18/snippet.go index e774f360e42..50001f0bbf0 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example18/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example18/snippet.go @@ -10,7 +10,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example2/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example2/snippet.go index 11fe0a28aae..4804e0fcc17 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example2/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example2/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example3/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example3/snippet.go index 0fd85645a0e..5a7241d8ef8 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example3/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example3/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example4/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example4/snippet.go index b8f79eea5c2..02f83545fa8 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example4/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example4/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example5/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example5/snippet.go index 460544b0f72..05611cb140a 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example5/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example5/snippet.go @@ -8,7 +8,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example6/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example6/snippet.go index ec8382ae623..7ca0b066340 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example6/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example6/snippet.go @@ -8,7 +8,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example7/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example7/snippet.go index 3d56a0923c0..2df73941e1c 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example7/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example7/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example8/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example8/snippet.go index f2caf690c60..aef38b1d7b8 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example8/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example8/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example9/snippet.go b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example9/snippet.go index 6e122ddbbc8..9cd5700e23c 100644 --- a/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example9/snippet.go +++ b/seed/go-sdk/examples/exported-client-name/dynamic-snippets/example9/snippet.go @@ -7,7 +7,7 @@ import ( ) func do() () { - client := client.NewClient( + client := client.NewAcmeClient( option.WithToken( "", ), diff --git a/seed/go-sdk/examples/no-custom-config/core/request_option.go b/seed/go-sdk/examples/no-custom-config/core/request_option.go index 94c9c735344..4fe862e0f12 100644 --- a/seed/go-sdk/examples/no-custom-config/core/request_option.go +++ b/seed/go-sdk/examples/no-custom-config/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/examples/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/examples/fern/0.0.1") return headers } diff --git a/seed/go-sdk/extends/core/request_option.go b/seed/go-sdk/extends/core/request_option.go index 11592b349f8..7c8475191ea 100644 --- a/seed/go-sdk/extends/core/request_option.go +++ b/seed/go-sdk/extends/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/extends/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/extends/fern/0.0.1") return headers } diff --git a/seed/go-sdk/extra-properties/core/request_option.go b/seed/go-sdk/extra-properties/core/request_option.go index 3cdf7e5e465..1de226cb6dc 100644 --- a/seed/go-sdk/extra-properties/core/request_option.go +++ b/seed/go-sdk/extra-properties/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/extra-properties/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/extra-properties/fern/0.0.1") return headers } diff --git a/seed/go-sdk/file-download/core/request_option.go b/seed/go-sdk/file-download/core/request_option.go index 3999694456f..434a9774c54 100644 --- a/seed/go-sdk/file-download/core/request_option.go +++ b/seed/go-sdk/file-download/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/file-download/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/file-download/fern/0.0.1") return headers } diff --git a/seed/go-sdk/file-upload/inline-file-properties/core/request_option.go b/seed/go-sdk/file-upload/inline-file-properties/core/request_option.go index a82f9442526..643a4cc0524 100644 --- a/seed/go-sdk/file-upload/inline-file-properties/core/request_option.go +++ b/seed/go-sdk/file-upload/inline-file-properties/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/fern-api/file-upload-go") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/file-upload/fern/0.0.1") return headers } diff --git a/seed/go-sdk/file-upload/no-custom-config/core/request_option.go b/seed/go-sdk/file-upload/no-custom-config/core/request_option.go index 06ec480e4c3..3fe7b06129c 100644 --- a/seed/go-sdk/file-upload/no-custom-config/core/request_option.go +++ b/seed/go-sdk/file-upload/no-custom-config/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/file-upload/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/file-upload/fern/0.0.1") return headers } diff --git a/seed/go-sdk/folders/core/request_option.go b/seed/go-sdk/folders/core/request_option.go index e4cf758da8f..9e1b2e78135 100644 --- a/seed/go-sdk/folders/core/request_option.go +++ b/seed/go-sdk/folders/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/folders/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/folders/fern/0.0.1") return headers } diff --git a/seed/go-sdk/go-content-type/core/request_option.go b/seed/go-sdk/go-content-type/core/request_option.go index 8a6dc26b3cb..ad4f74589ed 100644 --- a/seed/go-sdk/go-content-type/core/request_option.go +++ b/seed/go-sdk/go-content-type/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/go-content-type/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/go-content-type/fern/0.0.1") return headers } diff --git a/seed/go-sdk/idempotency-headers/core/request_option.go b/seed/go-sdk/idempotency-headers/core/request_option.go index 5c6fb3ecf8e..5a77c8c1846 100644 --- a/seed/go-sdk/idempotency-headers/core/request_option.go +++ b/seed/go-sdk/idempotency-headers/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/idempotency-headers/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/idempotency-headers/fern/0.0.1") return headers } diff --git a/seed/go-sdk/imdb/core/request_option.go b/seed/go-sdk/imdb/core/request_option.go index 3cdfd248268..de9180f5296 100644 --- a/seed/go-sdk/imdb/core/request_option.go +++ b/seed/go-sdk/imdb/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/imdb/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/imdb/fern/0.0.1") return headers } diff --git a/seed/go-sdk/inline-types/.github/workflows/ci.yml b/seed/go-sdk/inline-types/.github/workflows/ci.yml deleted file mode 100644 index d4c0a5dcd95..00000000000 --- a/seed/go-sdk/inline-types/.github/workflows/ci.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Set up go - uses: actions/setup-go@v4 - - - name: Compile - run: go build ./... - test: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Set up go - uses: actions/setup-go@v4 - - - name: Test - run: go test ./... diff --git a/seed/go-sdk/inline-types/.mock/definition/__package__.yml b/seed/go-sdk/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/go-sdk/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/go-sdk/inline-types/.mock/definition/api.yml b/seed/go-sdk/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/go-sdk/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/go-sdk/inline-types/.mock/fern.config.json b/seed/go-sdk/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/go-sdk/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/go-sdk/inline-types/client/client.go b/seed/go-sdk/inline-types/client/client.go deleted file mode 100644 index ccf71df33e5..00000000000 --- a/seed/go-sdk/inline-types/client/client.go +++ /dev/null @@ -1,70 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package client - -import ( - context "context" - fern "github.com/inline-types/fern" - core "github.com/inline-types/fern/core" - internal "github.com/inline-types/fern/internal" - option "github.com/inline-types/fern/option" - http "net/http" -) - -type Client struct { - baseURL string - caller *internal.Caller - header http.Header -} - -func NewClient(opts ...option.RequestOption) *Client { - options := core.NewRequestOptions(opts...) - return &Client{ - baseURL: options.BaseURL, - caller: internal.NewCaller( - &internal.CallerParams{ - Client: options.HTTPClient, - MaxAttempts: options.MaxAttempts, - }, - ), - header: options.ToHeader(), - } -} - -func (c *Client) GetRoot( - ctx context.Context, - request *fern.PostRootRequest, - opts ...option.RequestOption, -) (*fern.RootType1, error) { - options := core.NewRequestOptions(opts...) - baseURL := internal.ResolveBaseURL( - options.BaseURL, - c.baseURL, - "", - ) - endpointURL := baseURL + "/root/root" - headers := internal.MergeHeaders( - c.header.Clone(), - options.ToHeader(), - ) - headers.Set("Content-Type", "application/json") - - var response *fern.RootType1 - if err := c.caller.Call( - ctx, - &internal.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: headers, - MaxAttempts: options.MaxAttempts, - BodyProperties: options.BodyProperties, - QueryParameters: options.QueryParameters, - Client: options.HTTPClient, - Request: request, - Response: &response, - }, - ); err != nil { - return nil, err - } - return response, nil -} diff --git a/seed/go-sdk/inline-types/client/client_test.go b/seed/go-sdk/inline-types/client/client_test.go deleted file mode 100644 index 73ba53c8db4..00000000000 --- a/seed/go-sdk/inline-types/client/client_test.go +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package client - -import ( - option "github.com/inline-types/fern/option" - assert "github.com/stretchr/testify/assert" - http "net/http" - testing "testing" - time "time" -) - -func TestNewClient(t *testing.T) { - t.Run("default", func(t *testing.T) { - c := NewClient() - assert.Empty(t, c.baseURL) - }) - - t.Run("base url", func(t *testing.T) { - c := NewClient( - option.WithBaseURL("test.co"), - ) - assert.Equal(t, "test.co", c.baseURL) - }) - - t.Run("http client", func(t *testing.T) { - httpClient := &http.Client{ - Timeout: 5 * time.Second, - } - c := NewClient( - option.WithHTTPClient(httpClient), - ) - assert.Empty(t, c.baseURL) - }) - - t.Run("http header", func(t *testing.T) { - header := make(http.Header) - header.Set("X-API-Tenancy", "test") - c := NewClient( - option.WithHTTPHeader(header), - ) - assert.Empty(t, c.baseURL) - assert.Equal(t, "test", c.header.Get("X-API-Tenancy")) - }) -} diff --git a/seed/go-sdk/inline-types/core/api_error.go b/seed/go-sdk/inline-types/core/api_error.go deleted file mode 100644 index dc4190ca1cd..00000000000 --- a/seed/go-sdk/inline-types/core/api_error.go +++ /dev/null @@ -1,42 +0,0 @@ -package core - -import "fmt" - -// APIError is a lightweight wrapper around the standard error -// interface that preserves the status code from the RPC, if any. -type APIError struct { - err error - - StatusCode int `json:"-"` -} - -// NewAPIError constructs a new API error. -func NewAPIError(statusCode int, err error) *APIError { - return &APIError{ - err: err, - StatusCode: statusCode, - } -} - -// Unwrap returns the underlying error. This also makes the error compatible -// with errors.As and errors.Is. -func (a *APIError) Unwrap() error { - if a == nil { - return nil - } - return a.err -} - -// Error returns the API error's message. -func (a *APIError) Error() string { - if a == nil || (a.err == nil && a.StatusCode == 0) { - return "" - } - if a.err == nil { - return fmt.Sprintf("%d", a.StatusCode) - } - if a.StatusCode == 0 { - return a.err.Error() - } - return fmt.Sprintf("%d: %s", a.StatusCode, a.err.Error()) -} diff --git a/seed/go-sdk/inline-types/core/http.go b/seed/go-sdk/inline-types/core/http.go deleted file mode 100644 index b553350b84e..00000000000 --- a/seed/go-sdk/inline-types/core/http.go +++ /dev/null @@ -1,8 +0,0 @@ -package core - -import "net/http" - -// HTTPClient is an interface for a subset of the *http.Client. -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} diff --git a/seed/go-sdk/inline-types/core/request_option.go b/seed/go-sdk/inline-types/core/request_option.go deleted file mode 100644 index 59b90a18fb8..00000000000 --- a/seed/go-sdk/inline-types/core/request_option.go +++ /dev/null @@ -1,108 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package core - -import ( - http "net/http" - url "net/url" -) - -// RequestOption adapts the behavior of the client or an individual request. -type RequestOption interface { - applyRequestOptions(*RequestOptions) -} - -// RequestOptions defines all of the possible request options. -// -// This type is primarily used by the generated code and is not meant -// to be used directly; use the option package instead. -type RequestOptions struct { - BaseURL string - HTTPClient HTTPClient - HTTPHeader http.Header - BodyProperties map[string]interface{} - QueryParameters url.Values - MaxAttempts uint -} - -// NewRequestOptions returns a new *RequestOptions value. -// -// This function is primarily used by the generated code and is not meant -// to be used directly; use RequestOption instead. -func NewRequestOptions(opts ...RequestOption) *RequestOptions { - options := &RequestOptions{ - HTTPHeader: make(http.Header), - BodyProperties: make(map[string]interface{}), - QueryParameters: make(url.Values), - } - for _, opt := range opts { - opt.applyRequestOptions(options) - } - return options -} - -// ToHeader maps the configured request options into a http.Header used -// for the request(s). -func (r *RequestOptions) ToHeader() http.Header { return r.cloneHeader() } - -func (r *RequestOptions) cloneHeader() http.Header { - headers := r.HTTPHeader.Clone() - headers.Set("X-Fern-Language", "Go") - headers.Set("X-Fern-SDK-Name", "github.com/inline-types/fern") - headers.Set("X-Fern-SDK-Version", "0.0.1") - return headers -} - -// BaseURLOption implements the RequestOption interface. -type BaseURLOption struct { - BaseURL string -} - -func (b *BaseURLOption) applyRequestOptions(opts *RequestOptions) { - opts.BaseURL = b.BaseURL -} - -// HTTPClientOption implements the RequestOption interface. -type HTTPClientOption struct { - HTTPClient HTTPClient -} - -func (h *HTTPClientOption) applyRequestOptions(opts *RequestOptions) { - opts.HTTPClient = h.HTTPClient -} - -// HTTPHeaderOption implements the RequestOption interface. -type HTTPHeaderOption struct { - HTTPHeader http.Header -} - -func (h *HTTPHeaderOption) applyRequestOptions(opts *RequestOptions) { - opts.HTTPHeader = h.HTTPHeader -} - -// BodyPropertiesOption implements the RequestOption interface. -type BodyPropertiesOption struct { - BodyProperties map[string]interface{} -} - -func (b *BodyPropertiesOption) applyRequestOptions(opts *RequestOptions) { - opts.BodyProperties = b.BodyProperties -} - -// QueryParametersOption implements the RequestOption interface. -type QueryParametersOption struct { - QueryParameters url.Values -} - -func (q *QueryParametersOption) applyRequestOptions(opts *RequestOptions) { - opts.QueryParameters = q.QueryParameters -} - -// MaxAttemptsOption implements the RequestOption interface. -type MaxAttemptsOption struct { - MaxAttempts uint -} - -func (m *MaxAttemptsOption) applyRequestOptions(opts *RequestOptions) { - opts.MaxAttempts = m.MaxAttempts -} diff --git a/seed/go-sdk/inline-types/dynamic-snippets/example0/snippet.go b/seed/go-sdk/inline-types/dynamic-snippets/example0/snippet.go deleted file mode 100644 index 3dc762bbee3..00000000000 --- a/seed/go-sdk/inline-types/dynamic-snippets/example0/snippet.go +++ /dev/null @@ -1,25 +0,0 @@ -package example - -import ( - client "github.com/inline-types/fern/client" - context "context" - fern "github.com/inline-types/fern" -) - -func do() () { - client := client.NewClient() - client.GetRoot( - context.TODO(), - &fern.PostRootRequest{ - Bar: &fern.InlineType1{ - Foo: "foo", - Bar: &fern.NestedInlineType1{ - Foo: "foo", - Bar: "bar", - MyEnum: fern.InlineEnumSunny, - }, - }, - Foo: "foo", - }, - ) -} diff --git a/seed/go-sdk/inline-types/file_param.go b/seed/go-sdk/inline-types/file_param.go deleted file mode 100644 index 33abc01dbcd..00000000000 --- a/seed/go-sdk/inline-types/file_param.go +++ /dev/null @@ -1,41 +0,0 @@ -package object - -import ( - "io" -) - -// FileParam is a file type suitable for multipart/form-data uploads. -type FileParam struct { - io.Reader - filename string - contentType string -} - -// FileParamOption adapts the behavior of the FileParam. No options are -// implemented yet, but this interface allows for future extensibility. -type FileParamOption interface { - apply() -} - -// NewFileParam returns a *FileParam type suitable for multipart/form-data uploads. All file -// upload endpoints accept a simple io.Reader, which is usually created by opening a file -// via os.Open. -// -// However, some endpoints require additional metadata about the file such as a specific -// Content-Type or custom filename. FileParam makes it easier to create the correct type -// signature for these endpoints. -func NewFileParam( - reader io.Reader, - filename string, - contentType string, - opts ...FileParamOption, -) *FileParam { - return &FileParam{ - Reader: reader, - filename: filename, - contentType: contentType, - } -} - -func (f *FileParam) Name() string { return f.filename } -func (f *FileParam) ContentType() string { return f.contentType } diff --git a/seed/go-sdk/inline-types/go.mod b/seed/go-sdk/inline-types/go.mod deleted file mode 100644 index 744d58e186e..00000000000 --- a/seed/go-sdk/inline-types/go.mod +++ /dev/null @@ -1,9 +0,0 @@ -module github.com/inline-types/fern - -go 1.13 - -require ( - github.com/google/uuid v1.4.0 - github.com/stretchr/testify v1.7.0 - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/seed/go-sdk/inline-types/go.sum b/seed/go-sdk/inline-types/go.sum deleted file mode 100644 index b3766d4366b..00000000000 --- a/seed/go-sdk/inline-types/go.sum +++ /dev/null @@ -1,14 +0,0 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/seed/go-sdk/inline-types/internal/caller.go b/seed/go-sdk/inline-types/internal/caller.go deleted file mode 100644 index 213837b3617..00000000000 --- a/seed/go-sdk/inline-types/internal/caller.go +++ /dev/null @@ -1,238 +0,0 @@ -package internal - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "reflect" - "strings" - - "github.com/inline-types/fern/core" -) - -const ( - // contentType specifies the JSON Content-Type header value. - contentType = "application/json" - contentTypeHeader = "Content-Type" -) - -// Caller calls APIs and deserializes their response, if any. -type Caller struct { - client core.HTTPClient - retrier *Retrier -} - -// CallerParams represents the parameters used to constrcut a new *Caller. -type CallerParams struct { - Client core.HTTPClient - MaxAttempts uint -} - -// NewCaller returns a new *Caller backed by the given parameters. -func NewCaller(params *CallerParams) *Caller { - var httpClient core.HTTPClient = http.DefaultClient - if params.Client != nil { - httpClient = params.Client - } - var retryOptions []RetryOption - if params.MaxAttempts > 0 { - retryOptions = append(retryOptions, WithMaxAttempts(params.MaxAttempts)) - } - return &Caller{ - client: httpClient, - retrier: NewRetrier(retryOptions...), - } -} - -// CallParams represents the parameters used to issue an API call. -type CallParams struct { - URL string - Method string - MaxAttempts uint - Headers http.Header - BodyProperties map[string]interface{} - QueryParameters url.Values - Client core.HTTPClient - Request interface{} - Response interface{} - ResponseIsOptional bool - ErrorDecoder ErrorDecoder -} - -// Call issues an API call according to the given call parameters. -func (c *Caller) Call(ctx context.Context, params *CallParams) error { - url := buildURL(params.URL, params.QueryParameters) - req, err := newRequest( - ctx, - url, - params.Method, - params.Headers, - params.Request, - params.BodyProperties, - ) - if err != nil { - return err - } - - // If the call has been cancelled, don't issue the request. - if err := ctx.Err(); err != nil { - return err - } - - client := c.client - if params.Client != nil { - // Use the HTTP client scoped to the request. - client = params.Client - } - - var retryOptions []RetryOption - if params.MaxAttempts > 0 { - retryOptions = append(retryOptions, WithMaxAttempts(params.MaxAttempts)) - } - - resp, err := c.retrier.Run( - client.Do, - req, - params.ErrorDecoder, - retryOptions..., - ) - if err != nil { - return err - } - - // Close the response body after we're done. - defer resp.Body.Close() - - // Check if the call was cancelled before we return the error - // associated with the call and/or unmarshal the response data. - if err := ctx.Err(); err != nil { - return err - } - - if resp.StatusCode < 200 || resp.StatusCode >= 300 { - return decodeError(resp, params.ErrorDecoder) - } - - // Mutate the response parameter in-place. - if params.Response != nil { - if writer, ok := params.Response.(io.Writer); ok { - _, err = io.Copy(writer, resp.Body) - } else { - err = json.NewDecoder(resp.Body).Decode(params.Response) - } - if err != nil { - if err == io.EOF { - if params.ResponseIsOptional { - // The response is optional, so we should ignore the - // io.EOF error - return nil - } - return fmt.Errorf("expected a %T response, but the server responded with nothing", params.Response) - } - return err - } - } - - return nil -} - -// buildURL constructs the final URL by appending the given query parameters (if any). -func buildURL( - url string, - queryParameters url.Values, -) string { - if len(queryParameters) == 0 { - return url - } - if strings.ContainsRune(url, '?') { - url += "&" - } else { - url += "?" - } - url += queryParameters.Encode() - return url -} - -// newRequest returns a new *http.Request with all of the fields -// required to issue the call. -func newRequest( - ctx context.Context, - url string, - method string, - endpointHeaders http.Header, - request interface{}, - bodyProperties map[string]interface{}, -) (*http.Request, error) { - requestBody, err := newRequestBody(request, bodyProperties) - if err != nil { - return nil, err - } - req, err := http.NewRequestWithContext(ctx, method, url, requestBody) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - req.Header.Set(contentTypeHeader, contentType) - for name, values := range endpointHeaders { - req.Header[name] = values - } - return req, nil -} - -// newRequestBody returns a new io.Reader that represents the HTTP request body. -func newRequestBody(request interface{}, bodyProperties map[string]interface{}) (io.Reader, error) { - if isNil(request) { - if len(bodyProperties) == 0 { - return nil, nil - } - requestBytes, err := json.Marshal(bodyProperties) - if err != nil { - return nil, err - } - return bytes.NewReader(requestBytes), nil - } - if body, ok := request.(io.Reader); ok { - return body, nil - } - requestBytes, err := MarshalJSONWithExtraProperties(request, bodyProperties) - if err != nil { - return nil, err - } - return bytes.NewReader(requestBytes), nil -} - -// decodeError decodes the error from the given HTTP response. Note that -// it's the caller's responsibility to close the response body. -func decodeError(response *http.Response, errorDecoder ErrorDecoder) error { - if errorDecoder != nil { - // This endpoint has custom errors, so we'll - // attempt to unmarshal the error into a structured - // type based on the status code. - return errorDecoder(response.StatusCode, response.Body) - } - // This endpoint doesn't have any custom error - // types, so we just read the body as-is, and - // put it into a normal error. - bytes, err := io.ReadAll(response.Body) - if err != nil && err != io.EOF { - return err - } - if err == io.EOF { - // The error didn't have a response body, - // so all we can do is return an error - // with the status code. - return core.NewAPIError(response.StatusCode, nil) - } - return core.NewAPIError(response.StatusCode, errors.New(string(bytes))) -} - -// isNil is used to determine if the request value is equal to nil (i.e. an interface -// value that holds a nil concrete value is itself non-nil). -func isNil(value interface{}) bool { - return value == nil || reflect.ValueOf(value).IsNil() -} diff --git a/seed/go-sdk/inline-types/internal/caller_test.go b/seed/go-sdk/inline-types/internal/caller_test.go deleted file mode 100644 index c7558afaef8..00000000000 --- a/seed/go-sdk/inline-types/internal/caller_test.go +++ /dev/null @@ -1,391 +0,0 @@ -package internal - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/http/httptest" - "net/url" - "strconv" - "testing" - - "github.com/inline-types/fern/core" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -// TestCase represents a single test case. -type TestCase struct { - description string - - // Server-side assertions. - givePathSuffix string - giveMethod string - giveResponseIsOptional bool - giveHeader http.Header - giveErrorDecoder ErrorDecoder - giveRequest *Request - giveQueryParams url.Values - giveBodyProperties map[string]interface{} - - // Client-side assertions. - wantResponse *Response - wantError error -} - -// Request a simple request body. -type Request struct { - Id string `json:"id"` -} - -// Response a simple response body. -type Response struct { - Id string `json:"id"` - ExtraBodyProperties map[string]interface{} `json:"extraBodyProperties,omitempty"` - QueryParameters url.Values `json:"queryParameters,omitempty"` -} - -// NotFoundError represents a 404. -type NotFoundError struct { - *core.APIError - - Message string `json:"message"` -} - -func TestCall(t *testing.T) { - tests := []*TestCase{ - { - description: "GET success", - giveMethod: http.MethodGet, - giveHeader: http.Header{ - "X-API-Status": []string{"success"}, - }, - giveRequest: &Request{ - Id: "123", - }, - wantResponse: &Response{ - Id: "123", - }, - }, - { - description: "GET success with query", - givePathSuffix: "?limit=1", - giveMethod: http.MethodGet, - giveHeader: http.Header{ - "X-API-Status": []string{"success"}, - }, - giveRequest: &Request{ - Id: "123", - }, - wantResponse: &Response{ - Id: "123", - QueryParameters: url.Values{ - "limit": []string{"1"}, - }, - }, - }, - { - description: "GET not found", - giveMethod: http.MethodGet, - giveHeader: http.Header{ - "X-API-Status": []string{"fail"}, - }, - giveRequest: &Request{ - Id: strconv.Itoa(http.StatusNotFound), - }, - giveErrorDecoder: newTestErrorDecoder(t), - wantError: &NotFoundError{ - APIError: core.NewAPIError( - http.StatusNotFound, - errors.New(`{"message":"ID \"404\" not found"}`), - ), - }, - }, - { - description: "POST empty body", - giveMethod: http.MethodPost, - giveHeader: http.Header{ - "X-API-Status": []string{"fail"}, - }, - giveRequest: nil, - wantError: core.NewAPIError( - http.StatusBadRequest, - errors.New("invalid request"), - ), - }, - { - description: "POST optional response", - giveMethod: http.MethodPost, - giveHeader: http.Header{ - "X-API-Status": []string{"success"}, - }, - giveRequest: &Request{ - Id: "123", - }, - giveResponseIsOptional: true, - }, - { - description: "POST API error", - giveMethod: http.MethodPost, - giveHeader: http.Header{ - "X-API-Status": []string{"fail"}, - }, - giveRequest: &Request{ - Id: strconv.Itoa(http.StatusInternalServerError), - }, - wantError: core.NewAPIError( - http.StatusInternalServerError, - errors.New("failed to process request"), - ), - }, - { - description: "POST extra properties", - giveMethod: http.MethodPost, - giveHeader: http.Header{ - "X-API-Status": []string{"success"}, - }, - giveRequest: new(Request), - giveBodyProperties: map[string]interface{}{ - "key": "value", - }, - wantResponse: &Response{ - ExtraBodyProperties: map[string]interface{}{ - "key": "value", - }, - }, - }, - { - description: "GET extra query parameters", - giveMethod: http.MethodGet, - giveHeader: http.Header{ - "X-API-Status": []string{"success"}, - }, - giveQueryParams: url.Values{ - "extra": []string{"true"}, - }, - giveRequest: &Request{ - Id: "123", - }, - wantResponse: &Response{ - Id: "123", - QueryParameters: url.Values{ - "extra": []string{"true"}, - }, - }, - }, - { - description: "GET merge extra query parameters", - givePathSuffix: "?limit=1", - giveMethod: http.MethodGet, - giveHeader: http.Header{ - "X-API-Status": []string{"success"}, - }, - giveRequest: &Request{ - Id: "123", - }, - giveQueryParams: url.Values{ - "extra": []string{"true"}, - }, - wantResponse: &Response{ - Id: "123", - QueryParameters: url.Values{ - "limit": []string{"1"}, - "extra": []string{"true"}, - }, - }, - }, - } - for _, test := range tests { - t.Run(test.description, func(t *testing.T) { - var ( - server = newTestServer(t, test) - client = server.Client() - ) - caller := NewCaller( - &CallerParams{ - Client: client, - }, - ) - var response *Response - err := caller.Call( - context.Background(), - &CallParams{ - URL: server.URL + test.givePathSuffix, - Method: test.giveMethod, - Headers: test.giveHeader, - BodyProperties: test.giveBodyProperties, - QueryParameters: test.giveQueryParams, - Request: test.giveRequest, - Response: &response, - ResponseIsOptional: test.giveResponseIsOptional, - ErrorDecoder: test.giveErrorDecoder, - }, - ) - if test.wantError != nil { - assert.EqualError(t, err, test.wantError.Error()) - return - } - require.NoError(t, err) - assert.Equal(t, test.wantResponse, response) - }) - } -} - -func TestMergeHeaders(t *testing.T) { - t.Run("both empty", func(t *testing.T) { - merged := MergeHeaders(make(http.Header), make(http.Header)) - assert.Empty(t, merged) - }) - - t.Run("empty left", func(t *testing.T) { - left := make(http.Header) - - right := make(http.Header) - right.Set("X-API-Version", "0.0.1") - - merged := MergeHeaders(left, right) - assert.Equal(t, "0.0.1", merged.Get("X-API-Version")) - }) - - t.Run("empty right", func(t *testing.T) { - left := make(http.Header) - left.Set("X-API-Version", "0.0.1") - - right := make(http.Header) - - merged := MergeHeaders(left, right) - assert.Equal(t, "0.0.1", merged.Get("X-API-Version")) - }) - - t.Run("single value override", func(t *testing.T) { - left := make(http.Header) - left.Set("X-API-Version", "0.0.0") - - right := make(http.Header) - right.Set("X-API-Version", "0.0.1") - - merged := MergeHeaders(left, right) - assert.Equal(t, []string{"0.0.1"}, merged.Values("X-API-Version")) - }) - - t.Run("multiple value override", func(t *testing.T) { - left := make(http.Header) - left.Set("X-API-Versions", "0.0.0") - - right := make(http.Header) - right.Add("X-API-Versions", "0.0.1") - right.Add("X-API-Versions", "0.0.2") - - merged := MergeHeaders(left, right) - assert.Equal(t, []string{"0.0.1", "0.0.2"}, merged.Values("X-API-Versions")) - }) - - t.Run("disjoint merge", func(t *testing.T) { - left := make(http.Header) - left.Set("X-API-Tenancy", "test") - - right := make(http.Header) - right.Set("X-API-Version", "0.0.1") - - merged := MergeHeaders(left, right) - assert.Equal(t, []string{"test"}, merged.Values("X-API-Tenancy")) - assert.Equal(t, []string{"0.0.1"}, merged.Values("X-API-Version")) - }) -} - -// newTestServer returns a new *httptest.Server configured with the -// given test parameters. -func newTestServer(t *testing.T, tc *TestCase) *httptest.Server { - return httptest.NewServer( - http.HandlerFunc( - func(w http.ResponseWriter, r *http.Request) { - assert.Equal(t, tc.giveMethod, r.Method) - assert.Equal(t, contentType, r.Header.Get(contentTypeHeader)) - for header, value := range tc.giveHeader { - assert.Equal(t, value, r.Header.Values(header)) - } - - request := new(Request) - - bytes, err := io.ReadAll(r.Body) - if tc.giveRequest == nil { - require.Empty(t, bytes) - w.WriteHeader(http.StatusBadRequest) - _, err = w.Write([]byte("invalid request")) - require.NoError(t, err) - return - } - require.NoError(t, err) - require.NoError(t, json.Unmarshal(bytes, request)) - - switch request.Id { - case strconv.Itoa(http.StatusNotFound): - notFoundError := &NotFoundError{ - APIError: &core.APIError{ - StatusCode: http.StatusNotFound, - }, - Message: fmt.Sprintf("ID %q not found", request.Id), - } - bytes, err = json.Marshal(notFoundError) - require.NoError(t, err) - - w.WriteHeader(http.StatusNotFound) - _, err = w.Write(bytes) - require.NoError(t, err) - return - - case strconv.Itoa(http.StatusInternalServerError): - w.WriteHeader(http.StatusInternalServerError) - _, err = w.Write([]byte("failed to process request")) - require.NoError(t, err) - return - } - - if tc.giveResponseIsOptional { - w.WriteHeader(http.StatusOK) - return - } - - extraBodyProperties := make(map[string]interface{}) - require.NoError(t, json.Unmarshal(bytes, &extraBodyProperties)) - delete(extraBodyProperties, "id") - - response := &Response{ - Id: request.Id, - ExtraBodyProperties: extraBodyProperties, - QueryParameters: r.URL.Query(), - } - bytes, err = json.Marshal(response) - require.NoError(t, err) - - _, err = w.Write(bytes) - require.NoError(t, err) - }, - ), - ) -} - -// newTestErrorDecoder returns an error decoder suitable for tests. -func newTestErrorDecoder(t *testing.T) func(int, io.Reader) error { - return func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - require.NoError(t, err) - - var ( - apiError = core.NewAPIError(statusCode, errors.New(string(raw))) - decoder = json.NewDecoder(bytes.NewReader(raw)) - ) - if statusCode == http.StatusNotFound { - value := new(NotFoundError) - value.APIError = apiError - require.NoError(t, decoder.Decode(value)) - - return value - } - return apiError - } -} diff --git a/seed/go-sdk/inline-types/internal/error_decoder.go b/seed/go-sdk/inline-types/internal/error_decoder.go deleted file mode 100644 index 1321c464c24..00000000000 --- a/seed/go-sdk/inline-types/internal/error_decoder.go +++ /dev/null @@ -1,45 +0,0 @@ -package internal - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - - "github.com/inline-types/fern/core" -) - -// ErrorDecoder decodes *http.Response errors and returns a -// typed API error (e.g. *core.APIError). -type ErrorDecoder func(statusCode int, body io.Reader) error - -// ErrorCodes maps HTTP status codes to error constructors. -type ErrorCodes map[int]func(*core.APIError) error - -// NewErrorDecoder returns a new ErrorDecoder backed by the given error codes. -func NewErrorDecoder(errorCodes ErrorCodes) ErrorDecoder { - return func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - if err != nil { - return fmt.Errorf("failed to read error from response body: %w", err) - } - apiError := core.NewAPIError( - statusCode, - errors.New(string(raw)), - ) - newErrorFunc, ok := errorCodes[statusCode] - if !ok { - // This status code isn't recognized, so we return - // the API error as-is. - return apiError - } - customError := newErrorFunc(apiError) - if err := json.NewDecoder(bytes.NewReader(raw)).Decode(customError); err != nil { - // If we fail to decode the error, we return the - // API error as-is. - return apiError - } - return customError - } -} diff --git a/seed/go-sdk/inline-types/internal/error_decoder_test.go b/seed/go-sdk/inline-types/internal/error_decoder_test.go deleted file mode 100644 index 2bc84bfa21d..00000000000 --- a/seed/go-sdk/inline-types/internal/error_decoder_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package internal - -import ( - "bytes" - "errors" - "net/http" - "testing" - - "github.com/inline-types/fern/core" - "github.com/stretchr/testify/assert" -) - -func TestErrorDecoder(t *testing.T) { - decoder := NewErrorDecoder( - ErrorCodes{ - http.StatusNotFound: func(apiError *core.APIError) error { - return &NotFoundError{APIError: apiError} - }, - }) - - tests := []struct { - description string - giveStatusCode int - giveBody string - wantError error - }{ - { - description: "unrecognized status code", - giveStatusCode: http.StatusInternalServerError, - giveBody: "Internal Server Error", - wantError: core.NewAPIError(http.StatusInternalServerError, errors.New("Internal Server Error")), - }, - { - description: "not found with valid JSON", - giveStatusCode: http.StatusNotFound, - giveBody: `{"message": "Resource not found"}`, - wantError: &NotFoundError{ - APIError: core.NewAPIError(http.StatusNotFound, errors.New(`{"message": "Resource not found"}`)), - Message: "Resource not found", - }, - }, - { - description: "not found with invalid JSON", - giveStatusCode: http.StatusNotFound, - giveBody: `Resource not found`, - wantError: core.NewAPIError(http.StatusNotFound, errors.New("Resource not found")), - }, - } - - for _, tt := range tests { - t.Run(tt.description, func(t *testing.T) { - assert.Equal(t, tt.wantError, decoder(tt.giveStatusCode, bytes.NewReader([]byte(tt.giveBody)))) - }) - } -} diff --git a/seed/go-sdk/inline-types/internal/extra_properties.go b/seed/go-sdk/inline-types/internal/extra_properties.go deleted file mode 100644 index 540c3fd89ee..00000000000 --- a/seed/go-sdk/inline-types/internal/extra_properties.go +++ /dev/null @@ -1,141 +0,0 @@ -package internal - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "strings" -) - -// MarshalJSONWithExtraProperty marshals the given value to JSON, including the extra property. -func MarshalJSONWithExtraProperty(marshaler interface{}, key string, value interface{}) ([]byte, error) { - return MarshalJSONWithExtraProperties(marshaler, map[string]interface{}{key: value}) -} - -// MarshalJSONWithExtraProperties marshals the given value to JSON, including any extra properties. -func MarshalJSONWithExtraProperties(marshaler interface{}, extraProperties map[string]interface{}) ([]byte, error) { - bytes, err := json.Marshal(marshaler) - if err != nil { - return nil, err - } - if len(extraProperties) == 0 { - return bytes, nil - } - keys, err := getKeys(marshaler) - if err != nil { - return nil, err - } - for _, key := range keys { - if _, ok := extraProperties[key]; ok { - return nil, fmt.Errorf("cannot add extra property %q because it is already defined on the type", key) - } - } - extraBytes, err := json.Marshal(extraProperties) - if err != nil { - return nil, err - } - if isEmptyJSON(bytes) { - if isEmptyJSON(extraBytes) { - return bytes, nil - } - return extraBytes, nil - } - result := bytes[:len(bytes)-1] - result = append(result, ',') - result = append(result, extraBytes[1:len(extraBytes)-1]...) - result = append(result, '}') - return result, nil -} - -// ExtractExtraProperties extracts any extra properties from the given value. -func ExtractExtraProperties(bytes []byte, value interface{}, exclude ...string) (map[string]interface{}, error) { - val := reflect.ValueOf(value) - for val.Kind() == reflect.Ptr { - if val.IsNil() { - return nil, fmt.Errorf("value must be non-nil to extract extra properties") - } - val = val.Elem() - } - if err := json.Unmarshal(bytes, &value); err != nil { - return nil, err - } - var extraProperties map[string]interface{} - if err := json.Unmarshal(bytes, &extraProperties); err != nil { - return nil, err - } - for i := 0; i < val.Type().NumField(); i++ { - key := jsonKey(val.Type().Field(i)) - if key == "" || key == "-" { - continue - } - delete(extraProperties, key) - } - for _, key := range exclude { - delete(extraProperties, key) - } - if len(extraProperties) == 0 { - return nil, nil - } - return extraProperties, nil -} - -// getKeys returns the keys associated with the given value. The value must be a -// a struct or a map with string keys. -func getKeys(value interface{}) ([]string, error) { - val := reflect.ValueOf(value) - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - if !val.IsValid() { - return nil, nil - } - switch val.Kind() { - case reflect.Struct: - return getKeysForStructType(val.Type()), nil - case reflect.Map: - var keys []string - if val.Type().Key().Kind() != reflect.String { - return nil, fmt.Errorf("cannot extract keys from %T; only structs and maps with string keys are supported", value) - } - for _, key := range val.MapKeys() { - keys = append(keys, key.String()) - } - return keys, nil - default: - return nil, fmt.Errorf("cannot extract keys from %T; only structs and maps with string keys are supported", value) - } -} - -// getKeysForStructType returns all the keys associated with the given struct type, -// visiting embedded fields recursively. -func getKeysForStructType(structType reflect.Type) []string { - if structType.Kind() == reflect.Pointer { - structType = structType.Elem() - } - if structType.Kind() != reflect.Struct { - return nil - } - var keys []string - for i := 0; i < structType.NumField(); i++ { - field := structType.Field(i) - if field.Anonymous { - keys = append(keys, getKeysForStructType(field.Type)...) - continue - } - keys = append(keys, jsonKey(field)) - } - return keys -} - -// jsonKey returns the JSON key from the struct tag of the given field, -// excluding the omitempty flag (if any). -func jsonKey(field reflect.StructField) string { - return strings.TrimSuffix(field.Tag.Get("json"), ",omitempty") -} - -// isEmptyJSON returns true if the given data is empty, the empty JSON object, or -// an explicit null. -func isEmptyJSON(data []byte) bool { - return len(data) <= 2 || bytes.Equal(data, []byte("null")) -} diff --git a/seed/go-sdk/inline-types/internal/extra_properties_test.go b/seed/go-sdk/inline-types/internal/extra_properties_test.go deleted file mode 100644 index aa2510ee512..00000000000 --- a/seed/go-sdk/inline-types/internal/extra_properties_test.go +++ /dev/null @@ -1,228 +0,0 @@ -package internal - -import ( - "encoding/json" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -type testMarshaler struct { - Name string `json:"name"` - BirthDate time.Time `json:"birthDate"` - CreatedAt time.Time `json:"created_at"` -} - -func (t *testMarshaler) MarshalJSON() ([]byte, error) { - type embed testMarshaler - var marshaler = struct { - embed - BirthDate string `json:"birthDate"` - CreatedAt string `json:"created_at"` - }{ - embed: embed(*t), - BirthDate: t.BirthDate.Format("2006-01-02"), - CreatedAt: t.CreatedAt.Format(time.RFC3339), - } - return MarshalJSONWithExtraProperty(marshaler, "type", "test") -} - -func TestMarshalJSONWithExtraProperties(t *testing.T) { - tests := []struct { - desc string - giveMarshaler interface{} - giveExtraProperties map[string]interface{} - wantBytes []byte - wantError string - }{ - { - desc: "invalid type", - giveMarshaler: []string{"invalid"}, - giveExtraProperties: map[string]interface{}{"key": "overwrite"}, - wantError: `cannot extract keys from []string; only structs and maps with string keys are supported`, - }, - { - desc: "invalid key type", - giveMarshaler: map[int]interface{}{42: "value"}, - giveExtraProperties: map[string]interface{}{"key": "overwrite"}, - wantError: `cannot extract keys from map[int]interface {}; only structs and maps with string keys are supported`, - }, - { - desc: "invalid map overwrite", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{"key": "overwrite"}, - wantError: `cannot add extra property "key" because it is already defined on the type`, - }, - { - desc: "invalid struct overwrite", - giveMarshaler: new(testMarshaler), - giveExtraProperties: map[string]interface{}{"birthDate": "2000-01-01"}, - wantError: `cannot add extra property "birthDate" because it is already defined on the type`, - }, - { - desc: "invalid struct overwrite embedded type", - giveMarshaler: new(testMarshaler), - giveExtraProperties: map[string]interface{}{"name": "bob"}, - wantError: `cannot add extra property "name" because it is already defined on the type`, - }, - { - desc: "nil", - giveMarshaler: nil, - giveExtraProperties: nil, - wantBytes: []byte(`null`), - }, - { - desc: "empty", - giveMarshaler: map[string]interface{}{}, - giveExtraProperties: map[string]interface{}{}, - wantBytes: []byte(`{}`), - }, - { - desc: "no extra properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{}, - wantBytes: []byte(`{"key":"value"}`), - }, - { - desc: "only extra properties", - giveMarshaler: map[string]interface{}{}, - giveExtraProperties: map[string]interface{}{"key": "value"}, - wantBytes: []byte(`{"key":"value"}`), - }, - { - desc: "single extra property", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{"extra": "property"}, - wantBytes: []byte(`{"key":"value","extra":"property"}`), - }, - { - desc: "multiple extra properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{"one": 1, "two": 2}, - wantBytes: []byte(`{"key":"value","one":1,"two":2}`), - }, - { - desc: "nested properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{ - "user": map[string]interface{}{ - "age": 42, - "name": "alice", - }, - }, - wantBytes: []byte(`{"key":"value","user":{"age":42,"name":"alice"}}`), - }, - { - desc: "multiple nested properties", - giveMarshaler: map[string]interface{}{"key": "value"}, - giveExtraProperties: map[string]interface{}{ - "metadata": map[string]interface{}{ - "ip": "127.0.0.1", - }, - "user": map[string]interface{}{ - "age": 42, - "name": "alice", - }, - }, - wantBytes: []byte(`{"key":"value","metadata":{"ip":"127.0.0.1"},"user":{"age":42,"name":"alice"}}`), - }, - { - desc: "custom marshaler", - giveMarshaler: &testMarshaler{ - Name: "alice", - BirthDate: time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC), - CreatedAt: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC), - }, - giveExtraProperties: map[string]interface{}{ - "extra": "property", - }, - wantBytes: []byte(`{"name":"alice","birthDate":"2000-01-01","created_at":"2024-01-01T00:00:00Z","type":"test","extra":"property"}`), - }, - } - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - bytes, err := MarshalJSONWithExtraProperties(tt.giveMarshaler, tt.giveExtraProperties) - if tt.wantError != "" { - require.EqualError(t, err, tt.wantError) - assert.Nil(t, tt.wantBytes) - return - } - require.NoError(t, err) - assert.Equal(t, tt.wantBytes, bytes) - - value := make(map[string]interface{}) - require.NoError(t, json.Unmarshal(bytes, &value)) - }) - } -} - -func TestExtractExtraProperties(t *testing.T) { - t.Run("none", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := &user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice"}`), value) - require.NoError(t, err) - assert.Nil(t, extraProperties) - }) - - t.Run("non-nil pointer", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := &user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - require.NoError(t, err) - assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) - }) - - t.Run("nil pointer", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - var value *user - _, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - assert.EqualError(t, err, "value must be non-nil to extract extra properties") - }) - - t.Run("non-zero value", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - require.NoError(t, err) - assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) - }) - - t.Run("zero value", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - var value user - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) - require.NoError(t, err) - assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) - }) - - t.Run("exclude", func(t *testing.T) { - type user struct { - Name string `json:"name"` - } - value := &user{ - Name: "alice", - } - extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value, "age") - require.NoError(t, err) - assert.Nil(t, extraProperties) - }) -} diff --git a/seed/go-sdk/inline-types/internal/http.go b/seed/go-sdk/inline-types/internal/http.go deleted file mode 100644 index 768968bd621..00000000000 --- a/seed/go-sdk/inline-types/internal/http.go +++ /dev/null @@ -1,48 +0,0 @@ -package internal - -import ( - "fmt" - "net/http" - "net/url" -) - -// HTTPClient is an interface for a subset of the *http.Client. -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -// ResolveBaseURL resolves the base URL from the given arguments, -// preferring the first non-empty value. -func ResolveBaseURL(values ...string) string { - for _, value := range values { - if value != "" { - return value - } - } - return "" -} - -// EncodeURL encodes the given arguments into the URL, escaping -// values as needed. -func EncodeURL(urlFormat string, args ...interface{}) string { - escapedArgs := make([]interface{}, 0, len(args)) - for _, arg := range args { - escapedArgs = append(escapedArgs, url.PathEscape(fmt.Sprintf("%v", arg))) - } - return fmt.Sprintf(urlFormat, escapedArgs...) -} - -// MergeHeaders merges the given headers together, where the right -// takes precedence over the left. -func MergeHeaders(left, right http.Header) http.Header { - for key, values := range right { - if len(values) > 1 { - left[key] = values - continue - } - if value := right.Get(key); value != "" { - left.Set(key, value) - } - } - return left -} diff --git a/seed/go-sdk/inline-types/internal/query.go b/seed/go-sdk/inline-types/internal/query.go deleted file mode 100644 index 6129e71ffe5..00000000000 --- a/seed/go-sdk/inline-types/internal/query.go +++ /dev/null @@ -1,231 +0,0 @@ -package internal - -import ( - "encoding/base64" - "fmt" - "net/url" - "reflect" - "strings" - "time" - - "github.com/google/uuid" -) - -var ( - bytesType = reflect.TypeOf([]byte{}) - queryEncoderType = reflect.TypeOf(new(QueryEncoder)).Elem() - timeType = reflect.TypeOf(time.Time{}) - uuidType = reflect.TypeOf(uuid.UUID{}) -) - -// QueryEncoder is an interface implemented by any type that wishes to encode -// itself into URL values in a non-standard way. -type QueryEncoder interface { - EncodeQueryValues(key string, v *url.Values) error -} - -// QueryValues encodes url.Values from request objects. -// -// Note: This type is inspired by Google's query encoding library, but -// supports far less customization and is tailored to fit this SDK's use case. -// -// Ref: https://github.com/google/go-querystring -func QueryValues(v interface{}) (url.Values, error) { - values := make(url.Values) - val := reflect.ValueOf(v) - for val.Kind() == reflect.Ptr { - if val.IsNil() { - return values, nil - } - val = val.Elem() - } - - if v == nil { - return values, nil - } - - if val.Kind() != reflect.Struct { - return nil, fmt.Errorf("query: Values() expects struct input. Got %v", val.Kind()) - } - - err := reflectValue(values, val, "") - return values, err -} - -// reflectValue populates the values parameter from the struct fields in val. -// Embedded structs are followed recursively (using the rules defined in the -// Values function documentation) breadth-first. -func reflectValue(values url.Values, val reflect.Value, scope string) error { - typ := val.Type() - for i := 0; i < typ.NumField(); i++ { - sf := typ.Field(i) - if sf.PkgPath != "" && !sf.Anonymous { - // Skip unexported fields. - continue - } - - sv := val.Field(i) - tag := sf.Tag.Get("url") - if tag == "" || tag == "-" { - continue - } - - name, opts := parseTag(tag) - if name == "" { - name = sf.Name - } - - if scope != "" { - name = scope + "[" + name + "]" - } - - if opts.Contains("omitempty") && isEmptyValue(sv) { - continue - } - - if sv.Type().Implements(queryEncoderType) { - // If sv is a nil pointer and the custom encoder is defined on a non-pointer - // method receiver, set sv to the zero value of the underlying type - if !reflect.Indirect(sv).IsValid() && sv.Type().Elem().Implements(queryEncoderType) { - sv = reflect.New(sv.Type().Elem()) - } - - m := sv.Interface().(QueryEncoder) - if err := m.EncodeQueryValues(name, &values); err != nil { - return err - } - continue - } - - // Recursively dereference pointers, but stop at nil pointers. - for sv.Kind() == reflect.Ptr { - if sv.IsNil() { - break - } - sv = sv.Elem() - } - - if sv.Type() == uuidType || sv.Type() == bytesType || sv.Type() == timeType { - values.Add(name, valueString(sv, opts, sf)) - continue - } - - if sv.Kind() == reflect.Slice || sv.Kind() == reflect.Array { - if sv.Len() == 0 { - // Skip if slice or array is empty. - continue - } - for i := 0; i < sv.Len(); i++ { - value := sv.Index(i) - if isStructPointer(value) && !value.IsNil() { - if err := reflectValue(values, value.Elem(), name); err != nil { - return err - } - } else { - values.Add(name, valueString(value, opts, sf)) - } - } - continue - } - - if sv.Kind() == reflect.Struct { - if err := reflectValue(values, sv, name); err != nil { - return err - } - continue - } - - values.Add(name, valueString(sv, opts, sf)) - } - - return nil -} - -// valueString returns the string representation of a value. -func valueString(v reflect.Value, opts tagOptions, sf reflect.StructField) string { - for v.Kind() == reflect.Ptr { - if v.IsNil() { - return "" - } - v = v.Elem() - } - - if v.Type() == timeType { - t := v.Interface().(time.Time) - if format := sf.Tag.Get("format"); format == "date" { - return t.Format("2006-01-02") - } - return t.Format(time.RFC3339) - } - - if v.Type() == uuidType { - u := v.Interface().(uuid.UUID) - return u.String() - } - - if v.Type() == bytesType { - b := v.Interface().([]byte) - return base64.StdEncoding.EncodeToString(b) - } - - return fmt.Sprint(v.Interface()) -} - -// isEmptyValue checks if a value should be considered empty for the purposes -// of omitting fields with the "omitempty" option. -func isEmptyValue(v reflect.Value) bool { - type zeroable interface { - IsZero() bool - } - - if !v.IsZero() { - if z, ok := v.Interface().(zeroable); ok { - return z.IsZero() - } - } - - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - case reflect.Invalid, reflect.Complex64, reflect.Complex128, reflect.Chan, reflect.Func, reflect.Struct, reflect.UnsafePointer: - return false - } - - return false -} - -// isStructPointer returns true if the given reflect.Value is a pointer to a struct. -func isStructPointer(v reflect.Value) bool { - return v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Struct -} - -// tagOptions is the string following a comma in a struct field's "url" tag, or -// the empty string. It does not include the leading comma. -type tagOptions []string - -// parseTag splits a struct field's url tag into its name and comma-separated -// options. -func parseTag(tag string) (string, tagOptions) { - s := strings.Split(tag, ",") - return s[0], s[1:] -} - -// Contains checks whether the tagOptions contains the specified option. -func (o tagOptions) Contains(option string) bool { - for _, s := range o { - if s == option { - return true - } - } - return false -} diff --git a/seed/go-sdk/inline-types/internal/query_test.go b/seed/go-sdk/inline-types/internal/query_test.go deleted file mode 100644 index 2e58ccadde1..00000000000 --- a/seed/go-sdk/inline-types/internal/query_test.go +++ /dev/null @@ -1,187 +0,0 @@ -package internal - -import ( - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestQueryValues(t *testing.T) { - t.Run("empty optional", func(t *testing.T) { - type nested struct { - Value *string `json:"value,omitempty" url:"value,omitempty"` - } - type example struct { - Nested *nested `json:"nested,omitempty" url:"nested,omitempty"` - } - - values, err := QueryValues(&example{}) - require.NoError(t, err) - assert.Empty(t, values) - }) - - t.Run("empty required", func(t *testing.T) { - type nested struct { - Value *string `json:"value,omitempty" url:"value,omitempty"` - } - type example struct { - Required string `json:"required" url:"required"` - Nested *nested `json:"nested,omitempty" url:"nested,omitempty"` - } - - values, err := QueryValues(&example{}) - require.NoError(t, err) - assert.Equal(t, "required=", values.Encode()) - }) - - t.Run("allow multiple", func(t *testing.T) { - type example struct { - Values []string `json:"values" url:"values"` - } - - values, err := QueryValues( - &example{ - Values: []string{"foo", "bar", "baz"}, - }, - ) - require.NoError(t, err) - assert.Equal(t, "values=foo&values=bar&values=baz", values.Encode()) - }) - - t.Run("nested object", func(t *testing.T) { - type nested struct { - Value *string `json:"value,omitempty" url:"value,omitempty"` - } - type example struct { - Required string `json:"required" url:"required"` - Nested *nested `json:"nested,omitempty" url:"nested,omitempty"` - } - - nestedValue := "nestedValue" - values, err := QueryValues( - &example{ - Required: "requiredValue", - Nested: &nested{ - Value: &nestedValue, - }, - }, - ) - require.NoError(t, err) - assert.Equal(t, "nested%5Bvalue%5D=nestedValue&required=requiredValue", values.Encode()) - }) - - t.Run("url unspecified", func(t *testing.T) { - type example struct { - Required string `json:"required" url:"required"` - NotFound string `json:"notFound"` - } - - values, err := QueryValues( - &example{ - Required: "requiredValue", - NotFound: "notFound", - }, - ) - require.NoError(t, err) - assert.Equal(t, "required=requiredValue", values.Encode()) - }) - - t.Run("url ignored", func(t *testing.T) { - type example struct { - Required string `json:"required" url:"required"` - NotFound string `json:"notFound" url:"-"` - } - - values, err := QueryValues( - &example{ - Required: "requiredValue", - NotFound: "notFound", - }, - ) - require.NoError(t, err) - assert.Equal(t, "required=requiredValue", values.Encode()) - }) - - t.Run("datetime", func(t *testing.T) { - type example struct { - DateTime time.Time `json:"dateTime" url:"dateTime"` - } - - values, err := QueryValues( - &example{ - DateTime: time.Date(1994, 3, 16, 12, 34, 56, 0, time.UTC), - }, - ) - require.NoError(t, err) - assert.Equal(t, "dateTime=1994-03-16T12%3A34%3A56Z", values.Encode()) - }) - - t.Run("date", func(t *testing.T) { - type example struct { - Date time.Time `json:"date" url:"date" format:"date"` - } - - values, err := QueryValues( - &example{ - Date: time.Date(1994, 3, 16, 12, 34, 56, 0, time.UTC), - }, - ) - require.NoError(t, err) - assert.Equal(t, "date=1994-03-16", values.Encode()) - }) - - t.Run("optional time", func(t *testing.T) { - type example struct { - Date *time.Time `json:"date,omitempty" url:"date,omitempty" format:"date"` - } - - values, err := QueryValues( - &example{}, - ) - require.NoError(t, err) - assert.Empty(t, values.Encode()) - }) - - t.Run("omitempty with non-pointer zero value", func(t *testing.T) { - type enum string - - type example struct { - Enum enum `json:"enum,omitempty" url:"enum,omitempty"` - } - - values, err := QueryValues( - &example{}, - ) - require.NoError(t, err) - assert.Empty(t, values.Encode()) - }) - - t.Run("object array", func(t *testing.T) { - type object struct { - Key string `json:"key" url:"key"` - Value string `json:"value" url:"value"` - } - type example struct { - Objects []*object `json:"objects,omitempty" url:"objects,omitempty"` - } - - values, err := QueryValues( - &example{ - Objects: []*object{ - { - Key: "hello", - Value: "world", - }, - { - Key: "foo", - Value: "bar", - }, - }, - }, - ) - require.NoError(t, err) - assert.Equal(t, "objects%5Bkey%5D=hello&objects%5Bkey%5D=foo&objects%5Bvalue%5D=world&objects%5Bvalue%5D=bar", values.Encode()) - }) -} diff --git a/seed/go-sdk/inline-types/internal/retrier.go b/seed/go-sdk/inline-types/internal/retrier.go deleted file mode 100644 index 6040147154b..00000000000 --- a/seed/go-sdk/inline-types/internal/retrier.go +++ /dev/null @@ -1,165 +0,0 @@ -package internal - -import ( - "crypto/rand" - "math/big" - "net/http" - "time" -) - -const ( - defaultRetryAttempts = 2 - minRetryDelay = 500 * time.Millisecond - maxRetryDelay = 5000 * time.Millisecond -) - -// RetryOption adapts the behavior the *Retrier. -type RetryOption func(*retryOptions) - -// RetryFunc is a retriable HTTP function call (i.e. *http.Client.Do). -type RetryFunc func(*http.Request) (*http.Response, error) - -// WithMaxAttempts configures the maximum number of attempts -// of the *Retrier. -func WithMaxAttempts(attempts uint) RetryOption { - return func(opts *retryOptions) { - opts.attempts = attempts - } -} - -// Retrier retries failed requests a configurable number of times with an -// exponential back-off between each retry. -type Retrier struct { - attempts uint -} - -// NewRetrier constructs a new *Retrier with the given options, if any. -func NewRetrier(opts ...RetryOption) *Retrier { - options := new(retryOptions) - for _, opt := range opts { - opt(options) - } - attempts := uint(defaultRetryAttempts) - if options.attempts > 0 { - attempts = options.attempts - } - return &Retrier{ - attempts: attempts, - } -} - -// Run issues the request and, upon failure, retries the request if possible. -// -// The request will be retried as long as the request is deemed retriable and the -// number of retry attempts has not grown larger than the configured retry limit. -func (r *Retrier) Run( - fn RetryFunc, - request *http.Request, - errorDecoder ErrorDecoder, - opts ...RetryOption, -) (*http.Response, error) { - options := new(retryOptions) - for _, opt := range opts { - opt(options) - } - maxRetryAttempts := r.attempts - if options.attempts > 0 { - maxRetryAttempts = options.attempts - } - var ( - retryAttempt uint - previousError error - ) - return r.run( - fn, - request, - errorDecoder, - maxRetryAttempts, - retryAttempt, - previousError, - ) -} - -func (r *Retrier) run( - fn RetryFunc, - request *http.Request, - errorDecoder ErrorDecoder, - maxRetryAttempts uint, - retryAttempt uint, - previousError error, -) (*http.Response, error) { - if retryAttempt >= maxRetryAttempts { - return nil, previousError - } - - // If the call has been cancelled, don't issue the request. - if err := request.Context().Err(); err != nil { - return nil, err - } - - response, err := fn(request) - if err != nil { - return nil, err - } - - if r.shouldRetry(response) { - defer response.Body.Close() - - delay, err := r.retryDelay(retryAttempt) - if err != nil { - return nil, err - } - - time.Sleep(delay) - - return r.run( - fn, - request, - errorDecoder, - maxRetryAttempts, - retryAttempt+1, - decodeError(response, errorDecoder), - ) - } - - return response, nil -} - -// shouldRetry returns true if the request should be retried based on the given -// response status code. -func (r *Retrier) shouldRetry(response *http.Response) bool { - return response.StatusCode == http.StatusTooManyRequests || - response.StatusCode == http.StatusRequestTimeout || - response.StatusCode >= http.StatusInternalServerError -} - -// retryDelay calculates the delay time in milliseconds based on the retry attempt. -func (r *Retrier) retryDelay(retryAttempt uint) (time.Duration, error) { - // Apply exponential backoff. - delay := minRetryDelay + minRetryDelay*time.Duration(retryAttempt*retryAttempt) - - // Do not allow the number to exceed maxRetryDelay. - if delay > maxRetryDelay { - delay = maxRetryDelay - } - - // Apply some itter by randomizing the value in the range of 75%-100%. - max := big.NewInt(int64(delay / 4)) - jitter, err := rand.Int(rand.Reader, max) - if err != nil { - return 0, err - } - - delay -= time.Duration(jitter.Int64()) - - // Never sleep less than the base sleep seconds. - if delay < minRetryDelay { - delay = minRetryDelay - } - - return delay, nil -} - -type retryOptions struct { - attempts uint -} diff --git a/seed/go-sdk/inline-types/internal/retrier_test.go b/seed/go-sdk/inline-types/internal/retrier_test.go deleted file mode 100644 index 750180114ce..00000000000 --- a/seed/go-sdk/inline-types/internal/retrier_test.go +++ /dev/null @@ -1,211 +0,0 @@ -package internal - -import ( - "context" - "encoding/json" - "io" - "net/http" - "net/http/httptest" - "testing" - "time" - - "github.com/inline-types/fern/core" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -type RetryTestCase struct { - description string - - giveAttempts uint - giveStatusCodes []int - giveResponse *Response - - wantResponse *Response - wantError *core.APIError -} - -func TestRetrier(t *testing.T) { - tests := []*RetryTestCase{ - { - description: "retry request succeeds after multiple failures", - giveAttempts: 3, - giveStatusCodes: []int{ - http.StatusServiceUnavailable, - http.StatusServiceUnavailable, - http.StatusOK, - }, - giveResponse: &Response{ - Id: "1", - }, - wantResponse: &Response{ - Id: "1", - }, - }, - { - description: "retry request fails if MaxAttempts is exceeded", - giveAttempts: 3, - giveStatusCodes: []int{ - http.StatusRequestTimeout, - http.StatusRequestTimeout, - http.StatusRequestTimeout, - http.StatusOK, - }, - wantError: &core.APIError{ - StatusCode: http.StatusRequestTimeout, - }, - }, - { - description: "retry durations increase exponentially and stay within the min and max delay values", - giveAttempts: 4, - giveStatusCodes: []int{ - http.StatusServiceUnavailable, - http.StatusServiceUnavailable, - http.StatusServiceUnavailable, - http.StatusOK, - }, - }, - { - description: "retry does not occur on status code 404", - giveAttempts: 2, - giveStatusCodes: []int{http.StatusNotFound, http.StatusOK}, - wantError: &core.APIError{ - StatusCode: http.StatusNotFound, - }, - }, - { - description: "retries occur on status code 429", - giveAttempts: 2, - giveStatusCodes: []int{http.StatusTooManyRequests, http.StatusOK}, - }, - { - description: "retries occur on status code 408", - giveAttempts: 2, - giveStatusCodes: []int{http.StatusRequestTimeout, http.StatusOK}, - }, - { - description: "retries occur on status code 500", - giveAttempts: 2, - giveStatusCodes: []int{http.StatusInternalServerError, http.StatusOK}, - }, - } - - for _, tc := range tests { - t.Run(tc.description, func(t *testing.T) { - var ( - test = tc - server = newTestRetryServer(t, test) - client = server.Client() - ) - - t.Parallel() - - caller := NewCaller( - &CallerParams{ - Client: client, - }, - ) - - var response *Response - err := caller.Call( - context.Background(), - &CallParams{ - URL: server.URL, - Method: http.MethodGet, - Request: &Request{}, - Response: &response, - MaxAttempts: test.giveAttempts, - ResponseIsOptional: true, - }, - ) - - if test.wantError != nil { - require.IsType(t, err, &core.APIError{}) - expectedErrorCode := test.wantError.StatusCode - actualErrorCode := err.(*core.APIError).StatusCode - assert.Equal(t, expectedErrorCode, actualErrorCode) - return - } - - require.NoError(t, err) - assert.Equal(t, test.wantResponse, response) - }) - } -} - -// newTestRetryServer returns a new *httptest.Server configured with the -// given test parameters, suitable for testing retries. -func newTestRetryServer(t *testing.T, tc *RetryTestCase) *httptest.Server { - var index int - timestamps := make([]time.Time, 0, len(tc.giveStatusCodes)) - - return httptest.NewServer( - http.HandlerFunc( - func(w http.ResponseWriter, r *http.Request) { - timestamps = append(timestamps, time.Now()) - if index > 0 && index < len(expectedRetryDurations) { - // Ensure that the duration between retries increases exponentially, - // and that it is within the minimum and maximum retry delay values. - actualDuration := timestamps[index].Sub(timestamps[index-1]) - expectedDurationMin := expectedRetryDurations[index-1] * 75 / 100 - expectedDurationMax := expectedRetryDurations[index-1] * 125 / 100 - assert.True( - t, - actualDuration >= expectedDurationMin && actualDuration <= expectedDurationMax, - "expected duration to be in range [%v, %v], got %v", - expectedDurationMin, - expectedDurationMax, - actualDuration, - ) - assert.LessOrEqual( - t, - actualDuration, - maxRetryDelay, - "expected duration to be less than the maxRetryDelay (%v), got %v", - maxRetryDelay, - actualDuration, - ) - assert.GreaterOrEqual( - t, - actualDuration, - minRetryDelay, - "expected duration to be greater than the minRetryDelay (%v), got %v", - minRetryDelay, - actualDuration, - ) - } - - request := new(Request) - bytes, err := io.ReadAll(r.Body) - require.NoError(t, err) - require.NoError(t, json.Unmarshal(bytes, request)) - require.LessOrEqual(t, index, len(tc.giveStatusCodes)) - - statusCode := tc.giveStatusCodes[index] - w.WriteHeader(statusCode) - - if tc.giveResponse != nil && statusCode == http.StatusOK { - bytes, err = json.Marshal(tc.giveResponse) - require.NoError(t, err) - _, err = w.Write(bytes) - require.NoError(t, err) - } - - index++ - }, - ), - ) -} - -// expectedRetryDurations holds an array of calculated retry durations, -// where the index of the array should correspond to the retry attempt. -// -// Values are calculated based off of `minRetryDelay + minRetryDelay*i*i`, with -// a max and min value of 5000ms and 500ms respectively. -var expectedRetryDurations = []time.Duration{ - 500 * time.Millisecond, - 1000 * time.Millisecond, - 2500 * time.Millisecond, - 5000 * time.Millisecond, - 5000 * time.Millisecond, -} diff --git a/seed/go-sdk/inline-types/internal/stringer.go b/seed/go-sdk/inline-types/internal/stringer.go deleted file mode 100644 index 312801851e0..00000000000 --- a/seed/go-sdk/inline-types/internal/stringer.go +++ /dev/null @@ -1,13 +0,0 @@ -package internal - -import "encoding/json" - -// StringifyJSON returns a pretty JSON string representation of -// the given value. -func StringifyJSON(value interface{}) (string, error) { - bytes, err := json.MarshalIndent(value, "", " ") - if err != nil { - return "", err - } - return string(bytes), nil -} diff --git a/seed/go-sdk/inline-types/internal/time.go b/seed/go-sdk/inline-types/internal/time.go deleted file mode 100644 index ab0e269fade..00000000000 --- a/seed/go-sdk/inline-types/internal/time.go +++ /dev/null @@ -1,137 +0,0 @@ -package internal - -import ( - "encoding/json" - "time" -) - -const dateFormat = "2006-01-02" - -// DateTime wraps time.Time and adapts its JSON representation -// to conform to a RFC3339 date (e.g. 2006-01-02). -// -// Ref: https://ijmacd.github.io/rfc3339-iso8601 -type Date struct { - t *time.Time -} - -// NewDate returns a new *Date. If the given time.Time -// is nil, nil will be returned. -func NewDate(t time.Time) *Date { - return &Date{t: &t} -} - -// NewOptionalDate returns a new *Date. If the given time.Time -// is nil, nil will be returned. -func NewOptionalDate(t *time.Time) *Date { - if t == nil { - return nil - } - return &Date{t: t} -} - -// Time returns the Date's underlying time, if any. If the -// date is nil, the zero value is returned. -func (d *Date) Time() time.Time { - if d == nil || d.t == nil { - return time.Time{} - } - return *d.t -} - -// TimePtr returns a pointer to the Date's underlying time.Time, if any. -func (d *Date) TimePtr() *time.Time { - if d == nil || d.t == nil { - return nil - } - if d.t.IsZero() { - return nil - } - return d.t -} - -func (d *Date) MarshalJSON() ([]byte, error) { - if d == nil || d.t == nil { - return nil, nil - } - return json.Marshal(d.t.Format(dateFormat)) -} - -func (d *Date) UnmarshalJSON(data []byte) error { - var raw string - if err := json.Unmarshal(data, &raw); err != nil { - return err - } - - parsedTime, err := time.Parse(dateFormat, raw) - if err != nil { - return err - } - - *d = Date{t: &parsedTime} - return nil -} - -// DateTime wraps time.Time and adapts its JSON representation -// to conform to a RFC3339 date-time (e.g. 2017-07-21T17:32:28Z). -// -// Ref: https://ijmacd.github.io/rfc3339-iso8601 -type DateTime struct { - t *time.Time -} - -// NewDateTime returns a new *DateTime. -func NewDateTime(t time.Time) *DateTime { - return &DateTime{t: &t} -} - -// NewOptionalDateTime returns a new *DateTime. If the given time.Time -// is nil, nil will be returned. -func NewOptionalDateTime(t *time.Time) *DateTime { - if t == nil { - return nil - } - return &DateTime{t: t} -} - -// Time returns the DateTime's underlying time, if any. If the -// date-time is nil, the zero value is returned. -func (d *DateTime) Time() time.Time { - if d == nil || d.t == nil { - return time.Time{} - } - return *d.t -} - -// TimePtr returns a pointer to the DateTime's underlying time.Time, if any. -func (d *DateTime) TimePtr() *time.Time { - if d == nil || d.t == nil { - return nil - } - if d.t.IsZero() { - return nil - } - return d.t -} - -func (d *DateTime) MarshalJSON() ([]byte, error) { - if d == nil || d.t == nil { - return nil, nil - } - return json.Marshal(d.t.Format(time.RFC3339)) -} - -func (d *DateTime) UnmarshalJSON(data []byte) error { - var raw string - if err := json.Unmarshal(data, &raw); err != nil { - return err - } - - parsedTime, err := time.Parse(time.RFC3339, raw) - if err != nil { - return err - } - - *d = DateTime{t: &parsedTime} - return nil -} diff --git a/seed/go-sdk/inline-types/option/request_option.go b/seed/go-sdk/inline-types/option/request_option.go deleted file mode 100644 index b9c9cd68f5e..00000000000 --- a/seed/go-sdk/inline-types/option/request_option.go +++ /dev/null @@ -1,64 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package option - -import ( - core "github.com/inline-types/fern/core" - http "net/http" - url "net/url" -) - -// RequestOption adapts the behavior of an indivdual request. -type RequestOption = core.RequestOption - -// WithBaseURL sets the base URL, overriding the default -// environment, if any. -func WithBaseURL(baseURL string) *core.BaseURLOption { - return &core.BaseURLOption{ - BaseURL: baseURL, - } -} - -// WithHTTPClient uses the given HTTPClient to issue the request. -func WithHTTPClient(httpClient core.HTTPClient) *core.HTTPClientOption { - return &core.HTTPClientOption{ - HTTPClient: httpClient, - } -} - -// WithHTTPHeader adds the given http.Header to the request. -func WithHTTPHeader(httpHeader http.Header) *core.HTTPHeaderOption { - return &core.HTTPHeaderOption{ - // Clone the headers so they can't be modified after the option call. - HTTPHeader: httpHeader.Clone(), - } -} - -// WithBodyProperties adds the given body properties to the request. -func WithBodyProperties(bodyProperties map[string]interface{}) *core.BodyPropertiesOption { - copiedBodyProperties := make(map[string]interface{}, len(bodyProperties)) - for key, value := range bodyProperties { - copiedBodyProperties[key] = value - } - return &core.BodyPropertiesOption{ - BodyProperties: copiedBodyProperties, - } -} - -// WithQueryParameters adds the given query parameters to the request. -func WithQueryParameters(queryParameters url.Values) *core.QueryParametersOption { - copiedQueryParameters := make(url.Values, len(queryParameters)) - for key, values := range queryParameters { - copiedQueryParameters[key] = values - } - return &core.QueryParametersOption{ - QueryParameters: copiedQueryParameters, - } -} - -// WithMaxAttempts configures the maximum number of retry attempts. -func WithMaxAttempts(attempts uint) *core.MaxAttemptsOption { - return &core.MaxAttemptsOption{ - MaxAttempts: attempts, - } -} diff --git a/seed/go-sdk/inline-types/pointer.go b/seed/go-sdk/inline-types/pointer.go deleted file mode 100644 index d7fa5bf11bb..00000000000 --- a/seed/go-sdk/inline-types/pointer.go +++ /dev/null @@ -1,132 +0,0 @@ -package object - -import ( - "time" - - "github.com/google/uuid" -) - -// Bool returns a pointer to the given bool value. -func Bool(b bool) *bool { - return &b -} - -// Byte returns a pointer to the given byte value. -func Byte(b byte) *byte { - return &b -} - -// Complex64 returns a pointer to the given complex64 value. -func Complex64(c complex64) *complex64 { - return &c -} - -// Complex128 returns a pointer to the given complex128 value. -func Complex128(c complex128) *complex128 { - return &c -} - -// Float32 returns a pointer to the given float32 value. -func Float32(f float32) *float32 { - return &f -} - -// Float64 returns a pointer to the given float64 value. -func Float64(f float64) *float64 { - return &f -} - -// Int returns a pointer to the given int value. -func Int(i int) *int { - return &i -} - -// Int8 returns a pointer to the given int8 value. -func Int8(i int8) *int8 { - return &i -} - -// Int16 returns a pointer to the given int16 value. -func Int16(i int16) *int16 { - return &i -} - -// Int32 returns a pointer to the given int32 value. -func Int32(i int32) *int32 { - return &i -} - -// Int64 returns a pointer to the given int64 value. -func Int64(i int64) *int64 { - return &i -} - -// Rune returns a pointer to the given rune value. -func Rune(r rune) *rune { - return &r -} - -// String returns a pointer to the given string value. -func String(s string) *string { - return &s -} - -// Uint returns a pointer to the given uint value. -func Uint(u uint) *uint { - return &u -} - -// Uint8 returns a pointer to the given uint8 value. -func Uint8(u uint8) *uint8 { - return &u -} - -// Uint16 returns a pointer to the given uint16 value. -func Uint16(u uint16) *uint16 { - return &u -} - -// Uint32 returns a pointer to the given uint32 value. -func Uint32(u uint32) *uint32 { - return &u -} - -// Uint64 returns a pointer to the given uint64 value. -func Uint64(u uint64) *uint64 { - return &u -} - -// Uintptr returns a pointer to the given uintptr value. -func Uintptr(u uintptr) *uintptr { - return &u -} - -// UUID returns a pointer to the given uuid.UUID value. -func UUID(u uuid.UUID) *uuid.UUID { - return &u -} - -// Time returns a pointer to the given time.Time value. -func Time(t time.Time) *time.Time { - return &t -} - -// MustParseDate attempts to parse the given string as a -// date time.Time, and panics upon failure. -func MustParseDate(date string) time.Time { - t, err := time.Parse("2006-01-02", date) - if err != nil { - panic(err) - } - return t -} - -// MustParseDateTime attempts to parse the given string as a -// datetime time.Time, and panics upon failure. -func MustParseDateTime(datetime string) time.Time { - t, err := time.Parse(time.RFC3339, datetime) - if err != nil { - panic(err) - } - return t -} diff --git a/seed/go-sdk/inline-types/snippet-templates.json b/seed/go-sdk/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/go-sdk/inline-types/snippet.json b/seed/go-sdk/inline-types/snippet.json deleted file mode 100644 index a8b1cd64cf3..00000000000 --- a/seed/go-sdk/inline-types/snippet.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "endpoints": [ - { - "id": { - "path": "/root/root", - "method": "POST", - "identifier_override": "endpoint_.getRoot" - }, - "snippet": { - "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/inline-types/fern\"\n\tfernclient \"github.com/inline-types/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.GetRoot(\n\tcontext.TODO(),\n\t\u0026fern.PostRootRequest{\n\t\tBar: \u0026fern.InlineType1{\n\t\t\tFoo: \"foo\",\n\t\t\tBar: \u0026fern.NestedInlineType1{\n\t\t\t\tFoo: \"foo\",\n\t\t\t\tBar: \"bar\",\n\t\t\t\tMyEnum: fern.InlineEnumSunny,\n\t\t\t},\n\t\t},\n\t\tFoo: \"foo\",\n\t},\n)\n" - } - } - ] -} \ No newline at end of file diff --git a/seed/go-sdk/inline-types/types.go b/seed/go-sdk/inline-types/types.go deleted file mode 100644 index e5314b8bcc1..00000000000 --- a/seed/go-sdk/inline-types/types.go +++ /dev/null @@ -1,418 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package object - -import ( - json "encoding/json" - fmt "fmt" - internal "github.com/inline-types/fern/internal" -) - -type PostRootRequest struct { - Bar *InlineType1 `json:"bar,omitempty" url:"-"` - Foo string `json:"foo" url:"-"` -} - -type InlineEnum string - -const ( - InlineEnumSunny InlineEnum = "SUNNY" - InlineEnumCloudy InlineEnum = "CLOUDY" - InlineEnumRaining InlineEnum = "RAINING" - InlineEnumSnowing InlineEnum = "SNOWING" -) - -func NewInlineEnumFromString(s string) (InlineEnum, error) { - switch s { - case "SUNNY": - return InlineEnumSunny, nil - case "CLOUDY": - return InlineEnumCloudy, nil - case "RAINING": - return InlineEnumRaining, nil - case "SNOWING": - return InlineEnumSnowing, nil - } - var t InlineEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i InlineEnum) Ptr() *InlineEnum { - return &i -} - -type InlineType1 struct { - Foo string `json:"foo" url:"foo"` - Bar *NestedInlineType1 `json:"bar,omitempty" url:"bar,omitempty"` - - extraProperties map[string]interface{} - rawJSON json.RawMessage -} - -func (i *InlineType1) GetFoo() string { - if i == nil { - return "" - } - return i.Foo -} - -func (i *InlineType1) GetBar() *NestedInlineType1 { - if i == nil { - return nil - } - return i.Bar -} - -func (i *InlineType1) GetExtraProperties() map[string]interface{} { - return i.extraProperties -} - -func (i *InlineType1) UnmarshalJSON(data []byte) error { - type unmarshaler InlineType1 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = InlineType1(value) - extraProperties, err := internal.ExtractExtraProperties(data, *i) - if err != nil { - return err - } - i.extraProperties = extraProperties - i.rawJSON = json.RawMessage(data) - return nil -} - -func (i *InlineType1) String() string { - if len(i.rawJSON) > 0 { - if value, err := internal.StringifyJSON(i.rawJSON); err == nil { - return value - } - } - if value, err := internal.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type InlineType2 struct { - Baz string `json:"baz" url:"baz"` - - extraProperties map[string]interface{} - rawJSON json.RawMessage -} - -func (i *InlineType2) GetBaz() string { - if i == nil { - return "" - } - return i.Baz -} - -func (i *InlineType2) GetExtraProperties() map[string]interface{} { - return i.extraProperties -} - -func (i *InlineType2) UnmarshalJSON(data []byte) error { - type unmarshaler InlineType2 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = InlineType2(value) - extraProperties, err := internal.ExtractExtraProperties(data, *i) - if err != nil { - return err - } - i.extraProperties = extraProperties - i.rawJSON = json.RawMessage(data) - return nil -} - -func (i *InlineType2) String() string { - if len(i.rawJSON) > 0 { - if value, err := internal.StringifyJSON(i.rawJSON); err == nil { - return value - } - } - if value, err := internal.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type InlinedDiscriminatedUnion1 struct { - Type string - Type1 *InlineType1 - Type2 *InlineType2 -} - -func NewInlinedDiscriminatedUnion1FromType1(value *InlineType1) *InlinedDiscriminatedUnion1 { - return &InlinedDiscriminatedUnion1{Type: "type1", Type1: value} -} - -func NewInlinedDiscriminatedUnion1FromType2(value *InlineType2) *InlinedDiscriminatedUnion1 { - return &InlinedDiscriminatedUnion1{Type: "type2", Type2: value} -} - -func (i *InlinedDiscriminatedUnion1) GetType() string { - if i == nil { - return "" - } - return i.Type -} - -func (i *InlinedDiscriminatedUnion1) GetType1() *InlineType1 { - if i == nil { - return nil - } - return i.Type1 -} - -func (i *InlinedDiscriminatedUnion1) GetType2() *InlineType2 { - if i == nil { - return nil - } - return i.Type2 -} - -func (i *InlinedDiscriminatedUnion1) UnmarshalJSON(data []byte) error { - var unmarshaler struct { - Type string `json:"type"` - } - if err := json.Unmarshal(data, &unmarshaler); err != nil { - return err - } - i.Type = unmarshaler.Type - if unmarshaler.Type == "" { - return fmt.Errorf("%T did not include discriminant type", i) - } - switch unmarshaler.Type { - case "type1": - value := new(InlineType1) - if err := json.Unmarshal(data, &value); err != nil { - return err - } - i.Type1 = value - case "type2": - value := new(InlineType2) - if err := json.Unmarshal(data, &value); err != nil { - return err - } - i.Type2 = value - } - return nil -} - -func (i InlinedDiscriminatedUnion1) MarshalJSON() ([]byte, error) { - switch i.Type { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.Type, i) - case "type1": - return internal.MarshalJSONWithExtraProperty(i.Type1, "type", "type1") - case "type2": - return internal.MarshalJSONWithExtraProperty(i.Type2, "type", "type2") - } -} - -type InlinedDiscriminatedUnion1Visitor interface { - VisitType1(*InlineType1) error - VisitType2(*InlineType2) error -} - -func (i *InlinedDiscriminatedUnion1) Accept(visitor InlinedDiscriminatedUnion1Visitor) error { - switch i.Type { - default: - return fmt.Errorf("invalid type %s in %T", i.Type, i) - case "type1": - return visitor.VisitType1(i.Type1) - case "type2": - return visitor.VisitType2(i.Type2) - } -} - -type InlinedUndiscriminatedUnion1 struct { - InlineType1 *InlineType1 - InlineType2 *InlineType2 - - typ string -} - -func NewInlinedUndiscriminatedUnion1FromInlineType1(value *InlineType1) *InlinedUndiscriminatedUnion1 { - return &InlinedUndiscriminatedUnion1{typ: "InlineType1", InlineType1: value} -} - -func NewInlinedUndiscriminatedUnion1FromInlineType2(value *InlineType2) *InlinedUndiscriminatedUnion1 { - return &InlinedUndiscriminatedUnion1{typ: "InlineType2", InlineType2: value} -} - -func (i *InlinedUndiscriminatedUnion1) GetInlineType1() *InlineType1 { - if i == nil { - return nil - } - return i.InlineType1 -} - -func (i *InlinedUndiscriminatedUnion1) GetInlineType2() *InlineType2 { - if i == nil { - return nil - } - return i.InlineType2 -} - -func (i *InlinedUndiscriminatedUnion1) UnmarshalJSON(data []byte) error { - valueInlineType1 := new(InlineType1) - if err := json.Unmarshal(data, &valueInlineType1); err == nil { - i.typ = "InlineType1" - i.InlineType1 = valueInlineType1 - return nil - } - valueInlineType2 := new(InlineType2) - if err := json.Unmarshal(data, &valueInlineType2); err == nil { - i.typ = "InlineType2" - i.InlineType2 = valueInlineType2 - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i InlinedUndiscriminatedUnion1) MarshalJSON() ([]byte, error) { - if i.typ == "InlineType1" || i.InlineType1 != nil { - return json.Marshal(i.InlineType1) - } - if i.typ == "InlineType2" || i.InlineType2 != nil { - return json.Marshal(i.InlineType2) - } - return nil, fmt.Errorf("type %T does not include a non-empty union type", i) -} - -type InlinedUndiscriminatedUnion1Visitor interface { - VisitInlineType1(*InlineType1) error - VisitInlineType2(*InlineType2) error -} - -func (i *InlinedUndiscriminatedUnion1) Accept(visitor InlinedUndiscriminatedUnion1Visitor) error { - if i.typ == "InlineType1" || i.InlineType1 != nil { - return visitor.VisitInlineType1(i.InlineType1) - } - if i.typ == "InlineType2" || i.InlineType2 != nil { - return visitor.VisitInlineType2(i.InlineType2) - } - return fmt.Errorf("type %T does not include a non-empty union type", i) -} - -type NestedInlineType1 struct { - Foo string `json:"foo" url:"foo"` - Bar string `json:"bar" url:"bar"` - MyEnum InlineEnum `json:"myEnum" url:"myEnum"` - - extraProperties map[string]interface{} - rawJSON json.RawMessage -} - -func (n *NestedInlineType1) GetFoo() string { - if n == nil { - return "" - } - return n.Foo -} - -func (n *NestedInlineType1) GetBar() string { - if n == nil { - return "" - } - return n.Bar -} - -func (n *NestedInlineType1) GetMyEnum() InlineEnum { - if n == nil { - return "" - } - return n.MyEnum -} - -func (n *NestedInlineType1) GetExtraProperties() map[string]interface{} { - return n.extraProperties -} - -func (n *NestedInlineType1) UnmarshalJSON(data []byte) error { - type unmarshaler NestedInlineType1 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *n = NestedInlineType1(value) - extraProperties, err := internal.ExtractExtraProperties(data, *n) - if err != nil { - return err - } - n.extraProperties = extraProperties - n.rawJSON = json.RawMessage(data) - return nil -} - -func (n *NestedInlineType1) String() string { - if len(n.rawJSON) > 0 { - if value, err := internal.StringifyJSON(n.rawJSON); err == nil { - return value - } - } - if value, err := internal.StringifyJSON(n); err == nil { - return value - } - return fmt.Sprintf("%#v", n) -} - -type RootType1 struct { - Foo string `json:"foo" url:"foo"` - Bar *InlineType1 `json:"bar,omitempty" url:"bar,omitempty"` - - extraProperties map[string]interface{} - rawJSON json.RawMessage -} - -func (r *RootType1) GetFoo() string { - if r == nil { - return "" - } - return r.Foo -} - -func (r *RootType1) GetBar() *InlineType1 { - if r == nil { - return nil - } - return r.Bar -} - -func (r *RootType1) GetExtraProperties() map[string]interface{} { - return r.extraProperties -} - -func (r *RootType1) UnmarshalJSON(data []byte) error { - type unmarshaler RootType1 - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = RootType1(value) - extraProperties, err := internal.ExtractExtraProperties(data, *r) - if err != nil { - return err - } - r.extraProperties = extraProperties - r.rawJSON = json.RawMessage(data) - return nil -} - -func (r *RootType1) String() string { - if len(r.rawJSON) > 0 { - if value, err := internal.StringifyJSON(r.rawJSON); err == nil { - return value - } - } - if value, err := internal.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} diff --git a/seed/go-sdk/license/core/request_option.go b/seed/go-sdk/license/core/request_option.go index b6de5a1efe3..4509a930261 100644 --- a/seed/go-sdk/license/core/request_option.go +++ b/seed/go-sdk/license/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/license/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/license/fern/0.0.1") return headers } diff --git a/seed/go-sdk/literal/core/request_option.go b/seed/go-sdk/literal/core/request_option.go index 321ebb0f8ad..75014f0c1da 100644 --- a/seed/go-sdk/literal/core/request_option.go +++ b/seed/go-sdk/literal/core/request_option.go @@ -56,6 +56,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/literal/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/literal/fern/0.0.1") return headers } diff --git a/seed/go-sdk/mixed-case/core/request_option.go b/seed/go-sdk/mixed-case/core/request_option.go index b8132f77f38..f06d16349be 100644 --- a/seed/go-sdk/mixed-case/core/request_option.go +++ b/seed/go-sdk/mixed-case/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/mixed-case/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/mixed-case/fern/0.0.1") return headers } diff --git a/seed/go-sdk/mixed-file-directory/core/request_option.go b/seed/go-sdk/mixed-file-directory/core/request_option.go index 9f996795ec1..cb066639289 100644 --- a/seed/go-sdk/mixed-file-directory/core/request_option.go +++ b/seed/go-sdk/mixed-file-directory/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/mixed-file-directory/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/mixed-file-directory/fern/0.0.1") return headers } diff --git a/seed/go-sdk/multi-line-docs/core/request_option.go b/seed/go-sdk/multi-line-docs/core/request_option.go index 9246b0ecee2..5fb32194782 100644 --- a/seed/go-sdk/multi-line-docs/core/request_option.go +++ b/seed/go-sdk/multi-line-docs/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/multi-line-docs/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/multi-line-docs/fern/0.0.1") return headers } diff --git a/seed/go-sdk/multi-url-environment-no-default/core/request_option.go b/seed/go-sdk/multi-url-environment-no-default/core/request_option.go index ea71e7806e4..2d24ab71723 100644 --- a/seed/go-sdk/multi-url-environment-no-default/core/request_option.go +++ b/seed/go-sdk/multi-url-environment-no-default/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/multi-url-environment-no-default/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/multi-url-environment-no-default/fern/0.0.1") return headers } diff --git a/seed/go-sdk/multi-url-environment/core/request_option.go b/seed/go-sdk/multi-url-environment/core/request_option.go index 0d8db8d66b4..18fd3766b03 100644 --- a/seed/go-sdk/multi-url-environment/core/request_option.go +++ b/seed/go-sdk/multi-url-environment/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/multi-url-environment/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/multi-url-environment/fern/0.0.1") return headers } diff --git a/seed/go-sdk/no-environment/core/request_option.go b/seed/go-sdk/no-environment/core/request_option.go index 8e5b244c879..58252ccb30b 100644 --- a/seed/go-sdk/no-environment/core/request_option.go +++ b/seed/go-sdk/no-environment/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/no-environment/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/no-environment/fern/0.0.1") return headers } diff --git a/seed/go-sdk/oauth-client-credentials-default/core/request_option.go b/seed/go-sdk/oauth-client-credentials-default/core/request_option.go index fb29077d900..e05cfc3f932 100644 --- a/seed/go-sdk/oauth-client-credentials-default/core/request_option.go +++ b/seed/go-sdk/oauth-client-credentials-default/core/request_option.go @@ -53,6 +53,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/oauth-client-credentials-default/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/oauth-client-credentials-default/fern/0.0.1") return headers } diff --git a/seed/go-sdk/oauth-client-credentials-environment-variables/core/request_option.go b/seed/go-sdk/oauth-client-credentials-environment-variables/core/request_option.go index a194857fe0f..8e895acb657 100644 --- a/seed/go-sdk/oauth-client-credentials-environment-variables/core/request_option.go +++ b/seed/go-sdk/oauth-client-credentials-environment-variables/core/request_option.go @@ -53,6 +53,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/oauth-client-credentials-environment-variables/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/oauth-client-credentials-environment-variables/fern/0.0.1") return headers } diff --git a/seed/go-sdk/oauth-client-credentials-nested-root/core/request_option.go b/seed/go-sdk/oauth-client-credentials-nested-root/core/request_option.go index 43ac86d1357..d58d26224a1 100644 --- a/seed/go-sdk/oauth-client-credentials-nested-root/core/request_option.go +++ b/seed/go-sdk/oauth-client-credentials-nested-root/core/request_option.go @@ -53,6 +53,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/oauth-client-credentials-nested-root/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/oauth-client-credentials-nested-root/fern/0.0.1") return headers } diff --git a/seed/go-sdk/oauth-client-credentials/core/request_option.go b/seed/go-sdk/oauth-client-credentials/core/request_option.go index 54adc753862..5cdc67a4f04 100644 --- a/seed/go-sdk/oauth-client-credentials/core/request_option.go +++ b/seed/go-sdk/oauth-client-credentials/core/request_option.go @@ -53,6 +53,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/oauth-client-credentials/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/oauth-client-credentials/fern/0.0.1") return headers } diff --git a/seed/go-sdk/object/core/request_option.go b/seed/go-sdk/object/core/request_option.go index 763acd656e6..7adf23f1d07 100644 --- a/seed/go-sdk/object/core/request_option.go +++ b/seed/go-sdk/object/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/object/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/object/fern/0.0.1") return headers } diff --git a/seed/go-sdk/objects-with-imports/core/request_option.go b/seed/go-sdk/objects-with-imports/core/request_option.go index 203f69eaa90..bbb888f09c8 100644 --- a/seed/go-sdk/objects-with-imports/core/request_option.go +++ b/seed/go-sdk/objects-with-imports/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/objects-with-imports/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/objects-with-imports/fern/0.0.1") return headers } diff --git a/seed/go-sdk/optional/core/request_option.go b/seed/go-sdk/optional/core/request_option.go index 27f691e8c80..77e10813ac2 100644 --- a/seed/go-sdk/optional/core/request_option.go +++ b/seed/go-sdk/optional/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/optional/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/optional/fern/0.0.1") return headers } diff --git a/seed/go-sdk/package-yml/core/request_option.go b/seed/go-sdk/package-yml/core/request_option.go index 394045cc9a5..2a380515b18 100644 --- a/seed/go-sdk/package-yml/core/request_option.go +++ b/seed/go-sdk/package-yml/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/package-yml/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/package-yml/fern/0.0.1") return headers } diff --git a/seed/go-sdk/pagination/core/request_option.go b/seed/go-sdk/pagination/core/request_option.go index 17315669f66..0b4b08aa39c 100644 --- a/seed/go-sdk/pagination/core/request_option.go +++ b/seed/go-sdk/pagination/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/pagination/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/pagination/fern/0.0.1") return headers } diff --git a/seed/go-sdk/path-parameters/inline-path-parameters/core/request_option.go b/seed/go-sdk/path-parameters/inline-path-parameters/core/request_option.go index 5fc38db10e3..7ddb0dc4183 100644 --- a/seed/go-sdk/path-parameters/inline-path-parameters/core/request_option.go +++ b/seed/go-sdk/path-parameters/inline-path-parameters/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/fern-api/path-parameters-go") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/path-parameters/fern/0.0.1") return headers } diff --git a/seed/go-sdk/path-parameters/no-custom-config/core/request_option.go b/seed/go-sdk/path-parameters/no-custom-config/core/request_option.go index ab1af856a9b..b02eb499317 100644 --- a/seed/go-sdk/path-parameters/no-custom-config/core/request_option.go +++ b/seed/go-sdk/path-parameters/no-custom-config/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/path-parameters/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/path-parameters/fern/0.0.1") return headers } diff --git a/seed/go-sdk/plain-text/core/request_option.go b/seed/go-sdk/plain-text/core/request_option.go index f34284d3db2..5e7375a78ef 100644 --- a/seed/go-sdk/plain-text/core/request_option.go +++ b/seed/go-sdk/plain-text/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/plain-text/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/plain-text/fern/0.0.1") return headers } diff --git a/seed/go-sdk/query-parameters/core/request_option.go b/seed/go-sdk/query-parameters/core/request_option.go index 9391c6bf8b4..c9842fdd0e4 100644 --- a/seed/go-sdk/query-parameters/core/request_option.go +++ b/seed/go-sdk/query-parameters/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/query-parameters/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/query-parameters/fern/0.0.1") return headers } diff --git a/seed/go-sdk/response-property/core/request_option.go b/seed/go-sdk/response-property/core/request_option.go index 5175397ef38..2fa492c28c1 100644 --- a/seed/go-sdk/response-property/core/request_option.go +++ b/seed/go-sdk/response-property/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/response-property/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/response-property/fern/0.0.1") return headers } diff --git a/seed/go-sdk/server-sent-event-examples/core/request_option.go b/seed/go-sdk/server-sent-event-examples/core/request_option.go index 69ff2743ba5..01449ec43cd 100644 --- a/seed/go-sdk/server-sent-event-examples/core/request_option.go +++ b/seed/go-sdk/server-sent-event-examples/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/server-sent-event-examples/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/server-sent-event-examples/fern/0.0.1") return headers } diff --git a/seed/go-sdk/server-sent-events/core/request_option.go b/seed/go-sdk/server-sent-events/core/request_option.go index c25ed836172..cc08bd65011 100644 --- a/seed/go-sdk/server-sent-events/core/request_option.go +++ b/seed/go-sdk/server-sent-events/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/server-sent-events/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/server-sent-events/fern/0.0.1") return headers } diff --git a/seed/go-sdk/simple-fhir/core/request_option.go b/seed/go-sdk/simple-fhir/core/request_option.go index c2ff1611170..2c8b4389e41 100644 --- a/seed/go-sdk/simple-fhir/core/request_option.go +++ b/seed/go-sdk/simple-fhir/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/simple-fhir/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/simple-fhir/fern/0.0.1") return headers } diff --git a/seed/go-sdk/single-url-environment-default/core/request_option.go b/seed/go-sdk/single-url-environment-default/core/request_option.go index 5c2eecd5f5e..7cc35f36d65 100644 --- a/seed/go-sdk/single-url-environment-default/core/request_option.go +++ b/seed/go-sdk/single-url-environment-default/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/single-url-environment-default/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/single-url-environment-default/fern/0.0.1") return headers } diff --git a/seed/go-sdk/single-url-environment-no-default/core/request_option.go b/seed/go-sdk/single-url-environment-no-default/core/request_option.go index d46bb6ae149..a00cd9dc3fd 100644 --- a/seed/go-sdk/single-url-environment-no-default/core/request_option.go +++ b/seed/go-sdk/single-url-environment-no-default/core/request_option.go @@ -57,6 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/single-url-environment-no-default/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/single-url-environment-no-default/fern/0.0.1") return headers } diff --git a/seed/go-sdk/streaming/core/request_option.go b/seed/go-sdk/streaming/core/request_option.go index 2404f5dcf51..119a0f2ae71 100644 --- a/seed/go-sdk/streaming/core/request_option.go +++ b/seed/go-sdk/streaming/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/fern-api/stream-go/v2") headers.Set("X-Fern-SDK-Version", "v2.0.0") + headers.Set("User-Agent", "github.com/streaming/fern/v2.0.0") return headers } diff --git a/seed/go-sdk/undiscriminated-unions/core/request_option.go b/seed/go-sdk/undiscriminated-unions/core/request_option.go index 4b202f7fa14..04249d20226 100644 --- a/seed/go-sdk/undiscriminated-unions/core/request_option.go +++ b/seed/go-sdk/undiscriminated-unions/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/fern-api/undiscriminated-go") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/undiscriminated-unions/fern/0.0.1") return headers } diff --git a/seed/go-sdk/unions/core/request_option.go b/seed/go-sdk/unions/core/request_option.go index 8c16a46b060..0efb704a782 100644 --- a/seed/go-sdk/unions/core/request_option.go +++ b/seed/go-sdk/unions/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/fern-api/unions-go") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/unions/fern/0.0.1") return headers } diff --git a/seed/go-sdk/unknown/core/request_option.go b/seed/go-sdk/unknown/core/request_option.go index 3c4935033b3..b6da5e71698 100644 --- a/seed/go-sdk/unknown/core/request_option.go +++ b/seed/go-sdk/unknown/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/unknown/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/unknown/fern/0.0.1") return headers } diff --git a/seed/go-sdk/validation/core/request_option.go b/seed/go-sdk/validation/core/request_option.go index 4112abe890a..443497494d1 100644 --- a/seed/go-sdk/validation/core/request_option.go +++ b/seed/go-sdk/validation/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/validation/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/validation/fern/0.0.1") return headers } diff --git a/seed/go-sdk/variables/core/request_option.go b/seed/go-sdk/variables/core/request_option.go index 53188b10962..694cb4dad4c 100644 --- a/seed/go-sdk/variables/core/request_option.go +++ b/seed/go-sdk/variables/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/variables/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/variables/fern/0.0.1") return headers } diff --git a/seed/go-sdk/version-no-default/core/request_option.go b/seed/go-sdk/version-no-default/core/request_option.go index 52d50daffb4..877e9f214b5 100644 --- a/seed/go-sdk/version-no-default/core/request_option.go +++ b/seed/go-sdk/version-no-default/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/version-no-default/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/version-no-default/fern/0.0.1") return headers } diff --git a/seed/go-sdk/version/core/request_option.go b/seed/go-sdk/version/core/request_option.go index 9d5ae8880a2..bd69e5b7c75 100644 --- a/seed/go-sdk/version/core/request_option.go +++ b/seed/go-sdk/version/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/version/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/version/fern/0.0.1") return headers } diff --git a/seed/go-sdk/websocket/core/request_option.go b/seed/go-sdk/websocket/core/request_option.go index aa0f8a3dfbd..deab8cdcb8b 100644 --- a/seed/go-sdk/websocket/core/request_option.go +++ b/seed/go-sdk/websocket/core/request_option.go @@ -50,6 +50,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/websocket/fern") headers.Set("X-Fern-SDK-Version", "0.0.1") + headers.Set("User-Agent", "github.com/websocket/fern/0.0.1") return headers } diff --git a/seed/java-model/inline-types/.gradle/8.5/checksums/checksums.lock b/seed/java-model/inline-types/.gradle/8.5/checksums/checksums.lock deleted file mode 100644 index eae337d783f..00000000000 Binary files a/seed/java-model/inline-types/.gradle/8.5/checksums/checksums.lock and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/8.5/checksums/md5-checksums.bin b/seed/java-model/inline-types/.gradle/8.5/checksums/md5-checksums.bin deleted file mode 100644 index 601c9fe6bc2..00000000000 Binary files a/seed/java-model/inline-types/.gradle/8.5/checksums/md5-checksums.bin and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/8.5/checksums/sha1-checksums.bin b/seed/java-model/inline-types/.gradle/8.5/checksums/sha1-checksums.bin deleted file mode 100644 index 041b1c83303..00000000000 Binary files a/seed/java-model/inline-types/.gradle/8.5/checksums/sha1-checksums.bin and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock b/seed/java-model/inline-types/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock deleted file mode 100644 index 8e914806b42..00000000000 Binary files a/seed/java-model/inline-types/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/8.5/dependencies-accessors/gc.properties b/seed/java-model/inline-types/.gradle/8.5/dependencies-accessors/gc.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-model/inline-types/.gradle/8.5/executionHistory/executionHistory.bin b/seed/java-model/inline-types/.gradle/8.5/executionHistory/executionHistory.bin deleted file mode 100644 index 145a20425b6..00000000000 Binary files a/seed/java-model/inline-types/.gradle/8.5/executionHistory/executionHistory.bin and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/8.5/executionHistory/executionHistory.lock b/seed/java-model/inline-types/.gradle/8.5/executionHistory/executionHistory.lock deleted file mode 100644 index 1b4ac04842c..00000000000 Binary files a/seed/java-model/inline-types/.gradle/8.5/executionHistory/executionHistory.lock and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/8.5/fileChanges/last-build.bin b/seed/java-model/inline-types/.gradle/8.5/fileChanges/last-build.bin deleted file mode 100644 index f76dd238ade..00000000000 Binary files a/seed/java-model/inline-types/.gradle/8.5/fileChanges/last-build.bin and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/8.5/fileHashes/fileHashes.bin b/seed/java-model/inline-types/.gradle/8.5/fileHashes/fileHashes.bin deleted file mode 100644 index 5f1d751448e..00000000000 Binary files a/seed/java-model/inline-types/.gradle/8.5/fileHashes/fileHashes.bin and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/8.5/fileHashes/fileHashes.lock b/seed/java-model/inline-types/.gradle/8.5/fileHashes/fileHashes.lock deleted file mode 100644 index a9c08edfc8e..00000000000 Binary files a/seed/java-model/inline-types/.gradle/8.5/fileHashes/fileHashes.lock and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/8.5/gc.properties b/seed/java-model/inline-types/.gradle/8.5/gc.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-model/inline-types/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/seed/java-model/inline-types/.gradle/buildOutputCleanup/buildOutputCleanup.lock deleted file mode 100644 index a2f2b75d141..00000000000 Binary files a/seed/java-model/inline-types/.gradle/buildOutputCleanup/buildOutputCleanup.lock and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/buildOutputCleanup/cache.properties b/seed/java-model/inline-types/.gradle/buildOutputCleanup/cache.properties deleted file mode 100644 index 38753e2af99..00000000000 --- a/seed/java-model/inline-types/.gradle/buildOutputCleanup/cache.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Wed Dec 04 21:43:30 UTC 2024 -gradle.version=8.5 diff --git a/seed/java-model/inline-types/.gradle/buildOutputCleanup/outputFiles.bin b/seed/java-model/inline-types/.gradle/buildOutputCleanup/outputFiles.bin deleted file mode 100644 index 8eff991d1a8..00000000000 Binary files a/seed/java-model/inline-types/.gradle/buildOutputCleanup/outputFiles.bin and /dev/null differ diff --git a/seed/java-model/inline-types/.gradle/vcs-1/gc.properties b/seed/java-model/inline-types/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-model/inline-types/.mock/definition/__package__.yml b/seed/java-model/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/java-model/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/java-model/inline-types/.mock/definition/api.yml b/seed/java-model/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/java-model/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/java-model/inline-types/.mock/fern.config.json b/seed/java-model/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/java-model/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/java-model/inline-types/.mock/generators.yml b/seed/java-model/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/java-model/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/java-model/inline-types/build.gradle b/seed/java-model/inline-types/build.gradle deleted file mode 100644 index 95bd1a90ef3..00000000000 --- a/seed/java-model/inline-types/build.gradle +++ /dev/null @@ -1,98 +0,0 @@ -plugins { - id 'java-library' - id 'maven-publish' - id 'com.diffplug.spotless' version '6.11.0' -} - -repositories { - mavenCentral() - maven { - url 'https://s01.oss.sonatype.org/content/repositories/releases/' - } -} - -dependencies { - api 'com.fasterxml.jackson.core:jackson-databind:2.17.2' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' -} - - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -tasks.withType(Javadoc) { - failOnError false - options.addStringOption('Xdoclint:none', '-quiet') -} - -spotless { - java { - palantirJavaFormat() - } -} - - -java { - withSourcesJar() - withJavadocJar() -} - - -group = 'com.fern' - -version = '0.0.1' - -jar { - dependsOn(":generatePomFileForMavenPublication") - archiveBaseName = "inline-types" -} - -sourcesJar { - archiveBaseName = "inline-types" -} - -javadocJar { - archiveBaseName = "inline-types" -} - -test { - useJUnitPlatform() - testLogging { - showStandardStreams = true - } -} - -publishing { - publications { - maven(MavenPublication) { - groupId = 'com.fern' - artifactId = 'inline-types' - version = '0.0.1' - from components.java - pom { - licenses { - license { - name = 'The MIT License (MIT)' - url = 'https://mit-license.org/' - } - } - scm { - connection = 'scm:git:git://github.com/inline-types/fern.git' - developerConnection = 'scm:git:git://github.com/inline-types/fern.git' - url = 'https://github.com/inline-types/fern' - } - } - } - } - repositories { - maven { - url "$System.env.MAVEN_PUBLISH_REGISTRY_URL" - credentials { - username "$System.env.MAVEN_USERNAME" - password "$System.env.MAVEN_PASSWORD" - } - } - } -} - diff --git a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/DateTimeDeserializer.java b/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/DateTimeDeserializer.java deleted file mode 100644 index ad231070a3d..00000000000 --- a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/DateTimeDeserializer.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.module.SimpleModule; -import java.io.IOException; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.format.DateTimeFormatter; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalQueries; - -/** - * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. - */ -class DateTimeDeserializer extends JsonDeserializer { - private static final SimpleModule MODULE; - - static { - MODULE = new SimpleModule().addDeserializer(OffsetDateTime.class, new DateTimeDeserializer()); - } - - /** - * Gets a module wrapping this deserializer as an adapter for the Jackson ObjectMapper. - * - * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. - */ - public static SimpleModule getModule() { - return MODULE; - } - - @Override - public OffsetDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { - JsonToken token = parser.currentToken(); - if (token == JsonToken.VALUE_NUMBER_INT) { - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC); - } else { - TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( - parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from); - - if (temporal.query(TemporalQueries.offset()) == null) { - return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); - } else { - return OffsetDateTime.from(temporal); - } - } - } -} diff --git a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ObjectMappers.java b/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ObjectMappers.java deleted file mode 100644 index c889a5b4c3d..00000000000 --- a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ObjectMappers.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.fasterxml.jackson.databind.json.JsonMapper; -import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import java.io.IOException; - -public final class ObjectMappers { - public static final ObjectMapper JSON_MAPPER = JsonMapper.builder() - .addModule(new Jdk8Module()) - .addModule(new JavaTimeModule()) - .addModule(DateTimeDeserializer.getModule()) - .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) - .build(); - - private ObjectMappers() {} - - public static String stringify(Object o) { - try { - return JSON_MAPPER - .setSerializationInclusion(JsonInclude.Include.ALWAYS) - .writerWithDefaultPrettyPrinter() - .writeValueAsString(o); - } catch (IOException e) { - return o.getClass().getName() + "@" + Integer.toHexString(o.hashCode()); - } - } -} diff --git a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlineEnum.java b/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlineEnum.java deleted file mode 100644 index 66d978305f7..00000000000 --- a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlineEnum.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonValue; - -public enum InlineEnum { - SUNNY("SUNNY"), - - CLOUDY("CLOUDY"), - - RAINING("RAINING"), - - SNOWING("SNOWING"); - - private final String value; - - InlineEnum(String value) { - this.value = value; - } - - @JsonValue - @java.lang.Override - public String toString() { - return this.value; - } -} diff --git a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlineType1.java b/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlineType1.java deleted file mode 100644 index bcafb30642f..00000000000 --- a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlineType1.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = InlineType1.Builder.class) -public final class InlineType1 { - private final String foo; - - private final NestedInlineType1 bar; - - private InlineType1(String foo, NestedInlineType1 bar) { - this.foo = foo; - this.bar = bar; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public NestedInlineType1 getBar() { - return bar; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlineType1 && equalTo((InlineType1) other); - } - - private boolean equalTo(InlineType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(String foo); - - Builder from(InlineType1 other); - } - - public interface BarStage { - _FinalStage bar(NestedInlineType1 bar); - } - - public interface _FinalStage { - InlineType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, _FinalStage { - private String foo; - - private NestedInlineType1 bar; - - private Builder() {} - - @java.lang.Override - public Builder from(InlineType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public _FinalStage bar(NestedInlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - public InlineType1 build() { - return new InlineType1(foo, bar); - } - } -} diff --git a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlineType2.java b/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlineType2.java deleted file mode 100644 index c885d7a08ed..00000000000 --- a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlineType2.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = InlineType2.Builder.class) -public final class InlineType2 { - private final String baz; - - private InlineType2(String baz) { - this.baz = baz; - } - - @JsonProperty("baz") - public String getBaz() { - return baz; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlineType2 && equalTo((InlineType2) other); - } - - private boolean equalTo(InlineType2 other) { - return baz.equals(other.baz); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.baz); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BazStage builder() { - return new Builder(); - } - - public interface BazStage { - _FinalStage baz(String baz); - - Builder from(InlineType2 other); - } - - public interface _FinalStage { - InlineType2 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BazStage, _FinalStage { - private String baz; - - private Builder() {} - - @java.lang.Override - public Builder from(InlineType2 other) { - baz(other.getBaz()); - return this; - } - - @java.lang.Override - @JsonSetter("baz") - public _FinalStage baz(String baz) { - this.baz = Objects.requireNonNull(baz, "baz must not be null"); - return this; - } - - @java.lang.Override - public InlineType2 build() { - return new InlineType2(baz); - } - } -} diff --git a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlinedDiscriminatedUnion1.java b/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlinedDiscriminatedUnion1.java deleted file mode 100644 index c2d65055d7d..00000000000 --- a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlinedDiscriminatedUnion1.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public final class InlinedDiscriminatedUnion1 { - private final Value value; - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private InlinedDiscriminatedUnion1(Value value) { - this.value = value; - } - - public T visit(Visitor visitor) { - return value.visit(visitor); - } - - public static InlinedDiscriminatedUnion1 type1(InlineType1 value) { - return new InlinedDiscriminatedUnion1(new Type1Value(value)); - } - - public static InlinedDiscriminatedUnion1 type2(InlineType2 value) { - return new InlinedDiscriminatedUnion1(new Type2Value(value)); - } - - public boolean isType1() { - return value instanceof Type1Value; - } - - public boolean isType2() { - return value instanceof Type2Value; - } - - public boolean _isUnknown() { - return value instanceof _UnknownValue; - } - - public Optional getType1() { - if (isType1()) { - return Optional.of(((Type1Value) value).value); - } - return Optional.empty(); - } - - public Optional getType2() { - if (isType2()) { - return Optional.of(((Type2Value) value).value); - } - return Optional.empty(); - } - - public Optional _getUnknown() { - if (_isUnknown()) { - return Optional.of(((_UnknownValue) value).value); - } - return Optional.empty(); - } - - @JsonValue - private Value getValue() { - return this.value; - } - - public interface Visitor { - T visitType1(InlineType1 type1); - - T visitType2(InlineType2 type2); - - T _visitUnknown(Object unknownType); - } - - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) - @JsonSubTypes({@JsonSubTypes.Type(Type1Value.class), @JsonSubTypes.Type(Type2Value.class)}) - @JsonIgnoreProperties(ignoreUnknown = true) - private interface Value { - T visit(Visitor visitor); - } - - @JsonTypeName("type1") - private static final class Type1Value implements Value { - @JsonUnwrapped - private InlineType1 value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private Type1Value() {} - - private Type1Value(InlineType1 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitType1(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Type1Value && equalTo((Type1Value) other); - } - - private boolean equalTo(Type1Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "value: " + value + "}"; - } - } - - @JsonTypeName("type2") - private static final class Type2Value implements Value { - @JsonUnwrapped - private InlineType2 value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private Type2Value() {} - - private Type2Value(InlineType2 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitType2(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Type2Value && equalTo((Type2Value) other); - } - - private boolean equalTo(Type2Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "value: " + value + "}"; - } - } - - private static final class _UnknownValue implements Value { - private String type; - - @JsonValue - private Object value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private _UnknownValue(@JsonProperty("value") Object value) {} - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor._visitUnknown(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof _UnknownValue && equalTo((_UnknownValue) other); - } - - private boolean equalTo(_UnknownValue other) { - return type.equals(other.type) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "type: " + type + ", value: " + value + "}"; - } - } -} diff --git a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlinedUndiscriminatedUnion1.java b/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlinedUndiscriminatedUnion1.java deleted file mode 100644 index 2ddc4805b32..00000000000 --- a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/InlinedUndiscriminatedUnion1.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.seed.object.core.ObjectMappers; -import java.io.IOException; -import java.util.Objects; - -@JsonDeserialize(using = InlinedUndiscriminatedUnion1.Deserializer.class) -public final class InlinedUndiscriminatedUnion1 { - private final Object value; - - private final int type; - - private InlinedUndiscriminatedUnion1(Object value, int type) { - this.value = value; - this.type = type; - } - - @JsonValue - public Object get() { - return this.value; - } - - public T visit(Visitor visitor) { - if (this.type == 0) { - return visitor.visit((InlineType1) this.value); - } else if (this.type == 1) { - return visitor.visit((InlineType2) this.value); - } - throw new IllegalStateException("Failed to visit value. This should never happen."); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlinedUndiscriminatedUnion1 && equalTo((InlinedUndiscriminatedUnion1) other); - } - - private boolean equalTo(InlinedUndiscriminatedUnion1 other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return this.value.toString(); - } - - public static InlinedUndiscriminatedUnion1 of(InlineType1 value) { - return new InlinedUndiscriminatedUnion1(value, 0); - } - - public static InlinedUndiscriminatedUnion1 of(InlineType2 value) { - return new InlinedUndiscriminatedUnion1(value, 1); - } - - public interface Visitor { - T visit(InlineType1 value); - - T visit(InlineType2 value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(InlinedUndiscriminatedUnion1.class); - } - - @java.lang.Override - public InlinedUndiscriminatedUnion1 deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, InlineType1.class)); - } catch (IllegalArgumentException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, InlineType2.class)); - } catch (IllegalArgumentException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/NestedInlineType1.java b/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/NestedInlineType1.java deleted file mode 100644 index dd48a14900d..00000000000 --- a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/NestedInlineType1.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = NestedInlineType1.Builder.class) -public final class NestedInlineType1 { - private final String foo; - - private final String bar; - - private final InlineEnum myEnum; - - private NestedInlineType1(String foo, String bar, InlineEnum myEnum) { - this.foo = foo; - this.bar = bar; - this.myEnum = myEnum; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("myEnum") - public InlineEnum getMyEnum() { - return myEnum; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NestedInlineType1 && equalTo((NestedInlineType1) other); - } - - private boolean equalTo(NestedInlineType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar) && myEnum.equals(other.myEnum); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar, this.myEnum); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(String foo); - - Builder from(NestedInlineType1 other); - } - - public interface BarStage { - MyEnumStage bar(String bar); - } - - public interface MyEnumStage { - _FinalStage myEnum(InlineEnum myEnum); - } - - public interface _FinalStage { - NestedInlineType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, MyEnumStage, _FinalStage { - private String foo; - - private String bar; - - private InlineEnum myEnum; - - private Builder() {} - - @java.lang.Override - public Builder from(NestedInlineType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - myEnum(other.getMyEnum()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public MyEnumStage bar(String bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("myEnum") - public _FinalStage myEnum(InlineEnum myEnum) { - this.myEnum = Objects.requireNonNull(myEnum, "myEnum must not be null"); - return this; - } - - @java.lang.Override - public NestedInlineType1 build() { - return new NestedInlineType1(foo, bar, myEnum); - } - } -} diff --git a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/RootType1.java b/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/RootType1.java deleted file mode 100644 index 6125d099de1..00000000000 --- a/seed/java-model/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/model/RootType1.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = RootType1.Builder.class) -public final class RootType1 { - private final String foo; - - private final InlineType1 bar; - - private RootType1(String foo, InlineType1 bar) { - this.foo = foo; - this.bar = bar; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public InlineType1 getBar() { - return bar; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RootType1 && equalTo((RootType1) other); - } - - private boolean equalTo(RootType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(String foo); - - Builder from(RootType1 other); - } - - public interface BarStage { - _FinalStage bar(InlineType1 bar); - } - - public interface _FinalStage { - RootType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, _FinalStage { - private String foo; - - private InlineType1 bar; - - private Builder() {} - - @java.lang.Override - public Builder from(RootType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public _FinalStage bar(InlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - public RootType1 build() { - return new RootType1(foo, bar); - } - } -} diff --git a/seed/java-model/inline-types/build/tmp/spotless-register-dependencies b/seed/java-model/inline-types/build/tmp/spotless-register-dependencies deleted file mode 100644 index 56a6051ca2b..00000000000 --- a/seed/java-model/inline-types/build/tmp/spotless-register-dependencies +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/seed/java-model/inline-types/settings.gradle b/seed/java-model/inline-types/settings.gradle deleted file mode 100644 index 24f0d4e99ad..00000000000 --- a/seed/java-model/inline-types/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'inline-types' - diff --git a/seed/java-model/inline-types/snippet-templates.json b/seed/java-model/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-model/inline-types/snippet.json b/seed/java-model/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-model/inline-types/src/main/java/com/seed/object/core/DateTimeDeserializer.java b/seed/java-model/inline-types/src/main/java/com/seed/object/core/DateTimeDeserializer.java deleted file mode 100644 index ad231070a3d..00000000000 --- a/seed/java-model/inline-types/src/main/java/com/seed/object/core/DateTimeDeserializer.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.module.SimpleModule; -import java.io.IOException; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.format.DateTimeFormatter; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalQueries; - -/** - * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. - */ -class DateTimeDeserializer extends JsonDeserializer { - private static final SimpleModule MODULE; - - static { - MODULE = new SimpleModule().addDeserializer(OffsetDateTime.class, new DateTimeDeserializer()); - } - - /** - * Gets a module wrapping this deserializer as an adapter for the Jackson ObjectMapper. - * - * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. - */ - public static SimpleModule getModule() { - return MODULE; - } - - @Override - public OffsetDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { - JsonToken token = parser.currentToken(); - if (token == JsonToken.VALUE_NUMBER_INT) { - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC); - } else { - TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( - parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from); - - if (temporal.query(TemporalQueries.offset()) == null) { - return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); - } else { - return OffsetDateTime.from(temporal); - } - } - } -} diff --git a/seed/java-model/inline-types/src/main/java/com/seed/object/core/ObjectMappers.java b/seed/java-model/inline-types/src/main/java/com/seed/object/core/ObjectMappers.java deleted file mode 100644 index c889a5b4c3d..00000000000 --- a/seed/java-model/inline-types/src/main/java/com/seed/object/core/ObjectMappers.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.fasterxml.jackson.databind.json.JsonMapper; -import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import java.io.IOException; - -public final class ObjectMappers { - public static final ObjectMapper JSON_MAPPER = JsonMapper.builder() - .addModule(new Jdk8Module()) - .addModule(new JavaTimeModule()) - .addModule(DateTimeDeserializer.getModule()) - .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) - .build(); - - private ObjectMappers() {} - - public static String stringify(Object o) { - try { - return JSON_MAPPER - .setSerializationInclusion(JsonInclude.Include.ALWAYS) - .writerWithDefaultPrettyPrinter() - .writeValueAsString(o); - } catch (IOException e) { - return o.getClass().getName() + "@" + Integer.toHexString(o.hashCode()); - } - } -} diff --git a/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlineEnum.java b/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlineEnum.java deleted file mode 100644 index 66d978305f7..00000000000 --- a/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlineEnum.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonValue; - -public enum InlineEnum { - SUNNY("SUNNY"), - - CLOUDY("CLOUDY"), - - RAINING("RAINING"), - - SNOWING("SNOWING"); - - private final String value; - - InlineEnum(String value) { - this.value = value; - } - - @JsonValue - @java.lang.Override - public String toString() { - return this.value; - } -} diff --git a/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlineType1.java b/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlineType1.java deleted file mode 100644 index bcafb30642f..00000000000 --- a/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlineType1.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = InlineType1.Builder.class) -public final class InlineType1 { - private final String foo; - - private final NestedInlineType1 bar; - - private InlineType1(String foo, NestedInlineType1 bar) { - this.foo = foo; - this.bar = bar; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public NestedInlineType1 getBar() { - return bar; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlineType1 && equalTo((InlineType1) other); - } - - private boolean equalTo(InlineType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(String foo); - - Builder from(InlineType1 other); - } - - public interface BarStage { - _FinalStage bar(NestedInlineType1 bar); - } - - public interface _FinalStage { - InlineType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, _FinalStage { - private String foo; - - private NestedInlineType1 bar; - - private Builder() {} - - @java.lang.Override - public Builder from(InlineType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public _FinalStage bar(NestedInlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - public InlineType1 build() { - return new InlineType1(foo, bar); - } - } -} diff --git a/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlineType2.java b/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlineType2.java deleted file mode 100644 index c885d7a08ed..00000000000 --- a/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlineType2.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = InlineType2.Builder.class) -public final class InlineType2 { - private final String baz; - - private InlineType2(String baz) { - this.baz = baz; - } - - @JsonProperty("baz") - public String getBaz() { - return baz; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlineType2 && equalTo((InlineType2) other); - } - - private boolean equalTo(InlineType2 other) { - return baz.equals(other.baz); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.baz); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BazStage builder() { - return new Builder(); - } - - public interface BazStage { - _FinalStage baz(String baz); - - Builder from(InlineType2 other); - } - - public interface _FinalStage { - InlineType2 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BazStage, _FinalStage { - private String baz; - - private Builder() {} - - @java.lang.Override - public Builder from(InlineType2 other) { - baz(other.getBaz()); - return this; - } - - @java.lang.Override - @JsonSetter("baz") - public _FinalStage baz(String baz) { - this.baz = Objects.requireNonNull(baz, "baz must not be null"); - return this; - } - - @java.lang.Override - public InlineType2 build() { - return new InlineType2(baz); - } - } -} diff --git a/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlinedDiscriminatedUnion1.java b/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlinedDiscriminatedUnion1.java deleted file mode 100644 index c2d65055d7d..00000000000 --- a/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlinedDiscriminatedUnion1.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public final class InlinedDiscriminatedUnion1 { - private final Value value; - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private InlinedDiscriminatedUnion1(Value value) { - this.value = value; - } - - public T visit(Visitor visitor) { - return value.visit(visitor); - } - - public static InlinedDiscriminatedUnion1 type1(InlineType1 value) { - return new InlinedDiscriminatedUnion1(new Type1Value(value)); - } - - public static InlinedDiscriminatedUnion1 type2(InlineType2 value) { - return new InlinedDiscriminatedUnion1(new Type2Value(value)); - } - - public boolean isType1() { - return value instanceof Type1Value; - } - - public boolean isType2() { - return value instanceof Type2Value; - } - - public boolean _isUnknown() { - return value instanceof _UnknownValue; - } - - public Optional getType1() { - if (isType1()) { - return Optional.of(((Type1Value) value).value); - } - return Optional.empty(); - } - - public Optional getType2() { - if (isType2()) { - return Optional.of(((Type2Value) value).value); - } - return Optional.empty(); - } - - public Optional _getUnknown() { - if (_isUnknown()) { - return Optional.of(((_UnknownValue) value).value); - } - return Optional.empty(); - } - - @JsonValue - private Value getValue() { - return this.value; - } - - public interface Visitor { - T visitType1(InlineType1 type1); - - T visitType2(InlineType2 type2); - - T _visitUnknown(Object unknownType); - } - - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) - @JsonSubTypes({@JsonSubTypes.Type(Type1Value.class), @JsonSubTypes.Type(Type2Value.class)}) - @JsonIgnoreProperties(ignoreUnknown = true) - private interface Value { - T visit(Visitor visitor); - } - - @JsonTypeName("type1") - private static final class Type1Value implements Value { - @JsonUnwrapped - private InlineType1 value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private Type1Value() {} - - private Type1Value(InlineType1 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitType1(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Type1Value && equalTo((Type1Value) other); - } - - private boolean equalTo(Type1Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "value: " + value + "}"; - } - } - - @JsonTypeName("type2") - private static final class Type2Value implements Value { - @JsonUnwrapped - private InlineType2 value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private Type2Value() {} - - private Type2Value(InlineType2 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitType2(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Type2Value && equalTo((Type2Value) other); - } - - private boolean equalTo(Type2Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "value: " + value + "}"; - } - } - - private static final class _UnknownValue implements Value { - private String type; - - @JsonValue - private Object value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private _UnknownValue(@JsonProperty("value") Object value) {} - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor._visitUnknown(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof _UnknownValue && equalTo((_UnknownValue) other); - } - - private boolean equalTo(_UnknownValue other) { - return type.equals(other.type) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "type: " + type + ", value: " + value + "}"; - } - } -} diff --git a/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlinedUndiscriminatedUnion1.java b/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlinedUndiscriminatedUnion1.java deleted file mode 100644 index 2ddc4805b32..00000000000 --- a/seed/java-model/inline-types/src/main/java/com/seed/object/model/InlinedUndiscriminatedUnion1.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.seed.object.core.ObjectMappers; -import java.io.IOException; -import java.util.Objects; - -@JsonDeserialize(using = InlinedUndiscriminatedUnion1.Deserializer.class) -public final class InlinedUndiscriminatedUnion1 { - private final Object value; - - private final int type; - - private InlinedUndiscriminatedUnion1(Object value, int type) { - this.value = value; - this.type = type; - } - - @JsonValue - public Object get() { - return this.value; - } - - public T visit(Visitor visitor) { - if (this.type == 0) { - return visitor.visit((InlineType1) this.value); - } else if (this.type == 1) { - return visitor.visit((InlineType2) this.value); - } - throw new IllegalStateException("Failed to visit value. This should never happen."); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlinedUndiscriminatedUnion1 && equalTo((InlinedUndiscriminatedUnion1) other); - } - - private boolean equalTo(InlinedUndiscriminatedUnion1 other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return this.value.toString(); - } - - public static InlinedUndiscriminatedUnion1 of(InlineType1 value) { - return new InlinedUndiscriminatedUnion1(value, 0); - } - - public static InlinedUndiscriminatedUnion1 of(InlineType2 value) { - return new InlinedUndiscriminatedUnion1(value, 1); - } - - public interface Visitor { - T visit(InlineType1 value); - - T visit(InlineType2 value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(InlinedUndiscriminatedUnion1.class); - } - - @java.lang.Override - public InlinedUndiscriminatedUnion1 deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, InlineType1.class)); - } catch (IllegalArgumentException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, InlineType2.class)); - } catch (IllegalArgumentException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/seed/java-model/inline-types/src/main/java/com/seed/object/model/NestedInlineType1.java b/seed/java-model/inline-types/src/main/java/com/seed/object/model/NestedInlineType1.java deleted file mode 100644 index dd48a14900d..00000000000 --- a/seed/java-model/inline-types/src/main/java/com/seed/object/model/NestedInlineType1.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = NestedInlineType1.Builder.class) -public final class NestedInlineType1 { - private final String foo; - - private final String bar; - - private final InlineEnum myEnum; - - private NestedInlineType1(String foo, String bar, InlineEnum myEnum) { - this.foo = foo; - this.bar = bar; - this.myEnum = myEnum; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("myEnum") - public InlineEnum getMyEnum() { - return myEnum; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NestedInlineType1 && equalTo((NestedInlineType1) other); - } - - private boolean equalTo(NestedInlineType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar) && myEnum.equals(other.myEnum); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar, this.myEnum); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(String foo); - - Builder from(NestedInlineType1 other); - } - - public interface BarStage { - MyEnumStage bar(String bar); - } - - public interface MyEnumStage { - _FinalStage myEnum(InlineEnum myEnum); - } - - public interface _FinalStage { - NestedInlineType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, MyEnumStage, _FinalStage { - private String foo; - - private String bar; - - private InlineEnum myEnum; - - private Builder() {} - - @java.lang.Override - public Builder from(NestedInlineType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - myEnum(other.getMyEnum()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public MyEnumStage bar(String bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("myEnum") - public _FinalStage myEnum(InlineEnum myEnum) { - this.myEnum = Objects.requireNonNull(myEnum, "myEnum must not be null"); - return this; - } - - @java.lang.Override - public NestedInlineType1 build() { - return new NestedInlineType1(foo, bar, myEnum); - } - } -} diff --git a/seed/java-model/inline-types/src/main/java/com/seed/object/model/RootType1.java b/seed/java-model/inline-types/src/main/java/com/seed/object/model/RootType1.java deleted file mode 100644 index 6125d099de1..00000000000 --- a/seed/java-model/inline-types/src/main/java/com/seed/object/model/RootType1.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.Objects; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = RootType1.Builder.class) -public final class RootType1 { - private final String foo; - - private final InlineType1 bar; - - private RootType1(String foo, InlineType1 bar) { - this.foo = foo; - this.bar = bar; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public InlineType1 getBar() { - return bar; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RootType1 && equalTo((RootType1) other); - } - - private boolean equalTo(RootType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(String foo); - - Builder from(RootType1 other); - } - - public interface BarStage { - _FinalStage bar(InlineType1 bar); - } - - public interface _FinalStage { - RootType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, _FinalStage { - private String foo; - - private InlineType1 bar; - - private Builder() {} - - @java.lang.Override - public Builder from(RootType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public _FinalStage bar(InlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - public RootType1 build() { - return new RootType1(foo, bar); - } - } -} diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java index e7db2103102..20253b2f456 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java @@ -52,7 +52,7 @@ public void postJsonPatchContentType(ObjectWithOptionalField request, RequestOpt .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,7 +98,7 @@ public void postJsonPatchContentWithCharsetType(ObjectWithOptionalField request, .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json; charset=utf-8") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java index 4113789731d..7e31af50665 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java @@ -52,7 +52,7 @@ public void postJsonPatchContentType(ObjectWithOptionalField request, RequestOpt .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,7 +98,7 @@ public void postJsonPatchContentWithCharsetType(ObjectWithOptionalField request, .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json; charset=utf-8") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java index 9ccd41fcf75..938fd9b0294 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java @@ -52,7 +52,7 @@ public void postJsonPatchContentType(ObjectWithOptionalField request, RequestOpt .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,7 +98,7 @@ public void postJsonPatchContentWithCharsetType(ObjectWithOptionalField request, .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json; charset=utf-8") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java index 4113789731d..7e31af50665 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java @@ -52,7 +52,7 @@ public void postJsonPatchContentType(ObjectWithOptionalField request, RequestOpt .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,7 +98,7 @@ public void postJsonPatchContentWithCharsetType(ObjectWithOptionalField request, .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json; charset=utf-8") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java index 4113789731d..7e31af50665 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java @@ -52,7 +52,7 @@ public void postJsonPatchContentType(ObjectWithOptionalField request, RequestOpt .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,7 +98,7 @@ public void postJsonPatchContentWithCharsetType(ObjectWithOptionalField request, .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json; charset=utf-8") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java index 4113789731d..7e31af50665 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java @@ -52,7 +52,7 @@ public void postJsonPatchContentType(ObjectWithOptionalField request, RequestOpt .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,7 +98,7 @@ public void postJsonPatchContentWithCharsetType(ObjectWithOptionalField request, .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json; charset=utf-8") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/seed/java-sdk/exhaustive/local-files/resources/endpoints/contenttype/ContentTypeClient.java b/seed/java-sdk/exhaustive/local-files/resources/endpoints/contenttype/ContentTypeClient.java index 1b606cf6b8d..b697312666e 100644 --- a/seed/java-sdk/exhaustive/local-files/resources/endpoints/contenttype/ContentTypeClient.java +++ b/seed/java-sdk/exhaustive/local-files/resources/endpoints/contenttype/ContentTypeClient.java @@ -55,7 +55,7 @@ public void postJsonPatchContentType(ObjectWithOptionalField request, .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -99,7 +99,7 @@ public void postJsonPatchContentWithCharsetType(ObjectWithOptionalField request, .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json; charset=utf-8") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java index 4113789731d..7e31af50665 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java @@ -52,7 +52,7 @@ public void postJsonPatchContentType(ObjectWithOptionalField request, RequestOpt .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,7 +98,7 @@ public void postJsonPatchContentWithCharsetType(ObjectWithOptionalField request, .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json; charset=utf-8") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java index 4113789731d..7e31af50665 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/contenttype/ContentTypeClient.java @@ -52,7 +52,7 @@ public void postJsonPatchContentType(ObjectWithOptionalField request, RequestOpt .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,7 +98,7 @@ public void postJsonPatchContentWithCharsetType(ObjectWithOptionalField request, .url(httpUrl) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") + .addHeader("Content-Type", "application/json-patch+json; charset=utf-8") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/seed/java-sdk/inline-types/.github/workflows/ci.yml b/seed/java-sdk/inline-types/.github/workflows/ci.yml deleted file mode 100644 index 9910fd269c2..00000000000 --- a/seed/java-sdk/inline-types/.github/workflows/ci.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Set up Java - id: setup-jre - uses: actions/setup-java@v1 - with: - java-version: "11" - architecture: x64 - - - name: Compile - run: ./gradlew compileJava - - test: - needs: [ compile ] - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Set up Java - id: setup-jre - uses: actions/setup-java@v1 - with: - java-version: "11" - architecture: x64 - - - name: Test - run: ./gradlew test - publish: - needs: [ compile, test ] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Set up Java - id: setup-jre - uses: actions/setup-java@v1 - with: - java-version: "11" - architecture: x64 - - - name: Publish to maven - run: | - ./gradlew publish - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} - MAVEN_PUBLISH_REGISTRY_URL: "" diff --git a/seed/java-sdk/inline-types/.gitignore b/seed/java-sdk/inline-types/.gitignore deleted file mode 100644 index d4199abc2cd..00000000000 --- a/seed/java-sdk/inline-types/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -*.class -.project -.gradle -? -.classpath -.checkstyle -.settings -.node -build - -# IntelliJ -*.iml -*.ipr -*.iws -.idea/ -out/ - -# Eclipse/IntelliJ APT -generated_src/ -generated_testSrc/ -generated/ - -bin -build \ No newline at end of file diff --git a/seed/java-sdk/inline-types/.gradle/8.11.1/checksums/checksums.lock b/seed/java-sdk/inline-types/.gradle/8.11.1/checksums/checksums.lock deleted file mode 100644 index dae511e5f67..00000000000 Binary files a/seed/java-sdk/inline-types/.gradle/8.11.1/checksums/checksums.lock and /dev/null differ diff --git a/seed/java-sdk/inline-types/.gradle/8.11.1/checksums/md5-checksums.bin b/seed/java-sdk/inline-types/.gradle/8.11.1/checksums/md5-checksums.bin deleted file mode 100644 index 4b9c4fc3ee7..00000000000 Binary files a/seed/java-sdk/inline-types/.gradle/8.11.1/checksums/md5-checksums.bin and /dev/null differ diff --git a/seed/java-sdk/inline-types/.gradle/8.11.1/checksums/sha1-checksums.bin b/seed/java-sdk/inline-types/.gradle/8.11.1/checksums/sha1-checksums.bin deleted file mode 100644 index 98bf60bac5e..00000000000 Binary files a/seed/java-sdk/inline-types/.gradle/8.11.1/checksums/sha1-checksums.bin and /dev/null differ diff --git a/seed/java-sdk/inline-types/.gradle/8.11.1/executionHistory/executionHistory.bin b/seed/java-sdk/inline-types/.gradle/8.11.1/executionHistory/executionHistory.bin deleted file mode 100644 index 8ef685d90b2..00000000000 Binary files a/seed/java-sdk/inline-types/.gradle/8.11.1/executionHistory/executionHistory.bin and /dev/null differ diff --git a/seed/java-sdk/inline-types/.gradle/8.11.1/executionHistory/executionHistory.lock b/seed/java-sdk/inline-types/.gradle/8.11.1/executionHistory/executionHistory.lock deleted file mode 100644 index fe01955acd4..00000000000 Binary files a/seed/java-sdk/inline-types/.gradle/8.11.1/executionHistory/executionHistory.lock and /dev/null differ diff --git a/seed/java-sdk/inline-types/.gradle/8.11.1/fileChanges/last-build.bin b/seed/java-sdk/inline-types/.gradle/8.11.1/fileChanges/last-build.bin deleted file mode 100644 index f76dd238ade..00000000000 Binary files a/seed/java-sdk/inline-types/.gradle/8.11.1/fileChanges/last-build.bin and /dev/null differ diff --git a/seed/java-sdk/inline-types/.gradle/8.11.1/fileHashes/fileHashes.bin b/seed/java-sdk/inline-types/.gradle/8.11.1/fileHashes/fileHashes.bin deleted file mode 100644 index 2d4c9100523..00000000000 Binary files a/seed/java-sdk/inline-types/.gradle/8.11.1/fileHashes/fileHashes.bin and /dev/null differ diff --git a/seed/java-sdk/inline-types/.gradle/8.11.1/fileHashes/fileHashes.lock b/seed/java-sdk/inline-types/.gradle/8.11.1/fileHashes/fileHashes.lock deleted file mode 100644 index 25669923fb9..00000000000 Binary files a/seed/java-sdk/inline-types/.gradle/8.11.1/fileHashes/fileHashes.lock and /dev/null differ diff --git a/seed/java-sdk/inline-types/.gradle/8.11.1/gc.properties b/seed/java-sdk/inline-types/.gradle/8.11.1/gc.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-sdk/inline-types/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/seed/java-sdk/inline-types/.gradle/buildOutputCleanup/buildOutputCleanup.lock deleted file mode 100644 index 34443a1529d..00000000000 Binary files a/seed/java-sdk/inline-types/.gradle/buildOutputCleanup/buildOutputCleanup.lock and /dev/null differ diff --git a/seed/java-sdk/inline-types/.gradle/buildOutputCleanup/cache.properties b/seed/java-sdk/inline-types/.gradle/buildOutputCleanup/cache.properties deleted file mode 100644 index 6d982fc7ace..00000000000 --- a/seed/java-sdk/inline-types/.gradle/buildOutputCleanup/cache.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Wed Dec 04 20:59:06 UTC 2024 -gradle.version=8.11.1 diff --git a/seed/java-sdk/inline-types/.gradle/buildOutputCleanup/outputFiles.bin b/seed/java-sdk/inline-types/.gradle/buildOutputCleanup/outputFiles.bin deleted file mode 100644 index d8ba9331271..00000000000 Binary files a/seed/java-sdk/inline-types/.gradle/buildOutputCleanup/outputFiles.bin and /dev/null differ diff --git a/seed/java-sdk/inline-types/.gradle/vcs-1/gc.properties b/seed/java-sdk/inline-types/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-sdk/inline-types/.mock/definition/__package__.yml b/seed/java-sdk/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/java-sdk/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/java-sdk/inline-types/.mock/definition/api.yml b/seed/java-sdk/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/java-sdk/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/java-sdk/inline-types/.mock/fern.config.json b/seed/java-sdk/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/java-sdk/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/java-sdk/inline-types/.mock/generators.yml b/seed/java-sdk/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/java-sdk/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/java-sdk/inline-types/build.gradle b/seed/java-sdk/inline-types/build.gradle deleted file mode 100644 index cc60466dd47..00000000000 --- a/seed/java-sdk/inline-types/build.gradle +++ /dev/null @@ -1,101 +0,0 @@ -plugins { - id 'java-library' - id 'maven-publish' - id 'com.diffplug.spotless' version '6.11.0' -} - -repositories { - mavenCentral() - maven { - url 'https://s01.oss.sonatype.org/content/repositories/releases/' - } -} - -dependencies { - api 'com.squareup.okhttp3:okhttp:4.12.0' - api 'com.fasterxml.jackson.core:jackson-databind:2.17.2' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' - testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' -} - - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -tasks.withType(Javadoc) { - failOnError false - options.addStringOption('Xdoclint:none', '-quiet') -} - -spotless { - java { - palantirJavaFormat() - } -} - - -java { - withSourcesJar() - withJavadocJar() -} - - -group = 'com.fern' - -version = '0.0.1' - -jar { - dependsOn(":generatePomFileForMavenPublication") - archiveBaseName = "inline-types" -} - -sourcesJar { - archiveBaseName = "inline-types" -} - -javadocJar { - archiveBaseName = "inline-types" -} - -test { - useJUnitPlatform() - testLogging { - showStandardStreams = true - } -} - -publishing { - publications { - maven(MavenPublication) { - groupId = 'com.fern' - artifactId = 'inline-types' - version = '0.0.1' - from components.java - pom { - licenses { - license { - name = 'The MIT License (MIT)' - url = 'https://mit-license.org/' - } - } - scm { - connection = 'scm:git:git://github.com/inline-types/fern.git' - developerConnection = 'scm:git:git://github.com/inline-types/fern.git' - url = 'https://github.com/inline-types/fern' - } - } - } - } - repositories { - maven { - url "$System.env.MAVEN_PUBLISH_REGISTRY_URL" - credentials { - username "$System.env.MAVEN_USERNAME" - password "$System.env.MAVEN_PASSWORD" - } - } - } -} - diff --git a/seed/java-sdk/inline-types/build/reports/problems/problems-report.html b/seed/java-sdk/inline-types/build/reports/problems/problems-report.html deleted file mode 100644 index b1aaef2d6ce..00000000000 --- a/seed/java-sdk/inline-types/build/reports/problems/problems-report.html +++ /dev/null @@ -1,663 +0,0 @@ - - - - - - - - - - - - - Gradle Configuration Cache - - - -
- -
- Loading... -
- - - - - - diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/SeedObjectClient.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/SeedObjectClient.java deleted file mode 100644 index 372519d5daa..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/SeedObjectClient.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.seed.object.core.ClientOptions; -import com.seed.object.core.MediaTypes; -import com.seed.object.core.ObjectMappers; -import com.seed.object.core.RequestOptions; -import com.seed.object.core.SeedObjectApiException; -import com.seed.object.core.SeedObjectException; -import com.seed.object.requests.PostRootRequest; -import com.seed.object.types.RootType1; -import java.io.IOException; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class SeedObjectClient { - protected final ClientOptions clientOptions; - - public SeedObjectClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public RootType1 getRoot(PostRootRequest request) { - return getRoot(request, null); - } - - public RootType1 getRoot(PostRootRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("root") - .addPathSegments("root") - .build(); - RequestBody body; - try { - body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new SeedObjectException("Failed to serialize request", e); - } - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("POST", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - if (response.isSuccessful()) { - return ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RootType1.class); - } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new SeedObjectApiException( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class)); - } catch (IOException e) { - throw new SeedObjectException("Network error executing HTTP request", e); - } - } - - public static SeedObjectClientBuilder builder() { - return new SeedObjectClientBuilder(); - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/SeedObjectClientBuilder.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/SeedObjectClientBuilder.java deleted file mode 100644 index 0421ff3dee7..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/SeedObjectClientBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object; - -import com.seed.object.core.ClientOptions; -import com.seed.object.core.Environment; - -public final class SeedObjectClientBuilder { - private ClientOptions.Builder clientOptionsBuilder = ClientOptions.builder(); - - private Environment environment; - - public SeedObjectClientBuilder url(String url) { - this.environment = Environment.custom(url); - return this; - } - - public SeedObjectClient build() { - clientOptionsBuilder.environment(this.environment); - return new SeedObjectClient(clientOptionsBuilder.build()); - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ClientOptions.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ClientOptions.java deleted file mode 100644 index c403c535450..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ClientOptions.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import java.util.function.Supplier; -import okhttp3.OkHttpClient; - -public final class ClientOptions { - private final Environment environment; - - private final Map headers; - - private final Map> headerSuppliers; - - private final OkHttpClient httpClient; - - private ClientOptions( - Environment environment, - Map headers, - Map> headerSuppliers, - OkHttpClient httpClient) { - this.environment = environment; - this.headers = new HashMap<>(); - this.headers.putAll(headers); - this.headers.putAll(new HashMap() { - { - put("X-Fern-Language", "JAVA"); - } - }); - this.headerSuppliers = headerSuppliers; - this.httpClient = httpClient; - } - - public Environment environment() { - return this.environment; - } - - public Map headers(RequestOptions requestOptions) { - Map values = new HashMap<>(this.headers); - headerSuppliers.forEach((key, supplier) -> { - values.put(key, supplier.get()); - }); - if (requestOptions != null) { - values.putAll(requestOptions.getHeaders()); - } - return values; - } - - public OkHttpClient httpClient() { - return this.httpClient; - } - - public OkHttpClient httpClientWithTimeout(RequestOptions requestOptions) { - if (requestOptions == null) { - return this.httpClient; - } - return this.httpClient - .newBuilder() - .callTimeout(requestOptions.getTimeout().get(), requestOptions.getTimeoutTimeUnit()) - .connectTimeout(0, TimeUnit.SECONDS) - .writeTimeout(0, TimeUnit.SECONDS) - .readTimeout(0, TimeUnit.SECONDS) - .build(); - } - - public static Builder builder() { - return new Builder(); - } - - public static final class Builder { - private Environment environment; - - private final Map headers = new HashMap<>(); - - private final Map> headerSuppliers = new HashMap<>(); - - public Builder environment(Environment environment) { - this.environment = environment; - return this; - } - - public Builder addHeader(String key, String value) { - this.headers.put(key, value); - return this; - } - - public Builder addHeader(String key, Supplier value) { - this.headerSuppliers.put(key, value); - return this; - } - - public ClientOptions build() { - OkHttpClient okhttpClient = new OkHttpClient.Builder() - .addInterceptor(new RetryInterceptor(3)) - .build(); - return new ClientOptions(environment, headers, headerSuppliers, okhttpClient); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/DateTimeDeserializer.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/DateTimeDeserializer.java deleted file mode 100644 index ad231070a3d..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/DateTimeDeserializer.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.module.SimpleModule; -import java.io.IOException; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.format.DateTimeFormatter; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalQueries; - -/** - * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. - */ -class DateTimeDeserializer extends JsonDeserializer { - private static final SimpleModule MODULE; - - static { - MODULE = new SimpleModule().addDeserializer(OffsetDateTime.class, new DateTimeDeserializer()); - } - - /** - * Gets a module wrapping this deserializer as an adapter for the Jackson ObjectMapper. - * - * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. - */ - public static SimpleModule getModule() { - return MODULE; - } - - @Override - public OffsetDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { - JsonToken token = parser.currentToken(); - if (token == JsonToken.VALUE_NUMBER_INT) { - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC); - } else { - TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( - parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from); - - if (temporal.query(TemporalQueries.offset()) == null) { - return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); - } else { - return OffsetDateTime.from(temporal); - } - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/Environment.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/Environment.java deleted file mode 100644 index 19b694c5b93..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/Environment.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -public final class Environment { - private final String url; - - private Environment(String url) { - this.url = url; - } - - public String getUrl() { - return this.url; - } - - public static Environment custom(String url) { - return new Environment(url); - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/FileStream.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/FileStream.java deleted file mode 100644 index eef28eef8bd..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/FileStream.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.InputStream; -import java.util.Objects; -import okhttp3.MediaType; -import okhttp3.RequestBody; -import org.jetbrains.annotations.Nullable; - -/** - * Represents a file stream with associated metadata for file uploads. - */ -public class FileStream { - private final InputStream inputStream; - private final String fileName; - private final MediaType contentType; - - /** - * Constructs a FileStream with the given input stream and optional metadata. - * - * @param inputStream The input stream of the file content. Must not be null. - * @param fileName The name of the file, or null if unknown. - * @param contentType The MIME type of the file content, or null if unknown. - * @throws NullPointerException if inputStream is null - */ - public FileStream(InputStream inputStream, @Nullable String fileName, @Nullable MediaType contentType) { - this.inputStream = Objects.requireNonNull(inputStream, "Input stream cannot be null"); - this.fileName = fileName; - this.contentType = contentType; - } - - public FileStream(InputStream inputStream) { - this(inputStream, null, null); - } - - public InputStream getInputStream() { - return inputStream; - } - - @Nullable - public String getFileName() { - return fileName; - } - - @Nullable - public MediaType getContentType() { - return contentType; - } - - /** - * Creates a RequestBody suitable for use with OkHttp client. - * - * @return A RequestBody instance representing this file stream. - */ - public RequestBody toRequestBody() { - return new InputStreamRequestBody(contentType, inputStream); - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/InputStreamRequestBody.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/InputStreamRequestBody.java deleted file mode 100644 index 433d823fbed..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/InputStreamRequestBody.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Objects; -import okhttp3.MediaType; -import okhttp3.RequestBody; -import okhttp3.internal.Util; -import okio.BufferedSink; -import okio.Okio; -import okio.Source; -import org.jetbrains.annotations.Nullable; - -/** - * A custom implementation of OkHttp's RequestBody that wraps an InputStream. - * This class allows streaming of data from an InputStream directly to an HTTP request body, - * which is useful for file uploads or sending large amounts of data without loading it all into memory. - */ -public class InputStreamRequestBody extends RequestBody { - private final InputStream inputStream; - private final MediaType contentType; - - /** - * Constructs an InputStreamRequestBody with the specified content type and input stream. - * - * @param contentType the MediaType of the content, or null if not known - * @param inputStream the InputStream containing the data to be sent - * @throws NullPointerException if inputStream is null - */ - public InputStreamRequestBody(@Nullable MediaType contentType, InputStream inputStream) { - this.contentType = contentType; - this.inputStream = Objects.requireNonNull(inputStream, "inputStream == null"); - } - - /** - * Returns the content type of this request body. - * - * @return the MediaType of the content, or null if not specified - */ - @Nullable - @Override - public MediaType contentType() { - return contentType; - } - - /** - * Returns the content length of this request body, if known. - * This method attempts to determine the length using the InputStream's available() method, - * which may not always accurately reflect the total length of the stream. - * - * @return the content length, or -1 if the length is unknown - * @throws IOException if an I/O error occurs - */ - @Override - public long contentLength() throws IOException { - return inputStream.available() == 0 ? -1 : inputStream.available(); - } - - /** - * Writes the content of the InputStream to the given BufferedSink. - * This method is responsible for transferring the data from the InputStream to the network request. - * - * @param sink the BufferedSink to write the content to - * @throws IOException if an I/O error occurs during writing - */ - @Override - public void writeTo(BufferedSink sink) throws IOException { - Source source = null; - try { - source = Okio.source(inputStream); - sink.writeAll(source); - } finally { - Util.closeQuietly(Objects.requireNonNull(source)); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/MediaTypes.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/MediaTypes.java deleted file mode 100644 index df45659067e..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/MediaTypes.java +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import okhttp3.MediaType; - -public final class MediaTypes { - - public static final MediaType APPLICATION_JSON = MediaType.parse("application/json"); - - private MediaTypes() {} -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ObjectMappers.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ObjectMappers.java deleted file mode 100644 index c889a5b4c3d..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ObjectMappers.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.fasterxml.jackson.databind.json.JsonMapper; -import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import java.io.IOException; - -public final class ObjectMappers { - public static final ObjectMapper JSON_MAPPER = JsonMapper.builder() - .addModule(new Jdk8Module()) - .addModule(new JavaTimeModule()) - .addModule(DateTimeDeserializer.getModule()) - .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) - .build(); - - private ObjectMappers() {} - - public static String stringify(Object o) { - try { - return JSON_MAPPER - .setSerializationInclusion(JsonInclude.Include.ALWAYS) - .writerWithDefaultPrettyPrinter() - .writeValueAsString(o); - } catch (IOException e) { - return o.getClass().getName() + "@" + Integer.toHexString(o.hashCode()); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/RequestOptions.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/RequestOptions.java deleted file mode 100644 index 5ea45c533b5..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/RequestOptions.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.TimeUnit; - -public final class RequestOptions { - private final Optional timeout; - - private final TimeUnit timeoutTimeUnit; - - private RequestOptions(Optional timeout, TimeUnit timeoutTimeUnit) { - this.timeout = timeout; - this.timeoutTimeUnit = timeoutTimeUnit; - } - - public Optional getTimeout() { - return timeout; - } - - public TimeUnit getTimeoutTimeUnit() { - return timeoutTimeUnit; - } - - public Map getHeaders() { - Map headers = new HashMap<>(); - return headers; - } - - public static Builder builder() { - return new Builder(); - } - - public static final class Builder { - private Optional timeout = Optional.empty(); - - private TimeUnit timeoutTimeUnit = TimeUnit.SECONDS; - - public Builder timeout(Integer timeout) { - this.timeout = Optional.of(timeout); - return this; - } - - public Builder timeout(Integer timeout, TimeUnit timeoutTimeUnit) { - this.timeout = Optional.of(timeout); - this.timeoutTimeUnit = timeoutTimeUnit; - return this; - } - - public RequestOptions build() { - return new RequestOptions(timeout, timeoutTimeUnit); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ResponseBodyInputStream.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ResponseBodyInputStream.java deleted file mode 100644 index ea75c68fd88..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ResponseBodyInputStream.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.FilterInputStream; -import java.io.IOException; -import okhttp3.Response; - -/** - * A custom InputStream that wraps the InputStream from the OkHttp Response and ensures that the - * OkHttp Response object is properly closed when the stream is closed. - * - * This class extends FilterInputStream and takes an OkHttp Response object as a parameter. - * It retrieves the InputStream from the Response and overrides the close method to close - * both the InputStream and the Response object, ensuring proper resource management and preventing - * premature closure of the underlying HTTP connection. - */ -public class ResponseBodyInputStream extends FilterInputStream { - private final Response response; - - /** - * Constructs a ResponseBodyInputStream that wraps the InputStream from the given OkHttp - * Response object. - * - * @param response the OkHttp Response object from which the InputStream is retrieved - * @throws IOException if an I/O error occurs while retrieving the InputStream - */ - public ResponseBodyInputStream(Response response) throws IOException { - super(response.body().byteStream()); - this.response = response; - } - - /** - * Closes the InputStream and the associated OkHttp Response object. This ensures that the - * underlying HTTP connection is properly closed after the stream is no longer needed. - * - * @throws IOException if an I/O error occurs - */ - @Override - public void close() throws IOException { - super.close(); - response.close(); // Ensure the response is closed when the stream is closed - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ResponseBodyReader.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ResponseBodyReader.java deleted file mode 100644 index 3903eb7436c..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/ResponseBodyReader.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.FilterReader; -import java.io.IOException; -import okhttp3.Response; - -/** - * A custom Reader that wraps the Reader from the OkHttp Response and ensures that the - * OkHttp Response object is properly closed when the reader is closed. - * - * This class extends FilterReader and takes an OkHttp Response object as a parameter. - * It retrieves the Reader from the Response and overrides the close method to close - * both the Reader and the Response object, ensuring proper resource management and preventing - * premature closure of the underlying HTTP connection. - */ -public class ResponseBodyReader extends FilterReader { - private final Response response; - - /** - * Constructs a ResponseBodyReader that wraps the Reader from the given OkHttp Response object. - * - * @param response the OkHttp Response object from which the Reader is retrieved - * @throws IOException if an I/O error occurs while retrieving the Reader - */ - public ResponseBodyReader(Response response) throws IOException { - super(response.body().charStream()); - this.response = response; - } - - /** - * Closes the Reader and the associated OkHttp Response object. This ensures that the - * underlying HTTP connection is properly closed after the reader is no longer needed. - * - * @throws IOException if an I/O error occurs - */ - @Override - public void close() throws IOException { - super.close(); - response.close(); // Ensure the response is closed when the reader is closed - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/RetryInterceptor.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/RetryInterceptor.java deleted file mode 100644 index 9f541cea8fc..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/RetryInterceptor.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.IOException; -import java.time.Duration; -import java.util.Optional; -import java.util.Random; -import okhttp3.Interceptor; -import okhttp3.Response; - -public class RetryInterceptor implements Interceptor { - - private static final Duration ONE_SECOND = Duration.ofSeconds(1); - private final ExponentialBackoff backoff; - private final Random random = new Random(); - - public RetryInterceptor(int maxRetries) { - this.backoff = new ExponentialBackoff(maxRetries); - } - - @Override - public Response intercept(Chain chain) throws IOException { - Response response = chain.proceed(chain.request()); - - if (shouldRetry(response.code())) { - return retryChain(response, chain); - } - - return response; - } - - private Response retryChain(Response response, Chain chain) throws IOException { - Optional nextBackoff = this.backoff.nextBackoff(); - while (nextBackoff.isPresent()) { - try { - Thread.sleep(nextBackoff.get().toMillis()); - } catch (InterruptedException e) { - throw new IOException("Interrupted while trying request", e); - } - response.close(); - response = chain.proceed(chain.request()); - if (shouldRetry(response.code())) { - nextBackoff = this.backoff.nextBackoff(); - } else { - return response; - } - } - - return response; - } - - private static boolean shouldRetry(int statusCode) { - return statusCode == 408 || statusCode == 409 || statusCode == 429 || statusCode >= 500; - } - - private final class ExponentialBackoff { - - private final int maxNumRetries; - - private int retryNumber = 0; - - ExponentialBackoff(int maxNumRetries) { - this.maxNumRetries = maxNumRetries; - } - - public Optional nextBackoff() { - retryNumber += 1; - if (retryNumber > maxNumRetries) { - return Optional.empty(); - } - - int upperBound = (int) Math.pow(2, retryNumber); - return Optional.of(ONE_SECOND.multipliedBy(random.nextInt(upperBound))); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/SeedObjectApiException.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/SeedObjectApiException.java deleted file mode 100644 index 64ec8313ea1..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/SeedObjectApiException.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -/** - * This exception type will be thrown for any non-2XX API responses. - */ -public class SeedObjectApiException extends SeedObjectException { - /** - * The error code of the response that triggered the exception. - */ - private final int statusCode; - - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public SeedObjectApiException(String message, int statusCode, Object body) { - super(message); - this.statusCode = statusCode; - this.body = body; - } - - /** - * @return the statusCode - */ - public int statusCode() { - return this.statusCode; - } - - /** - * @return the body - */ - public Object body() { - return this.body; - } - - @java.lang.Override - public String toString() { - return "SeedObjectApiException{" + "message: " + getMessage() + ", statusCode: " + statusCode + ", body: " - + body + "}"; - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/SeedObjectException.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/SeedObjectException.java deleted file mode 100644 index a338879cb59..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/SeedObjectException.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -/** - * This class serves as the base exception for all errors in the SDK. - */ -public class SeedObjectException extends RuntimeException { - public SeedObjectException(String message) { - super(message); - } - - public SeedObjectException(String message, Exception e) { - super(message, e); - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/Stream.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/Stream.java deleted file mode 100644 index ecc1492c728..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/Stream.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.Reader; -import java.util.Iterator; -import java.util.NoSuchElementException; -import java.util.Scanner; - -/** - * The {@code Stream} class implmenets {@link Iterable} to provide a simple mechanism for reading and parsing - * objects of a given type from data streamed via a {@link Reader} using a specified delimiter. - *

- * {@code Stream} assumes that data is being pushed to the provided {@link Reader} asynchronously and utilizes a - * {@code Scanner} to block during iteration if the next object is not available. - * - * @param The type of objects in the stream. - */ -public final class Stream implements Iterable { - /** - * The {@link Class} of the objects in the stream. - */ - private final Class valueType; - /** - * The {@link Scanner} used for reading from the input stream and blocking when neede during iteration. - */ - private final Scanner scanner; - - /** - * Constructs a new {@code Stream} with the specified value type, reader, and delimiter. - * - * @param valueType The class of the objects in the stream. - * @param reader The reader that provides the streamed data. - * @param delimiter The delimiter used to separate elements in the stream. - */ - public Stream(Class valueType, Reader reader, String delimiter) { - this.scanner = new Scanner(reader).useDelimiter(delimiter); - this.valueType = valueType; - } - - /** - * Returns an iterator over the elements in this stream that blocks during iteration when the next object is - * not yet available. - * - * @return An iterator that can be used to traverse the elements in the stream. - */ - @Override - public Iterator iterator() { - return new Iterator() { - /** - * Returns {@code true} if there are more elements in the stream. - *

- * Will block and wait for input if the stream has not ended and the next object is not yet available. - * - * @return {@code true} if there are more elements, {@code false} otherwise. - */ - @Override - public boolean hasNext() { - return scanner.hasNext(); - } - - /** - * Returns the next element in the stream. - *

- * Will block and wait for input if the stream has not ended and the next object is not yet available. - * - * @return The next element in the stream. - * @throws NoSuchElementException If there are no more elements in the stream. - */ - @Override - public T next() { - if (!scanner.hasNext()) { - throw new NoSuchElementException(); - } else { - try { - T parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - scanner.next().trim(), valueType); - return parsedResponse; - } catch (Exception e) { - throw new RuntimeException(e); - } - } - } - - /** - * Removing elements from {@code Stream} is not supported. - * - * @throws UnsupportedOperationException Always, as removal is not supported. - */ - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - }; - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/Suppliers.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/Suppliers.java deleted file mode 100644 index 5001ddf4767..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/core/Suppliers.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.util.Objects; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Supplier; - -public final class Suppliers { - private Suppliers() {} - - public static Supplier memoize(Supplier delegate) { - AtomicReference value = new AtomicReference<>(); - return () -> { - T val = value.get(); - if (val == null) { - val = value.updateAndGet(cur -> cur == null ? Objects.requireNonNull(delegate.get()) : cur); - } - return val; - }; - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/requests/PostRootRequest.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/requests/PostRootRequest.java deleted file mode 100644 index 61d78f3a823..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/requests/PostRootRequest.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.requests; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import com.seed.object.types.InlineType1; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = PostRootRequest.Builder.class) -public final class PostRootRequest { - private final InlineType1 bar; - - private final String foo; - - private final Map additionalProperties; - - private PostRootRequest(InlineType1 bar, String foo, Map additionalProperties) { - this.bar = bar; - this.foo = foo; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("bar") - public InlineType1 getBar() { - return bar; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PostRootRequest && equalTo((PostRootRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PostRootRequest other) { - return bar.equals(other.bar) && foo.equals(other.foo); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bar, this.foo); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BarStage builder() { - return new Builder(); - } - - public interface BarStage { - FooStage bar(@NotNull InlineType1 bar); - - Builder from(PostRootRequest other); - } - - public interface FooStage { - _FinalStage foo(@NotNull String foo); - } - - public interface _FinalStage { - PostRootRequest build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BarStage, FooStage, _FinalStage { - private InlineType1 bar; - - private String foo; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(PostRootRequest other) { - bar(other.getBar()); - foo(other.getFoo()); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public FooStage bar(@NotNull InlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public _FinalStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - public PostRootRequest build() { - return new PostRootRequest(bar, foo, additionalProperties); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlineEnum.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlineEnum.java deleted file mode 100644 index c092fdbeee4..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlineEnum.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonValue; - -public enum InlineEnum { - SUNNY("SUNNY"), - - CLOUDY("CLOUDY"), - - RAINING("RAINING"), - - SNOWING("SNOWING"); - - private final String value; - - InlineEnum(String value) { - this.value = value; - } - - @JsonValue - @java.lang.Override - public String toString() { - return this.value; - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlineType1.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlineType1.java deleted file mode 100644 index 1cd11b9008e..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlineType1.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = InlineType1.Builder.class) -public final class InlineType1 { - private final String foo; - - private final NestedInlineType1 bar; - - private final Map additionalProperties; - - private InlineType1(String foo, NestedInlineType1 bar, Map additionalProperties) { - this.foo = foo; - this.bar = bar; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public NestedInlineType1 getBar() { - return bar; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlineType1 && equalTo((InlineType1) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(InlineType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(@NotNull String foo); - - Builder from(InlineType1 other); - } - - public interface BarStage { - _FinalStage bar(@NotNull NestedInlineType1 bar); - } - - public interface _FinalStage { - InlineType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, _FinalStage { - private String foo; - - private NestedInlineType1 bar; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(InlineType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public _FinalStage bar(@NotNull NestedInlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - public InlineType1 build() { - return new InlineType1(foo, bar, additionalProperties); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlineType2.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlineType2.java deleted file mode 100644 index 4b02ac98287..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlineType2.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = InlineType2.Builder.class) -public final class InlineType2 { - private final String baz; - - private final Map additionalProperties; - - private InlineType2(String baz, Map additionalProperties) { - this.baz = baz; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("baz") - public String getBaz() { - return baz; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlineType2 && equalTo((InlineType2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(InlineType2 other) { - return baz.equals(other.baz); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.baz); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BazStage builder() { - return new Builder(); - } - - public interface BazStage { - _FinalStage baz(@NotNull String baz); - - Builder from(InlineType2 other); - } - - public interface _FinalStage { - InlineType2 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BazStage, _FinalStage { - private String baz; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(InlineType2 other) { - baz(other.getBaz()); - return this; - } - - @java.lang.Override - @JsonSetter("baz") - public _FinalStage baz(@NotNull String baz) { - this.baz = Objects.requireNonNull(baz, "baz must not be null"); - return this; - } - - @java.lang.Override - public InlineType2 build() { - return new InlineType2(baz, additionalProperties); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlinedDiscriminatedUnion1.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlinedDiscriminatedUnion1.java deleted file mode 100644 index fa7004fcaa0..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlinedDiscriminatedUnion1.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public final class InlinedDiscriminatedUnion1 { - private final Value value; - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private InlinedDiscriminatedUnion1(Value value) { - this.value = value; - } - - public T visit(Visitor visitor) { - return value.visit(visitor); - } - - public static InlinedDiscriminatedUnion1 type1(InlineType1 value) { - return new InlinedDiscriminatedUnion1(new Type1Value(value)); - } - - public static InlinedDiscriminatedUnion1 type2(InlineType2 value) { - return new InlinedDiscriminatedUnion1(new Type2Value(value)); - } - - public boolean isType1() { - return value instanceof Type1Value; - } - - public boolean isType2() { - return value instanceof Type2Value; - } - - public boolean _isUnknown() { - return value instanceof _UnknownValue; - } - - public Optional getType1() { - if (isType1()) { - return Optional.of(((Type1Value) value).value); - } - return Optional.empty(); - } - - public Optional getType2() { - if (isType2()) { - return Optional.of(((Type2Value) value).value); - } - return Optional.empty(); - } - - public Optional _getUnknown() { - if (_isUnknown()) { - return Optional.of(((_UnknownValue) value).value); - } - return Optional.empty(); - } - - @JsonValue - private Value getValue() { - return this.value; - } - - public interface Visitor { - T visitType1(InlineType1 type1); - - T visitType2(InlineType2 type2); - - T _visitUnknown(Object unknownType); - } - - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) - @JsonSubTypes({@JsonSubTypes.Type(Type1Value.class), @JsonSubTypes.Type(Type2Value.class)}) - @JsonIgnoreProperties(ignoreUnknown = true) - private interface Value { - T visit(Visitor visitor); - } - - @JsonTypeName("type1") - private static final class Type1Value implements Value { - @JsonUnwrapped - private InlineType1 value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private Type1Value() {} - - private Type1Value(InlineType1 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitType1(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Type1Value && equalTo((Type1Value) other); - } - - private boolean equalTo(Type1Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "value: " + value + "}"; - } - } - - @JsonTypeName("type2") - private static final class Type2Value implements Value { - @JsonUnwrapped - private InlineType2 value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private Type2Value() {} - - private Type2Value(InlineType2 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitType2(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Type2Value && equalTo((Type2Value) other); - } - - private boolean equalTo(Type2Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "value: " + value + "}"; - } - } - - private static final class _UnknownValue implements Value { - private String type; - - @JsonValue - private Object value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private _UnknownValue(@JsonProperty("value") Object value) {} - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor._visitUnknown(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof _UnknownValue && equalTo((_UnknownValue) other); - } - - private boolean equalTo(_UnknownValue other) { - return type.equals(other.type) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "type: " + type + ", value: " + value + "}"; - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlinedUndiscriminatedUnion1.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlinedUndiscriminatedUnion1.java deleted file mode 100644 index cf244dd256e..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/InlinedUndiscriminatedUnion1.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.seed.object.core.ObjectMappers; -import java.io.IOException; -import java.util.Objects; - -@JsonDeserialize(using = InlinedUndiscriminatedUnion1.Deserializer.class) -public final class InlinedUndiscriminatedUnion1 { - private final Object value; - - private final int type; - - private InlinedUndiscriminatedUnion1(Object value, int type) { - this.value = value; - this.type = type; - } - - @JsonValue - public Object get() { - return this.value; - } - - public T visit(Visitor visitor) { - if (this.type == 0) { - return visitor.visit((InlineType1) this.value); - } else if (this.type == 1) { - return visitor.visit((InlineType2) this.value); - } - throw new IllegalStateException("Failed to visit value. This should never happen."); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlinedUndiscriminatedUnion1 && equalTo((InlinedUndiscriminatedUnion1) other); - } - - private boolean equalTo(InlinedUndiscriminatedUnion1 other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return this.value.toString(); - } - - public static InlinedUndiscriminatedUnion1 of(InlineType1 value) { - return new InlinedUndiscriminatedUnion1(value, 0); - } - - public static InlinedUndiscriminatedUnion1 of(InlineType2 value) { - return new InlinedUndiscriminatedUnion1(value, 1); - } - - public interface Visitor { - T visit(InlineType1 value); - - T visit(InlineType2 value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(InlinedUndiscriminatedUnion1.class); - } - - @java.lang.Override - public InlinedUndiscriminatedUnion1 deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, InlineType1.class)); - } catch (IllegalArgumentException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, InlineType2.class)); - } catch (IllegalArgumentException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/NestedInlineType1.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/NestedInlineType1.java deleted file mode 100644 index 64febcc9d97..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/NestedInlineType1.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = NestedInlineType1.Builder.class) -public final class NestedInlineType1 { - private final String foo; - - private final String bar; - - private final InlineEnum myEnum; - - private final Map additionalProperties; - - private NestedInlineType1(String foo, String bar, InlineEnum myEnum, Map additionalProperties) { - this.foo = foo; - this.bar = bar; - this.myEnum = myEnum; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("myEnum") - public InlineEnum getMyEnum() { - return myEnum; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NestedInlineType1 && equalTo((NestedInlineType1) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(NestedInlineType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar) && myEnum.equals(other.myEnum); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar, this.myEnum); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(@NotNull String foo); - - Builder from(NestedInlineType1 other); - } - - public interface BarStage { - MyEnumStage bar(@NotNull String bar); - } - - public interface MyEnumStage { - _FinalStage myEnum(@NotNull InlineEnum myEnum); - } - - public interface _FinalStage { - NestedInlineType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, MyEnumStage, _FinalStage { - private String foo; - - private String bar; - - private InlineEnum myEnum; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(NestedInlineType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - myEnum(other.getMyEnum()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public MyEnumStage bar(@NotNull String bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("myEnum") - public _FinalStage myEnum(@NotNull InlineEnum myEnum) { - this.myEnum = Objects.requireNonNull(myEnum, "myEnum must not be null"); - return this; - } - - @java.lang.Override - public NestedInlineType1 build() { - return new NestedInlineType1(foo, bar, myEnum, additionalProperties); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/RootType1.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/RootType1.java deleted file mode 100644 index 25cca383157..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/main/java/com/seed/object/types/RootType1.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = RootType1.Builder.class) -public final class RootType1 { - private final String foo; - - private final InlineType1 bar; - - private final Map additionalProperties; - - private RootType1(String foo, InlineType1 bar, Map additionalProperties) { - this.foo = foo; - this.bar = bar; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public InlineType1 getBar() { - return bar; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RootType1 && equalTo((RootType1) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RootType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(@NotNull String foo); - - Builder from(RootType1 other); - } - - public interface BarStage { - _FinalStage bar(@NotNull InlineType1 bar); - } - - public interface _FinalStage { - RootType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, _FinalStage { - private String foo; - - private InlineType1 bar; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(RootType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public _FinalStage bar(@NotNull InlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - public RootType1 build() { - return new RootType1(foo, bar, additionalProperties); - } - } -} diff --git a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/test/java/com/seed/object/TestClient.java b/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/test/java/com/seed/object/TestClient.java deleted file mode 100644 index 37f1534fe0c..00000000000 --- a/seed/java-sdk/inline-types/build/spotless/spotlessJava/src/test/java/com/seed/object/TestClient.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object; - -public final class TestClient { - public void test() { - // Add tests here and mark this file in .fernignore - assert true; - } -} diff --git a/seed/java-sdk/inline-types/build/tmp/spotless-register-dependencies b/seed/java-sdk/inline-types/build/tmp/spotless-register-dependencies deleted file mode 100644 index 56a6051ca2b..00000000000 --- a/seed/java-sdk/inline-types/build/tmp/spotless-register-dependencies +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/seed/java-sdk/inline-types/settings.gradle b/seed/java-sdk/inline-types/settings.gradle deleted file mode 100644 index a6252c5d1bc..00000000000 --- a/seed/java-sdk/inline-types/settings.gradle +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = 'inline-types' - -include 'sample-app' \ No newline at end of file diff --git a/seed/java-sdk/inline-types/snippet-templates.json b/seed/java-sdk/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-sdk/inline-types/snippet.json b/seed/java-sdk/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/SeedObjectClient.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/SeedObjectClient.java deleted file mode 100644 index 372519d5daa..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/SeedObjectClient.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.seed.object.core.ClientOptions; -import com.seed.object.core.MediaTypes; -import com.seed.object.core.ObjectMappers; -import com.seed.object.core.RequestOptions; -import com.seed.object.core.SeedObjectApiException; -import com.seed.object.core.SeedObjectException; -import com.seed.object.requests.PostRootRequest; -import com.seed.object.types.RootType1; -import java.io.IOException; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class SeedObjectClient { - protected final ClientOptions clientOptions; - - public SeedObjectClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public RootType1 getRoot(PostRootRequest request) { - return getRoot(request, null); - } - - public RootType1 getRoot(PostRootRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("root") - .addPathSegments("root") - .build(); - RequestBody body; - try { - body = RequestBody.create( - ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); - } catch (JsonProcessingException e) { - throw new SeedObjectException("Failed to serialize request", e); - } - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("POST", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - if (response.isSuccessful()) { - return ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), RootType1.class); - } - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - throw new SeedObjectApiException( - "Error with status code " + response.code(), - response.code(), - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class)); - } catch (IOException e) { - throw new SeedObjectException("Network error executing HTTP request", e); - } - } - - public static SeedObjectClientBuilder builder() { - return new SeedObjectClientBuilder(); - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/SeedObjectClientBuilder.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/SeedObjectClientBuilder.java deleted file mode 100644 index 0421ff3dee7..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/SeedObjectClientBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object; - -import com.seed.object.core.ClientOptions; -import com.seed.object.core.Environment; - -public final class SeedObjectClientBuilder { - private ClientOptions.Builder clientOptionsBuilder = ClientOptions.builder(); - - private Environment environment; - - public SeedObjectClientBuilder url(String url) { - this.environment = Environment.custom(url); - return this; - } - - public SeedObjectClient build() { - clientOptionsBuilder.environment(this.environment); - return new SeedObjectClient(clientOptionsBuilder.build()); - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ClientOptions.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ClientOptions.java deleted file mode 100644 index c403c535450..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ClientOptions.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import java.util.function.Supplier; -import okhttp3.OkHttpClient; - -public final class ClientOptions { - private final Environment environment; - - private final Map headers; - - private final Map> headerSuppliers; - - private final OkHttpClient httpClient; - - private ClientOptions( - Environment environment, - Map headers, - Map> headerSuppliers, - OkHttpClient httpClient) { - this.environment = environment; - this.headers = new HashMap<>(); - this.headers.putAll(headers); - this.headers.putAll(new HashMap() { - { - put("X-Fern-Language", "JAVA"); - } - }); - this.headerSuppliers = headerSuppliers; - this.httpClient = httpClient; - } - - public Environment environment() { - return this.environment; - } - - public Map headers(RequestOptions requestOptions) { - Map values = new HashMap<>(this.headers); - headerSuppliers.forEach((key, supplier) -> { - values.put(key, supplier.get()); - }); - if (requestOptions != null) { - values.putAll(requestOptions.getHeaders()); - } - return values; - } - - public OkHttpClient httpClient() { - return this.httpClient; - } - - public OkHttpClient httpClientWithTimeout(RequestOptions requestOptions) { - if (requestOptions == null) { - return this.httpClient; - } - return this.httpClient - .newBuilder() - .callTimeout(requestOptions.getTimeout().get(), requestOptions.getTimeoutTimeUnit()) - .connectTimeout(0, TimeUnit.SECONDS) - .writeTimeout(0, TimeUnit.SECONDS) - .readTimeout(0, TimeUnit.SECONDS) - .build(); - } - - public static Builder builder() { - return new Builder(); - } - - public static final class Builder { - private Environment environment; - - private final Map headers = new HashMap<>(); - - private final Map> headerSuppliers = new HashMap<>(); - - public Builder environment(Environment environment) { - this.environment = environment; - return this; - } - - public Builder addHeader(String key, String value) { - this.headers.put(key, value); - return this; - } - - public Builder addHeader(String key, Supplier value) { - this.headerSuppliers.put(key, value); - return this; - } - - public ClientOptions build() { - OkHttpClient okhttpClient = new OkHttpClient.Builder() - .addInterceptor(new RetryInterceptor(3)) - .build(); - return new ClientOptions(environment, headers, headerSuppliers, okhttpClient); - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/DateTimeDeserializer.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/DateTimeDeserializer.java deleted file mode 100644 index ad231070a3d..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/DateTimeDeserializer.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.module.SimpleModule; -import java.io.IOException; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.format.DateTimeFormatter; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalQueries; - -/** - * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. - */ -class DateTimeDeserializer extends JsonDeserializer { - private static final SimpleModule MODULE; - - static { - MODULE = new SimpleModule().addDeserializer(OffsetDateTime.class, new DateTimeDeserializer()); - } - - /** - * Gets a module wrapping this deserializer as an adapter for the Jackson ObjectMapper. - * - * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. - */ - public static SimpleModule getModule() { - return MODULE; - } - - @Override - public OffsetDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { - JsonToken token = parser.currentToken(); - if (token == JsonToken.VALUE_NUMBER_INT) { - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC); - } else { - TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( - parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from); - - if (temporal.query(TemporalQueries.offset()) == null) { - return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); - } else { - return OffsetDateTime.from(temporal); - } - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/Environment.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/Environment.java deleted file mode 100644 index 19b694c5b93..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/Environment.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -public final class Environment { - private final String url; - - private Environment(String url) { - this.url = url; - } - - public String getUrl() { - return this.url; - } - - public static Environment custom(String url) { - return new Environment(url); - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/FileStream.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/FileStream.java deleted file mode 100644 index eef28eef8bd..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/FileStream.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.InputStream; -import java.util.Objects; -import okhttp3.MediaType; -import okhttp3.RequestBody; -import org.jetbrains.annotations.Nullable; - -/** - * Represents a file stream with associated metadata for file uploads. - */ -public class FileStream { - private final InputStream inputStream; - private final String fileName; - private final MediaType contentType; - - /** - * Constructs a FileStream with the given input stream and optional metadata. - * - * @param inputStream The input stream of the file content. Must not be null. - * @param fileName The name of the file, or null if unknown. - * @param contentType The MIME type of the file content, or null if unknown. - * @throws NullPointerException if inputStream is null - */ - public FileStream(InputStream inputStream, @Nullable String fileName, @Nullable MediaType contentType) { - this.inputStream = Objects.requireNonNull(inputStream, "Input stream cannot be null"); - this.fileName = fileName; - this.contentType = contentType; - } - - public FileStream(InputStream inputStream) { - this(inputStream, null, null); - } - - public InputStream getInputStream() { - return inputStream; - } - - @Nullable - public String getFileName() { - return fileName; - } - - @Nullable - public MediaType getContentType() { - return contentType; - } - - /** - * Creates a RequestBody suitable for use with OkHttp client. - * - * @return A RequestBody instance representing this file stream. - */ - public RequestBody toRequestBody() { - return new InputStreamRequestBody(contentType, inputStream); - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/InputStreamRequestBody.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/InputStreamRequestBody.java deleted file mode 100644 index 433d823fbed..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/InputStreamRequestBody.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Objects; -import okhttp3.MediaType; -import okhttp3.RequestBody; -import okhttp3.internal.Util; -import okio.BufferedSink; -import okio.Okio; -import okio.Source; -import org.jetbrains.annotations.Nullable; - -/** - * A custom implementation of OkHttp's RequestBody that wraps an InputStream. - * This class allows streaming of data from an InputStream directly to an HTTP request body, - * which is useful for file uploads or sending large amounts of data without loading it all into memory. - */ -public class InputStreamRequestBody extends RequestBody { - private final InputStream inputStream; - private final MediaType contentType; - - /** - * Constructs an InputStreamRequestBody with the specified content type and input stream. - * - * @param contentType the MediaType of the content, or null if not known - * @param inputStream the InputStream containing the data to be sent - * @throws NullPointerException if inputStream is null - */ - public InputStreamRequestBody(@Nullable MediaType contentType, InputStream inputStream) { - this.contentType = contentType; - this.inputStream = Objects.requireNonNull(inputStream, "inputStream == null"); - } - - /** - * Returns the content type of this request body. - * - * @return the MediaType of the content, or null if not specified - */ - @Nullable - @Override - public MediaType contentType() { - return contentType; - } - - /** - * Returns the content length of this request body, if known. - * This method attempts to determine the length using the InputStream's available() method, - * which may not always accurately reflect the total length of the stream. - * - * @return the content length, or -1 if the length is unknown - * @throws IOException if an I/O error occurs - */ - @Override - public long contentLength() throws IOException { - return inputStream.available() == 0 ? -1 : inputStream.available(); - } - - /** - * Writes the content of the InputStream to the given BufferedSink. - * This method is responsible for transferring the data from the InputStream to the network request. - * - * @param sink the BufferedSink to write the content to - * @throws IOException if an I/O error occurs during writing - */ - @Override - public void writeTo(BufferedSink sink) throws IOException { - Source source = null; - try { - source = Okio.source(inputStream); - sink.writeAll(source); - } finally { - Util.closeQuietly(Objects.requireNonNull(source)); - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/MediaTypes.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/MediaTypes.java deleted file mode 100644 index df45659067e..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/MediaTypes.java +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import okhttp3.MediaType; - -public final class MediaTypes { - - public static final MediaType APPLICATION_JSON = MediaType.parse("application/json"); - - private MediaTypes() {} -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ObjectMappers.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ObjectMappers.java deleted file mode 100644 index c889a5b4c3d..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ObjectMappers.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.fasterxml.jackson.databind.json.JsonMapper; -import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import java.io.IOException; - -public final class ObjectMappers { - public static final ObjectMapper JSON_MAPPER = JsonMapper.builder() - .addModule(new Jdk8Module()) - .addModule(new JavaTimeModule()) - .addModule(DateTimeDeserializer.getModule()) - .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) - .build(); - - private ObjectMappers() {} - - public static String stringify(Object o) { - try { - return JSON_MAPPER - .setSerializationInclusion(JsonInclude.Include.ALWAYS) - .writerWithDefaultPrettyPrinter() - .writeValueAsString(o); - } catch (IOException e) { - return o.getClass().getName() + "@" + Integer.toHexString(o.hashCode()); - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/RequestOptions.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/RequestOptions.java deleted file mode 100644 index 5ea45c533b5..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/RequestOptions.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.TimeUnit; - -public final class RequestOptions { - private final Optional timeout; - - private final TimeUnit timeoutTimeUnit; - - private RequestOptions(Optional timeout, TimeUnit timeoutTimeUnit) { - this.timeout = timeout; - this.timeoutTimeUnit = timeoutTimeUnit; - } - - public Optional getTimeout() { - return timeout; - } - - public TimeUnit getTimeoutTimeUnit() { - return timeoutTimeUnit; - } - - public Map getHeaders() { - Map headers = new HashMap<>(); - return headers; - } - - public static Builder builder() { - return new Builder(); - } - - public static final class Builder { - private Optional timeout = Optional.empty(); - - private TimeUnit timeoutTimeUnit = TimeUnit.SECONDS; - - public Builder timeout(Integer timeout) { - this.timeout = Optional.of(timeout); - return this; - } - - public Builder timeout(Integer timeout, TimeUnit timeoutTimeUnit) { - this.timeout = Optional.of(timeout); - this.timeoutTimeUnit = timeoutTimeUnit; - return this; - } - - public RequestOptions build() { - return new RequestOptions(timeout, timeoutTimeUnit); - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ResponseBodyInputStream.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ResponseBodyInputStream.java deleted file mode 100644 index ea75c68fd88..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ResponseBodyInputStream.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.FilterInputStream; -import java.io.IOException; -import okhttp3.Response; - -/** - * A custom InputStream that wraps the InputStream from the OkHttp Response and ensures that the - * OkHttp Response object is properly closed when the stream is closed. - * - * This class extends FilterInputStream and takes an OkHttp Response object as a parameter. - * It retrieves the InputStream from the Response and overrides the close method to close - * both the InputStream and the Response object, ensuring proper resource management and preventing - * premature closure of the underlying HTTP connection. - */ -public class ResponseBodyInputStream extends FilterInputStream { - private final Response response; - - /** - * Constructs a ResponseBodyInputStream that wraps the InputStream from the given OkHttp - * Response object. - * - * @param response the OkHttp Response object from which the InputStream is retrieved - * @throws IOException if an I/O error occurs while retrieving the InputStream - */ - public ResponseBodyInputStream(Response response) throws IOException { - super(response.body().byteStream()); - this.response = response; - } - - /** - * Closes the InputStream and the associated OkHttp Response object. This ensures that the - * underlying HTTP connection is properly closed after the stream is no longer needed. - * - * @throws IOException if an I/O error occurs - */ - @Override - public void close() throws IOException { - super.close(); - response.close(); // Ensure the response is closed when the stream is closed - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ResponseBodyReader.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ResponseBodyReader.java deleted file mode 100644 index 3903eb7436c..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/ResponseBodyReader.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.FilterReader; -import java.io.IOException; -import okhttp3.Response; - -/** - * A custom Reader that wraps the Reader from the OkHttp Response and ensures that the - * OkHttp Response object is properly closed when the reader is closed. - * - * This class extends FilterReader and takes an OkHttp Response object as a parameter. - * It retrieves the Reader from the Response and overrides the close method to close - * both the Reader and the Response object, ensuring proper resource management and preventing - * premature closure of the underlying HTTP connection. - */ -public class ResponseBodyReader extends FilterReader { - private final Response response; - - /** - * Constructs a ResponseBodyReader that wraps the Reader from the given OkHttp Response object. - * - * @param response the OkHttp Response object from which the Reader is retrieved - * @throws IOException if an I/O error occurs while retrieving the Reader - */ - public ResponseBodyReader(Response response) throws IOException { - super(response.body().charStream()); - this.response = response; - } - - /** - * Closes the Reader and the associated OkHttp Response object. This ensures that the - * underlying HTTP connection is properly closed after the reader is no longer needed. - * - * @throws IOException if an I/O error occurs - */ - @Override - public void close() throws IOException { - super.close(); - response.close(); // Ensure the response is closed when the reader is closed - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/RetryInterceptor.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/RetryInterceptor.java deleted file mode 100644 index 9f541cea8fc..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/RetryInterceptor.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.IOException; -import java.time.Duration; -import java.util.Optional; -import java.util.Random; -import okhttp3.Interceptor; -import okhttp3.Response; - -public class RetryInterceptor implements Interceptor { - - private static final Duration ONE_SECOND = Duration.ofSeconds(1); - private final ExponentialBackoff backoff; - private final Random random = new Random(); - - public RetryInterceptor(int maxRetries) { - this.backoff = new ExponentialBackoff(maxRetries); - } - - @Override - public Response intercept(Chain chain) throws IOException { - Response response = chain.proceed(chain.request()); - - if (shouldRetry(response.code())) { - return retryChain(response, chain); - } - - return response; - } - - private Response retryChain(Response response, Chain chain) throws IOException { - Optional nextBackoff = this.backoff.nextBackoff(); - while (nextBackoff.isPresent()) { - try { - Thread.sleep(nextBackoff.get().toMillis()); - } catch (InterruptedException e) { - throw new IOException("Interrupted while trying request", e); - } - response.close(); - response = chain.proceed(chain.request()); - if (shouldRetry(response.code())) { - nextBackoff = this.backoff.nextBackoff(); - } else { - return response; - } - } - - return response; - } - - private static boolean shouldRetry(int statusCode) { - return statusCode == 408 || statusCode == 409 || statusCode == 429 || statusCode >= 500; - } - - private final class ExponentialBackoff { - - private final int maxNumRetries; - - private int retryNumber = 0; - - ExponentialBackoff(int maxNumRetries) { - this.maxNumRetries = maxNumRetries; - } - - public Optional nextBackoff() { - retryNumber += 1; - if (retryNumber > maxNumRetries) { - return Optional.empty(); - } - - int upperBound = (int) Math.pow(2, retryNumber); - return Optional.of(ONE_SECOND.multipliedBy(random.nextInt(upperBound))); - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/SeedObjectApiException.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/SeedObjectApiException.java deleted file mode 100644 index 64ec8313ea1..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/SeedObjectApiException.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -/** - * This exception type will be thrown for any non-2XX API responses. - */ -public class SeedObjectApiException extends SeedObjectException { - /** - * The error code of the response that triggered the exception. - */ - private final int statusCode; - - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public SeedObjectApiException(String message, int statusCode, Object body) { - super(message); - this.statusCode = statusCode; - this.body = body; - } - - /** - * @return the statusCode - */ - public int statusCode() { - return this.statusCode; - } - - /** - * @return the body - */ - public Object body() { - return this.body; - } - - @java.lang.Override - public String toString() { - return "SeedObjectApiException{" + "message: " + getMessage() + ", statusCode: " + statusCode + ", body: " - + body + "}"; - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/SeedObjectException.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/SeedObjectException.java deleted file mode 100644 index a338879cb59..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/SeedObjectException.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -/** - * This class serves as the base exception for all errors in the SDK. - */ -public class SeedObjectException extends RuntimeException { - public SeedObjectException(String message) { - super(message); - } - - public SeedObjectException(String message, Exception e) { - super(message, e); - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/Stream.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/Stream.java deleted file mode 100644 index ecc1492c728..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/Stream.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.io.Reader; -import java.util.Iterator; -import java.util.NoSuchElementException; -import java.util.Scanner; - -/** - * The {@code Stream} class implmenets {@link Iterable} to provide a simple mechanism for reading and parsing - * objects of a given type from data streamed via a {@link Reader} using a specified delimiter. - *

- * {@code Stream} assumes that data is being pushed to the provided {@link Reader} asynchronously and utilizes a - * {@code Scanner} to block during iteration if the next object is not available. - * - * @param The type of objects in the stream. - */ -public final class Stream implements Iterable { - /** - * The {@link Class} of the objects in the stream. - */ - private final Class valueType; - /** - * The {@link Scanner} used for reading from the input stream and blocking when neede during iteration. - */ - private final Scanner scanner; - - /** - * Constructs a new {@code Stream} with the specified value type, reader, and delimiter. - * - * @param valueType The class of the objects in the stream. - * @param reader The reader that provides the streamed data. - * @param delimiter The delimiter used to separate elements in the stream. - */ - public Stream(Class valueType, Reader reader, String delimiter) { - this.scanner = new Scanner(reader).useDelimiter(delimiter); - this.valueType = valueType; - } - - /** - * Returns an iterator over the elements in this stream that blocks during iteration when the next object is - * not yet available. - * - * @return An iterator that can be used to traverse the elements in the stream. - */ - @Override - public Iterator iterator() { - return new Iterator() { - /** - * Returns {@code true} if there are more elements in the stream. - *

- * Will block and wait for input if the stream has not ended and the next object is not yet available. - * - * @return {@code true} if there are more elements, {@code false} otherwise. - */ - @Override - public boolean hasNext() { - return scanner.hasNext(); - } - - /** - * Returns the next element in the stream. - *

- * Will block and wait for input if the stream has not ended and the next object is not yet available. - * - * @return The next element in the stream. - * @throws NoSuchElementException If there are no more elements in the stream. - */ - @Override - public T next() { - if (!scanner.hasNext()) { - throw new NoSuchElementException(); - } else { - try { - T parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - scanner.next().trim(), valueType); - return parsedResponse; - } catch (Exception e) { - throw new RuntimeException(e); - } - } - } - - /** - * Removing elements from {@code Stream} is not supported. - * - * @throws UnsupportedOperationException Always, as removal is not supported. - */ - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - }; - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/Suppliers.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/Suppliers.java deleted file mode 100644 index 5001ddf4767..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/core/Suppliers.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.core; - -import java.util.Objects; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Supplier; - -public final class Suppliers { - private Suppliers() {} - - public static Supplier memoize(Supplier delegate) { - AtomicReference value = new AtomicReference<>(); - return () -> { - T val = value.get(); - if (val == null) { - val = value.updateAndGet(cur -> cur == null ? Objects.requireNonNull(delegate.get()) : cur); - } - return val; - }; - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/requests/PostRootRequest.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/requests/PostRootRequest.java deleted file mode 100644 index 61d78f3a823..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/requests/PostRootRequest.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.requests; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import com.seed.object.types.InlineType1; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = PostRootRequest.Builder.class) -public final class PostRootRequest { - private final InlineType1 bar; - - private final String foo; - - private final Map additionalProperties; - - private PostRootRequest(InlineType1 bar, String foo, Map additionalProperties) { - this.bar = bar; - this.foo = foo; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("bar") - public InlineType1 getBar() { - return bar; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PostRootRequest && equalTo((PostRootRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PostRootRequest other) { - return bar.equals(other.bar) && foo.equals(other.foo); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bar, this.foo); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BarStage builder() { - return new Builder(); - } - - public interface BarStage { - FooStage bar(@NotNull InlineType1 bar); - - Builder from(PostRootRequest other); - } - - public interface FooStage { - _FinalStage foo(@NotNull String foo); - } - - public interface _FinalStage { - PostRootRequest build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BarStage, FooStage, _FinalStage { - private InlineType1 bar; - - private String foo; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(PostRootRequest other) { - bar(other.getBar()); - foo(other.getFoo()); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public FooStage bar(@NotNull InlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public _FinalStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - public PostRootRequest build() { - return new PostRootRequest(bar, foo, additionalProperties); - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlineEnum.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlineEnum.java deleted file mode 100644 index c092fdbeee4..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlineEnum.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonValue; - -public enum InlineEnum { - SUNNY("SUNNY"), - - CLOUDY("CLOUDY"), - - RAINING("RAINING"), - - SNOWING("SNOWING"); - - private final String value; - - InlineEnum(String value) { - this.value = value; - } - - @JsonValue - @java.lang.Override - public String toString() { - return this.value; - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlineType1.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlineType1.java deleted file mode 100644 index 1cd11b9008e..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlineType1.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = InlineType1.Builder.class) -public final class InlineType1 { - private final String foo; - - private final NestedInlineType1 bar; - - private final Map additionalProperties; - - private InlineType1(String foo, NestedInlineType1 bar, Map additionalProperties) { - this.foo = foo; - this.bar = bar; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public NestedInlineType1 getBar() { - return bar; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlineType1 && equalTo((InlineType1) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(InlineType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(@NotNull String foo); - - Builder from(InlineType1 other); - } - - public interface BarStage { - _FinalStage bar(@NotNull NestedInlineType1 bar); - } - - public interface _FinalStage { - InlineType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, _FinalStage { - private String foo; - - private NestedInlineType1 bar; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(InlineType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public _FinalStage bar(@NotNull NestedInlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - public InlineType1 build() { - return new InlineType1(foo, bar, additionalProperties); - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlineType2.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlineType2.java deleted file mode 100644 index 4b02ac98287..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlineType2.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = InlineType2.Builder.class) -public final class InlineType2 { - private final String baz; - - private final Map additionalProperties; - - private InlineType2(String baz, Map additionalProperties) { - this.baz = baz; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("baz") - public String getBaz() { - return baz; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlineType2 && equalTo((InlineType2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(InlineType2 other) { - return baz.equals(other.baz); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.baz); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BazStage builder() { - return new Builder(); - } - - public interface BazStage { - _FinalStage baz(@NotNull String baz); - - Builder from(InlineType2 other); - } - - public interface _FinalStage { - InlineType2 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BazStage, _FinalStage { - private String baz; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(InlineType2 other) { - baz(other.getBaz()); - return this; - } - - @java.lang.Override - @JsonSetter("baz") - public _FinalStage baz(@NotNull String baz) { - this.baz = Objects.requireNonNull(baz, "baz must not be null"); - return this; - } - - @java.lang.Override - public InlineType2 build() { - return new InlineType2(baz, additionalProperties); - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlinedDiscriminatedUnion1.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlinedDiscriminatedUnion1.java deleted file mode 100644 index fa7004fcaa0..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlinedDiscriminatedUnion1.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; - -public final class InlinedDiscriminatedUnion1 { - private final Value value; - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - private InlinedDiscriminatedUnion1(Value value) { - this.value = value; - } - - public T visit(Visitor visitor) { - return value.visit(visitor); - } - - public static InlinedDiscriminatedUnion1 type1(InlineType1 value) { - return new InlinedDiscriminatedUnion1(new Type1Value(value)); - } - - public static InlinedDiscriminatedUnion1 type2(InlineType2 value) { - return new InlinedDiscriminatedUnion1(new Type2Value(value)); - } - - public boolean isType1() { - return value instanceof Type1Value; - } - - public boolean isType2() { - return value instanceof Type2Value; - } - - public boolean _isUnknown() { - return value instanceof _UnknownValue; - } - - public Optional getType1() { - if (isType1()) { - return Optional.of(((Type1Value) value).value); - } - return Optional.empty(); - } - - public Optional getType2() { - if (isType2()) { - return Optional.of(((Type2Value) value).value); - } - return Optional.empty(); - } - - public Optional _getUnknown() { - if (_isUnknown()) { - return Optional.of(((_UnknownValue) value).value); - } - return Optional.empty(); - } - - @JsonValue - private Value getValue() { - return this.value; - } - - public interface Visitor { - T visitType1(InlineType1 type1); - - T visitType2(InlineType2 type2); - - T _visitUnknown(Object unknownType); - } - - @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class) - @JsonSubTypes({@JsonSubTypes.Type(Type1Value.class), @JsonSubTypes.Type(Type2Value.class)}) - @JsonIgnoreProperties(ignoreUnknown = true) - private interface Value { - T visit(Visitor visitor); - } - - @JsonTypeName("type1") - private static final class Type1Value implements Value { - @JsonUnwrapped - private InlineType1 value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private Type1Value() {} - - private Type1Value(InlineType1 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitType1(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Type1Value && equalTo((Type1Value) other); - } - - private boolean equalTo(Type1Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "value: " + value + "}"; - } - } - - @JsonTypeName("type2") - private static final class Type2Value implements Value { - @JsonUnwrapped - private InlineType2 value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private Type2Value() {} - - private Type2Value(InlineType2 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitType2(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Type2Value && equalTo((Type2Value) other); - } - - private boolean equalTo(Type2Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "value: " + value + "}"; - } - } - - private static final class _UnknownValue implements Value { - private String type; - - @JsonValue - private Object value; - - @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) - private _UnknownValue(@JsonProperty("value") Object value) {} - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor._visitUnknown(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof _UnknownValue && equalTo((_UnknownValue) other); - } - - private boolean equalTo(_UnknownValue other) { - return type.equals(other.type) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "type: " + type + ", value: " + value + "}"; - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlinedUndiscriminatedUnion1.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlinedUndiscriminatedUnion1.java deleted file mode 100644 index cf244dd256e..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/InlinedUndiscriminatedUnion1.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.seed.object.core.ObjectMappers; -import java.io.IOException; -import java.util.Objects; - -@JsonDeserialize(using = InlinedUndiscriminatedUnion1.Deserializer.class) -public final class InlinedUndiscriminatedUnion1 { - private final Object value; - - private final int type; - - private InlinedUndiscriminatedUnion1(Object value, int type) { - this.value = value; - this.type = type; - } - - @JsonValue - public Object get() { - return this.value; - } - - public T visit(Visitor visitor) { - if (this.type == 0) { - return visitor.visit((InlineType1) this.value); - } else if (this.type == 1) { - return visitor.visit((InlineType2) this.value); - } - throw new IllegalStateException("Failed to visit value. This should never happen."); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlinedUndiscriminatedUnion1 && equalTo((InlinedUndiscriminatedUnion1) other); - } - - private boolean equalTo(InlinedUndiscriminatedUnion1 other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return this.value.toString(); - } - - public static InlinedUndiscriminatedUnion1 of(InlineType1 value) { - return new InlinedUndiscriminatedUnion1(value, 0); - } - - public static InlinedUndiscriminatedUnion1 of(InlineType2 value) { - return new InlinedUndiscriminatedUnion1(value, 1); - } - - public interface Visitor { - T visit(InlineType1 value); - - T visit(InlineType2 value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(InlinedUndiscriminatedUnion1.class); - } - - @java.lang.Override - public InlinedUndiscriminatedUnion1 deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, InlineType1.class)); - } catch (IllegalArgumentException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, InlineType2.class)); - } catch (IllegalArgumentException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/NestedInlineType1.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/NestedInlineType1.java deleted file mode 100644 index 64febcc9d97..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/NestedInlineType1.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = NestedInlineType1.Builder.class) -public final class NestedInlineType1 { - private final String foo; - - private final String bar; - - private final InlineEnum myEnum; - - private final Map additionalProperties; - - private NestedInlineType1(String foo, String bar, InlineEnum myEnum, Map additionalProperties) { - this.foo = foo; - this.bar = bar; - this.myEnum = myEnum; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("myEnum") - public InlineEnum getMyEnum() { - return myEnum; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NestedInlineType1 && equalTo((NestedInlineType1) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(NestedInlineType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar) && myEnum.equals(other.myEnum); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar, this.myEnum); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(@NotNull String foo); - - Builder from(NestedInlineType1 other); - } - - public interface BarStage { - MyEnumStage bar(@NotNull String bar); - } - - public interface MyEnumStage { - _FinalStage myEnum(@NotNull InlineEnum myEnum); - } - - public interface _FinalStage { - NestedInlineType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, MyEnumStage, _FinalStage { - private String foo; - - private String bar; - - private InlineEnum myEnum; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(NestedInlineType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - myEnum(other.getMyEnum()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public MyEnumStage bar(@NotNull String bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("myEnum") - public _FinalStage myEnum(@NotNull InlineEnum myEnum) { - this.myEnum = Objects.requireNonNull(myEnum, "myEnum must not be null"); - return this; - } - - @java.lang.Override - public NestedInlineType1 build() { - return new NestedInlineType1(foo, bar, myEnum, additionalProperties); - } - } -} diff --git a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/RootType1.java b/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/RootType1.java deleted file mode 100644 index 25cca383157..00000000000 --- a/seed/java-sdk/inline-types/src/main/java/com/seed/object/types/RootType1.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.seed.object.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = RootType1.Builder.class) -public final class RootType1 { - private final String foo; - - private final InlineType1 bar; - - private final Map additionalProperties; - - private RootType1(String foo, InlineType1 bar, Map additionalProperties) { - this.foo = foo; - this.bar = bar; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public InlineType1 getBar() { - return bar; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RootType1 && equalTo((RootType1) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RootType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(@NotNull String foo); - - Builder from(RootType1 other); - } - - public interface BarStage { - _FinalStage bar(@NotNull InlineType1 bar); - } - - public interface _FinalStage { - RootType1 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FooStage, BarStage, _FinalStage { - private String foo; - - private InlineType1 bar; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(RootType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public _FinalStage bar(@NotNull InlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - public RootType1 build() { - return new RootType1(foo, bar, additionalProperties); - } - } -} diff --git a/seed/java-sdk/inline-types/src/test/java/com/seed/object/TestClient.java b/seed/java-sdk/inline-types/src/test/java/com/seed/object/TestClient.java deleted file mode 100644 index 37f1534fe0c..00000000000 --- a/seed/java-sdk/inline-types/src/test/java/com/seed/object/TestClient.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.seed.object; - -public final class TestClient { - public void test() { - // Add tests here and mark this file in .fernignore - assert true; - } -} diff --git a/seed/java-model/inline-types/.github/workflows/ci.yml b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.github/workflows/ci.yml similarity index 100% rename from seed/java-model/inline-types/.github/workflows/ci.yml rename to seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.github/workflows/ci.yml diff --git a/seed/java-model/inline-types/.gitignore b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.gitignore similarity index 100% rename from seed/java-model/inline-types/.gitignore rename to seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.gitignore diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/definition/api.yml b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/definition/api.yml new file mode 100644 index 00000000000..c437dc0ab29 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/definition/api.yml @@ -0,0 +1,4 @@ +name: api +error-discrimination: + strategy: status-code +auth: bearer diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/definition/imdb.yml b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/definition/imdb.yml new file mode 100644 index 00000000000..4f013d969e8 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/definition/imdb.yml @@ -0,0 +1,42 @@ +types: + MovieId: string + + Movie: + properties: + id: MovieId + title: string + rating: + type: double + docs: The rating scale is one to five stars + + CreateMovieRequest: + properties: + title: string + rating: double + +service: + auth: false + base-path: /movies + endpoints: + createMovie: + docs: Add a movie to the database + method: POST + path: /create-movie + request: CreateMovieRequest + response: + type: MovieId + status-code: 201 + + getMovie: + method: GET + path: /{movieId} + path-parameters: + movieId: MovieId + response: Movie + errors: + - MovieDoesNotExistError + +errors: + MovieDoesNotExistError: + status-code: 404 + type: MovieId diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/definition/service.yml b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/definition/service.yml new file mode 100644 index 00000000000..a253b468847 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/definition/service.yml @@ -0,0 +1,11 @@ +service: + auth: false + base-path: /test + endpoints: + test: + docs: A test endpoint + method: GET + path: /endpoint + response: + type: string + status-code: 200 \ No newline at end of file diff --git a/seed/csharp-model/inline-types/.mock/fern.config.json b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/fern.config.json similarity index 100% rename from seed/csharp-model/inline-types/.mock/fern.config.json rename to seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/fern.config.json diff --git a/seed/csharp-sdk/inline-types/.mock/generators.yml b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/generators.yml similarity index 100% rename from seed/csharp-sdk/inline-types/.mock/generators.yml rename to seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/.mock/generators.yml diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/build.gradle b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/build.gradle new file mode 100644 index 00000000000..325687305c1 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/build.gradle @@ -0,0 +1,101 @@ +plugins { + id 'java-library' + id 'maven-publish' + id 'com.diffplug.spotless' version '6.11.0' +} + +repositories { + mavenCentral() + maven { + url 'https://s01.oss.sonatype.org/content/repositories/releases/' + } +} + +dependencies { + api 'com.squareup.okhttp3:okhttp:4.12.0' + api 'com.fasterxml.jackson.core:jackson-databind:2.17.2' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' +} + + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + +tasks.withType(Javadoc) { + failOnError false + options.addStringOption('Xdoclint:none', '-quiet') +} + +spotless { + java { + palantirJavaFormat() + } +} + + +java { + withSourcesJar() + withJavadocJar() +} + + +group = 'com.fern' + +version = '0.0.1' + +jar { + dependsOn(":generatePomFileForMavenPublication") + archiveBaseName = "java-custom-package-prefix" +} + +sourcesJar { + archiveBaseName = "java-custom-package-prefix" +} + +javadocJar { + archiveBaseName = "java-custom-package-prefix" +} + +test { + useJUnitPlatform() + testLogging { + showStandardStreams = true + } +} + +publishing { + publications { + maven(MavenPublication) { + groupId = 'com.fern' + artifactId = 'java-custom-package-prefix' + version = '0.0.1' + from components.java + pom { + licenses { + license { + name = 'The MIT License (MIT)' + url = 'https://mit-license.org/' + } + } + scm { + connection = 'scm:git:git://github.com/java-custom-package-prefix/fern.git' + developerConnection = 'scm:git:git://github.com/java-custom-package-prefix/fern.git' + url = 'https://github.com/java-custom-package-prefix/fern' + } + } + } + } + repositories { + maven { + url "$System.env.MAVEN_PUBLISH_REGISTRY_URL" + credentials { + username "$System.env.MAVEN_USERNAME" + password "$System.env.MAVEN_PASSWORD" + } + } + } +} + diff --git a/seed/java-sdk/inline-types/sample-app/build.gradle b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/sample-app/build.gradle similarity index 100% rename from seed/java-sdk/inline-types/sample-app/build.gradle rename to seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/sample-app/build.gradle diff --git a/seed/java-sdk/inline-types/sample-app/src/main/java/sample/App.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/sample-app/src/main/java/sample/App.java similarity index 80% rename from seed/java-sdk/inline-types/sample-app/src/main/java/sample/App.java rename to seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/sample-app/src/main/java/sample/App.java index b115384f1d2..625e24c65cf 100644 --- a/seed/java-sdk/inline-types/sample-app/src/main/java/sample/App.java +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/sample-app/src/main/java/sample/App.java @@ -8,6 +8,6 @@ public final class App { public static void main(String[] args) { - // import com.seed.object.SeedObjectClient + // import com.customprefix.SeedApiClient } } diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/settings.gradle b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/settings.gradle new file mode 100644 index 00000000000..565887d9744 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/settings.gradle @@ -0,0 +1,3 @@ +rootProject.name = 'java-custom-package-prefix' + +include 'sample-app' \ No newline at end of file diff --git a/seed/csharp-model/inline-types/snippet-templates.json b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/snippet-templates.json similarity index 100% rename from seed/csharp-model/inline-types/snippet-templates.json rename to seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/snippet-templates.json diff --git a/seed/csharp-model/inline-types/snippet.json b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/snippet.json similarity index 100% rename from seed/csharp-model/inline-types/snippet.json rename to seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/snippet.json diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/SeedApiClient.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/SeedApiClient.java new file mode 100644 index 00000000000..7a2604ab6f2 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/SeedApiClient.java @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix; + +import com.customprefix.core.ClientOptions; +import com.customprefix.core.Suppliers; +import com.customprefix.resources.imdb.ImdbClient; +import com.customprefix.resources.service.ServiceClient; +import java.util.function.Supplier; + +public class SeedApiClient { + protected final ClientOptions clientOptions; + + protected final Supplier imdbClient; + + protected final Supplier serviceClient; + + public SeedApiClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.imdbClient = Suppliers.memoize(() -> new ImdbClient(clientOptions)); + this.serviceClient = Suppliers.memoize(() -> new ServiceClient(clientOptions)); + } + + public ImdbClient imdb() { + return this.imdbClient.get(); + } + + public ServiceClient service() { + return this.serviceClient.get(); + } + + public static SeedApiClientBuilder builder() { + return new SeedApiClientBuilder(); + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/SeedApiClientBuilder.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/SeedApiClientBuilder.java new file mode 100644 index 00000000000..7b9cf78329f --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/SeedApiClientBuilder.java @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix; + +import com.customprefix.core.ClientOptions; +import com.customprefix.core.Environment; + +public final class SeedApiClientBuilder { + private ClientOptions.Builder clientOptionsBuilder = ClientOptions.builder(); + + private String token = null; + + private Environment environment; + + /** + * Sets token + */ + public SeedApiClientBuilder token(String token) { + this.token = token; + return this; + } + + public SeedApiClientBuilder url(String url) { + this.environment = Environment.custom(url); + return this; + } + + public SeedApiClient build() { + this.clientOptionsBuilder.addHeader("Authorization", "Bearer " + this.token); + clientOptionsBuilder.environment(this.environment); + return new SeedApiClient(clientOptionsBuilder.build()); + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ClientOptions.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ClientOptions.java new file mode 100644 index 00000000000..9ab83ca8065 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ClientOptions.java @@ -0,0 +1,103 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; +import okhttp3.OkHttpClient; + +public final class ClientOptions { + private final Environment environment; + + private final Map headers; + + private final Map> headerSuppliers; + + private final OkHttpClient httpClient; + + private ClientOptions( + Environment environment, + Map headers, + Map> headerSuppliers, + OkHttpClient httpClient) { + this.environment = environment; + this.headers = new HashMap<>(); + this.headers.putAll(headers); + this.headers.putAll(new HashMap() { + { + put("X-Fern-Language", "JAVA"); + } + }); + this.headerSuppliers = headerSuppliers; + this.httpClient = httpClient; + } + + public Environment environment() { + return this.environment; + } + + public Map headers(RequestOptions requestOptions) { + Map values = new HashMap<>(this.headers); + headerSuppliers.forEach((key, supplier) -> { + values.put(key, supplier.get()); + }); + if (requestOptions != null) { + values.putAll(requestOptions.getHeaders()); + } + return values; + } + + public OkHttpClient httpClient() { + return this.httpClient; + } + + public OkHttpClient httpClientWithTimeout(RequestOptions requestOptions) { + if (requestOptions == null) { + return this.httpClient; + } + return this.httpClient + .newBuilder() + .callTimeout(requestOptions.getTimeout().get(), requestOptions.getTimeoutTimeUnit()) + .connectTimeout(0, TimeUnit.SECONDS) + .writeTimeout(0, TimeUnit.SECONDS) + .readTimeout(0, TimeUnit.SECONDS) + .build(); + } + + public static Builder builder() { + return new Builder(); + } + + public static final class Builder { + private Environment environment; + + private final Map headers = new HashMap<>(); + + private final Map> headerSuppliers = new HashMap<>(); + + public Builder environment(Environment environment) { + this.environment = environment; + return this; + } + + public Builder addHeader(String key, String value) { + this.headers.put(key, value); + return this; + } + + public Builder addHeader(String key, Supplier value) { + this.headerSuppliers.put(key, value); + return this; + } + + public ClientOptions build() { + OkHttpClient okhttpClient = new OkHttpClient.Builder() + .addInterceptor(new RetryInterceptor(3)) + .build(); + return new ClientOptions(environment, headers, headerSuppliers, okhttpClient); + } + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/DateTimeDeserializer.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/DateTimeDeserializer.java new file mode 100644 index 00000000000..7ec50181466 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/DateTimeDeserializer.java @@ -0,0 +1,55 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.module.SimpleModule; +import java.io.IOException; +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalQueries; + +/** + * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. + */ +class DateTimeDeserializer extends JsonDeserializer { + private static final SimpleModule MODULE; + + static { + MODULE = new SimpleModule().addDeserializer(OffsetDateTime.class, new DateTimeDeserializer()); + } + + /** + * Gets a module wrapping this deserializer as an adapter for the Jackson ObjectMapper. + * + * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. + */ + public static SimpleModule getModule() { + return MODULE; + } + + @Override + public OffsetDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { + JsonToken token = parser.currentToken(); + if (token == JsonToken.VALUE_NUMBER_INT) { + return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC); + } else { + TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( + parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from); + + if (temporal.query(TemporalQueries.offset()) == null) { + return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); + } else { + return OffsetDateTime.from(temporal); + } + } + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/Environment.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/Environment.java new file mode 100644 index 00000000000..8a7a2a0c750 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/Environment.java @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +public final class Environment { + private final String url; + + private Environment(String url) { + this.url = url; + } + + public String getUrl() { + return this.url; + } + + public static Environment custom(String url) { + return new Environment(url); + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/FileStream.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/FileStream.java new file mode 100644 index 00000000000..c334ce346f7 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/FileStream.java @@ -0,0 +1,60 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import java.io.InputStream; +import java.util.Objects; +import okhttp3.MediaType; +import okhttp3.RequestBody; +import org.jetbrains.annotations.Nullable; + +/** + * Represents a file stream with associated metadata for file uploads. + */ +public class FileStream { + private final InputStream inputStream; + private final String fileName; + private final MediaType contentType; + + /** + * Constructs a FileStream with the given input stream and optional metadata. + * + * @param inputStream The input stream of the file content. Must not be null. + * @param fileName The name of the file, or null if unknown. + * @param contentType The MIME type of the file content, or null if unknown. + * @throws NullPointerException if inputStream is null + */ + public FileStream(InputStream inputStream, @Nullable String fileName, @Nullable MediaType contentType) { + this.inputStream = Objects.requireNonNull(inputStream, "Input stream cannot be null"); + this.fileName = fileName; + this.contentType = contentType; + } + + public FileStream(InputStream inputStream) { + this(inputStream, null, null); + } + + public InputStream getInputStream() { + return inputStream; + } + + @Nullable + public String getFileName() { + return fileName; + } + + @Nullable + public MediaType getContentType() { + return contentType; + } + + /** + * Creates a RequestBody suitable for use with OkHttp client. + * + * @return A RequestBody instance representing this file stream. + */ + public RequestBody toRequestBody() { + return new InputStreamRequestBody(contentType, inputStream); + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/InputStreamRequestBody.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/InputStreamRequestBody.java new file mode 100644 index 00000000000..cba65e17bff --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/InputStreamRequestBody.java @@ -0,0 +1,79 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Objects; +import okhttp3.MediaType; +import okhttp3.RequestBody; +import okhttp3.internal.Util; +import okio.BufferedSink; +import okio.Okio; +import okio.Source; +import org.jetbrains.annotations.Nullable; + +/** + * A custom implementation of OkHttp's RequestBody that wraps an InputStream. + * This class allows streaming of data from an InputStream directly to an HTTP request body, + * which is useful for file uploads or sending large amounts of data without loading it all into memory. + */ +public class InputStreamRequestBody extends RequestBody { + private final InputStream inputStream; + private final MediaType contentType; + + /** + * Constructs an InputStreamRequestBody with the specified content type and input stream. + * + * @param contentType the MediaType of the content, or null if not known + * @param inputStream the InputStream containing the data to be sent + * @throws NullPointerException if inputStream is null + */ + public InputStreamRequestBody(@Nullable MediaType contentType, InputStream inputStream) { + this.contentType = contentType; + this.inputStream = Objects.requireNonNull(inputStream, "inputStream == null"); + } + + /** + * Returns the content type of this request body. + * + * @return the MediaType of the content, or null if not specified + */ + @Nullable + @Override + public MediaType contentType() { + return contentType; + } + + /** + * Returns the content length of this request body, if known. + * This method attempts to determine the length using the InputStream's available() method, + * which may not always accurately reflect the total length of the stream. + * + * @return the content length, or -1 if the length is unknown + * @throws IOException if an I/O error occurs + */ + @Override + public long contentLength() throws IOException { + return inputStream.available() == 0 ? -1 : inputStream.available(); + } + + /** + * Writes the content of the InputStream to the given BufferedSink. + * This method is responsible for transferring the data from the InputStream to the network request. + * + * @param sink the BufferedSink to write the content to + * @throws IOException if an I/O error occurs during writing + */ + @Override + public void writeTo(BufferedSink sink) throws IOException { + Source source = null; + try { + source = Okio.source(inputStream); + sink.writeAll(source); + } finally { + Util.closeQuietly(Objects.requireNonNull(source)); + } + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/MediaTypes.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/MediaTypes.java new file mode 100644 index 00000000000..fcf1b8a8bfa --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/MediaTypes.java @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import okhttp3.MediaType; + +public final class MediaTypes { + + public static final MediaType APPLICATION_JSON = MediaType.parse("application/json"); + + private MediaTypes() {} +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ObjectMappers.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ObjectMappers.java new file mode 100644 index 00000000000..f5d87112b73 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ObjectMappers.java @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import java.io.IOException; + +public final class ObjectMappers { + public static final ObjectMapper JSON_MAPPER = JsonMapper.builder() + .addModule(new Jdk8Module()) + .addModule(new JavaTimeModule()) + .addModule(DateTimeDeserializer.getModule()) + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .build(); + + private ObjectMappers() {} + + public static String stringify(Object o) { + try { + return JSON_MAPPER + .setSerializationInclusion(JsonInclude.Include.ALWAYS) + .writerWithDefaultPrettyPrinter() + .writeValueAsString(o); + } catch (IOException e) { + return o.getClass().getName() + "@" + Integer.toHexString(o.hashCode()); + } + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/RequestOptions.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/RequestOptions.java new file mode 100644 index 00000000000..56d1336f2be --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/RequestOptions.java @@ -0,0 +1,71 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + +public final class RequestOptions { + private final String token; + + private final Optional timeout; + + private final TimeUnit timeoutTimeUnit; + + private RequestOptions(String token, Optional timeout, TimeUnit timeoutTimeUnit) { + this.token = token; + this.timeout = timeout; + this.timeoutTimeUnit = timeoutTimeUnit; + } + + public Optional getTimeout() { + return timeout; + } + + public TimeUnit getTimeoutTimeUnit() { + return timeoutTimeUnit; + } + + public Map getHeaders() { + Map headers = new HashMap<>(); + if (this.token != null) { + headers.put("Authorization", "Bearer " + this.token); + } + return headers; + } + + public static Builder builder() { + return new Builder(); + } + + public static final class Builder { + private String token = null; + + private Optional timeout = Optional.empty(); + + private TimeUnit timeoutTimeUnit = TimeUnit.SECONDS; + + public Builder token(String token) { + this.token = token; + return this; + } + + public Builder timeout(Integer timeout) { + this.timeout = Optional.of(timeout); + return this; + } + + public Builder timeout(Integer timeout, TimeUnit timeoutTimeUnit) { + this.timeout = Optional.of(timeout); + this.timeoutTimeUnit = timeoutTimeUnit; + return this; + } + + public RequestOptions build() { + return new RequestOptions(token, timeout, timeoutTimeUnit); + } + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ResponseBodyInputStream.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ResponseBodyInputStream.java new file mode 100644 index 00000000000..7ec3762ce4b --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ResponseBodyInputStream.java @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import java.io.FilterInputStream; +import java.io.IOException; +import okhttp3.Response; + +/** + * A custom InputStream that wraps the InputStream from the OkHttp Response and ensures that the + * OkHttp Response object is properly closed when the stream is closed. + * + * This class extends FilterInputStream and takes an OkHttp Response object as a parameter. + * It retrieves the InputStream from the Response and overrides the close method to close + * both the InputStream and the Response object, ensuring proper resource management and preventing + * premature closure of the underlying HTTP connection. + */ +public class ResponseBodyInputStream extends FilterInputStream { + private final Response response; + + /** + * Constructs a ResponseBodyInputStream that wraps the InputStream from the given OkHttp + * Response object. + * + * @param response the OkHttp Response object from which the InputStream is retrieved + * @throws IOException if an I/O error occurs while retrieving the InputStream + */ + public ResponseBodyInputStream(Response response) throws IOException { + super(response.body().byteStream()); + this.response = response; + } + + /** + * Closes the InputStream and the associated OkHttp Response object. This ensures that the + * underlying HTTP connection is properly closed after the stream is no longer needed. + * + * @throws IOException if an I/O error occurs + */ + @Override + public void close() throws IOException { + super.close(); + response.close(); // Ensure the response is closed when the stream is closed + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ResponseBodyReader.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ResponseBodyReader.java new file mode 100644 index 00000000000..8d943224aa6 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/ResponseBodyReader.java @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import java.io.FilterReader; +import java.io.IOException; +import okhttp3.Response; + +/** + * A custom Reader that wraps the Reader from the OkHttp Response and ensures that the + * OkHttp Response object is properly closed when the reader is closed. + * + * This class extends FilterReader and takes an OkHttp Response object as a parameter. + * It retrieves the Reader from the Response and overrides the close method to close + * both the Reader and the Response object, ensuring proper resource management and preventing + * premature closure of the underlying HTTP connection. + */ +public class ResponseBodyReader extends FilterReader { + private final Response response; + + /** + * Constructs a ResponseBodyReader that wraps the Reader from the given OkHttp Response object. + * + * @param response the OkHttp Response object from which the Reader is retrieved + * @throws IOException if an I/O error occurs while retrieving the Reader + */ + public ResponseBodyReader(Response response) throws IOException { + super(response.body().charStream()); + this.response = response; + } + + /** + * Closes the Reader and the associated OkHttp Response object. This ensures that the + * underlying HTTP connection is properly closed after the reader is no longer needed. + * + * @throws IOException if an I/O error occurs + */ + @Override + public void close() throws IOException { + super.close(); + response.close(); // Ensure the response is closed when the reader is closed + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/RetryInterceptor.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/RetryInterceptor.java new file mode 100644 index 00000000000..023ab819ec2 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/RetryInterceptor.java @@ -0,0 +1,78 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import java.io.IOException; +import java.time.Duration; +import java.util.Optional; +import java.util.Random; +import okhttp3.Interceptor; +import okhttp3.Response; + +public class RetryInterceptor implements Interceptor { + + private static final Duration ONE_SECOND = Duration.ofSeconds(1); + private final ExponentialBackoff backoff; + private final Random random = new Random(); + + public RetryInterceptor(int maxRetries) { + this.backoff = new ExponentialBackoff(maxRetries); + } + + @Override + public Response intercept(Chain chain) throws IOException { + Response response = chain.proceed(chain.request()); + + if (shouldRetry(response.code())) { + return retryChain(response, chain); + } + + return response; + } + + private Response retryChain(Response response, Chain chain) throws IOException { + Optional nextBackoff = this.backoff.nextBackoff(); + while (nextBackoff.isPresent()) { + try { + Thread.sleep(nextBackoff.get().toMillis()); + } catch (InterruptedException e) { + throw new IOException("Interrupted while trying request", e); + } + response.close(); + response = chain.proceed(chain.request()); + if (shouldRetry(response.code())) { + nextBackoff = this.backoff.nextBackoff(); + } else { + return response; + } + } + + return response; + } + + private static boolean shouldRetry(int statusCode) { + return statusCode == 408 || statusCode == 409 || statusCode == 429 || statusCode >= 500; + } + + private final class ExponentialBackoff { + + private final int maxNumRetries; + + private int retryNumber = 0; + + ExponentialBackoff(int maxNumRetries) { + this.maxNumRetries = maxNumRetries; + } + + public Optional nextBackoff() { + retryNumber += 1; + if (retryNumber > maxNumRetries) { + return Optional.empty(); + } + + int upperBound = (int) Math.pow(2, retryNumber); + return Optional.of(ONE_SECOND.multipliedBy(random.nextInt(upperBound))); + } + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/SeedApiApiException.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/SeedApiApiException.java new file mode 100644 index 00000000000..d5cb9f62ba6 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/SeedApiApiException.java @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +/** + * This exception type will be thrown for any non-2XX API responses. + */ +public class SeedApiApiException extends SeedApiException { + /** + * The error code of the response that triggered the exception. + */ + private final int statusCode; + + /** + * The body of the response that triggered the exception. + */ + private final Object body; + + public SeedApiApiException(String message, int statusCode, Object body) { + super(message); + this.statusCode = statusCode; + this.body = body; + } + + /** + * @return the statusCode + */ + public int statusCode() { + return this.statusCode; + } + + /** + * @return the body + */ + public Object body() { + return this.body; + } + + @java.lang.Override + public String toString() { + return "SeedApiApiException{" + "message: " + getMessage() + ", statusCode: " + statusCode + ", body: " + body + + "}"; + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/SeedApiException.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/SeedApiException.java new file mode 100644 index 00000000000..4f9f1c4e3f1 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/SeedApiException.java @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +/** + * This class serves as the base exception for all errors in the SDK. + */ +public class SeedApiException extends RuntimeException { + public SeedApiException(String message) { + super(message); + } + + public SeedApiException(String message, Exception e) { + super(message, e); + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/Stream.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/Stream.java new file mode 100644 index 00000000000..c43a685ee2d --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/Stream.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import java.io.Reader; +import java.util.Iterator; +import java.util.NoSuchElementException; +import java.util.Scanner; + +/** + * The {@code Stream} class implmenets {@link Iterable} to provide a simple mechanism for reading and parsing + * objects of a given type from data streamed via a {@link Reader} using a specified delimiter. + *

+ * {@code Stream} assumes that data is being pushed to the provided {@link Reader} asynchronously and utilizes a + * {@code Scanner} to block during iteration if the next object is not available. + * + * @param The type of objects in the stream. + */ +public final class Stream implements Iterable { + /** + * The {@link Class} of the objects in the stream. + */ + private final Class valueType; + /** + * The {@link Scanner} used for reading from the input stream and blocking when neede during iteration. + */ + private final Scanner scanner; + + /** + * Constructs a new {@code Stream} with the specified value type, reader, and delimiter. + * + * @param valueType The class of the objects in the stream. + * @param reader The reader that provides the streamed data. + * @param delimiter The delimiter used to separate elements in the stream. + */ + public Stream(Class valueType, Reader reader, String delimiter) { + this.scanner = new Scanner(reader).useDelimiter(delimiter); + this.valueType = valueType; + } + + /** + * Returns an iterator over the elements in this stream that blocks during iteration when the next object is + * not yet available. + * + * @return An iterator that can be used to traverse the elements in the stream. + */ + @Override + public Iterator iterator() { + return new Iterator() { + /** + * Returns {@code true} if there are more elements in the stream. + *

+ * Will block and wait for input if the stream has not ended and the next object is not yet available. + * + * @return {@code true} if there are more elements, {@code false} otherwise. + */ + @Override + public boolean hasNext() { + return scanner.hasNext(); + } + + /** + * Returns the next element in the stream. + *

+ * Will block and wait for input if the stream has not ended and the next object is not yet available. + * + * @return The next element in the stream. + * @throws NoSuchElementException If there are no more elements in the stream. + */ + @Override + public T next() { + if (!scanner.hasNext()) { + throw new NoSuchElementException(); + } else { + try { + T parsedResponse = ObjectMappers.JSON_MAPPER.readValue( + scanner.next().trim(), valueType); + return parsedResponse; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + /** + * Removing elements from {@code Stream} is not supported. + * + * @throws UnsupportedOperationException Always, as removal is not supported. + */ + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/Suppliers.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/Suppliers.java new file mode 100644 index 00000000000..aedc1c31f7c --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/core/Suppliers.java @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.core; + +import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Supplier; + +public final class Suppliers { + private Suppliers() {} + + public static Supplier memoize(Supplier delegate) { + AtomicReference value = new AtomicReference<>(); + return () -> { + T val = value.get(); + if (val == null) { + val = value.updateAndGet(cur -> cur == null ? Objects.requireNonNull(delegate.get()) : cur); + } + return val; + }; + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/ImdbClient.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/ImdbClient.java new file mode 100644 index 00000000000..79ef86992a0 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/ImdbClient.java @@ -0,0 +1,122 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.resources.imdb; + +import com.customprefix.core.ClientOptions; +import com.customprefix.core.MediaTypes; +import com.customprefix.core.ObjectMappers; +import com.customprefix.core.RequestOptions; +import com.customprefix.core.SeedApiApiException; +import com.customprefix.core.SeedApiException; +import com.customprefix.resources.imdb.errors.MovieDoesNotExistError; +import com.customprefix.resources.imdb.types.CreateMovieRequest; +import com.customprefix.resources.imdb.types.Movie; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.io.IOException; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class ImdbClient { + protected final ClientOptions clientOptions; + + public ImdbClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Add a movie to the database + */ + public String createMovie(CreateMovieRequest request) { + return createMovie(request, null); + } + + /** + * Add a movie to the database + */ + public String createMovie(CreateMovieRequest request, RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("movies") + .addPathSegments("create-movie") + .build(); + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedApiException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), String.class); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + throw new SeedApiApiException( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class)); + } catch (IOException e) { + throw new SeedApiException("Network error executing HTTP request", e); + } + } + + public Movie getMovie(String movieId) { + return getMovie(movieId, null); + } + + public Movie getMovie(String movieId, RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("movies") + .addPathSegment(movieId) + .build(); + Request okhttpRequest = new Request.Builder() + .url(httpUrl) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Movie.class); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + try { + if (response.code() == 404) { + throw new MovieDoesNotExistError( + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, String.class)); + } + } catch (JsonProcessingException ignored) { + // unable to map error response, throwing generic error + } + throw new SeedApiApiException( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class)); + } catch (IOException e) { + throw new SeedApiException("Network error executing HTTP request", e); + } + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/errors/MovieDoesNotExistError.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/errors/MovieDoesNotExistError.java new file mode 100644 index 00000000000..ba240d7a9a2 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/errors/MovieDoesNotExistError.java @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.resources.imdb.errors; + +import com.customprefix.core.SeedApiApiException; + +public final class MovieDoesNotExistError extends SeedApiApiException { + /** + * The body of the response that triggered the exception. + */ + private final String body; + + public MovieDoesNotExistError(String body) { + super("MovieDoesNotExistError", 404, body); + this.body = body; + } + + /** + * @return the body + */ + @java.lang.Override + public String body() { + return this.body; + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/types/CreateMovieRequest.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/types/CreateMovieRequest.java new file mode 100644 index 00000000000..9a96cd726b4 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/types/CreateMovieRequest.java @@ -0,0 +1,124 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.resources.imdb.types; + +import com.customprefix.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = CreateMovieRequest.Builder.class) +public final class CreateMovieRequest { + private final String title; + + private final double rating; + + private final Map additionalProperties; + + private CreateMovieRequest(String title, double rating, Map additionalProperties) { + this.title = title; + this.rating = rating; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("title") + public String getTitle() { + return title; + } + + @JsonProperty("rating") + public double getRating() { + return rating; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreateMovieRequest && equalTo((CreateMovieRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(CreateMovieRequest other) { + return title.equals(other.title) && rating == other.rating; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.title, this.rating); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static TitleStage builder() { + return new Builder(); + } + + public interface TitleStage { + RatingStage title(@NotNull String title); + + Builder from(CreateMovieRequest other); + } + + public interface RatingStage { + _FinalStage rating(double rating); + } + + public interface _FinalStage { + CreateMovieRequest build(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements TitleStage, RatingStage, _FinalStage { + private String title; + + private double rating; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(CreateMovieRequest other) { + title(other.getTitle()); + rating(other.getRating()); + return this; + } + + @java.lang.Override + @JsonSetter("title") + public RatingStage title(@NotNull String title) { + this.title = Objects.requireNonNull(title, "title must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("rating") + public _FinalStage rating(double rating) { + this.rating = rating; + return this; + } + + @java.lang.Override + public CreateMovieRequest build() { + return new CreateMovieRequest(title, rating, additionalProperties); + } + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/types/Movie.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/types/Movie.java new file mode 100644 index 00000000000..aa947526222 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/imdb/types/Movie.java @@ -0,0 +1,153 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.resources.imdb.types; + +import com.customprefix.core.ObjectMappers; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Movie.Builder.class) +public final class Movie { + private final String id; + + private final String title; + + private final double rating; + + private final Map additionalProperties; + + private Movie(String id, String title, double rating, Map additionalProperties) { + this.id = id; + this.title = title; + this.rating = rating; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public String getId() { + return id; + } + + @JsonProperty("title") + public String getTitle() { + return title; + } + + /** + * @return The rating scale is one to five stars + */ + @JsonProperty("rating") + public double getRating() { + return rating; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof Movie && equalTo((Movie) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Movie other) { + return id.equals(other.id) && title.equals(other.title) && rating == other.rating; + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.id, this.title, this.rating); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static IdStage builder() { + return new Builder(); + } + + public interface IdStage { + TitleStage id(@NotNull String id); + + Builder from(Movie other); + } + + public interface TitleStage { + RatingStage title(@NotNull String title); + } + + public interface RatingStage { + _FinalStage rating(double rating); + } + + public interface _FinalStage { + Movie build(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements IdStage, TitleStage, RatingStage, _FinalStage { + private String id; + + private String title; + + private double rating; + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Movie other) { + id(other.getId()); + title(other.getTitle()); + rating(other.getRating()); + return this; + } + + @java.lang.Override + @JsonSetter("id") + public TitleStage id(@NotNull String id) { + this.id = Objects.requireNonNull(id, "id must not be null"); + return this; + } + + @java.lang.Override + @JsonSetter("title") + public RatingStage title(@NotNull String title) { + this.title = Objects.requireNonNull(title, "title must not be null"); + return this; + } + + /** + *

The rating scale is one to five stars

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("rating") + public _FinalStage rating(double rating) { + this.rating = rating; + return this; + } + + @java.lang.Override + public Movie build() { + return new Movie(id, title, rating, additionalProperties); + } + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/service/ServiceClient.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/service/ServiceClient.java new file mode 100644 index 00000000000..656e6124f20 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/main/java/com/customprefix/resources/service/ServiceClient.java @@ -0,0 +1,66 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix.resources.service; + +import com.customprefix.core.ClientOptions; +import com.customprefix.core.ObjectMappers; +import com.customprefix.core.RequestOptions; +import com.customprefix.core.SeedApiApiException; +import com.customprefix.core.SeedApiException; +import java.io.IOException; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class ServiceClient { + protected final ClientOptions clientOptions; + + public ServiceClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * A test endpoint + */ + public String test() { + return test(null); + } + + /** + * A test endpoint + */ + public String test(RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("test") + .addPathSegments("endpoint") + .build(); + Request okhttpRequest = new Request.Builder() + .url(httpUrl) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), String.class); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + throw new SeedApiApiException( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class)); + } catch (IOException e) { + throw new SeedApiException("Network error executing HTTP request", e); + } + } +} diff --git a/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/test/java/com/customprefix/TestClient.java b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/test/java/com/customprefix/TestClient.java new file mode 100644 index 00000000000..f78f2a82cd6 --- /dev/null +++ b/seed/java-sdk/java-custom-package-prefix/java-custom-package-prefix/src/test/java/com/customprefix/TestClient.java @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.customprefix; + +public final class TestClient { + public void test() { + // Add tests here and mark this file in .fernignore + assert true; + } +} diff --git a/seed/java-sdk/object/src/main/java/com/seed/object/types/Type.java b/seed/java-sdk/object/src/main/java/com/seed/object/types/Type.java index f4776e60540..6ce8b968349 100644 --- a/seed/java-sdk/object/src/main/java/com/seed/object/types/Type.java +++ b/seed/java-sdk/object/src/main/java/com/seed/object/types/Type.java @@ -65,11 +65,11 @@ public final class Type { private final Name nineteen; - private final int twenty; + private final long twenty; private final long twentyone; - private final double twentytwo; + private final float twentytwo; private final BigInteger twentythree; @@ -94,9 +94,9 @@ private Type( List> sixteen, List> seventeen, Name nineteen, - int twenty, + long twenty, long twentyone, - double twentytwo, + float twentytwo, BigInteger twentythree, Map additionalProperties) { this.one = one; @@ -220,7 +220,7 @@ public Name getNineteen() { } @JsonProperty("twenty") - public int getTwenty() { + public long getTwenty() { return twenty; } @@ -230,7 +230,7 @@ public long getTwentyone() { } @JsonProperty("twentytwo") - public double getTwentytwo() { + public float getTwentytwo() { return twentytwo; } @@ -358,7 +358,7 @@ public interface NineteenStage { } public interface TwentyStage { - TwentyoneStage twenty(int twenty); + TwentyoneStage twenty(long twenty); } public interface TwentyoneStage { @@ -366,7 +366,7 @@ public interface TwentyoneStage { } public interface TwentytwoStage { - TwentythreeStage twentytwo(double twentytwo); + TwentythreeStage twentytwo(float twentytwo); } public interface TwentythreeStage { @@ -457,11 +457,11 @@ public static final class Builder private Name nineteen; - private int twenty; + private long twenty; private long twentyone; - private double twentytwo; + private float twentytwo; private BigInteger twentythree; @@ -590,7 +590,7 @@ public TwentyStage nineteen(@NotNull Name nineteen) { @java.lang.Override @JsonSetter("twenty") - public TwentyoneStage twenty(int twenty) { + public TwentyoneStage twenty(long twenty) { this.twenty = twenty; return this; } @@ -604,7 +604,7 @@ public TwentytwoStage twentyone(long twentyone) { @java.lang.Override @JsonSetter("twentytwo") - public TwentythreeStage twentytwo(double twentytwo) { + public TwentythreeStage twentytwo(float twentytwo) { this.twentytwo = twentytwo; return this; } diff --git a/seed/java-sdk/pagination/src/main/java/com/seed/pagination/resources/users/UsersClient.java b/seed/java-sdk/pagination/src/main/java/com/seed/pagination/resources/users/UsersClient.java index 52737640676..2a8316689cd 100644 --- a/seed/java-sdk/pagination/src/main/java/com/seed/pagination/resources/users/UsersClient.java +++ b/seed/java-sdk/pagination/src/main/java/com/seed/pagination/resources/users/UsersClient.java @@ -111,16 +111,16 @@ public SyncPagingIterable listWithCursorPagination( } } - public ListUsersPaginationResponse listWithBodyCursorPagination() { - return listWithBodyCursorPagination( + public void listWithBodyCursorPagination() { + listWithBodyCursorPagination( ListUsersBodyCursorPaginationRequest.builder().build()); } - public ListUsersPaginationResponse listWithBodyCursorPagination(ListUsersBodyCursorPaginationRequest request) { - return listWithBodyCursorPagination(request, null); + public void listWithBodyCursorPagination(ListUsersBodyCursorPaginationRequest request) { + listWithBodyCursorPagination(request, null); } - public ListUsersPaginationResponse listWithBodyCursorPagination( + public void listWithBodyCursorPagination( ListUsersBodyCursorPaginationRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -146,7 +146,8 @@ public ListUsersPaginationResponse listWithBodyCursorPagination( try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { - return ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListUsersPaginationResponse.class); + ListUsersPaginationResponse parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListUsersPaginationResponse.class); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; throw new SeedPaginationApiException( @@ -219,16 +220,16 @@ public SyncPagingIterable listWithOffsetPagination( } } - public ListUsersPaginationResponse listWithBodyOffsetPagination() { - return listWithBodyOffsetPagination( + public void listWithBodyOffsetPagination() { + listWithBodyOffsetPagination( ListUsersBodyOffsetPaginationRequest.builder().build()); } - public ListUsersPaginationResponse listWithBodyOffsetPagination(ListUsersBodyOffsetPaginationRequest request) { - return listWithBodyOffsetPagination(request, null); + public void listWithBodyOffsetPagination(ListUsersBodyOffsetPaginationRequest request) { + listWithBodyOffsetPagination(request, null); } - public ListUsersPaginationResponse listWithBodyOffsetPagination( + public void listWithBodyOffsetPagination( ListUsersBodyOffsetPaginationRequest request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -254,7 +255,8 @@ public ListUsersPaginationResponse listWithBodyOffsetPagination( try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { - return ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListUsersPaginationResponse.class); + ListUsersPaginationResponse parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListUsersPaginationResponse.class); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; throw new SeedPaginationApiException( @@ -266,16 +268,16 @@ public ListUsersPaginationResponse listWithBodyOffsetPagination( } } - public ListUsersPaginationResponse listWithOffsetStepPagination() { + public SyncPagingIterable listWithOffsetStepPagination() { return listWithOffsetStepPagination( ListUsersOffsetStepPaginationRequest.builder().build()); } - public ListUsersPaginationResponse listWithOffsetStepPagination(ListUsersOffsetStepPaginationRequest request) { + public SyncPagingIterable listWithOffsetStepPagination(ListUsersOffsetStepPaginationRequest request) { return listWithOffsetStepPagination(request, null); } - public ListUsersPaginationResponse listWithOffsetStepPagination( + public SyncPagingIterable listWithOffsetStepPagination( ListUsersOffsetStepPaginationRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -302,7 +304,16 @@ public ListUsersPaginationResponse listWithOffsetStepPagination( try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { - return ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListUsersPaginationResponse.class); + ListUsersPaginationResponse parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListUsersPaginationResponse.class); + int newPageNumber = request.getPage().map(page -> page + 1).orElse(1); + ListUsersOffsetStepPaginationRequest nextRequest = ListUsersOffsetStepPaginationRequest.builder() + .from(request) + .page(newPageNumber) + .build(); + List result = parsedResponse.getData(); + return new SyncPagingIterable<>( + true, result, () -> listWithOffsetStepPagination(nextRequest, requestOptions)); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; throw new SeedPaginationApiException( @@ -314,17 +325,17 @@ public ListUsersPaginationResponse listWithOffsetStepPagination( } } - public ListUsersPaginationResponse listWithOffsetPaginationHasNextPage() { + public SyncPagingIterable listWithOffsetPaginationHasNextPage() { return listWithOffsetPaginationHasNextPage( ListWithOffsetPaginationHasNextPageRequest.builder().build()); } - public ListUsersPaginationResponse listWithOffsetPaginationHasNextPage( + public SyncPagingIterable listWithOffsetPaginationHasNextPage( ListWithOffsetPaginationHasNextPageRequest request) { return listWithOffsetPaginationHasNextPage(request, null); } - public ListUsersPaginationResponse listWithOffsetPaginationHasNextPage( + public SyncPagingIterable listWithOffsetPaginationHasNextPage( ListWithOffsetPaginationHasNextPageRequest request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -351,7 +362,17 @@ public ListUsersPaginationResponse listWithOffsetPaginationHasNextPage( try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { - return ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListUsersPaginationResponse.class); + ListUsersPaginationResponse parsedResponse = + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListUsersPaginationResponse.class); + int newPageNumber = request.getPage().map(page -> page + 1).orElse(1); + ListWithOffsetPaginationHasNextPageRequest nextRequest = + ListWithOffsetPaginationHasNextPageRequest.builder() + .from(request) + .page(newPageNumber) + .build(); + List result = parsedResponse.getData(); + return new SyncPagingIterable<>( + true, result, () -> listWithOffsetPaginationHasNextPage(nextRequest, requestOptions)); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; throw new SeedPaginationApiException( diff --git a/seed/java-sdk/seed.yml b/seed/java-sdk/seed.yml index bca41117392..d020c8f2daa 100644 --- a/seed/java-sdk/seed.yml +++ b/seed/java-sdk/seed.yml @@ -1,4 +1,4 @@ -irVersion: v46 +irVersion: v53 displayName: Java SDK changelogLocation: ../../generators/java/sdk/versions.yml image: fernapi/fern-java-sdk @@ -82,6 +82,10 @@ fixtures: - customConfig: disable-required-property-builder-checks: true outputFolder: disable-required-property-builder-checks + java-custom-package-prefix: + - customConfig: + package-prefix: "com.customprefix" + outputFolder: java-custom-package-prefix scripts: - docker: fernapi/java-seed commands: @@ -96,3 +100,4 @@ allowedFailures: - query-parameters - trace - unions + - streaming-parameter diff --git a/seed/java-spring/inline-types/.mock/definition/__package__.yml b/seed/java-spring/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/java-spring/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/java-spring/inline-types/.mock/definition/api.yml b/seed/java-spring/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/java-spring/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/java-spring/inline-types/.mock/fern.config.json b/seed/java-spring/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/java-spring/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/java-spring/inline-types/.mock/generators.yml b/seed/java-spring/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/java-spring/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/java-spring/inline-types/RootService.java b/seed/java-spring/inline-types/RootService.java deleted file mode 100644 index 5375c06c49a..00000000000 --- a/seed/java-spring/inline-types/RootService.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import requests.PostRootRequest; -import types.RootType1; - -@RequestMapping( - path = "/root" -) -public interface RootService { - @PostMapping( - value = "/root", - produces = "application/json", - consumes = "application/json" - ) - RootType1 getRoot(@RequestBody PostRootRequest body); -} diff --git a/seed/java-spring/inline-types/core/APIException.java b/seed/java-spring/inline-types/core/APIException.java deleted file mode 100644 index 27289cf9b2e..00000000000 --- a/seed/java-spring/inline-types/core/APIException.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package core; - -import java.lang.Exception; - -public class APIException extends Exception { -} diff --git a/seed/java-spring/inline-types/core/DateTimeDeserializer.java b/seed/java-spring/inline-types/core/DateTimeDeserializer.java deleted file mode 100644 index 3d3174aec00..00000000000 --- a/seed/java-spring/inline-types/core/DateTimeDeserializer.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package core; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.module.SimpleModule; -import java.io.IOException; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.format.DateTimeFormatter; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalQueries; - -/** - * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. - */ -class DateTimeDeserializer extends JsonDeserializer { - private static final SimpleModule MODULE; - - static { - MODULE = new SimpleModule().addDeserializer(OffsetDateTime.class, new DateTimeDeserializer()); - } - - /** - * Gets a module wrapping this deserializer as an adapter for the Jackson ObjectMapper. - * - * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. - */ - public static SimpleModule getModule() { - return MODULE; - } - - @Override - public OffsetDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { - JsonToken token = parser.currentToken(); - if (token == JsonToken.VALUE_NUMBER_INT) { - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC); - } else { - TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest( - parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from); - - if (temporal.query(TemporalQueries.offset()) == null) { - return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); - } else { - return OffsetDateTime.from(temporal); - } - } - } -} \ No newline at end of file diff --git a/seed/java-spring/inline-types/core/ObjectMappers.java b/seed/java-spring/inline-types/core/ObjectMappers.java deleted file mode 100644 index e02822614a8..00000000000 --- a/seed/java-spring/inline-types/core/ObjectMappers.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package core; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.fasterxml.jackson.databind.json.JsonMapper; -import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import java.io.IOException; -import java.lang.Integer; -import java.lang.Object; -import java.lang.String; - -public final class ObjectMappers { - public static final ObjectMapper JSON_MAPPER = JsonMapper.builder() - .addModule(new Jdk8Module()) - .addModule(new JavaTimeModule()) - .addModule(DateTimeDeserializer.getModule()) - .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) - .build(); - - private ObjectMappers() { - } - - public static String stringify(Object o) { - try { - return JSON_MAPPER.setSerializationInclusion(JsonInclude.Include.ALWAYS) - .writerWithDefaultPrettyPrinter() - .writeValueAsString(o); - } - catch (IOException e) { - return o.getClass().getName() + "@" + Integer.toHexString(o.hashCode()); - } - } - } diff --git a/seed/java-spring/inline-types/requests/PostRootRequest.java b/seed/java-spring/inline-types/requests/PostRootRequest.java deleted file mode 100644 index ab93c023a4e..00000000000 --- a/seed/java-spring/inline-types/requests/PostRootRequest.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package requests; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import core.ObjectMappers; -import java.lang.Object; -import java.lang.String; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; -import types.InlineType1; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize( - builder = PostRootRequest.Builder.class -) -public final class PostRootRequest { - private final InlineType1 bar; - - private final String foo; - - private PostRootRequest(InlineType1 bar, String foo) { - this.bar = bar; - this.foo = foo; - } - - @JsonProperty("bar") - public InlineType1 getBar() { - return bar; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PostRootRequest && equalTo((PostRootRequest) other); - } - - private boolean equalTo(PostRootRequest other) { - return bar.equals(other.bar) && foo.equals(other.foo); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bar, this.foo); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BarStage builder() { - return new Builder(); - } - - public interface BarStage { - FooStage bar(@NotNull InlineType1 bar); - - Builder from(PostRootRequest other); - } - - public interface FooStage { - _FinalStage foo(@NotNull String foo); - } - - public interface _FinalStage { - PostRootRequest build(); - } - - @JsonIgnoreProperties( - ignoreUnknown = true - ) - public static final class Builder implements BarStage, FooStage, _FinalStage { - private InlineType1 bar; - - private String foo; - - private Builder() { - } - - @java.lang.Override - public Builder from(PostRootRequest other) { - bar(other.getBar()); - foo(other.getFoo()); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public FooStage bar(@NotNull InlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public _FinalStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - public PostRootRequest build() { - return new PostRootRequest(bar, foo); - } - } -} diff --git a/seed/java-spring/inline-types/snippet-templates.json b/seed/java-spring/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-spring/inline-types/snippet.json b/seed/java-spring/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/java-spring/inline-types/types/InlineEnum.java b/seed/java-spring/inline-types/types/InlineEnum.java deleted file mode 100644 index c0251c9bd68..00000000000 --- a/seed/java-spring/inline-types/types/InlineEnum.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package types; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.String; - -public enum InlineEnum { - SUNNY("SUNNY"), - - CLOUDY("CLOUDY"), - - RAINING("RAINING"), - - SNOWING("SNOWING"); - - private final String value; - - InlineEnum(String value) { - this.value = value; - } - - @JsonValue - @java.lang.Override - public String toString() { - return this.value; - } -} diff --git a/seed/java-spring/inline-types/types/InlineType1.java b/seed/java-spring/inline-types/types/InlineType1.java deleted file mode 100644 index f62f87ccbba..00000000000 --- a/seed/java-spring/inline-types/types/InlineType1.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package types; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import core.ObjectMappers; -import java.lang.Object; -import java.lang.String; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize( - builder = InlineType1.Builder.class -) -public final class InlineType1 { - private final String foo; - - private final NestedInlineType1 bar; - - private InlineType1(String foo, NestedInlineType1 bar) { - this.foo = foo; - this.bar = bar; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public NestedInlineType1 getBar() { - return bar; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlineType1 && equalTo((InlineType1) other); - } - - private boolean equalTo(InlineType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(@NotNull String foo); - - Builder from(InlineType1 other); - } - - public interface BarStage { - _FinalStage bar(@NotNull NestedInlineType1 bar); - } - - public interface _FinalStage { - InlineType1 build(); - } - - @JsonIgnoreProperties( - ignoreUnknown = true - ) - public static final class Builder implements FooStage, BarStage, _FinalStage { - private String foo; - - private NestedInlineType1 bar; - - private Builder() { - } - - @java.lang.Override - public Builder from(InlineType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public _FinalStage bar(@NotNull NestedInlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - public InlineType1 build() { - return new InlineType1(foo, bar); - } - } -} diff --git a/seed/java-spring/inline-types/types/InlineType2.java b/seed/java-spring/inline-types/types/InlineType2.java deleted file mode 100644 index 1dafe23d4db..00000000000 --- a/seed/java-spring/inline-types/types/InlineType2.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package types; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import core.ObjectMappers; -import java.lang.Object; -import java.lang.String; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize( - builder = InlineType2.Builder.class -) -public final class InlineType2 { - private final String baz; - - private InlineType2(String baz) { - this.baz = baz; - } - - @JsonProperty("baz") - public String getBaz() { - return baz; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlineType2 && equalTo((InlineType2) other); - } - - private boolean equalTo(InlineType2 other) { - return baz.equals(other.baz); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.baz); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BazStage builder() { - return new Builder(); - } - - public interface BazStage { - _FinalStage baz(@NotNull String baz); - - Builder from(InlineType2 other); - } - - public interface _FinalStage { - InlineType2 build(); - } - - @JsonIgnoreProperties( - ignoreUnknown = true - ) - public static final class Builder implements BazStage, _FinalStage { - private String baz; - - private Builder() { - } - - @java.lang.Override - public Builder from(InlineType2 other) { - baz(other.getBaz()); - return this; - } - - @java.lang.Override - @JsonSetter("baz") - public _FinalStage baz(@NotNull String baz) { - this.baz = Objects.requireNonNull(baz, "baz must not be null"); - return this; - } - - @java.lang.Override - public InlineType2 build() { - return new InlineType2(baz); - } - } -} diff --git a/seed/java-spring/inline-types/types/InlinedDiscriminatedUnion1.java b/seed/java-spring/inline-types/types/InlinedDiscriminatedUnion1.java deleted file mode 100644 index 481c78656b0..00000000000 --- a/seed/java-spring/inline-types/types/InlinedDiscriminatedUnion1.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.Object; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - -public final class InlinedDiscriminatedUnion1 { - private final Value value; - - @JsonCreator( - mode = JsonCreator.Mode.DELEGATING - ) - private InlinedDiscriminatedUnion1(Value value) { - this.value = value; - } - - public T visit(Visitor visitor) { - return value.visit(visitor); - } - - public static InlinedDiscriminatedUnion1 type1(InlineType1 value) { - return new InlinedDiscriminatedUnion1(new Type1Value(value)); - } - - public static InlinedDiscriminatedUnion1 type2(InlineType2 value) { - return new InlinedDiscriminatedUnion1(new Type2Value(value)); - } - - public boolean isType1() { - return value instanceof Type1Value; - } - - public boolean isType2() { - return value instanceof Type2Value; - } - - public boolean _isUnknown() { - return value instanceof _UnknownValue; - } - - public Optional getType1() { - if (isType1()) { - return Optional.of(((Type1Value) value).value); - } - return Optional.empty(); - } - - public Optional getType2() { - if (isType2()) { - return Optional.of(((Type2Value) value).value); - } - return Optional.empty(); - } - - public Optional _getUnknown() { - if (_isUnknown()) { - return Optional.of(((_UnknownValue) value).value); - } - return Optional.empty(); - } - - @JsonValue - private Value getValue() { - return this.value; - } - - public interface Visitor { - T visitType1(InlineType1 type1); - - T visitType2(InlineType2 type2); - - T _visitUnknown(Object unknownType); - } - - @JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - visible = true, - defaultImpl = _UnknownValue.class - ) - @JsonSubTypes({ - @JsonSubTypes.Type(Type1Value.class), - @JsonSubTypes.Type(Type2Value.class) - }) - @JsonIgnoreProperties( - ignoreUnknown = true - ) - private interface Value { - T visit(Visitor visitor); - } - - @JsonTypeName("type1") - private static final class Type1Value implements Value { - @JsonUnwrapped - private InlineType1 value; - - @JsonCreator( - mode = JsonCreator.Mode.PROPERTIES - ) - private Type1Value() { - } - - private Type1Value(InlineType1 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitType1(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Type1Value && equalTo((Type1Value) other); - } - - private boolean equalTo(Type1Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "value: " + value + "}"; - } - } - - @JsonTypeName("type2") - private static final class Type2Value implements Value { - @JsonUnwrapped - private InlineType2 value; - - @JsonCreator( - mode = JsonCreator.Mode.PROPERTIES - ) - private Type2Value() { - } - - private Type2Value(InlineType2 value) { - this.value = value; - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor.visitType2(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Type2Value && equalTo((Type2Value) other); - } - - private boolean equalTo(Type2Value other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "value: " + value + "}"; - } - } - - private static final class _UnknownValue implements Value { - private String type; - - @JsonValue - private Object value; - - @JsonCreator( - mode = JsonCreator.Mode.PROPERTIES - ) - private _UnknownValue(@JsonProperty("value") Object value) { - } - - @java.lang.Override - public T visit(Visitor visitor) { - return visitor._visitUnknown(value); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof _UnknownValue && equalTo((_UnknownValue) other); - } - - private boolean equalTo(_UnknownValue other) { - return type.equals(other.type) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.value); - } - - @java.lang.Override - public String toString() { - return "InlinedDiscriminatedUnion1{" + "type: " + type + ", value: " + value + "}"; - } - } -} diff --git a/seed/java-spring/inline-types/types/InlinedUndiscriminatedUnion1.java b/seed/java-spring/inline-types/types/InlinedUndiscriminatedUnion1.java deleted file mode 100644 index 2aa7f956849..00000000000 --- a/seed/java-spring/inline-types/types/InlinedUndiscriminatedUnion1.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package types; - -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import core.ObjectMappers; -import java.io.IOException; -import java.lang.IllegalArgumentException; -import java.lang.IllegalStateException; -import java.lang.Object; -import java.lang.String; -import java.util.Objects; - -@JsonDeserialize( - using = InlinedUndiscriminatedUnion1.Deserializer.class -) -public final class InlinedUndiscriminatedUnion1 { - private final Object value; - - private final int type; - - private InlinedUndiscriminatedUnion1(Object value, int type) { - this.value = value; - this.type = type; - } - - @JsonValue - public Object get() { - return this.value; - } - - public T visit(Visitor visitor) { - if(this.type == 0) { - return visitor.visit((InlineType1) this.value); - } else if(this.type == 1) { - return visitor.visit((InlineType2) this.value); - } - throw new IllegalStateException("Failed to visit value. This should never happen."); - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof InlinedUndiscriminatedUnion1 && equalTo((InlinedUndiscriminatedUnion1) other); - } - - private boolean equalTo(InlinedUndiscriminatedUnion1 other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return this.value.toString(); - } - - public static InlinedUndiscriminatedUnion1 of(InlineType1 value) { - return new InlinedUndiscriminatedUnion1(value, 0); - } - - public static InlinedUndiscriminatedUnion1 of(InlineType2 value) { - return new InlinedUndiscriminatedUnion1(value, 1); - } - - public interface Visitor { - T visit(InlineType1 value); - - T visit(InlineType2 value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(InlinedUndiscriminatedUnion1.class); - } - - @java.lang.Override - public InlinedUndiscriminatedUnion1 deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, InlineType1.class)); - } catch(IllegalArgumentException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, InlineType2.class)); - } catch(IllegalArgumentException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/seed/java-spring/inline-types/types/NestedInlineType1.java b/seed/java-spring/inline-types/types/NestedInlineType1.java deleted file mode 100644 index 3c9301f4294..00000000000 --- a/seed/java-spring/inline-types/types/NestedInlineType1.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package types; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import core.ObjectMappers; -import java.lang.Object; -import java.lang.String; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize( - builder = NestedInlineType1.Builder.class -) -public final class NestedInlineType1 { - private final String foo; - - private final String bar; - - private final InlineEnum myEnum; - - private NestedInlineType1(String foo, String bar, InlineEnum myEnum) { - this.foo = foo; - this.bar = bar; - this.myEnum = myEnum; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public String getBar() { - return bar; - } - - @JsonProperty("myEnum") - public InlineEnum getMyEnum() { - return myEnum; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NestedInlineType1 && equalTo((NestedInlineType1) other); - } - - private boolean equalTo(NestedInlineType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar) && myEnum.equals(other.myEnum); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar, this.myEnum); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(@NotNull String foo); - - Builder from(NestedInlineType1 other); - } - - public interface BarStage { - MyEnumStage bar(@NotNull String bar); - } - - public interface MyEnumStage { - _FinalStage myEnum(@NotNull InlineEnum myEnum); - } - - public interface _FinalStage { - NestedInlineType1 build(); - } - - @JsonIgnoreProperties( - ignoreUnknown = true - ) - public static final class Builder implements FooStage, BarStage, MyEnumStage, _FinalStage { - private String foo; - - private String bar; - - private InlineEnum myEnum; - - private Builder() { - } - - @java.lang.Override - public Builder from(NestedInlineType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - myEnum(other.getMyEnum()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public MyEnumStage bar(@NotNull String bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("myEnum") - public _FinalStage myEnum(@NotNull InlineEnum myEnum) { - this.myEnum = Objects.requireNonNull(myEnum, "myEnum must not be null"); - return this; - } - - @java.lang.Override - public NestedInlineType1 build() { - return new NestedInlineType1(foo, bar, myEnum); - } - } -} diff --git a/seed/java-spring/inline-types/types/RootType1.java b/seed/java-spring/inline-types/types/RootType1.java deleted file mode 100644 index a7512cf5ca8..00000000000 --- a/seed/java-spring/inline-types/types/RootType1.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package types; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import core.ObjectMappers; -import java.lang.Object; -import java.lang.String; -import java.util.Objects; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize( - builder = RootType1.Builder.class -) -public final class RootType1 { - private final String foo; - - private final InlineType1 bar; - - private RootType1(String foo, InlineType1 bar) { - this.foo = foo; - this.bar = bar; - } - - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - @JsonProperty("bar") - public InlineType1 getBar() { - return bar; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RootType1 && equalTo((RootType1) other); - } - - private boolean equalTo(RootType1 other) { - return foo.equals(other.foo) && bar.equals(other.bar); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.foo, this.bar); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FooStage builder() { - return new Builder(); - } - - public interface FooStage { - BarStage foo(@NotNull String foo); - - Builder from(RootType1 other); - } - - public interface BarStage { - _FinalStage bar(@NotNull InlineType1 bar); - } - - public interface _FinalStage { - RootType1 build(); - } - - @JsonIgnoreProperties( - ignoreUnknown = true - ) - public static final class Builder implements FooStage, BarStage, _FinalStage { - private String foo; - - private InlineType1 bar; - - private Builder() { - } - - @java.lang.Override - public Builder from(RootType1 other) { - foo(other.getFoo()); - bar(other.getBar()); - return this; - } - - @java.lang.Override - @JsonSetter("foo") - public BarStage foo(@NotNull String foo) { - this.foo = Objects.requireNonNull(foo, "foo must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("bar") - public _FinalStage bar(@NotNull InlineType1 bar) { - this.bar = Objects.requireNonNull(bar, "bar must not be null"); - return this; - } - - @java.lang.Override - public RootType1 build() { - return new RootType1(foo, bar); - } - } -} diff --git a/seed/openapi/inline-types/.mock/definition/__package__.yml b/seed/openapi/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/openapi/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/openapi/inline-types/.mock/definition/api.yml b/seed/openapi/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/openapi/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/openapi/inline-types/.mock/fern.config.json b/seed/openapi/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/openapi/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/openapi/inline-types/.mock/generators.yml b/seed/openapi/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/openapi/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/openapi/inline-types/openapi.yml b/seed/openapi/inline-types/openapi.yml deleted file mode 100644 index 4c6d6dc007c..00000000000 --- a/seed/openapi/inline-types/openapi.yml +++ /dev/null @@ -1,117 +0,0 @@ -openapi: 3.0.1 -info: - title: object - version: '' -paths: - /root/root: - post: - operationId: getRoot - tags: - - '' - parameters: [] - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/RootType1' - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - bar: - $ref: '#/components/schemas/InlineType1' - foo: - type: string - required: - - bar - - foo -components: - schemas: - RootType1: - title: RootType1 - type: object - properties: - foo: - type: string - bar: - $ref: '#/components/schemas/InlineType1' - required: - - foo - - bar - InlineType1: - title: InlineType1 - type: object - properties: - foo: - type: string - bar: - $ref: '#/components/schemas/NestedInlineType1' - required: - - foo - - bar - InlineType2: - title: InlineType2 - type: object - properties: - baz: - type: string - required: - - baz - NestedInlineType1: - title: NestedInlineType1 - type: object - properties: - foo: - type: string - bar: - type: string - myEnum: - $ref: '#/components/schemas/InlineEnum' - required: - - foo - - bar - - myEnum - InlinedDiscriminatedUnion1: - title: InlinedDiscriminatedUnion1 - oneOf: - - type: object - allOf: - - type: object - properties: - type: - type: string - enum: - - type1 - - $ref: '#/components/schemas/InlineType1' - required: - - type - - type: object - allOf: - - type: object - properties: - type: - type: string - enum: - - type2 - - $ref: '#/components/schemas/InlineType2' - required: - - type - InlinedUndiscriminatedUnion1: - title: InlinedUndiscriminatedUnion1 - oneOf: - - $ref: '#/components/schemas/InlineType1' - - $ref: '#/components/schemas/InlineType2' - InlineEnum: - title: InlineEnum - type: string - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING - securitySchemes: {} diff --git a/seed/openapi/inline-types/snippet-templates.json b/seed/openapi/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/openapi/inline-types/snippet.json b/seed/openapi/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/php-model/inline-types/.github/workflows/ci.yml b/seed/php-model/inline-types/.github/workflows/ci.yml deleted file mode 100644 index 258bf33a19f..00000000000 --- a/seed/php-model/inline-types/.github/workflows/ci.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "8.1" - - - name: Install tools - run: | - composer install - - - name: Build - run: | - composer build - - - name: Analyze - run: | - composer analyze - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "8.1" - - - name: Install tools - run: | - composer install - - - name: Run Tests - run: | - composer test \ No newline at end of file diff --git a/seed/php-model/inline-types/.gitignore b/seed/php-model/inline-types/.gitignore deleted file mode 100644 index f38efc46ade..00000000000 --- a/seed/php-model/inline-types/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.php-cs-fixer.cache -.phpunit.result.cache -composer.lock -vendor/ \ No newline at end of file diff --git a/seed/php-model/inline-types/.mock/definition/__package__.yml b/seed/php-model/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/php-model/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/php-model/inline-types/.mock/definition/api.yml b/seed/php-model/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/php-model/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/php-model/inline-types/.mock/fern.config.json b/seed/php-model/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/php-model/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/php-model/inline-types/.mock/generators.yml b/seed/php-model/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/php-model/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/php-model/inline-types/composer.json b/seed/php-model/inline-types/composer.json deleted file mode 100644 index 5c96c0056e0..00000000000 --- a/seed/php-model/inline-types/composer.json +++ /dev/null @@ -1,40 +0,0 @@ - -{ - "name": "seed/seed", - "version": "0.0.1", - "description": "Seed PHP Library", - "keywords": [ - "seed", - "api", - "sdk" - ], - "license": [], - "require": { - "php": "^8.1", - "ext-json": "*", - "guzzlehttp/guzzle": "^7.9" - }, - "require-dev": { - "phpunit/phpunit": "^9.0", - "friendsofphp/php-cs-fixer": "3.5.0", - "phpstan/phpstan": "^1.12" - }, - "autoload": { - "psr-4": { - "Seed\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "\\Seed\\Tests\\": "tests/" - } - }, - "scripts": { - "build": [ - "@php -l src", - "@php -l tests" - ], - "test": "phpunit", - "analyze": "phpstan analyze src tests" - } -} diff --git a/seed/php-model/inline-types/phpstan.neon b/seed/php-model/inline-types/phpstan.neon deleted file mode 100644 index 29a11a92a19..00000000000 --- a/seed/php-model/inline-types/phpstan.neon +++ /dev/null @@ -1,5 +0,0 @@ -parameters: - level: max - paths: - - src - - tests \ No newline at end of file diff --git a/seed/php-model/inline-types/phpunit.xml b/seed/php-model/inline-types/phpunit.xml deleted file mode 100644 index 54630a51163..00000000000 --- a/seed/php-model/inline-types/phpunit.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - tests - - - \ No newline at end of file diff --git a/seed/php-model/inline-types/snippet-templates.json b/seed/php-model/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/php-model/inline-types/snippet.json b/seed/php-model/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/php-model/inline-types/src/Core/Json/JsonDecoder.php b/seed/php-model/inline-types/src/Core/Json/JsonDecoder.php deleted file mode 100644 index 2ddff027348..00000000000 --- a/seed/php-model/inline-types/src/Core/Json/JsonDecoder.php +++ /dev/null @@ -1,161 +0,0 @@ - $type The type definition for deserialization. - * @return mixed[]|array The deserialized array. - * @throws JsonException If the decoded value is not an array. - */ - public static function decodeArray(string $json, array $type): array - { - $decoded = self::decode($json); - if (!is_array($decoded)) { - throw new JsonException("Unexpected non-array json value: " . $json); - } - return JsonDeserializer::deserializeArray($decoded, $type); - } - - /** - * Decodes a JSON string and deserializes it based on the provided union type definition. - * - * @param string $json The JSON string to decode. - * @param Union $union The union type definition for deserialization. - * @return mixed The deserialized value. - * @throws JsonException If the deserialization for all types in the union fails. - */ - public static function decodeUnion(string $json, Union $union): mixed - { - $decoded = self::decode($json); - return JsonDeserializer::deserializeUnion($decoded, $union); - } - /** - * Decodes a JSON string and returns a mixed. - * - * @param string $json The JSON string to decode. - * @return mixed The decoded mixed. - * @throws JsonException If the decoded value is not an mixed. - */ - public static function decodeMixed(string $json): mixed - { - return self::decode($json); - } - - /** - * Decodes a JSON string into a PHP value. - * - * @param string $json The JSON string to decode. - * @return mixed The decoded value. - * @throws JsonException If an error occurs during JSON decoding. - */ - public static function decode(string $json): mixed - { - return json_decode($json, associative: true, flags: JSON_THROW_ON_ERROR); - } -} diff --git a/seed/php-model/inline-types/src/Core/Json/JsonDeserializer.php b/seed/php-model/inline-types/src/Core/Json/JsonDeserializer.php deleted file mode 100644 index 5f0ca2d7ed0..00000000000 --- a/seed/php-model/inline-types/src/Core/Json/JsonDeserializer.php +++ /dev/null @@ -1,204 +0,0 @@ - $data The array to be deserialized. - * @param mixed[]|array $type The type definition from the annotation. - * @return mixed[]|array The deserialized array. - * @throws JsonException If deserialization fails. - */ - public static function deserializeArray(array $data, array $type): array - { - return Utils::isMapType($type) - ? self::deserializeMap($data, $type) - : self::deserializeList($data, $type); - } - - /** - * Deserializes a value based on its type definition. - * - * @param mixed $data The data to deserialize. - * @param mixed $type The type definition. - * @return mixed The deserialized value. - * @throws JsonException If deserialization fails. - */ - private static function deserializeValue(mixed $data, mixed $type): mixed - { - if ($type instanceof Union) { - return self::deserializeUnion($data, $type); - } - - if (is_array($type)) { - return self::deserializeArray((array)$data, $type); - } - - if (gettype($type) != "string") { - throw new JsonException("Unexpected non-string type."); - } - - return self::deserializeSingleValue($data, $type); - } - - /** - * Deserializes a value based on the possible types in a union type definition. - * - * @param mixed $data The data to deserialize. - * @param Union $type The union type definition. - * @return mixed The deserialized value. - * @throws JsonException If none of the union types can successfully deserialize the value. - */ - public static function deserializeUnion(mixed $data, Union $type): mixed - { - foreach ($type->types as $unionType) { - try { - return self::deserializeValue($data, $unionType); - } catch (Exception) { - continue; - } - } - $readableType = Utils::getReadableType($data); - throw new JsonException( - "Cannot deserialize value of type $readableType with any of the union types: " . $type - ); - } - - /** - * Deserializes a single value based on its expected type. - * - * @param mixed $data The data to deserialize. - * @param string $type The expected type. - * @return mixed The deserialized value. - * @throws JsonException If deserialization fails. - */ - private static function deserializeSingleValue(mixed $data, string $type): mixed - { - if ($type === 'null' && $data === null) { - return null; - } - - if ($type === 'date' && is_string($data)) { - return self::deserializeDate($data); - } - - if ($type === 'datetime' && is_string($data)) { - return self::deserializeDateTime($data); - } - - if ($type === 'mixed') { - return $data; - } - - if (class_exists($type) && is_array($data)) { - return self::deserializeObject($data, $type); - } - - // Handle floats as a special case since gettype($data) returns "double" for float values in PHP, and because - // floats make come through from json_decoded as integers - if ($type === 'float' && (is_numeric($data))) { - return (float) $data; - } - - if (gettype($data) === $type) { - return $data; - } - - throw new JsonException("Unable to deserialize value of type '" . gettype($data) . "' as '$type'."); - } - - /** - * Deserializes an array into an object of the given type. - * - * @param array $data The data to deserialize. - * @param string $type The class name of the object to deserialize into. - * - * @return object The deserialized object. - * - * @throws JsonException If the type does not implement JsonSerializableType. - */ - public static function deserializeObject(array $data, string $type): object - { - if (!is_subclass_of($type, JsonSerializableType::class)) { - throw new JsonException("$type is not a subclass of JsonSerializableType."); - } - return $type::jsonDeserialize($data); - } - - /** - * Deserializes a map (associative array) with defined key and value types. - * - * @param array $data The associative array to deserialize. - * @param array $type The type definition for the map. - * @return array The deserialized map. - * @throws JsonException If deserialization fails. - */ - private static function deserializeMap(array $data, array $type): array - { - $keyType = array_key_first($type); - $valueType = $type[$keyType]; - $result = []; - - foreach ($data as $key => $item) { - $key = Utils::castKey($key, (string)$keyType); - $result[$key] = self::deserializeValue($item, $valueType); - } - - return $result; - } - - /** - * Deserializes a list (indexed array) with a defined value type. - * - * @param array $data The list to deserialize. - * @param array $type The type definition for the list. - * @return array The deserialized list. - * @throws JsonException If deserialization fails. - */ - private static function deserializeList(array $data, array $type): array - { - $valueType = $type[0]; - return array_map(fn ($item) => self::deserializeValue($item, $valueType), $data); - } -} diff --git a/seed/php-model/inline-types/src/Core/Json/JsonEncoder.php b/seed/php-model/inline-types/src/Core/Json/JsonEncoder.php deleted file mode 100644 index 0dbf3fcc994..00000000000 --- a/seed/php-model/inline-types/src/Core/Json/JsonEncoder.php +++ /dev/null @@ -1,20 +0,0 @@ -jsonSerialize(); - $encoded = JsonEncoder::encode($serializedObject); - if (!$encoded) { - throw new Exception("Could not encode type"); - } - return $encoded; - } - - /** - * Serializes the object to an array. - * - * @return mixed[] Array representation of the object. - * @throws JsonException If serialization fails. - */ - public function jsonSerialize(): array - { - $result = []; - $reflectionClass = new \ReflectionClass($this); - - foreach ($reflectionClass->getProperties() as $property) { - $jsonKey = self::getJsonKey($property); - if ($jsonKey == null) { - continue; - } - $value = $property->getValue($this); - - // Handle DateTime properties - $dateTypeAttr = $property->getAttributes(Date::class)[0] ?? null; - if ($dateTypeAttr && $value instanceof DateTime) { - $dateType = $dateTypeAttr->newInstance()->type; - $value = ($dateType === Date::TYPE_DATE) - ? JsonSerializer::serializeDate($value) - : JsonSerializer::serializeDateTime($value); - } - - // Handle Union annotations - $unionTypeAttr = $property->getAttributes(Union::class)[0] ?? null; - if ($unionTypeAttr) { - $unionType = $unionTypeAttr->newInstance(); - $value = JsonSerializer::serializeUnion($value, $unionType); - } - - // Handle arrays with type annotations - $arrayTypeAttr = $property->getAttributes(ArrayType::class)[0] ?? null; - if ($arrayTypeAttr && is_array($value)) { - $arrayType = $arrayTypeAttr->newInstance()->type; - $value = JsonSerializer::serializeArray($value, $arrayType); - } - - // Handle object - if (is_object($value)) { - $value = JsonSerializer::serializeObject($value); - } - - if ($value !== null) { - $result[$jsonKey] = $value; - } - } - - return $result; - } - - /** - * Deserializes a JSON string into an instance of the calling class. - * - * @param string $json JSON string to deserialize. - * @return static Deserialized object. - * @throws JsonException If decoding fails or the result is not an array. - * @throws Exception If deserialization fails. - */ - public static function fromJson(string $json): static - { - $decodedJson = JsonDecoder::decode($json); - if (!is_array($decodedJson)) { - throw new JsonException("Unexpected non-array decoded type: " . gettype($decodedJson)); - } - return self::jsonDeserialize($decodedJson); - } - - /** - * Deserializes an array into an instance of the calling class. - * - * @param array $data Array data to deserialize. - * @return static Deserialized object. - * @throws JsonException If deserialization fails. - */ - public static function jsonDeserialize(array $data): static - { - $reflectionClass = new \ReflectionClass(static::class); - $constructor = $reflectionClass->getConstructor(); - - if ($constructor === null) { - throw new JsonException("No constructor found."); - } - - $args = []; - foreach ($reflectionClass->getProperties() as $property) { - $jsonKey = self::getJsonKey($property) ?? $property->getName(); - - if (array_key_exists($jsonKey, $data)) { - $value = $data[$jsonKey]; - - // Handle Date annotation - $dateTypeAttr = $property->getAttributes(Date::class)[0] ?? null; - if ($dateTypeAttr) { - $dateType = $dateTypeAttr->newInstance()->type; - if (!is_string($value)) { - throw new JsonException("Unexpected non-string type for date."); - } - $value = ($dateType === Date::TYPE_DATE) - ? JsonDeserializer::deserializeDate($value) - : JsonDeserializer::deserializeDateTime($value); - } - - // Handle Array annotation - $arrayTypeAttr = $property->getAttributes(ArrayType::class)[0] ?? null; - if (is_array($value) && $arrayTypeAttr) { - $arrayType = $arrayTypeAttr->newInstance()->type; - $value = JsonDeserializer::deserializeArray($value, $arrayType); - } - - // Handle Union annotations - $unionTypeAttr = $property->getAttributes(Union::class)[0] ?? null; - if ($unionTypeAttr) { - $unionType = $unionTypeAttr->newInstance(); - $value = JsonDeserializer::deserializeUnion($value, $unionType); - } - - // Handle object - $type = $property->getType(); - if (is_array($value) && $type instanceof ReflectionNamedType && !$type->isBuiltin()) { - $value = JsonDeserializer::deserializeObject($value, $type->getName()); - } - - $args[$property->getName()] = $value; - } else { - $defaultValue = $property->getDefaultValue() ?? null; - $args[$property->getName()] = $defaultValue; - } - } - // @phpstan-ignore-next-line - return new static($args); - } - - /** - * Retrieves the JSON key associated with a property. - * - * @param ReflectionProperty $property The reflection property. - * @return ?string The JSON key, or null if not available. - */ - private static function getJsonKey(ReflectionProperty $property): ?string - { - $jsonPropertyAttr = $property->getAttributes(JsonProperty::class)[0] ?? null; - return $jsonPropertyAttr?->newInstance()?->name; - } -} diff --git a/seed/php-model/inline-types/src/Core/Json/JsonSerializer.php b/seed/php-model/inline-types/src/Core/Json/JsonSerializer.php deleted file mode 100644 index 7dd6fe517af..00000000000 --- a/seed/php-model/inline-types/src/Core/Json/JsonSerializer.php +++ /dev/null @@ -1,192 +0,0 @@ -format(Constant::DateFormat); - } - - /** - * Serializes a DateTime object into a string using the date-time format. - * - * @param DateTime $date The DateTime object to serialize. - * @return string The serialized date-time string. - */ - public static function serializeDateTime(DateTime $date): string - { - return $date->format(Constant::DateTimeFormat); - } - - /** - * Serializes an array based on type annotations (either a list or map). - * - * @param mixed[]|array $data The array to be serialized. - * @param mixed[]|array $type The type definition from the annotation. - * @return mixed[]|array The serialized array. - * @throws JsonException If serialization fails. - */ - public static function serializeArray(array $data, array $type): array - { - return Utils::isMapType($type) - ? self::serializeMap($data, $type) - : self::serializeList($data, $type); - } - - /** - * Serializes a value based on its type definition. - * - * @param mixed $data The value to serialize. - * @param mixed $type The type definition. - * @return mixed The serialized value. - * @throws JsonException If serialization fails. - */ - private static function serializeValue(mixed $data, mixed $type): mixed - { - if ($type instanceof Union) { - return self::serializeUnion($data, $type); - } - - if (is_array($type)) { - return self::serializeArray((array)$data, $type); - } - - if (gettype($type) != "string") { - throw new JsonException("Unexpected non-string type."); - } - - return self::serializeSingleValue($data, $type); - } - - /** - * Serializes a value for a union type definition. - * - * @param mixed $data The value to serialize. - * @param Union $unionType The union type definition. - * @return mixed The serialized value. - * @throws JsonException If serialization fails for all union types. - */ - public static function serializeUnion(mixed $data, Union $unionType): mixed - { - foreach ($unionType->types as $type) { - try { - return self::serializeValue($data, $type); - } catch (Exception) { - // Try the next type in the union - continue; - } - } - $readableType = Utils::getReadableType($data); - throw new JsonException( - "Cannot serialize value of type $readableType with any of the union types: " . $unionType - ); - } - - /** - * Serializes a single value based on its type. - * - * @param mixed $data The value to serialize. - * @param string $type The expected type. - * @return mixed The serialized value. - * @throws JsonException If serialization fails. - */ - private static function serializeSingleValue(mixed $data, string $type): mixed - { - if ($type === 'null' && $data === null) { - return null; - } - - if (($type === 'date' || $type === 'datetime') && $data instanceof DateTime) { - return $type === 'date' ? self::serializeDate($data) : self::serializeDateTime($data); - } - - if ($type === 'mixed') { - return $data; - } - - if (class_exists($type) && $data instanceof $type) { - return self::serializeObject($data); - } - - // Handle floats as a special case since gettype($data) returns "double" for float values in PHP. - if ($type === 'float' && is_float($data)) { - return $data; - } - - if (gettype($data) === $type) { - return $data; - } - - throw new JsonException("Unable to serialize value of type '" . gettype($data) . "' as '$type'."); - } - - /** - * Serializes an object to a JSON-serializable format. - * - * @param object $data The object to serialize. - * @return mixed The serialized data. - * @throws JsonException If the object does not implement JsonSerializable. - */ - public static function serializeObject(object $data): mixed - { - if (!is_subclass_of($data, JsonSerializable::class)) { - $type = get_class($data); - throw new JsonException("Class $type must implement JsonSerializable."); - } - return $data->jsonSerialize(); - } - - /** - * Serializes a map (associative array) with defined key and value types. - * - * @param array $data The associative array to serialize. - * @param array $type The type definition for the map. - * @return array The serialized map. - * @throws JsonException If serialization fails. - */ - private static function serializeMap(array $data, array $type): array - { - $keyType = array_key_first($type); - if ($keyType === null) { - throw new JsonException("Unexpected no key in ArrayType."); - } - $valueType = $type[$keyType]; - $result = []; - - foreach ($data as $key => $item) { - $key = Utils::castKey($key, $keyType); - $result[$key] = self::serializeValue($item, $valueType); - } - - return $result; - } - - /** - * Serializes a list (indexed array) where only the value type is defined. - * - * @param array $data The list to serialize. - * @param array $type The type definition for the list. - * @return array The serialized list. - * @throws JsonException If serialization fails. - */ - private static function serializeList(array $data, array $type): array - { - $valueType = $type[0]; - return array_map(fn ($item) => self::serializeValue($item, $valueType), $data); - } -} diff --git a/seed/php-model/inline-types/src/Core/Json/Utils.php b/seed/php-model/inline-types/src/Core/Json/Utils.php deleted file mode 100644 index 7577c058916..00000000000 --- a/seed/php-model/inline-types/src/Core/Json/Utils.php +++ /dev/null @@ -1,61 +0,0 @@ - $type The type definition from the annotation. - * @return bool True if the type is a map, false if it's a list. - */ - public static function isMapType(array $type): bool - { - return count($type) === 1 && !array_is_list($type); - } - - /** - * Casts the key to the appropriate type based on the key type. - * - * @param mixed $key The key to be cast. - * @param string $keyType The type to cast the key to ('string', 'integer', 'float'). - * @return mixed The casted key. - * @throws JsonException - */ - public static function castKey(mixed $key, string $keyType): mixed - { - if (!is_scalar($key)) { - throw new JsonException("Key must be a scalar type."); - } - return match ($keyType) { - 'integer' => (int)$key, - 'float' => (float)$key, - 'string' => (string)$key, - default => $key, - }; - } - - /** - * Returns a human-readable representation of the input's type. - * - * @param mixed $input The input value to determine the type of. - * @return string A readable description of the input type. - */ - public static function getReadableType(mixed $input): string - { - if (is_object($input)) { - return get_class($input); - } elseif (is_array($input)) { - return 'array(' . count($input) . ' items)'; - } elseif (is_null($input)) { - return 'null'; - } else { - return gettype($input); - } - } -} diff --git a/seed/php-model/inline-types/src/Core/Types/ArrayType.php b/seed/php-model/inline-types/src/Core/Types/ArrayType.php deleted file mode 100644 index a26d29008ec..00000000000 --- a/seed/php-model/inline-types/src/Core/Types/ArrayType.php +++ /dev/null @@ -1,16 +0,0 @@ - 'valueType'] for maps, or ['valueType'] for lists - */ - public function __construct(public array $type) - { - } -} diff --git a/seed/php-model/inline-types/src/Core/Types/Constant.php b/seed/php-model/inline-types/src/Core/Types/Constant.php deleted file mode 100644 index 5ac4518cc6d..00000000000 --- a/seed/php-model/inline-types/src/Core/Types/Constant.php +++ /dev/null @@ -1,12 +0,0 @@ -> The types allowed for this property, which can be strings, arrays, or nested Union types. - */ - public array $types; - - /** - * Constructor for the Union attribute. - * - * @param string|Union|array ...$types The list of types that the property can accept. - * This can include primitive types (e.g., 'string', 'int'), arrays, or other Union instances. - * - * Example: - * ```php - * #[Union('string', 'null', 'date', new Union('boolean', 'int'))] - * ``` - */ - public function __construct(string|Union|array ...$types) - { - $this->types = $types; - } - - /** - * Converts the Union type to a string representation. - * - * @return string A string representation of the union types. - */ - public function __toString(): string - { - return implode(' | ', array_map(function ($type) { - if (is_string($type)) { - return $type; - } elseif ($type instanceof Union) { - return (string) $type; // Recursively handle nested unions - } elseif (is_array($type)) { - return 'array'; // Handle arrays - } - }, $this->types)); - } -} diff --git a/seed/php-model/inline-types/src/InlineEnum.php b/seed/php-model/inline-types/src/InlineEnum.php deleted file mode 100644 index 5df508c6949..00000000000 --- a/seed/php-model/inline-types/src/InlineEnum.php +++ /dev/null @@ -1,11 +0,0 @@ -foo = $values['foo']; - $this->bar = $values['bar']; - } -} diff --git a/seed/php-model/inline-types/src/InlineType2.php b/seed/php-model/inline-types/src/InlineType2.php deleted file mode 100644 index f59b4e9e761..00000000000 --- a/seed/php-model/inline-types/src/InlineType2.php +++ /dev/null @@ -1,26 +0,0 @@ -baz = $values['baz']; - } -} diff --git a/seed/php-model/inline-types/src/NestedInlineType1.php b/seed/php-model/inline-types/src/NestedInlineType1.php deleted file mode 100644 index 4bb55ace4a5..00000000000 --- a/seed/php-model/inline-types/src/NestedInlineType1.php +++ /dev/null @@ -1,42 +0,0 @@ - $myEnum - */ - #[JsonProperty('myEnum')] - public string $myEnum; - - /** - * @param array{ - * foo: string, - * bar: string, - * myEnum: value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->foo = $values['foo']; - $this->bar = $values['bar']; - $this->myEnum = $values['myEnum']; - } -} diff --git a/seed/php-model/inline-types/src/RootType1.php b/seed/php-model/inline-types/src/RootType1.php deleted file mode 100644 index e0a6ecf3e71..00000000000 --- a/seed/php-model/inline-types/src/RootType1.php +++ /dev/null @@ -1,34 +0,0 @@ -foo = $values['foo']; - $this->bar = $values['bar']; - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/DateArrayTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/DateArrayTest.php deleted file mode 100644 index a72cfdbdd22..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/DateArrayTest.php +++ /dev/null @@ -1,54 +0,0 @@ -dates = $values['dates']; - } -} - -class DateArrayTest extends TestCase -{ - public function testDateTimeInArrays(): void - { - $expectedJson = json_encode( - [ - 'dates' => ['2023-01-01', '2023-02-01', '2023-03-01'] - ], - JSON_THROW_ON_ERROR - ); - - $object = DateArray::fromJson($expectedJson); - $this->assertInstanceOf(DateTime::class, $object->dates[0], 'dates[0] should be a DateTime instance.'); - $this->assertEquals('2023-01-01', $object->dates[0]->format('Y-m-d'), 'dates[0] should have the correct date.'); - $this->assertInstanceOf(DateTime::class, $object->dates[1], 'dates[1] should be a DateTime instance.'); - $this->assertEquals('2023-02-01', $object->dates[1]->format('Y-m-d'), 'dates[1] should have the correct date.'); - $this->assertInstanceOf(DateTime::class, $object->dates[2], 'dates[2] should be a DateTime instance.'); - $this->assertEquals('2023-03-01', $object->dates[2]->format('Y-m-d'), 'dates[2] should have the correct date.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for dates array.'); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/EmptyArrayTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/EmptyArrayTest.php deleted file mode 100644 index d243a08916d..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/EmptyArrayTest.php +++ /dev/null @@ -1,71 +0,0 @@ - $emptyMapArray - */ - #[JsonProperty('empty_map_array')] - #[ArrayType(['integer' => new Union('string', 'null')])] - public array $emptyMapArray; - - /** - * @var array $emptyDatesArray - */ - #[ArrayType([new Union('date', 'null')])] - #[JsonProperty('empty_dates_array')] - public array $emptyDatesArray; - - /** - * @param array{ - * emptyStringArray: string[], - * emptyMapArray: array, - * emptyDatesArray: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->emptyStringArray = $values['emptyStringArray']; - $this->emptyMapArray = $values['emptyMapArray']; - $this->emptyDatesArray = $values['emptyDatesArray']; - } -} - -class EmptyArrayTest extends TestCase -{ - public function testEmptyArray(): void - { - $expectedJson = json_encode( - [ - 'empty_string_array' => [], - 'empty_map_array' => [], - 'empty_dates_array' => [] - ], - JSON_THROW_ON_ERROR - ); - - $object = EmptyArray::fromJson($expectedJson); - $this->assertEmpty($object->emptyStringArray, 'empty_string_array should be empty.'); - $this->assertEmpty($object->emptyMapArray, 'empty_map_array should be empty.'); - $this->assertEmpty($object->emptyDatesArray, 'empty_dates_array should be empty.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for EmptyArraysType.'); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/EnumTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/EnumTest.php deleted file mode 100644 index bf83d5b8ab0..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/EnumTest.php +++ /dev/null @@ -1,76 +0,0 @@ -value; - } -} - -class ShapeType extends JsonSerializableType -{ - /** - * @var Shape $shape - */ - #[JsonProperty('shape')] - public Shape $shape; - - /** - * @var Shape[] $shapes - */ - #[ArrayType([Shape::class])] - #[JsonProperty('shapes')] - public array $shapes; - - /** - * @param Shape $shape - * @param Shape[] $shapes - */ - public function __construct( - Shape $shape, - array $shapes, - ) { - $this->shape = $shape; - $this->shapes = $shapes; - } -} - -class EnumTest extends TestCase -{ - public function testEnumSerialization(): void - { - $object = new ShapeType( - Shape::Circle, - [Shape::Square, Shape::Circle, Shape::Triangle] - ); - - $expectedJson = json_encode([ - 'shape' => 'CIRCLE', - 'shapes' => ['SQUARE', 'CIRCLE', 'TRIANGLE'] - ], JSON_THROW_ON_ERROR); - - $actualJson = $object->toJson(); - - $this->assertJsonStringEqualsJsonString( - $expectedJson, - $actualJson, - 'Serialized JSON does not match expected JSON for shape and shapes properties.' - ); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/ExhaustiveTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/ExhaustiveTest.php deleted file mode 100644 index f542d6a535d..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/ExhaustiveTest.php +++ /dev/null @@ -1,197 +0,0 @@ -nestedProperty = $values['nestedProperty']; - } -} - -class Type extends JsonSerializableType -{ - /** - * @var Nested nestedType - */ - #[JsonProperty('nested_type')] - public Nested $nestedType; /** - - * @var string $simpleProperty - */ - #[JsonProperty('simple_property')] - public string $simpleProperty; - - /** - * @var DateTime $dateProperty - */ - #[Date(Date::TYPE_DATE)] - #[JsonProperty('date_property')] - public DateTime $dateProperty; - - /** - * @var DateTime $datetimeProperty - */ - #[Date(Date::TYPE_DATETIME)] - #[JsonProperty('datetime_property')] - public DateTime $datetimeProperty; - - /** - * @var array $stringArray - */ - #[ArrayType(['string'])] - #[JsonProperty('string_array')] - public array $stringArray; - - /** - * @var array $mapProperty - */ - #[ArrayType(['string' => 'integer'])] - #[JsonProperty('map_property')] - public array $mapProperty; - - /** - * @var array $objectArray - */ - #[ArrayType(['integer' => new Union(Nested::class, 'null')])] - #[JsonProperty('object_array')] - public array $objectArray; - - /** - * @var array> $nestedArray - */ - #[ArrayType(['integer' => ['integer' => new Union('string', 'null')]])] - #[JsonProperty('nested_array')] - public array $nestedArray; - - /** - * @var array $datesArray - */ - #[ArrayType([new Union('date', 'null')])] - #[JsonProperty('dates_array')] - public array $datesArray; - - /** - * @var string|null $nullableProperty - */ - #[JsonProperty('nullable_property')] - public ?string $nullableProperty; - - /** - * @param array{ - * nestedType: Nested, - * simpleProperty: string, - * dateProperty: DateTime, - * datetimeProperty: DateTime, - * stringArray: array, - * mapProperty: array, - * objectArray: array, - * nestedArray: array>, - * datesArray: array, - * nullableProperty?: string|null, - * } $values - */ - public function __construct( - array $values, - ) { - $this->nestedType = $values['nestedType']; - $this->simpleProperty = $values['simpleProperty']; - $this->dateProperty = $values['dateProperty']; - $this->datetimeProperty = $values['datetimeProperty']; - $this->stringArray = $values['stringArray']; - $this->mapProperty = $values['mapProperty']; - $this->objectArray = $values['objectArray']; - $this->nestedArray = $values['nestedArray']; - $this->datesArray = $values['datesArray']; - $this->nullableProperty = $values['nullableProperty'] ?? null; - } -} - -class ExhaustiveTest extends TestCase -{ - /** - * Test serialization and deserialization of all types in Type. - */ - public function testExhaustive(): void - { - $expectedJson = json_encode( - [ - 'nested_type' => ['nested_property' => '1995-07-20'], - 'simple_property' => 'Test String', - // Omit 'nullable_property' to test null serialization - 'date_property' => '2023-01-01', - 'datetime_property' => '2023-01-01T12:34:56+00:00', - 'string_array' => ['one', 'two', 'three'], - 'map_property' => ['key1' => 1, 'key2' => 2], - 'object_array' => [ - 1 => ['nested_property' => '2021-07-20'], - 2 => null, // Testing nullable objects in array - ], - 'nested_array' => [ - 1 => [1 => 'value1', 2 => null], // Testing nullable strings in nested array - 2 => [3 => 'value3', 4 => 'value4'] - ], - 'dates_array' => ['2023-01-01', null, '2023-03-01'] // Testing nullable dates in array> - ], - JSON_THROW_ON_ERROR - ); - - $object = Type::fromJson($expectedJson); - - // Check that nullable property is null and not included in JSON - $this->assertNull($object->nullableProperty, 'Nullable property should be null.'); - - // Check date properties - $this->assertInstanceOf(DateTime::class, $object->dateProperty, 'date_property should be a DateTime instance.'); - $this->assertEquals('2023-01-01', $object->dateProperty->format('Y-m-d'), 'date_property should have the correct date.'); - $this->assertInstanceOf(DateTime::class, $object->datetimeProperty, 'datetime_property should be a DateTime instance.'); - $this->assertEquals('2023-01-01 12:34:56', $object->datetimeProperty->format('Y-m-d H:i:s'), 'datetime_property should have the correct datetime.'); - - // Check scalar arrays - $this->assertEquals(['one', 'two', 'three'], $object->stringArray, 'string_array should match the original data.'); - $this->assertEquals(['key1' => 1, 'key2' => 2], $object->mapProperty, 'map_property should match the original data.'); - - // Check object array with nullable elements - $this->assertInstanceOf(Nested::class, $object->objectArray[1], 'object_array[1] should be an instance of TestNestedType1.'); - $this->assertEquals('2021-07-20', $object->objectArray[1]->nestedProperty->format('Y-m-d'), 'object_array[1]->nestedProperty should match the original data.'); - $this->assertNull($object->objectArray[2], 'object_array[2] should be null.'); - - // Check nested array with nullable strings - $this->assertEquals('value1', $object->nestedArray[1][1], 'nested_array[1][1] should match the original data.'); - $this->assertNull($object->nestedArray[1][2], 'nested_array[1][2] should be null.'); - $this->assertEquals('value3', $object->nestedArray[2][3], 'nested_array[2][3] should match the original data.'); - $this->assertEquals('value4', $object->nestedArray[2][4], 'nested_array[2][4] should match the original data.'); - - // Check dates array with nullable DateTime objects - $this->assertInstanceOf(DateTime::class, $object->datesArray[0], 'dates_array[0] should be a DateTime instance.'); - $this->assertEquals('2023-01-01', $object->datesArray[0]->format('Y-m-d'), 'dates_array[0] should have the correct date.'); - $this->assertNull($object->datesArray[1], 'dates_array[1] should be null.'); - $this->assertInstanceOf(DateTime::class, $object->datesArray[2], 'dates_array[2] should be a DateTime instance.'); - $this->assertEquals('2023-03-01', $object->datesArray[2]->format('Y-m-d'), 'dates_array[2] should have the correct date.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'The serialized JSON does not match the original JSON.'); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/InvalidTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/InvalidTest.php deleted file mode 100644 index 7d1d79406a5..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/InvalidTest.php +++ /dev/null @@ -1,42 +0,0 @@ -integerProperty = $values['integerProperty']; - } -} - -class InvalidTest extends TestCase -{ - public function testInvalidJsonThrowsException(): void - { - $this->expectException(\TypeError::class); - $json = json_encode( - [ - 'integer_property' => 'not_an_integer' - ], - JSON_THROW_ON_ERROR - ); - Invalid::fromJson($json); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/NestedUnionArrayTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/NestedUnionArrayTest.php deleted file mode 100644 index 0fcdd06667e..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/NestedUnionArrayTest.php +++ /dev/null @@ -1,89 +0,0 @@ -nestedProperty = $values['nestedProperty']; - } -} - -class NestedUnionArray extends JsonSerializableType -{ - /** - * @var array> $nestedArray - */ - #[ArrayType(['integer' => ['integer' => new Union(UnionObject::class, 'null', 'date')]])] - #[JsonProperty('nested_array')] - public array $nestedArray; - - /** - * @param array{ - * nestedArray: array>, - * } $values - */ - public function __construct( - array $values, - ) { - $this->nestedArray = $values['nestedArray']; - } -} - -class NestedUnionArrayTest extends TestCase -{ - public function testNestedUnionArray(): void - { - $expectedJson = json_encode( - [ - 'nested_array' => [ - 1 => [ - 1 => ['nested_property' => 'Nested One'], - 2 => null, - 4 => '2023-01-02' - ], - 2 => [ - 5 => ['nested_property' => 'Nested Two'], - 7 => '2023-02-02' - ] - ] - ], - JSON_THROW_ON_ERROR - ); - - $object = NestedUnionArray::fromJson($expectedJson); - $this->assertInstanceOf(UnionObject::class, $object->nestedArray[1][1], 'nested_array[1][1] should be an instance of Object.'); - $this->assertEquals('Nested One', $object->nestedArray[1][1]->nestedProperty, 'nested_array[1][1]->nestedProperty should match the original data.'); - $this->assertNull($object->nestedArray[1][2], 'nested_array[1][2] should be null.'); - $this->assertInstanceOf(DateTime::class, $object->nestedArray[1][4], 'nested_array[1][4] should be a DateTime instance.'); - $this->assertEquals('2023-01-02T00:00:00+00:00', $object->nestedArray[1][4]->format(Constant::DateTimeFormat), 'nested_array[1][4] should have the correct datetime.'); - $this->assertInstanceOf(UnionObject::class, $object->nestedArray[2][5], 'nested_array[2][5] should be an instance of Object.'); - $this->assertEquals('Nested Two', $object->nestedArray[2][5]->nestedProperty, 'nested_array[2][5]->nestedProperty should match the original data.'); - $this->assertInstanceOf(DateTime::class, $object->nestedArray[2][7], 'nested_array[1][4] should be a DateTime instance.'); - $this->assertEquals('2023-02-02', $object->nestedArray[2][7]->format('Y-m-d'), 'nested_array[1][4] should have the correct date.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for nested_array.'); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/NullPropertyTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/NullPropertyTest.php deleted file mode 100644 index ce20a244282..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/NullPropertyTest.php +++ /dev/null @@ -1,53 +0,0 @@ -nonNullProperty = $values['nonNullProperty']; - $this->nullProperty = $values['nullProperty'] ?? null; - } -} - -class NullPropertyTest extends TestCase -{ - public function testNullPropertiesAreOmitted(): void - { - $object = new NullProperty( - [ - "nonNullProperty" => "Test String", - "nullProperty" => null - ] - ); - - $serialized = $object->jsonSerialize(); - $this->assertArrayHasKey('non_null_property', $serialized, 'non_null_property should be present in the serialized JSON.'); - $this->assertArrayNotHasKey('null_property', $serialized, 'null_property should be omitted from the serialized JSON.'); - $this->assertEquals('Test String', $serialized['non_null_property'], 'non_null_property should have the correct value.'); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/NullableArrayTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/NullableArrayTest.php deleted file mode 100644 index fe0f19de6b1..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/NullableArrayTest.php +++ /dev/null @@ -1,49 +0,0 @@ - $nullableStringArray - */ - #[ArrayType([new Union('string', 'null')])] - #[JsonProperty('nullable_string_array')] - public array $nullableStringArray; - - /** - * @param array{ - * nullableStringArray: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->nullableStringArray = $values['nullableStringArray']; - } -} - -class NullableArrayTest extends TestCase -{ - public function testNullableArray(): void - { - $expectedJson = json_encode( - [ - 'nullable_string_array' => ['one', null, 'three'] - ], - JSON_THROW_ON_ERROR - ); - - $object = NullableArray::fromJson($expectedJson); - $this->assertEquals(['one', null, 'three'], $object->nullableStringArray, 'nullable_string_array should match the original data.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for nullable_string_array.'); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/ScalarTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/ScalarTest.php deleted file mode 100644 index 604b7c0b959..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/ScalarTest.php +++ /dev/null @@ -1,116 +0,0 @@ - $intFloatArray - */ - #[ArrayType([new Union('integer', 'float')])] - #[JsonProperty('int_float_array')] - public array $intFloatArray; - - /** - * @var array $floatArray - */ - #[ArrayType(['float'])] - #[JsonProperty('float_array')] - public array $floatArray; - - /** - * @var bool|null $nullableBooleanProperty - */ - #[JsonProperty('nullable_boolean_property')] - public ?bool $nullableBooleanProperty; - - /** - * @param array{ - * integerProperty: int, - * floatProperty: float, - * otherFloatProperty: float, - * booleanProperty: bool, - * stringProperty: string, - * intFloatArray: array, - * floatArray: array, - * nullableBooleanProperty?: bool|null, - * } $values - */ - public function __construct( - array $values, - ) { - $this->integerProperty = $values['integerProperty']; - $this->floatProperty = $values['floatProperty']; - $this->otherFloatProperty = $values['otherFloatProperty']; - $this->booleanProperty = $values['booleanProperty']; - $this->stringProperty = $values['stringProperty']; - $this->intFloatArray = $values['intFloatArray']; - $this->floatArray = $values['floatArray']; - $this->nullableBooleanProperty = $values['nullableBooleanProperty'] ?? null; - } -} - -class ScalarTest extends TestCase -{ - public function testAllScalarTypesIncludingFloat(): void - { - $expectedJson = json_encode( - [ - 'integer_property' => 42, - 'float_property' => 3.14159, - 'other_float_property' => 3, - 'boolean_property' => true, - 'string_property' => 'Hello, World!', - 'int_float_array' => [1, 2.5, 3, 4.75], - 'float_array' => [1, 2, 3, 4] // Ensure we handle "integer-looking" floats - ], - JSON_THROW_ON_ERROR - ); - - $object = Scalar::fromJson($expectedJson); - $this->assertEquals(42, $object->integerProperty, 'integer_property should be 42.'); - $this->assertEquals(3.14159, $object->floatProperty, 'float_property should be 3.14159.'); - $this->assertTrue($object->booleanProperty, 'boolean_property should be true.'); - $this->assertEquals('Hello, World!', $object->stringProperty, 'string_property should be "Hello, World!".'); - $this->assertNull($object->nullableBooleanProperty, 'nullable_boolean_property should be null.'); - $this->assertEquals([1, 2.5, 3, 4.75], $object->intFloatArray, 'int_float_array should match the original data.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for ScalarTypesTest.'); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/TraitTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/TraitTest.php deleted file mode 100644 index 837f239115f..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/TraitTest.php +++ /dev/null @@ -1,60 +0,0 @@ -integerProperty = $values['integerProperty']; - $this->stringProperty = $values['stringProperty']; - } -} - -class TraitTest extends TestCase -{ - public function testTraitPropertyAndString(): void - { - $expectedJson = json_encode( - [ - 'integer_property' => 42, - 'string_property' => 'Hello, World!', - ], - JSON_THROW_ON_ERROR - ); - - $object = TypeWithTrait::fromJson($expectedJson); - $this->assertEquals(42, $object->integerProperty, 'integer_property should be 42.'); - $this->assertEquals('Hello, World!', $object->stringProperty, 'string_property should be "Hello, World!".'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for ScalarTypesTestWithTrait.'); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/UnionArrayTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/UnionArrayTest.php deleted file mode 100644 index 09933d2321d..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/UnionArrayTest.php +++ /dev/null @@ -1,57 +0,0 @@ - $mixedDates - */ - #[ArrayType(['integer' => new Union('datetime', 'string', 'null')])] - #[JsonProperty('mixed_dates')] - public array $mixedDates; - - /** - * @param array{ - * mixedDates: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->mixedDates = $values['mixedDates']; - } -} - -class UnionArrayTest extends TestCase -{ - public function testUnionArray(): void - { - $expectedJson = json_encode( - [ - 'mixed_dates' => [ - 1 => '2023-01-01T12:00:00+00:00', - 2 => null, - 3 => 'Some String' - ] - ], - JSON_THROW_ON_ERROR - ); - - $object = UnionArray::fromJson($expectedJson); - $this->assertInstanceOf(DateTime::class, $object->mixedDates[1], 'mixed_dates[1] should be a DateTime instance.'); - $this->assertEquals('2023-01-01 12:00:00', $object->mixedDates[1]->format('Y-m-d H:i:s'), 'mixed_dates[1] should have the correct datetime.'); - $this->assertNull($object->mixedDates[2], 'mixed_dates[2] should be null.'); - $this->assertEquals('Some String', $object->mixedDates[3], 'mixed_dates[3] should be "Some String".'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for mixed_dates.'); - } -} diff --git a/seed/php-model/inline-types/tests/Seed/Core/Json/UnionPropertyTest.php b/seed/php-model/inline-types/tests/Seed/Core/Json/UnionPropertyTest.php deleted file mode 100644 index 3119baace62..00000000000 --- a/seed/php-model/inline-types/tests/Seed/Core/Json/UnionPropertyTest.php +++ /dev/null @@ -1,115 +0,0 @@ - 'integer'], UnionProperty::class)] - #[JsonProperty('complexUnion')] - public mixed $complexUnion; - - /** - * @param array{ - * complexUnion: string|int|null|array|UnionProperty - * } $values - */ - public function __construct( - array $values, - ) { - $this->complexUnion = $values['complexUnion']; - } -} - -class UnionPropertyTest extends TestCase -{ - public function testWithMapOfIntToInt(): void - { - $expectedJson = json_encode( - [ - 'complexUnion' => [1 => 100, 2 => 200] - ], - JSON_THROW_ON_ERROR - ); - - $object = UnionProperty::fromJson($expectedJson); - $this->assertIsArray($object->complexUnion, 'complexUnion should be an array.'); - $this->assertEquals([1 => 100, 2 => 200], $object->complexUnion, 'complexUnion should match the original map of int => int.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); - } - - public function testWithNestedUnionPropertyType(): void - { - $expectedJson = json_encode( - [ - 'complexUnion' => new UnionProperty( - [ - 'complexUnion' => 'Nested String' - ] - ) - ], - JSON_THROW_ON_ERROR - ); - - $object = UnionProperty::fromJson($expectedJson); - $this->assertInstanceOf(UnionProperty::class, $object->complexUnion, 'complexUnion should be an instance of UnionPropertyType.'); - $this->assertEquals('Nested String', $object->complexUnion->complexUnion, 'Nested complexUnion should match the original value.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); - } - - public function testWithNull(): void - { - $expectedJson = json_encode( - [], - JSON_THROW_ON_ERROR - ); - - $object = UnionProperty::fromJson($expectedJson); - $this->assertNull($object->complexUnion, 'complexUnion should be null.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); - } - - public function testWithInteger(): void - { - $expectedJson = json_encode( - [ - 'complexUnion' => 42 - ], - JSON_THROW_ON_ERROR - ); - - $object = UnionProperty::fromJson($expectedJson); - $this->assertIsInt($object->complexUnion, 'complexUnion should be an integer.'); - $this->assertEquals(42, $object->complexUnion, 'complexUnion should match the original integer.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); - } - - public function testWithString(): void - { - $expectedJson = json_encode( - [ - 'complexUnion' => 'Some String' - ], - JSON_THROW_ON_ERROR - ); - - $object = UnionProperty::fromJson($expectedJson); - $this->assertIsString($object->complexUnion, 'complexUnion should be a string.'); - $this->assertEquals('Some String', $object->complexUnion, 'complexUnion should match the original string.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); - } -} diff --git a/seed/php-sdk/inline-types/.github/workflows/ci.yml b/seed/php-sdk/inline-types/.github/workflows/ci.yml deleted file mode 100644 index 258bf33a19f..00000000000 --- a/seed/php-sdk/inline-types/.github/workflows/ci.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: ci - -on: [push] - -jobs: - compile: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "8.1" - - - name: Install tools - run: | - composer install - - - name: Build - run: | - composer build - - - name: Analyze - run: | - composer analyze - - unit-tests: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "8.1" - - - name: Install tools - run: | - composer install - - - name: Run Tests - run: | - composer test \ No newline at end of file diff --git a/seed/php-sdk/inline-types/.gitignore b/seed/php-sdk/inline-types/.gitignore deleted file mode 100644 index f38efc46ade..00000000000 --- a/seed/php-sdk/inline-types/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.php-cs-fixer.cache -.phpunit.result.cache -composer.lock -vendor/ \ No newline at end of file diff --git a/seed/php-sdk/inline-types/.mock/definition/__package__.yml b/seed/php-sdk/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/php-sdk/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/php-sdk/inline-types/.mock/definition/api.yml b/seed/php-sdk/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/php-sdk/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/php-sdk/inline-types/.mock/fern.config.json b/seed/php-sdk/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/php-sdk/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/php-sdk/inline-types/.mock/generators.yml b/seed/php-sdk/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/php-sdk/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/php-sdk/inline-types/composer.json b/seed/php-sdk/inline-types/composer.json deleted file mode 100644 index 5c96c0056e0..00000000000 --- a/seed/php-sdk/inline-types/composer.json +++ /dev/null @@ -1,40 +0,0 @@ - -{ - "name": "seed/seed", - "version": "0.0.1", - "description": "Seed PHP Library", - "keywords": [ - "seed", - "api", - "sdk" - ], - "license": [], - "require": { - "php": "^8.1", - "ext-json": "*", - "guzzlehttp/guzzle": "^7.9" - }, - "require-dev": { - "phpunit/phpunit": "^9.0", - "friendsofphp/php-cs-fixer": "3.5.0", - "phpstan/phpstan": "^1.12" - }, - "autoload": { - "psr-4": { - "Seed\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "\\Seed\\Tests\\": "tests/" - } - }, - "scripts": { - "build": [ - "@php -l src", - "@php -l tests" - ], - "test": "phpunit", - "analyze": "phpstan analyze src tests" - } -} diff --git a/seed/php-sdk/inline-types/phpstan.neon b/seed/php-sdk/inline-types/phpstan.neon deleted file mode 100644 index 29a11a92a19..00000000000 --- a/seed/php-sdk/inline-types/phpstan.neon +++ /dev/null @@ -1,5 +0,0 @@ -parameters: - level: max - paths: - - src - - tests \ No newline at end of file diff --git a/seed/php-sdk/inline-types/phpunit.xml b/seed/php-sdk/inline-types/phpunit.xml deleted file mode 100644 index 54630a51163..00000000000 --- a/seed/php-sdk/inline-types/phpunit.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - tests - - - \ No newline at end of file diff --git a/seed/php-sdk/inline-types/snippet-templates.json b/seed/php-sdk/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/php-sdk/inline-types/snippet.json b/seed/php-sdk/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/php-sdk/inline-types/src/Core/Client/BaseApiRequest.php b/seed/php-sdk/inline-types/src/Core/Client/BaseApiRequest.php deleted file mode 100644 index 5e1283e2b6f..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Client/BaseApiRequest.php +++ /dev/null @@ -1,22 +0,0 @@ - $headers Additional headers for the request (optional) - * @param array $query Query parameters for the request (optional) - */ - public function __construct( - public readonly string $baseUrl, - public readonly string $path, - public readonly HttpMethod $method, - public readonly array $headers = [], - public readonly array $query = [], - ) { - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Client/HttpMethod.php b/seed/php-sdk/inline-types/src/Core/Client/HttpMethod.php deleted file mode 100644 index b9a3e2d0321..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Client/HttpMethod.php +++ /dev/null @@ -1,12 +0,0 @@ - $headers - */ - private array $headers; - - /** - * @param ?array{ - * baseUrl?: string, - * client?: ClientInterface, - * headers?: array, - * } $options - */ - public function __construct( - public readonly ?array $options = null, - ) { - $this->client = $this->options['client'] ?? new Client(); - $this->headers = $this->options['headers'] ?? []; - } - - /** - * @throws ClientExceptionInterface - */ - public function sendRequest( - BaseApiRequest $request, - ): ResponseInterface { - $httpRequest = $this->buildRequest($request); - return $this->client->send($httpRequest); - } - - private function buildRequest( - BaseApiRequest $request - ): Request { - $url = $this->buildUrl($request); - $headers = $this->encodeHeaders($request); - $body = $this->encodeRequestBody($request); - return new Request( - $request->method->name, - $url, - $headers, - $body, - ); - } - - /** - * @return array - */ - private function encodeHeaders( - BaseApiRequest $request - ): array { - return match (get_class($request)) { - JsonApiRequest::class => array_merge( - ["Content-Type" => "application/json"], - $this->headers, - $request->headers - ), - MultipartApiRequest::class => array_merge( - $this->headers, - $request->headers - ), - default => throw new InvalidArgumentException('Unsupported request type: ' . get_class($request)), - }; - } - - private function encodeRequestBody( - BaseApiRequest $request - ): ?StreamInterface { - return match (get_class($request)) { - JsonApiRequest::class => $request->body != null ? Utils::streamFor(json_encode($request->body)) : null, - MultipartApiRequest::class => $request->body != null ? new MultipartStream($request->body->toArray()) : null, - default => throw new InvalidArgumentException('Unsupported request type: '.get_class($request)), - }; - } - - private function buildUrl( - BaseApiRequest $request - ): string { - $baseUrl = $request->baseUrl; - $trimmedBaseUrl = rtrim($baseUrl, '/'); - $trimmedBasePath = ltrim($request->path, '/'); - $url = "{$trimmedBaseUrl}/{$trimmedBasePath}"; - - if (!empty($request->query)) { - $url .= '?' . $this->encodeQuery($request->query); - } - - return $url; - } - - /** - * @param array $query - */ - private function encodeQuery( - array $query - ): string { - $parts = []; - foreach ($query as $key => $value) { - if (is_array($value)) { - foreach ($value as $item) { - $parts[] = urlencode($key).'='.$this->encodeQueryValue($item); - } - } else { - $parts[] = urlencode($key).'='.$this->encodeQueryValue($value); - } - } - return implode('&', $parts); - } - - private function encodeQueryValue( - mixed $value - ): string { - if (is_string($value)) { - return urlencode($value); - } - if (is_scalar($value)) { - return urlencode((string)$value); - } - if (is_null($value)) { - return 'null'; - } - // Unreachable, but included for a best effort. - return urlencode(strval(json_encode($value))); - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Json/JsonApiRequest.php b/seed/php-sdk/inline-types/src/Core/Json/JsonApiRequest.php deleted file mode 100644 index 8fdf493606e..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Json/JsonApiRequest.php +++ /dev/null @@ -1,28 +0,0 @@ - $headers Additional headers for the request (optional) - * @param array $query Query parameters for the request (optional) - * @param mixed|null $body The JSON request body (optional) - */ - public function __construct( - string $baseUrl, - string $path, - HttpMethod $method, - array $headers = [], - array $query = [], - public readonly mixed $body = null - ) { - parent::__construct($baseUrl, $path, $method, $headers, $query); - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Json/JsonDecoder.php b/seed/php-sdk/inline-types/src/Core/Json/JsonDecoder.php deleted file mode 100644 index 2ddff027348..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Json/JsonDecoder.php +++ /dev/null @@ -1,161 +0,0 @@ - $type The type definition for deserialization. - * @return mixed[]|array The deserialized array. - * @throws JsonException If the decoded value is not an array. - */ - public static function decodeArray(string $json, array $type): array - { - $decoded = self::decode($json); - if (!is_array($decoded)) { - throw new JsonException("Unexpected non-array json value: " . $json); - } - return JsonDeserializer::deserializeArray($decoded, $type); - } - - /** - * Decodes a JSON string and deserializes it based on the provided union type definition. - * - * @param string $json The JSON string to decode. - * @param Union $union The union type definition for deserialization. - * @return mixed The deserialized value. - * @throws JsonException If the deserialization for all types in the union fails. - */ - public static function decodeUnion(string $json, Union $union): mixed - { - $decoded = self::decode($json); - return JsonDeserializer::deserializeUnion($decoded, $union); - } - /** - * Decodes a JSON string and returns a mixed. - * - * @param string $json The JSON string to decode. - * @return mixed The decoded mixed. - * @throws JsonException If the decoded value is not an mixed. - */ - public static function decodeMixed(string $json): mixed - { - return self::decode($json); - } - - /** - * Decodes a JSON string into a PHP value. - * - * @param string $json The JSON string to decode. - * @return mixed The decoded value. - * @throws JsonException If an error occurs during JSON decoding. - */ - public static function decode(string $json): mixed - { - return json_decode($json, associative: true, flags: JSON_THROW_ON_ERROR); - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Json/JsonDeserializer.php b/seed/php-sdk/inline-types/src/Core/Json/JsonDeserializer.php deleted file mode 100644 index 5f0ca2d7ed0..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Json/JsonDeserializer.php +++ /dev/null @@ -1,204 +0,0 @@ - $data The array to be deserialized. - * @param mixed[]|array $type The type definition from the annotation. - * @return mixed[]|array The deserialized array. - * @throws JsonException If deserialization fails. - */ - public static function deserializeArray(array $data, array $type): array - { - return Utils::isMapType($type) - ? self::deserializeMap($data, $type) - : self::deserializeList($data, $type); - } - - /** - * Deserializes a value based on its type definition. - * - * @param mixed $data The data to deserialize. - * @param mixed $type The type definition. - * @return mixed The deserialized value. - * @throws JsonException If deserialization fails. - */ - private static function deserializeValue(mixed $data, mixed $type): mixed - { - if ($type instanceof Union) { - return self::deserializeUnion($data, $type); - } - - if (is_array($type)) { - return self::deserializeArray((array)$data, $type); - } - - if (gettype($type) != "string") { - throw new JsonException("Unexpected non-string type."); - } - - return self::deserializeSingleValue($data, $type); - } - - /** - * Deserializes a value based on the possible types in a union type definition. - * - * @param mixed $data The data to deserialize. - * @param Union $type The union type definition. - * @return mixed The deserialized value. - * @throws JsonException If none of the union types can successfully deserialize the value. - */ - public static function deserializeUnion(mixed $data, Union $type): mixed - { - foreach ($type->types as $unionType) { - try { - return self::deserializeValue($data, $unionType); - } catch (Exception) { - continue; - } - } - $readableType = Utils::getReadableType($data); - throw new JsonException( - "Cannot deserialize value of type $readableType with any of the union types: " . $type - ); - } - - /** - * Deserializes a single value based on its expected type. - * - * @param mixed $data The data to deserialize. - * @param string $type The expected type. - * @return mixed The deserialized value. - * @throws JsonException If deserialization fails. - */ - private static function deserializeSingleValue(mixed $data, string $type): mixed - { - if ($type === 'null' && $data === null) { - return null; - } - - if ($type === 'date' && is_string($data)) { - return self::deserializeDate($data); - } - - if ($type === 'datetime' && is_string($data)) { - return self::deserializeDateTime($data); - } - - if ($type === 'mixed') { - return $data; - } - - if (class_exists($type) && is_array($data)) { - return self::deserializeObject($data, $type); - } - - // Handle floats as a special case since gettype($data) returns "double" for float values in PHP, and because - // floats make come through from json_decoded as integers - if ($type === 'float' && (is_numeric($data))) { - return (float) $data; - } - - if (gettype($data) === $type) { - return $data; - } - - throw new JsonException("Unable to deserialize value of type '" . gettype($data) . "' as '$type'."); - } - - /** - * Deserializes an array into an object of the given type. - * - * @param array $data The data to deserialize. - * @param string $type The class name of the object to deserialize into. - * - * @return object The deserialized object. - * - * @throws JsonException If the type does not implement JsonSerializableType. - */ - public static function deserializeObject(array $data, string $type): object - { - if (!is_subclass_of($type, JsonSerializableType::class)) { - throw new JsonException("$type is not a subclass of JsonSerializableType."); - } - return $type::jsonDeserialize($data); - } - - /** - * Deserializes a map (associative array) with defined key and value types. - * - * @param array $data The associative array to deserialize. - * @param array $type The type definition for the map. - * @return array The deserialized map. - * @throws JsonException If deserialization fails. - */ - private static function deserializeMap(array $data, array $type): array - { - $keyType = array_key_first($type); - $valueType = $type[$keyType]; - $result = []; - - foreach ($data as $key => $item) { - $key = Utils::castKey($key, (string)$keyType); - $result[$key] = self::deserializeValue($item, $valueType); - } - - return $result; - } - - /** - * Deserializes a list (indexed array) with a defined value type. - * - * @param array $data The list to deserialize. - * @param array $type The type definition for the list. - * @return array The deserialized list. - * @throws JsonException If deserialization fails. - */ - private static function deserializeList(array $data, array $type): array - { - $valueType = $type[0]; - return array_map(fn ($item) => self::deserializeValue($item, $valueType), $data); - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Json/JsonEncoder.php b/seed/php-sdk/inline-types/src/Core/Json/JsonEncoder.php deleted file mode 100644 index 0dbf3fcc994..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Json/JsonEncoder.php +++ /dev/null @@ -1,20 +0,0 @@ -jsonSerialize(); - $encoded = JsonEncoder::encode($serializedObject); - if (!$encoded) { - throw new Exception("Could not encode type"); - } - return $encoded; - } - - /** - * Serializes the object to an array. - * - * @return mixed[] Array representation of the object. - * @throws JsonException If serialization fails. - */ - public function jsonSerialize(): array - { - $result = []; - $reflectionClass = new \ReflectionClass($this); - - foreach ($reflectionClass->getProperties() as $property) { - $jsonKey = self::getJsonKey($property); - if ($jsonKey == null) { - continue; - } - $value = $property->getValue($this); - - // Handle DateTime properties - $dateTypeAttr = $property->getAttributes(Date::class)[0] ?? null; - if ($dateTypeAttr && $value instanceof DateTime) { - $dateType = $dateTypeAttr->newInstance()->type; - $value = ($dateType === Date::TYPE_DATE) - ? JsonSerializer::serializeDate($value) - : JsonSerializer::serializeDateTime($value); - } - - // Handle Union annotations - $unionTypeAttr = $property->getAttributes(Union::class)[0] ?? null; - if ($unionTypeAttr) { - $unionType = $unionTypeAttr->newInstance(); - $value = JsonSerializer::serializeUnion($value, $unionType); - } - - // Handle arrays with type annotations - $arrayTypeAttr = $property->getAttributes(ArrayType::class)[0] ?? null; - if ($arrayTypeAttr && is_array($value)) { - $arrayType = $arrayTypeAttr->newInstance()->type; - $value = JsonSerializer::serializeArray($value, $arrayType); - } - - // Handle object - if (is_object($value)) { - $value = JsonSerializer::serializeObject($value); - } - - if ($value !== null) { - $result[$jsonKey] = $value; - } - } - - return $result; - } - - /** - * Deserializes a JSON string into an instance of the calling class. - * - * @param string $json JSON string to deserialize. - * @return static Deserialized object. - * @throws JsonException If decoding fails or the result is not an array. - * @throws Exception If deserialization fails. - */ - public static function fromJson(string $json): static - { - $decodedJson = JsonDecoder::decode($json); - if (!is_array($decodedJson)) { - throw new JsonException("Unexpected non-array decoded type: " . gettype($decodedJson)); - } - return self::jsonDeserialize($decodedJson); - } - - /** - * Deserializes an array into an instance of the calling class. - * - * @param array $data Array data to deserialize. - * @return static Deserialized object. - * @throws JsonException If deserialization fails. - */ - public static function jsonDeserialize(array $data): static - { - $reflectionClass = new \ReflectionClass(static::class); - $constructor = $reflectionClass->getConstructor(); - - if ($constructor === null) { - throw new JsonException("No constructor found."); - } - - $args = []; - foreach ($reflectionClass->getProperties() as $property) { - $jsonKey = self::getJsonKey($property) ?? $property->getName(); - - if (array_key_exists($jsonKey, $data)) { - $value = $data[$jsonKey]; - - // Handle Date annotation - $dateTypeAttr = $property->getAttributes(Date::class)[0] ?? null; - if ($dateTypeAttr) { - $dateType = $dateTypeAttr->newInstance()->type; - if (!is_string($value)) { - throw new JsonException("Unexpected non-string type for date."); - } - $value = ($dateType === Date::TYPE_DATE) - ? JsonDeserializer::deserializeDate($value) - : JsonDeserializer::deserializeDateTime($value); - } - - // Handle Array annotation - $arrayTypeAttr = $property->getAttributes(ArrayType::class)[0] ?? null; - if (is_array($value) && $arrayTypeAttr) { - $arrayType = $arrayTypeAttr->newInstance()->type; - $value = JsonDeserializer::deserializeArray($value, $arrayType); - } - - // Handle Union annotations - $unionTypeAttr = $property->getAttributes(Union::class)[0] ?? null; - if ($unionTypeAttr) { - $unionType = $unionTypeAttr->newInstance(); - $value = JsonDeserializer::deserializeUnion($value, $unionType); - } - - // Handle object - $type = $property->getType(); - if (is_array($value) && $type instanceof ReflectionNamedType && !$type->isBuiltin()) { - $value = JsonDeserializer::deserializeObject($value, $type->getName()); - } - - $args[$property->getName()] = $value; - } else { - $defaultValue = $property->getDefaultValue() ?? null; - $args[$property->getName()] = $defaultValue; - } - } - // @phpstan-ignore-next-line - return new static($args); - } - - /** - * Retrieves the JSON key associated with a property. - * - * @param ReflectionProperty $property The reflection property. - * @return ?string The JSON key, or null if not available. - */ - private static function getJsonKey(ReflectionProperty $property): ?string - { - $jsonPropertyAttr = $property->getAttributes(JsonProperty::class)[0] ?? null; - return $jsonPropertyAttr?->newInstance()?->name; - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Json/JsonSerializer.php b/seed/php-sdk/inline-types/src/Core/Json/JsonSerializer.php deleted file mode 100644 index 7dd6fe517af..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Json/JsonSerializer.php +++ /dev/null @@ -1,192 +0,0 @@ -format(Constant::DateFormat); - } - - /** - * Serializes a DateTime object into a string using the date-time format. - * - * @param DateTime $date The DateTime object to serialize. - * @return string The serialized date-time string. - */ - public static function serializeDateTime(DateTime $date): string - { - return $date->format(Constant::DateTimeFormat); - } - - /** - * Serializes an array based on type annotations (either a list or map). - * - * @param mixed[]|array $data The array to be serialized. - * @param mixed[]|array $type The type definition from the annotation. - * @return mixed[]|array The serialized array. - * @throws JsonException If serialization fails. - */ - public static function serializeArray(array $data, array $type): array - { - return Utils::isMapType($type) - ? self::serializeMap($data, $type) - : self::serializeList($data, $type); - } - - /** - * Serializes a value based on its type definition. - * - * @param mixed $data The value to serialize. - * @param mixed $type The type definition. - * @return mixed The serialized value. - * @throws JsonException If serialization fails. - */ - private static function serializeValue(mixed $data, mixed $type): mixed - { - if ($type instanceof Union) { - return self::serializeUnion($data, $type); - } - - if (is_array($type)) { - return self::serializeArray((array)$data, $type); - } - - if (gettype($type) != "string") { - throw new JsonException("Unexpected non-string type."); - } - - return self::serializeSingleValue($data, $type); - } - - /** - * Serializes a value for a union type definition. - * - * @param mixed $data The value to serialize. - * @param Union $unionType The union type definition. - * @return mixed The serialized value. - * @throws JsonException If serialization fails for all union types. - */ - public static function serializeUnion(mixed $data, Union $unionType): mixed - { - foreach ($unionType->types as $type) { - try { - return self::serializeValue($data, $type); - } catch (Exception) { - // Try the next type in the union - continue; - } - } - $readableType = Utils::getReadableType($data); - throw new JsonException( - "Cannot serialize value of type $readableType with any of the union types: " . $unionType - ); - } - - /** - * Serializes a single value based on its type. - * - * @param mixed $data The value to serialize. - * @param string $type The expected type. - * @return mixed The serialized value. - * @throws JsonException If serialization fails. - */ - private static function serializeSingleValue(mixed $data, string $type): mixed - { - if ($type === 'null' && $data === null) { - return null; - } - - if (($type === 'date' || $type === 'datetime') && $data instanceof DateTime) { - return $type === 'date' ? self::serializeDate($data) : self::serializeDateTime($data); - } - - if ($type === 'mixed') { - return $data; - } - - if (class_exists($type) && $data instanceof $type) { - return self::serializeObject($data); - } - - // Handle floats as a special case since gettype($data) returns "double" for float values in PHP. - if ($type === 'float' && is_float($data)) { - return $data; - } - - if (gettype($data) === $type) { - return $data; - } - - throw new JsonException("Unable to serialize value of type '" . gettype($data) . "' as '$type'."); - } - - /** - * Serializes an object to a JSON-serializable format. - * - * @param object $data The object to serialize. - * @return mixed The serialized data. - * @throws JsonException If the object does not implement JsonSerializable. - */ - public static function serializeObject(object $data): mixed - { - if (!is_subclass_of($data, JsonSerializable::class)) { - $type = get_class($data); - throw new JsonException("Class $type must implement JsonSerializable."); - } - return $data->jsonSerialize(); - } - - /** - * Serializes a map (associative array) with defined key and value types. - * - * @param array $data The associative array to serialize. - * @param array $type The type definition for the map. - * @return array The serialized map. - * @throws JsonException If serialization fails. - */ - private static function serializeMap(array $data, array $type): array - { - $keyType = array_key_first($type); - if ($keyType === null) { - throw new JsonException("Unexpected no key in ArrayType."); - } - $valueType = $type[$keyType]; - $result = []; - - foreach ($data as $key => $item) { - $key = Utils::castKey($key, $keyType); - $result[$key] = self::serializeValue($item, $valueType); - } - - return $result; - } - - /** - * Serializes a list (indexed array) where only the value type is defined. - * - * @param array $data The list to serialize. - * @param array $type The type definition for the list. - * @return array The serialized list. - * @throws JsonException If serialization fails. - */ - private static function serializeList(array $data, array $type): array - { - $valueType = $type[0]; - return array_map(fn ($item) => self::serializeValue($item, $valueType), $data); - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Json/Utils.php b/seed/php-sdk/inline-types/src/Core/Json/Utils.php deleted file mode 100644 index 7577c058916..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Json/Utils.php +++ /dev/null @@ -1,61 +0,0 @@ - $type The type definition from the annotation. - * @return bool True if the type is a map, false if it's a list. - */ - public static function isMapType(array $type): bool - { - return count($type) === 1 && !array_is_list($type); - } - - /** - * Casts the key to the appropriate type based on the key type. - * - * @param mixed $key The key to be cast. - * @param string $keyType The type to cast the key to ('string', 'integer', 'float'). - * @return mixed The casted key. - * @throws JsonException - */ - public static function castKey(mixed $key, string $keyType): mixed - { - if (!is_scalar($key)) { - throw new JsonException("Key must be a scalar type."); - } - return match ($keyType) { - 'integer' => (int)$key, - 'float' => (float)$key, - 'string' => (string)$key, - default => $key, - }; - } - - /** - * Returns a human-readable representation of the input's type. - * - * @param mixed $input The input value to determine the type of. - * @return string A readable description of the input type. - */ - public static function getReadableType(mixed $input): string - { - if (is_object($input)) { - return get_class($input); - } elseif (is_array($input)) { - return 'array(' . count($input) . ' items)'; - } elseif (is_null($input)) { - return 'null'; - } else { - return gettype($input); - } - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Multipart/MultipartApiRequest.php b/seed/php-sdk/inline-types/src/Core/Multipart/MultipartApiRequest.php deleted file mode 100644 index 7760366456c..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Multipart/MultipartApiRequest.php +++ /dev/null @@ -1,28 +0,0 @@ - $headers Additional headers for the request (optional) - * @param array $query Query parameters for the request (optional) - * @param ?MultipartFormData $body The multipart form data for the request (optional) - */ - public function __construct( - string $baseUrl, - string $path, - HttpMethod $method, - array $headers = [], - array $query = [], - public readonly ?MultipartFormData $body = null - ) { - parent::__construct($baseUrl, $path, $method, $headers, $query); - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Multipart/MultipartFormData.php b/seed/php-sdk/inline-types/src/Core/Multipart/MultipartFormData.php deleted file mode 100644 index 33bb67b05bd..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Multipart/MultipartFormData.php +++ /dev/null @@ -1,61 +0,0 @@ - - */ - private array $parts = []; - - /** - * Adds a new part to the multipart form data. - * - * @param string $name - * @param string|int|bool|float|StreamInterface $value - * @param ?string $contentType - */ - public function add( - string $name, - string|int|bool|float|StreamInterface $value, - ?string $contentType = null, - ): void { - $headers = $contentType != null ? ['Content-Type' => $contentType] : null; - self::addPart( - new MultipartFormDataPart( - name: $name, - value: $value, - headers: $headers, - ) - ); - } - - /** - * Adds a new part to the multipart form data. - * - * @param MultipartFormDataPart $part - */ - public function addPart(MultipartFormDataPart $part): void - { - $this->parts[] = $part; - } - - /** - * Converts the multipart form data into an array suitable - * for Guzzle's multipart form data. - * - * @return array - * }> - */ - public function toArray(): array - { - return array_map(fn ($part) => $part->toArray(), $this->parts); - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Multipart/MultipartFormDataPart.php b/seed/php-sdk/inline-types/src/Core/Multipart/MultipartFormDataPart.php deleted file mode 100644 index c158903d84f..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Multipart/MultipartFormDataPart.php +++ /dev/null @@ -1,76 +0,0 @@ - - */ - private ?array $headers; - - /** - * @param string $name - * @param string|bool|float|int|StreamInterface $value - * @param ?string $filename - * @param ?array $headers - */ - public function __construct( - string $name, - string|bool|float|int|StreamInterface $value, - ?string $filename = null, - ?array $headers = null - ) { - $this->name = $name; - $this->contents = Utils::streamFor($value); - $this->filename = $filename; - $this->headers = $headers; - } - - /** - * Converts the multipart form data part into an array suitable - * for Guzzle's multipart form data. - * - * @return array{ - * name: string, - * contents: StreamInterface, - * filename?: string, - * headers?: array - * } - */ - public function toArray(): array - { - $formData = [ - 'name' => $this->name, - 'contents' => $this->contents, - ]; - - if ($this->filename != null) { - $formData['filename'] = $this->filename; - } - - if ($this->headers != null) { - $formData['headers'] = $this->headers; - } - - return $formData; - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Types/ArrayType.php b/seed/php-sdk/inline-types/src/Core/Types/ArrayType.php deleted file mode 100644 index a26d29008ec..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Types/ArrayType.php +++ /dev/null @@ -1,16 +0,0 @@ - 'valueType'] for maps, or ['valueType'] for lists - */ - public function __construct(public array $type) - { - } -} diff --git a/seed/php-sdk/inline-types/src/Core/Types/Constant.php b/seed/php-sdk/inline-types/src/Core/Types/Constant.php deleted file mode 100644 index 5ac4518cc6d..00000000000 --- a/seed/php-sdk/inline-types/src/Core/Types/Constant.php +++ /dev/null @@ -1,12 +0,0 @@ -> The types allowed for this property, which can be strings, arrays, or nested Union types. - */ - public array $types; - - /** - * Constructor for the Union attribute. - * - * @param string|Union|array ...$types The list of types that the property can accept. - * This can include primitive types (e.g., 'string', 'int'), arrays, or other Union instances. - * - * Example: - * ```php - * #[Union('string', 'null', 'date', new Union('boolean', 'int'))] - * ``` - */ - public function __construct(string|Union|array ...$types) - { - $this->types = $types; - } - - /** - * Converts the Union type to a string representation. - * - * @return string A string representation of the union types. - */ - public function __toString(): string - { - return implode(' | ', array_map(function ($type) { - if (is_string($type)) { - return $type; - } elseif ($type instanceof Union) { - return (string) $type; // Recursively handle nested unions - } elseif (is_array($type)) { - return 'array'; // Handle arrays - } - }, $this->types)); - } -} diff --git a/seed/php-sdk/inline-types/src/Exceptions/SeedApiException.php b/seed/php-sdk/inline-types/src/Exceptions/SeedApiException.php deleted file mode 100644 index 41a85392b70..00000000000 --- a/seed/php-sdk/inline-types/src/Exceptions/SeedApiException.php +++ /dev/null @@ -1,53 +0,0 @@ -body = $body; - parent::__construct($message, $statusCode, $previous); - } - - /** - * Returns the body of the response that triggered the exception. - * - * @return mixed - */ - public function getBody(): mixed - { - return $this->body; - } - - /** - * @return string - */ - public function __toString(): string - { - if (empty($this->body)) { - return "$this->message; Status Code: $this->code\n"; - } - return "$this->message; Status Code: $this->code; Body: " . $this->body . "\n"; - } -} diff --git a/seed/php-sdk/inline-types/src/Exceptions/SeedException.php b/seed/php-sdk/inline-types/src/Exceptions/SeedException.php deleted file mode 100644 index 45703527673..00000000000 --- a/seed/php-sdk/inline-types/src/Exceptions/SeedException.php +++ /dev/null @@ -1,12 +0,0 @@ -bar = $values['bar']; - $this->foo = $values['foo']; - } -} diff --git a/seed/php-sdk/inline-types/src/SeedClient.php b/seed/php-sdk/inline-types/src/SeedClient.php deleted file mode 100644 index 44d26d3aa50..00000000000 --- a/seed/php-sdk/inline-types/src/SeedClient.php +++ /dev/null @@ -1,95 +0,0 @@ -, - * } $options - */ - private ?array $options; - - /** - * @var RawClient $client - */ - private RawClient $client; - - /** - * @param ?array{ - * baseUrl?: string, - * client?: ClientInterface, - * headers?: array, - * } $options - */ - public function __construct( - ?array $options = null, - ) { - $defaultHeaders = [ - 'X-Fern-Language' => 'PHP', - 'X-Fern-SDK-Name' => 'Seed', - 'X-Fern-SDK-Version' => '0.0.1', - ]; - - $this->options = $options ?? []; - $this->options['headers'] = array_merge( - $defaultHeaders, - $this->options['headers'] ?? [], - ); - - $this->client = new RawClient( - options: $this->options, - ); - } - - /** - * @param PostRootRequest $request - * @param ?array{ - * baseUrl?: string, - * } $options - * @return RootType1 - * @throws SeedException - * @throws SeedApiException - */ - public function getRoot(PostRootRequest $request, ?array $options = null): RootType1 - { - try { - $response = $this->client->sendRequest( - new JsonApiRequest( - baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', - path: "/root/root", - method: HttpMethod::POST, - body: $request, - ), - ); - $statusCode = $response->getStatusCode(); - if ($statusCode >= 200 && $statusCode < 400) { - $json = $response->getBody()->getContents(); - return RootType1::fromJson($json); - } - } catch (JsonException $e) { - throw new SeedException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); - } catch (ClientExceptionInterface $e) { - throw new SeedException(message: $e->getMessage(), previous: $e); - } - throw new SeedApiException( - message: 'API request failed', - statusCode: $statusCode, - body: $response->getBody()->getContents(), - ); - } -} diff --git a/seed/php-sdk/inline-types/src/Types/InlineEnum.php b/seed/php-sdk/inline-types/src/Types/InlineEnum.php deleted file mode 100644 index 53a2a5b26a0..00000000000 --- a/seed/php-sdk/inline-types/src/Types/InlineEnum.php +++ /dev/null @@ -1,11 +0,0 @@ -foo = $values['foo']; - $this->bar = $values['bar']; - } -} diff --git a/seed/php-sdk/inline-types/src/Types/InlineType2.php b/seed/php-sdk/inline-types/src/Types/InlineType2.php deleted file mode 100644 index b731042a72a..00000000000 --- a/seed/php-sdk/inline-types/src/Types/InlineType2.php +++ /dev/null @@ -1,26 +0,0 @@ -baz = $values['baz']; - } -} diff --git a/seed/php-sdk/inline-types/src/Types/NestedInlineType1.php b/seed/php-sdk/inline-types/src/Types/NestedInlineType1.php deleted file mode 100644 index 87166a44664..00000000000 --- a/seed/php-sdk/inline-types/src/Types/NestedInlineType1.php +++ /dev/null @@ -1,42 +0,0 @@ - $myEnum - */ - #[JsonProperty('myEnum')] - public string $myEnum; - - /** - * @param array{ - * foo: string, - * bar: string, - * myEnum: value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->foo = $values['foo']; - $this->bar = $values['bar']; - $this->myEnum = $values['myEnum']; - } -} diff --git a/seed/php-sdk/inline-types/src/Types/RootType1.php b/seed/php-sdk/inline-types/src/Types/RootType1.php deleted file mode 100644 index d4531d4a1cd..00000000000 --- a/seed/php-sdk/inline-types/src/Types/RootType1.php +++ /dev/null @@ -1,34 +0,0 @@ -foo = $values['foo']; - $this->bar = $values['bar']; - } -} diff --git a/seed/php-sdk/inline-types/src/Utils/File.php b/seed/php-sdk/inline-types/src/Utils/File.php deleted file mode 100644 index 753748138d4..00000000000 --- a/seed/php-sdk/inline-types/src/Utils/File.php +++ /dev/null @@ -1,125 +0,0 @@ -filename = $filename; - $this->contentType = $contentType; - $this->stream = $stream; - } - - /** - * Creates a File instance from a filepath. - * - * @param string $filepath - * @param ?string $filename - * @param ?string $contentType - * @return File - * @throws Exception - */ - public static function createFromFilepath( - string $filepath, - ?string $filename = null, - ?string $contentType = null, - ): File { - $resource = fopen($filepath, 'r'); - if (!$resource) { - throw new Exception("Unable to open file $filepath"); - } - $stream = Utils::streamFor($resource); - if (!$stream->isReadable()) { - throw new Exception("File $filepath is not readable"); - } - return new self( - stream: $stream, - filename: $filename ?? basename($filepath), - contentType: $contentType, - ); - } - - /** - * Creates a File instance from a string. - * - * @param string $content - * @param ?string $filename - * @param ?string $contentType - * @return File - */ - public static function createFromString( - string $content, - ?string $filename, - ?string $contentType = null, - ): File { - return new self( - stream: Utils::streamFor($content), - filename: $filename, - contentType: $contentType, - ); - } - - /** - * Maps this File into a multipart form data part. - * - * @param string $name The name of the mutlipart form data part. - * @param ?string $contentType Overrides the Content-Type associated with the file, if any. - * @return MultipartFormDataPart - */ - public function toMultipartFormDataPart(string $name, ?string $contentType = null): MultipartFormDataPart - { - $contentType ??= $this->contentType; - $headers = $contentType != null - ? ['Content-Type' => $contentType] - : null; - - return new MultipartFormDataPart( - name: $name, - value: $this->stream, - filename: $this->filename, - headers: $headers, - ); - } - - /** - * Closes the file stream. - */ - public function close(): void - { - $this->stream->close(); - } - - /** - * Destructor to ensure stream is closed. - */ - public function __destruct() - { - $this->close(); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Client/RawClientTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Client/RawClientTest.php deleted file mode 100644 index a1052cff3a5..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Client/RawClientTest.php +++ /dev/null @@ -1,101 +0,0 @@ -mockHandler = new MockHandler(); - $handlerStack = HandlerStack::create($this->mockHandler); - $client = new Client(['handler' => $handlerStack]); - $this->rawClient = new RawClient(['client' => $client]); - } - - public function testHeaders(): void - { - $this->mockHandler->append(new Response(200)); - - $request = new JsonApiRequest( - $this->baseUrl, - '/test', - HttpMethod::GET, - ['X-Custom-Header' => 'TestValue'] - ); - - $this->sendRequest($request); - - $lastRequest = $this->mockHandler->getLastRequest(); - assert($lastRequest instanceof RequestInterface); - $this->assertEquals('application/json', $lastRequest->getHeaderLine('Content-Type')); - $this->assertEquals('TestValue', $lastRequest->getHeaderLine('X-Custom-Header')); - } - - public function testQueryParameters(): void - { - $this->mockHandler->append(new Response(200)); - - $request = new JsonApiRequest( - $this->baseUrl, - '/test', - HttpMethod::GET, - [], - ['param1' => 'value1', 'param2' => ['a', 'b'], 'param3' => 'true'] - ); - - $this->sendRequest($request); - - $lastRequest = $this->mockHandler->getLastRequest(); - assert($lastRequest instanceof RequestInterface); - $this->assertEquals( - 'https://api.example.com/test?param1=value1¶m2=a¶m2=b¶m3=true', - (string)$lastRequest->getUri() - ); - } - - public function testJsonBody(): void - { - $this->mockHandler->append(new Response(200)); - - $body = ['key' => 'value']; - $request = new JsonApiRequest( - $this->baseUrl, - '/test', - HttpMethod::POST, - [], - [], - $body - ); - - $this->sendRequest($request); - - $lastRequest = $this->mockHandler->getLastRequest(); - assert($lastRequest instanceof RequestInterface); - $this->assertEquals('application/json', $lastRequest->getHeaderLine('Content-Type')); - $this->assertEquals(json_encode($body), (string)$lastRequest->getBody()); - } - - private function sendRequest(BaseApiRequest $request): void - { - try { - $this->rawClient->sendRequest($request); - } catch (\Throwable $e) { - $this->fail('An exception was thrown: ' . $e->getMessage()); - } - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/DateArrayTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/DateArrayTest.php deleted file mode 100644 index a72cfdbdd22..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/DateArrayTest.php +++ /dev/null @@ -1,54 +0,0 @@ -dates = $values['dates']; - } -} - -class DateArrayTest extends TestCase -{ - public function testDateTimeInArrays(): void - { - $expectedJson = json_encode( - [ - 'dates' => ['2023-01-01', '2023-02-01', '2023-03-01'] - ], - JSON_THROW_ON_ERROR - ); - - $object = DateArray::fromJson($expectedJson); - $this->assertInstanceOf(DateTime::class, $object->dates[0], 'dates[0] should be a DateTime instance.'); - $this->assertEquals('2023-01-01', $object->dates[0]->format('Y-m-d'), 'dates[0] should have the correct date.'); - $this->assertInstanceOf(DateTime::class, $object->dates[1], 'dates[1] should be a DateTime instance.'); - $this->assertEquals('2023-02-01', $object->dates[1]->format('Y-m-d'), 'dates[1] should have the correct date.'); - $this->assertInstanceOf(DateTime::class, $object->dates[2], 'dates[2] should be a DateTime instance.'); - $this->assertEquals('2023-03-01', $object->dates[2]->format('Y-m-d'), 'dates[2] should have the correct date.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for dates array.'); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/EmptyArrayTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/EmptyArrayTest.php deleted file mode 100644 index d243a08916d..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/EmptyArrayTest.php +++ /dev/null @@ -1,71 +0,0 @@ - $emptyMapArray - */ - #[JsonProperty('empty_map_array')] - #[ArrayType(['integer' => new Union('string', 'null')])] - public array $emptyMapArray; - - /** - * @var array $emptyDatesArray - */ - #[ArrayType([new Union('date', 'null')])] - #[JsonProperty('empty_dates_array')] - public array $emptyDatesArray; - - /** - * @param array{ - * emptyStringArray: string[], - * emptyMapArray: array, - * emptyDatesArray: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->emptyStringArray = $values['emptyStringArray']; - $this->emptyMapArray = $values['emptyMapArray']; - $this->emptyDatesArray = $values['emptyDatesArray']; - } -} - -class EmptyArrayTest extends TestCase -{ - public function testEmptyArray(): void - { - $expectedJson = json_encode( - [ - 'empty_string_array' => [], - 'empty_map_array' => [], - 'empty_dates_array' => [] - ], - JSON_THROW_ON_ERROR - ); - - $object = EmptyArray::fromJson($expectedJson); - $this->assertEmpty($object->emptyStringArray, 'empty_string_array should be empty.'); - $this->assertEmpty($object->emptyMapArray, 'empty_map_array should be empty.'); - $this->assertEmpty($object->emptyDatesArray, 'empty_dates_array should be empty.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for EmptyArraysType.'); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/EnumTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/EnumTest.php deleted file mode 100644 index bf83d5b8ab0..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/EnumTest.php +++ /dev/null @@ -1,76 +0,0 @@ -value; - } -} - -class ShapeType extends JsonSerializableType -{ - /** - * @var Shape $shape - */ - #[JsonProperty('shape')] - public Shape $shape; - - /** - * @var Shape[] $shapes - */ - #[ArrayType([Shape::class])] - #[JsonProperty('shapes')] - public array $shapes; - - /** - * @param Shape $shape - * @param Shape[] $shapes - */ - public function __construct( - Shape $shape, - array $shapes, - ) { - $this->shape = $shape; - $this->shapes = $shapes; - } -} - -class EnumTest extends TestCase -{ - public function testEnumSerialization(): void - { - $object = new ShapeType( - Shape::Circle, - [Shape::Square, Shape::Circle, Shape::Triangle] - ); - - $expectedJson = json_encode([ - 'shape' => 'CIRCLE', - 'shapes' => ['SQUARE', 'CIRCLE', 'TRIANGLE'] - ], JSON_THROW_ON_ERROR); - - $actualJson = $object->toJson(); - - $this->assertJsonStringEqualsJsonString( - $expectedJson, - $actualJson, - 'Serialized JSON does not match expected JSON for shape and shapes properties.' - ); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/ExhaustiveTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/ExhaustiveTest.php deleted file mode 100644 index f542d6a535d..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/ExhaustiveTest.php +++ /dev/null @@ -1,197 +0,0 @@ -nestedProperty = $values['nestedProperty']; - } -} - -class Type extends JsonSerializableType -{ - /** - * @var Nested nestedType - */ - #[JsonProperty('nested_type')] - public Nested $nestedType; /** - - * @var string $simpleProperty - */ - #[JsonProperty('simple_property')] - public string $simpleProperty; - - /** - * @var DateTime $dateProperty - */ - #[Date(Date::TYPE_DATE)] - #[JsonProperty('date_property')] - public DateTime $dateProperty; - - /** - * @var DateTime $datetimeProperty - */ - #[Date(Date::TYPE_DATETIME)] - #[JsonProperty('datetime_property')] - public DateTime $datetimeProperty; - - /** - * @var array $stringArray - */ - #[ArrayType(['string'])] - #[JsonProperty('string_array')] - public array $stringArray; - - /** - * @var array $mapProperty - */ - #[ArrayType(['string' => 'integer'])] - #[JsonProperty('map_property')] - public array $mapProperty; - - /** - * @var array $objectArray - */ - #[ArrayType(['integer' => new Union(Nested::class, 'null')])] - #[JsonProperty('object_array')] - public array $objectArray; - - /** - * @var array> $nestedArray - */ - #[ArrayType(['integer' => ['integer' => new Union('string', 'null')]])] - #[JsonProperty('nested_array')] - public array $nestedArray; - - /** - * @var array $datesArray - */ - #[ArrayType([new Union('date', 'null')])] - #[JsonProperty('dates_array')] - public array $datesArray; - - /** - * @var string|null $nullableProperty - */ - #[JsonProperty('nullable_property')] - public ?string $nullableProperty; - - /** - * @param array{ - * nestedType: Nested, - * simpleProperty: string, - * dateProperty: DateTime, - * datetimeProperty: DateTime, - * stringArray: array, - * mapProperty: array, - * objectArray: array, - * nestedArray: array>, - * datesArray: array, - * nullableProperty?: string|null, - * } $values - */ - public function __construct( - array $values, - ) { - $this->nestedType = $values['nestedType']; - $this->simpleProperty = $values['simpleProperty']; - $this->dateProperty = $values['dateProperty']; - $this->datetimeProperty = $values['datetimeProperty']; - $this->stringArray = $values['stringArray']; - $this->mapProperty = $values['mapProperty']; - $this->objectArray = $values['objectArray']; - $this->nestedArray = $values['nestedArray']; - $this->datesArray = $values['datesArray']; - $this->nullableProperty = $values['nullableProperty'] ?? null; - } -} - -class ExhaustiveTest extends TestCase -{ - /** - * Test serialization and deserialization of all types in Type. - */ - public function testExhaustive(): void - { - $expectedJson = json_encode( - [ - 'nested_type' => ['nested_property' => '1995-07-20'], - 'simple_property' => 'Test String', - // Omit 'nullable_property' to test null serialization - 'date_property' => '2023-01-01', - 'datetime_property' => '2023-01-01T12:34:56+00:00', - 'string_array' => ['one', 'two', 'three'], - 'map_property' => ['key1' => 1, 'key2' => 2], - 'object_array' => [ - 1 => ['nested_property' => '2021-07-20'], - 2 => null, // Testing nullable objects in array - ], - 'nested_array' => [ - 1 => [1 => 'value1', 2 => null], // Testing nullable strings in nested array - 2 => [3 => 'value3', 4 => 'value4'] - ], - 'dates_array' => ['2023-01-01', null, '2023-03-01'] // Testing nullable dates in array> - ], - JSON_THROW_ON_ERROR - ); - - $object = Type::fromJson($expectedJson); - - // Check that nullable property is null and not included in JSON - $this->assertNull($object->nullableProperty, 'Nullable property should be null.'); - - // Check date properties - $this->assertInstanceOf(DateTime::class, $object->dateProperty, 'date_property should be a DateTime instance.'); - $this->assertEquals('2023-01-01', $object->dateProperty->format('Y-m-d'), 'date_property should have the correct date.'); - $this->assertInstanceOf(DateTime::class, $object->datetimeProperty, 'datetime_property should be a DateTime instance.'); - $this->assertEquals('2023-01-01 12:34:56', $object->datetimeProperty->format('Y-m-d H:i:s'), 'datetime_property should have the correct datetime.'); - - // Check scalar arrays - $this->assertEquals(['one', 'two', 'three'], $object->stringArray, 'string_array should match the original data.'); - $this->assertEquals(['key1' => 1, 'key2' => 2], $object->mapProperty, 'map_property should match the original data.'); - - // Check object array with nullable elements - $this->assertInstanceOf(Nested::class, $object->objectArray[1], 'object_array[1] should be an instance of TestNestedType1.'); - $this->assertEquals('2021-07-20', $object->objectArray[1]->nestedProperty->format('Y-m-d'), 'object_array[1]->nestedProperty should match the original data.'); - $this->assertNull($object->objectArray[2], 'object_array[2] should be null.'); - - // Check nested array with nullable strings - $this->assertEquals('value1', $object->nestedArray[1][1], 'nested_array[1][1] should match the original data.'); - $this->assertNull($object->nestedArray[1][2], 'nested_array[1][2] should be null.'); - $this->assertEquals('value3', $object->nestedArray[2][3], 'nested_array[2][3] should match the original data.'); - $this->assertEquals('value4', $object->nestedArray[2][4], 'nested_array[2][4] should match the original data.'); - - // Check dates array with nullable DateTime objects - $this->assertInstanceOf(DateTime::class, $object->datesArray[0], 'dates_array[0] should be a DateTime instance.'); - $this->assertEquals('2023-01-01', $object->datesArray[0]->format('Y-m-d'), 'dates_array[0] should have the correct date.'); - $this->assertNull($object->datesArray[1], 'dates_array[1] should be null.'); - $this->assertInstanceOf(DateTime::class, $object->datesArray[2], 'dates_array[2] should be a DateTime instance.'); - $this->assertEquals('2023-03-01', $object->datesArray[2]->format('Y-m-d'), 'dates_array[2] should have the correct date.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'The serialized JSON does not match the original JSON.'); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/InvalidTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/InvalidTest.php deleted file mode 100644 index 7d1d79406a5..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/InvalidTest.php +++ /dev/null @@ -1,42 +0,0 @@ -integerProperty = $values['integerProperty']; - } -} - -class InvalidTest extends TestCase -{ - public function testInvalidJsonThrowsException(): void - { - $this->expectException(\TypeError::class); - $json = json_encode( - [ - 'integer_property' => 'not_an_integer' - ], - JSON_THROW_ON_ERROR - ); - Invalid::fromJson($json); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/NestedUnionArrayTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/NestedUnionArrayTest.php deleted file mode 100644 index 0fcdd06667e..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/NestedUnionArrayTest.php +++ /dev/null @@ -1,89 +0,0 @@ -nestedProperty = $values['nestedProperty']; - } -} - -class NestedUnionArray extends JsonSerializableType -{ - /** - * @var array> $nestedArray - */ - #[ArrayType(['integer' => ['integer' => new Union(UnionObject::class, 'null', 'date')]])] - #[JsonProperty('nested_array')] - public array $nestedArray; - - /** - * @param array{ - * nestedArray: array>, - * } $values - */ - public function __construct( - array $values, - ) { - $this->nestedArray = $values['nestedArray']; - } -} - -class NestedUnionArrayTest extends TestCase -{ - public function testNestedUnionArray(): void - { - $expectedJson = json_encode( - [ - 'nested_array' => [ - 1 => [ - 1 => ['nested_property' => 'Nested One'], - 2 => null, - 4 => '2023-01-02' - ], - 2 => [ - 5 => ['nested_property' => 'Nested Two'], - 7 => '2023-02-02' - ] - ] - ], - JSON_THROW_ON_ERROR - ); - - $object = NestedUnionArray::fromJson($expectedJson); - $this->assertInstanceOf(UnionObject::class, $object->nestedArray[1][1], 'nested_array[1][1] should be an instance of Object.'); - $this->assertEquals('Nested One', $object->nestedArray[1][1]->nestedProperty, 'nested_array[1][1]->nestedProperty should match the original data.'); - $this->assertNull($object->nestedArray[1][2], 'nested_array[1][2] should be null.'); - $this->assertInstanceOf(DateTime::class, $object->nestedArray[1][4], 'nested_array[1][4] should be a DateTime instance.'); - $this->assertEquals('2023-01-02T00:00:00+00:00', $object->nestedArray[1][4]->format(Constant::DateTimeFormat), 'nested_array[1][4] should have the correct datetime.'); - $this->assertInstanceOf(UnionObject::class, $object->nestedArray[2][5], 'nested_array[2][5] should be an instance of Object.'); - $this->assertEquals('Nested Two', $object->nestedArray[2][5]->nestedProperty, 'nested_array[2][5]->nestedProperty should match the original data.'); - $this->assertInstanceOf(DateTime::class, $object->nestedArray[2][7], 'nested_array[1][4] should be a DateTime instance.'); - $this->assertEquals('2023-02-02', $object->nestedArray[2][7]->format('Y-m-d'), 'nested_array[1][4] should have the correct date.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for nested_array.'); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/NullPropertyTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/NullPropertyTest.php deleted file mode 100644 index ce20a244282..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/NullPropertyTest.php +++ /dev/null @@ -1,53 +0,0 @@ -nonNullProperty = $values['nonNullProperty']; - $this->nullProperty = $values['nullProperty'] ?? null; - } -} - -class NullPropertyTest extends TestCase -{ - public function testNullPropertiesAreOmitted(): void - { - $object = new NullProperty( - [ - "nonNullProperty" => "Test String", - "nullProperty" => null - ] - ); - - $serialized = $object->jsonSerialize(); - $this->assertArrayHasKey('non_null_property', $serialized, 'non_null_property should be present in the serialized JSON.'); - $this->assertArrayNotHasKey('null_property', $serialized, 'null_property should be omitted from the serialized JSON.'); - $this->assertEquals('Test String', $serialized['non_null_property'], 'non_null_property should have the correct value.'); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/NullableArrayTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/NullableArrayTest.php deleted file mode 100644 index fe0f19de6b1..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/NullableArrayTest.php +++ /dev/null @@ -1,49 +0,0 @@ - $nullableStringArray - */ - #[ArrayType([new Union('string', 'null')])] - #[JsonProperty('nullable_string_array')] - public array $nullableStringArray; - - /** - * @param array{ - * nullableStringArray: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->nullableStringArray = $values['nullableStringArray']; - } -} - -class NullableArrayTest extends TestCase -{ - public function testNullableArray(): void - { - $expectedJson = json_encode( - [ - 'nullable_string_array' => ['one', null, 'three'] - ], - JSON_THROW_ON_ERROR - ); - - $object = NullableArray::fromJson($expectedJson); - $this->assertEquals(['one', null, 'three'], $object->nullableStringArray, 'nullable_string_array should match the original data.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for nullable_string_array.'); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/ScalarTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/ScalarTest.php deleted file mode 100644 index 604b7c0b959..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/ScalarTest.php +++ /dev/null @@ -1,116 +0,0 @@ - $intFloatArray - */ - #[ArrayType([new Union('integer', 'float')])] - #[JsonProperty('int_float_array')] - public array $intFloatArray; - - /** - * @var array $floatArray - */ - #[ArrayType(['float'])] - #[JsonProperty('float_array')] - public array $floatArray; - - /** - * @var bool|null $nullableBooleanProperty - */ - #[JsonProperty('nullable_boolean_property')] - public ?bool $nullableBooleanProperty; - - /** - * @param array{ - * integerProperty: int, - * floatProperty: float, - * otherFloatProperty: float, - * booleanProperty: bool, - * stringProperty: string, - * intFloatArray: array, - * floatArray: array, - * nullableBooleanProperty?: bool|null, - * } $values - */ - public function __construct( - array $values, - ) { - $this->integerProperty = $values['integerProperty']; - $this->floatProperty = $values['floatProperty']; - $this->otherFloatProperty = $values['otherFloatProperty']; - $this->booleanProperty = $values['booleanProperty']; - $this->stringProperty = $values['stringProperty']; - $this->intFloatArray = $values['intFloatArray']; - $this->floatArray = $values['floatArray']; - $this->nullableBooleanProperty = $values['nullableBooleanProperty'] ?? null; - } -} - -class ScalarTest extends TestCase -{ - public function testAllScalarTypesIncludingFloat(): void - { - $expectedJson = json_encode( - [ - 'integer_property' => 42, - 'float_property' => 3.14159, - 'other_float_property' => 3, - 'boolean_property' => true, - 'string_property' => 'Hello, World!', - 'int_float_array' => [1, 2.5, 3, 4.75], - 'float_array' => [1, 2, 3, 4] // Ensure we handle "integer-looking" floats - ], - JSON_THROW_ON_ERROR - ); - - $object = Scalar::fromJson($expectedJson); - $this->assertEquals(42, $object->integerProperty, 'integer_property should be 42.'); - $this->assertEquals(3.14159, $object->floatProperty, 'float_property should be 3.14159.'); - $this->assertTrue($object->booleanProperty, 'boolean_property should be true.'); - $this->assertEquals('Hello, World!', $object->stringProperty, 'string_property should be "Hello, World!".'); - $this->assertNull($object->nullableBooleanProperty, 'nullable_boolean_property should be null.'); - $this->assertEquals([1, 2.5, 3, 4.75], $object->intFloatArray, 'int_float_array should match the original data.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for ScalarTypesTest.'); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/TraitTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/TraitTest.php deleted file mode 100644 index 837f239115f..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/TraitTest.php +++ /dev/null @@ -1,60 +0,0 @@ -integerProperty = $values['integerProperty']; - $this->stringProperty = $values['stringProperty']; - } -} - -class TraitTest extends TestCase -{ - public function testTraitPropertyAndString(): void - { - $expectedJson = json_encode( - [ - 'integer_property' => 42, - 'string_property' => 'Hello, World!', - ], - JSON_THROW_ON_ERROR - ); - - $object = TypeWithTrait::fromJson($expectedJson); - $this->assertEquals(42, $object->integerProperty, 'integer_property should be 42.'); - $this->assertEquals('Hello, World!', $object->stringProperty, 'string_property should be "Hello, World!".'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for ScalarTypesTestWithTrait.'); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/UnionArrayTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/UnionArrayTest.php deleted file mode 100644 index 09933d2321d..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/UnionArrayTest.php +++ /dev/null @@ -1,57 +0,0 @@ - $mixedDates - */ - #[ArrayType(['integer' => new Union('datetime', 'string', 'null')])] - #[JsonProperty('mixed_dates')] - public array $mixedDates; - - /** - * @param array{ - * mixedDates: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->mixedDates = $values['mixedDates']; - } -} - -class UnionArrayTest extends TestCase -{ - public function testUnionArray(): void - { - $expectedJson = json_encode( - [ - 'mixed_dates' => [ - 1 => '2023-01-01T12:00:00+00:00', - 2 => null, - 3 => 'Some String' - ] - ], - JSON_THROW_ON_ERROR - ); - - $object = UnionArray::fromJson($expectedJson); - $this->assertInstanceOf(DateTime::class, $object->mixedDates[1], 'mixed_dates[1] should be a DateTime instance.'); - $this->assertEquals('2023-01-01 12:00:00', $object->mixedDates[1]->format('Y-m-d H:i:s'), 'mixed_dates[1] should have the correct datetime.'); - $this->assertNull($object->mixedDates[2], 'mixed_dates[2] should be null.'); - $this->assertEquals('Some String', $object->mixedDates[3], 'mixed_dates[3] should be "Some String".'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match original JSON for mixed_dates.'); - } -} diff --git a/seed/php-sdk/inline-types/tests/Seed/Core/Json/UnionPropertyTest.php b/seed/php-sdk/inline-types/tests/Seed/Core/Json/UnionPropertyTest.php deleted file mode 100644 index 3119baace62..00000000000 --- a/seed/php-sdk/inline-types/tests/Seed/Core/Json/UnionPropertyTest.php +++ /dev/null @@ -1,115 +0,0 @@ - 'integer'], UnionProperty::class)] - #[JsonProperty('complexUnion')] - public mixed $complexUnion; - - /** - * @param array{ - * complexUnion: string|int|null|array|UnionProperty - * } $values - */ - public function __construct( - array $values, - ) { - $this->complexUnion = $values['complexUnion']; - } -} - -class UnionPropertyTest extends TestCase -{ - public function testWithMapOfIntToInt(): void - { - $expectedJson = json_encode( - [ - 'complexUnion' => [1 => 100, 2 => 200] - ], - JSON_THROW_ON_ERROR - ); - - $object = UnionProperty::fromJson($expectedJson); - $this->assertIsArray($object->complexUnion, 'complexUnion should be an array.'); - $this->assertEquals([1 => 100, 2 => 200], $object->complexUnion, 'complexUnion should match the original map of int => int.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); - } - - public function testWithNestedUnionPropertyType(): void - { - $expectedJson = json_encode( - [ - 'complexUnion' => new UnionProperty( - [ - 'complexUnion' => 'Nested String' - ] - ) - ], - JSON_THROW_ON_ERROR - ); - - $object = UnionProperty::fromJson($expectedJson); - $this->assertInstanceOf(UnionProperty::class, $object->complexUnion, 'complexUnion should be an instance of UnionPropertyType.'); - $this->assertEquals('Nested String', $object->complexUnion->complexUnion, 'Nested complexUnion should match the original value.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); - } - - public function testWithNull(): void - { - $expectedJson = json_encode( - [], - JSON_THROW_ON_ERROR - ); - - $object = UnionProperty::fromJson($expectedJson); - $this->assertNull($object->complexUnion, 'complexUnion should be null.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); - } - - public function testWithInteger(): void - { - $expectedJson = json_encode( - [ - 'complexUnion' => 42 - ], - JSON_THROW_ON_ERROR - ); - - $object = UnionProperty::fromJson($expectedJson); - $this->assertIsInt($object->complexUnion, 'complexUnion should be an integer.'); - $this->assertEquals(42, $object->complexUnion, 'complexUnion should match the original integer.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); - } - - public function testWithString(): void - { - $expectedJson = json_encode( - [ - 'complexUnion' => 'Some String' - ], - JSON_THROW_ON_ERROR - ); - - $object = UnionProperty::fromJson($expectedJson); - $this->assertIsString($object->complexUnion, 'complexUnion should be a string.'); - $this->assertEquals('Some String', $object->complexUnion, 'complexUnion should match the original string.'); - - $actualJson = $object->toJson(); - $this->assertJsonStringEqualsJsonString($expectedJson, $actualJson, 'Serialized JSON does not match the original JSON.'); - } -} diff --git a/seed/postman/inline-types/.mock/definition/__package__.yml b/seed/postman/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/postman/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/postman/inline-types/.mock/definition/api.yml b/seed/postman/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/postman/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/postman/inline-types/.mock/fern.config.json b/seed/postman/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/postman/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/postman/inline-types/.mock/generators.yml b/seed/postman/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/postman/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/postman/inline-types/collection.json b/seed/postman/inline-types/collection.json deleted file mode 100644 index a64b1263525..00000000000 --- a/seed/postman/inline-types/collection.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "info": { - "name": "Object", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "description": null - }, - "variable": [ - { - "key": "baseUrl", - "value": "", - "type": "string" - } - ], - "auth": null, - "item": [ - { - "_type": "endpoint", - "name": "Get Root", - "request": { - "description": null, - "url": { - "raw": "{{baseUrl}}/root/root", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "root", - "root" - ], - "query": [], - "variable": [] - }, - "header": [ - { - "type": "text", - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "auth": null, - "body": { - "mode": "raw", - "raw": "{\n \"bar\": {\n \"foo\": \"foo\",\n \"bar\": {\n \"foo\": \"foo\",\n \"bar\": \"bar\",\n \"myEnum\": \"SUNNY\"\n }\n },\n \"foo\": \"foo\"\n}", - "options": { - "raw": { - "language": "json" - } - } - } - }, - "response": [ - { - "name": "Success", - "status": "OK", - "code": 200, - "originalRequest": { - "description": null, - "url": { - "raw": "{{baseUrl}}/root/root", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "root", - "root" - ], - "query": [], - "variable": [] - }, - "header": [ - { - "type": "text", - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "POST", - "auth": null, - "body": { - "mode": "raw", - "raw": "{\n \"bar\": {\n \"foo\": \"foo\",\n \"bar\": {\n \"foo\": \"foo\",\n \"bar\": \"bar\",\n \"myEnum\": \"SUNNY\"\n }\n },\n \"foo\": \"foo\"\n}", - "options": { - "raw": { - "language": "json" - } - } - } - }, - "description": null, - "body": "{\n \"foo\": \"foo\",\n \"bar\": {\n \"foo\": \"foo\",\n \"bar\": {\n \"foo\": \"foo\",\n \"bar\": \"bar\",\n \"myEnum\": \"SUNNY\"\n }\n }\n}", - "_postman_previewlanguage": "json" - } - ] - } - ] -} \ No newline at end of file diff --git a/seed/postman/inline-types/snippet-templates.json b/seed/postman/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/postman/inline-types/snippet.json b/seed/postman/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/pydantic/inline-types/.github/workflows/ci.yml b/seed/pydantic/inline-types/.github/workflows/ci.yml deleted file mode 100644 index b204fa604e2..00000000000 --- a/seed/pydantic/inline-types/.github/workflows/ci.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: ci - -on: [push] -jobs: - compile: - runs-on: ubuntu-20.04 - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Set up python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Bootstrap poetry - run: | - curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 - - name: Install dependencies - run: poetry install - - name: Compile - run: poetry run mypy . - test: - runs-on: ubuntu-20.04 - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Set up python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Bootstrap poetry - run: | - curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 - - name: Install dependencies - run: poetry install - - - name: Test - run: poetry run pytest -rP . - - publish: - needs: [compile, test] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-20.04 - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Set up python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Bootstrap poetry - run: | - curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 - - name: Install dependencies - run: poetry install - - name: Publish to pypi - run: | - poetry config repositories.remote - poetry --no-interaction -v publish --build --repository remote --username "$" --password "$" - env: - : ${{ secrets. }} - : ${{ secrets. }} diff --git a/seed/pydantic/inline-types/.gitignore b/seed/pydantic/inline-types/.gitignore deleted file mode 100644 index 0da665feeef..00000000000 --- a/seed/pydantic/inline-types/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -dist/ -.mypy_cache/ -__pycache__/ -poetry.toml -.ruff_cache/ diff --git a/seed/pydantic/inline-types/.mock/definition/__package__.yml b/seed/pydantic/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/pydantic/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/pydantic/inline-types/.mock/definition/api.yml b/seed/pydantic/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/pydantic/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/pydantic/inline-types/.mock/fern.config.json b/seed/pydantic/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/pydantic/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/pydantic/inline-types/.mock/generators.yml b/seed/pydantic/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/pydantic/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/pydantic/inline-types/README.md b/seed/pydantic/inline-types/README.md deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/pydantic/inline-types/pyproject.toml b/seed/pydantic/inline-types/pyproject.toml deleted file mode 100644 index 59c1ffa7302..00000000000 --- a/seed/pydantic/inline-types/pyproject.toml +++ /dev/null @@ -1,59 +0,0 @@ -[tool.poetry] -name = "fern_inline-types" -version = "0.0.1" -description = "" -readme = "README.md" -authors = [] -keywords = [] - -classifiers = [ - "Intended Audience :: Developers", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Operating System :: OS Independent", - "Operating System :: POSIX", - "Operating System :: MacOS", - "Operating System :: POSIX :: Linux", - "Operating System :: Microsoft :: Windows", - "Topic :: Software Development :: Libraries :: Python Modules", - "Typing :: Typed" -] -packages = [ - { include = "seed/object", from = "src"} -] - -[project.urls] -Repository = 'https://github.com/inline-types/fern' - -[tool.poetry.dependencies] -python = "^3.8" -pydantic = ">= 1.9.2" -pydantic-core = "^2.18.2" - -[tool.poetry.dev-dependencies] -mypy = "1.0.1" -pytest = "^7.4.0" -pytest-asyncio = "^0.23.5" -python-dateutil = "^2.9.0" -types-python-dateutil = "^2.9.0.20240316" -ruff = "^0.5.6" - -[tool.pytest.ini_options] -testpaths = [ "tests" ] -asyncio_mode = "auto" - -[tool.mypy] -plugins = ["pydantic.mypy"] - -[tool.ruff] -line-length = 120 - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/seed/pydantic/inline-types/snippet-templates.json b/seed/pydantic/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/pydantic/inline-types/snippet.json b/seed/pydantic/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/pydantic/inline-types/src/seed/object/__init__.py b/seed/pydantic/inline-types/src/seed/object/__init__.py deleted file mode 100644 index 5646342ae20..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .inline_enum import InlineEnum -from .inline_type_1 import InlineType1 -from .inline_type_2 import InlineType2 -from .inlined_discriminated_union_1 import ( - InlinedDiscriminatedUnion1, - InlinedDiscriminatedUnion1_Type1, - InlinedDiscriminatedUnion1_Type2, -) -from .inlined_undiscriminated_union_1 import InlinedUndiscriminatedUnion1 -from .nested_inline_type_1 import NestedInlineType1 -from .root_type_1 import RootType1 - -__all__ = [ - "InlineEnum", - "InlineType1", - "InlineType2", - "InlinedDiscriminatedUnion1", - "InlinedDiscriminatedUnion1_Type1", - "InlinedDiscriminatedUnion1_Type2", - "InlinedUndiscriminatedUnion1", - "NestedInlineType1", - "RootType1", -] diff --git a/seed/pydantic/inline-types/src/seed/object/core/__init__.py b/seed/pydantic/inline-types/src/seed/object/core/__init__.py deleted file mode 100644 index 9c7cd65aa25..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/core/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .datetime_utils import serialize_datetime -from .pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - UniversalRootModel, - parse_obj_as, - universal_field_validator, - universal_root_validator, - update_forward_refs, -) -from .serialization import FieldMetadata - -__all__ = [ - "FieldMetadata", - "IS_PYDANTIC_V2", - "UniversalBaseModel", - "UniversalRootModel", - "parse_obj_as", - "serialize_datetime", - "universal_field_validator", - "universal_root_validator", - "update_forward_refs", -] diff --git a/seed/pydantic/inline-types/src/seed/object/core/datetime_utils.py b/seed/pydantic/inline-types/src/seed/object/core/datetime_utils.py deleted file mode 100644 index 7c9864a944c..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/core/datetime_utils.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt - - -def serialize_datetime(v: dt.datetime) -> str: - """ - Serialize a datetime including timezone info. - - Uses the timezone info provided if present, otherwise uses the current runtime's timezone info. - - UTC datetimes end in "Z" while all other timezones are represented as offset from UTC, e.g. +05:00. - """ - - def _serialize_zoned_datetime(v: dt.datetime) -> str: - if v.tzinfo is not None and v.tzinfo.tzname(None) == dt.timezone.utc.tzname(None): - # UTC is a special case where we use "Z" at the end instead of "+00:00" - return v.isoformat().replace("+00:00", "Z") - else: - # Delegate to the typical +/- offset format - return v.isoformat() - - if v.tzinfo is not None: - return _serialize_zoned_datetime(v) - else: - local_tz = dt.datetime.now().astimezone().tzinfo - localized_dt = v.replace(tzinfo=local_tz) - return _serialize_zoned_datetime(localized_dt) diff --git a/seed/pydantic/inline-types/src/seed/object/core/pydantic_utilities.py b/seed/pydantic/inline-types/src/seed/object/core/pydantic_utilities.py deleted file mode 100644 index bbe1de41431..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/core/pydantic_utilities.py +++ /dev/null @@ -1,265 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# nopycln: file -import datetime as dt -import typing -from collections import defaultdict - -import typing_extensions - -import pydantic - -from .datetime_utils import serialize_datetime - -IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.") - -if IS_PYDANTIC_V2: - # isort will try to reformat the comments on these imports, which breaks mypy - # isort: off - from pydantic.v1.datetime_parse import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - parse_date as parse_date, - ) - from pydantic.v1.datetime_parse import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - parse_datetime as parse_datetime, - ) - from pydantic.v1.json import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - ENCODERS_BY_TYPE as encoders_by_type, - ) - from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - get_args as get_args, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - get_origin as get_origin, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - is_literal_type as is_literal_type, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - is_union as is_union, - ) - from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 -else: - from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1 - from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore # Pydantic v1 - from pydantic.fields import ModelField as ModelField # type: ignore # Pydantic v1 - from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore # Pydantic v1 - from pydantic.typing import get_args as get_args # type: ignore # Pydantic v1 - from pydantic.typing import get_origin as get_origin # type: ignore # Pydantic v1 - from pydantic.typing import is_literal_type as is_literal_type # type: ignore # Pydantic v1 - from pydantic.typing import is_union as is_union # type: ignore # Pydantic v1 - - # isort: on - - -T = typing.TypeVar("T") -Model = typing.TypeVar("Model", bound=pydantic.BaseModel) - - -def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T: - if IS_PYDANTIC_V2: - adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2 - return adapter.validate_python(object_) - else: - return pydantic.parse_obj_as(type_, object_) - - -def to_jsonable_with_fallback( - obj: typing.Any, fallback_serializer: typing.Callable[[typing.Any], typing.Any] -) -> typing.Any: - if IS_PYDANTIC_V2: - from pydantic_core import to_jsonable_python - - return to_jsonable_python(obj, fallback=fallback_serializer) - else: - return fallback_serializer(obj) - - -class UniversalBaseModel(pydantic.BaseModel): - class Config: - populate_by_name = True - smart_union = True - allow_population_by_field_name = True - json_encoders = {dt.datetime: serialize_datetime} - # Allow fields begining with `model_` to be used in the model - protected_namespaces = () - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = { - "by_alias": True, - "exclude_unset": True, - **kwargs, - } - if IS_PYDANTIC_V2: - return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2 - else: - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - """ - Override the default dict method to `exclude_unset` by default. This function patches - `exclude_unset` to work include fields within non-None default values. - """ - # Note: the logic here is multi-plexed given the levers exposed in Pydantic V1 vs V2 - # Pydantic V1's .dict can be extremely slow, so we do not want to call it twice. - # - # We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models - # that we have less control over, and this is less intrusive than custom serializers for now. - if IS_PYDANTIC_V2: - kwargs_with_defaults_exclude_unset: typing.Any = { - **kwargs, - "by_alias": True, - "exclude_unset": True, - "exclude_none": False, - } - kwargs_with_defaults_exclude_none: typing.Any = { - **kwargs, - "by_alias": True, - "exclude_none": True, - "exclude_unset": False, - } - return deep_union_pydantic_dicts( - super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2 - super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2 - ) - - else: - _fields_set = self.__fields_set__.copy() - - fields = _get_model_fields(self.__class__) - for name, field in fields.items(): - if name not in _fields_set: - default = _get_field_default(field) - - # If the default values are non-null act like they've been set - # This effectively allows exclude_unset to work like exclude_none where - # the latter passes through intentionally set none values. - if default is not None or ("exclude_unset" in kwargs and not kwargs["exclude_unset"]): - _fields_set.add(name) - - if default is not None: - self.__fields_set__.add(name) - - kwargs_with_defaults_exclude_unset_include_fields: typing.Any = { - "by_alias": True, - "exclude_unset": True, - "include": _fields_set, - **kwargs, - } - - return super().dict(**kwargs_with_defaults_exclude_unset_include_fields) - - -def _union_list_of_pydantic_dicts( - source: typing.List[typing.Any], destination: typing.List[typing.Any] -) -> typing.List[typing.Any]: - converted_list: typing.List[typing.Any] = [] - for i, item in enumerate(source): - destination_value = destination[i] # type: ignore - if isinstance(item, dict): - converted_list.append(deep_union_pydantic_dicts(item, destination_value)) - elif isinstance(item, list): - converted_list.append(_union_list_of_pydantic_dicts(item, destination_value)) - else: - converted_list.append(item) - return converted_list - - -def deep_union_pydantic_dicts( - source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any] -) -> typing.Dict[str, typing.Any]: - for key, value in source.items(): - node = destination.setdefault(key, {}) - if isinstance(value, dict): - deep_union_pydantic_dicts(value, node) - # Note: we do not do this same processing for sets given we do not have sets of models - # and given the sets are unordered, the processing of the set and matching objects would - # be non-trivial. - elif isinstance(value, list): - destination[key] = _union_list_of_pydantic_dicts(value, node) - else: - destination[key] = value - - return destination - - -if IS_PYDANTIC_V2: - - class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2 - pass - - UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore -else: - UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore - - -def encode_by_type(o: typing.Any) -> typing.Any: - encoders_by_class_tuples: typing.Dict[typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...]] = ( - defaultdict(tuple) - ) - for type_, encoder in encoders_by_type.items(): - encoders_by_class_tuples[encoder] += (type_,) - - if type(o) in encoders_by_type: - return encoders_by_type[type(o)](o) - for encoder, classes_tuple in encoders_by_class_tuples.items(): - if isinstance(o, classes_tuple): - return encoder(o) - - -def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None: - if IS_PYDANTIC_V2: - model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2 - else: - model.update_forward_refs(**localns) - - -# Mirrors Pydantic's internal typing -AnyCallable = typing.Callable[..., typing.Any] - - -def universal_root_validator( - pre: bool = False, -) -> typing.Callable[[AnyCallable], AnyCallable]: - def decorator(func: AnyCallable) -> AnyCallable: - if IS_PYDANTIC_V2: - return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 - else: - return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1 - - return decorator - - -def universal_field_validator(field_name: str, pre: bool = False) -> typing.Callable[[AnyCallable], AnyCallable]: - def decorator(func: AnyCallable) -> AnyCallable: - if IS_PYDANTIC_V2: - return pydantic.field_validator(field_name, mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 - else: - return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1 - - return decorator - - -PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo] - - -def _get_model_fields( - model: typing.Type["Model"], -) -> typing.Mapping[str, PydanticField]: - if IS_PYDANTIC_V2: - return model.model_fields # type: ignore # Pydantic v2 - else: - return model.__fields__ # type: ignore # Pydantic v1 - - -def _get_field_default(field: PydanticField) -> typing.Any: - try: - value = field.get_default() # type: ignore # Pydantic < v1.10.15 - except: - value = field.default - if IS_PYDANTIC_V2: - from pydantic_core import PydanticUndefined - - if value == PydanticUndefined: - return None - return value - return value diff --git a/seed/pydantic/inline-types/src/seed/object/core/serialization.py b/seed/pydantic/inline-types/src/seed/object/core/serialization.py deleted file mode 100644 index cb5dcbf93a9..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/core/serialization.py +++ /dev/null @@ -1,272 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import collections -import inspect -import typing - -import typing_extensions - -import pydantic - - -class FieldMetadata: - """ - Metadata class used to annotate fields to provide additional information. - - Example: - class MyDict(TypedDict): - field: typing.Annotated[str, FieldMetadata(alias="field_name")] - - Will serialize: `{"field": "value"}` - To: `{"field_name": "value"}` - """ - - alias: str - - def __init__(self, *, alias: str) -> None: - self.alias = alias - - -def convert_and_respect_annotation_metadata( - *, - object_: typing.Any, - annotation: typing.Any, - inner_type: typing.Optional[typing.Any] = None, - direction: typing.Literal["read", "write"], -) -> typing.Any: - """ - Respect the metadata annotations on a field, such as aliasing. This function effectively - manipulates the dict-form of an object to respect the metadata annotations. This is primarily used for - TypedDicts, which cannot support aliasing out of the box, and can be extended for additional - utilities, such as defaults. - - Parameters - ---------- - object_ : typing.Any - - annotation : type - The type we're looking to apply typing annotations from - - inner_type : typing.Optional[type] - - Returns - ------- - typing.Any - """ - - if object_ is None: - return None - if inner_type is None: - inner_type = annotation - - clean_type = _remove_annotations(inner_type) - # Pydantic models - if ( - inspect.isclass(clean_type) - and issubclass(clean_type, pydantic.BaseModel) - and isinstance(object_, typing.Mapping) - ): - return _convert_mapping(object_, clean_type, direction) - # TypedDicts - if typing_extensions.is_typeddict(clean_type) and isinstance(object_, typing.Mapping): - return _convert_mapping(object_, clean_type, direction) - - if ( - typing_extensions.get_origin(clean_type) == typing.Dict - or typing_extensions.get_origin(clean_type) == dict - or clean_type == typing.Dict - ) and isinstance(object_, typing.Dict): - key_type = typing_extensions.get_args(clean_type)[0] - value_type = typing_extensions.get_args(clean_type)[1] - - return { - key: convert_and_respect_annotation_metadata( - object_=value, - annotation=annotation, - inner_type=value_type, - direction=direction, - ) - for key, value in object_.items() - } - - # If you're iterating on a string, do not bother to coerce it to a sequence. - if not isinstance(object_, str): - if ( - typing_extensions.get_origin(clean_type) == typing.Set - or typing_extensions.get_origin(clean_type) == set - or clean_type == typing.Set - ) and isinstance(object_, typing.Set): - inner_type = typing_extensions.get_args(clean_type)[0] - return { - convert_and_respect_annotation_metadata( - object_=item, - annotation=annotation, - inner_type=inner_type, - direction=direction, - ) - for item in object_ - } - elif ( - ( - typing_extensions.get_origin(clean_type) == typing.List - or typing_extensions.get_origin(clean_type) == list - or clean_type == typing.List - ) - and isinstance(object_, typing.List) - ) or ( - ( - typing_extensions.get_origin(clean_type) == typing.Sequence - or typing_extensions.get_origin(clean_type) == collections.abc.Sequence - or clean_type == typing.Sequence - ) - and isinstance(object_, typing.Sequence) - ): - inner_type = typing_extensions.get_args(clean_type)[0] - return [ - convert_and_respect_annotation_metadata( - object_=item, - annotation=annotation, - inner_type=inner_type, - direction=direction, - ) - for item in object_ - ] - - if typing_extensions.get_origin(clean_type) == typing.Union: - # We should be able to ~relatively~ safely try to convert keys against all - # member types in the union, the edge case here is if one member aliases a field - # of the same name to a different name from another member - # Or if another member aliases a field of the same name that another member does not. - for member in typing_extensions.get_args(clean_type): - object_ = convert_and_respect_annotation_metadata( - object_=object_, - annotation=annotation, - inner_type=member, - direction=direction, - ) - return object_ - - annotated_type = _get_annotation(annotation) - if annotated_type is None: - return object_ - - # If the object is not a TypedDict, a Union, or other container (list, set, sequence, etc.) - # Then we can safely call it on the recursive conversion. - return object_ - - -def _convert_mapping( - object_: typing.Mapping[str, object], - expected_type: typing.Any, - direction: typing.Literal["read", "write"], -) -> typing.Mapping[str, object]: - converted_object: typing.Dict[str, object] = {} - annotations = typing_extensions.get_type_hints(expected_type, include_extras=True) - aliases_to_field_names = _get_alias_to_field_name(annotations) - for key, value in object_.items(): - if direction == "read" and key in aliases_to_field_names: - dealiased_key = aliases_to_field_names.get(key) - if dealiased_key is not None: - type_ = annotations.get(dealiased_key) - else: - type_ = annotations.get(key) - # Note you can't get the annotation by the field name if you're in read mode, so you must check the aliases map - # - # So this is effectively saying if we're in write mode, and we don't have a type, or if we're in read mode and we don't have an alias - # then we can just pass the value through as is - if type_ is None: - converted_object[key] = value - elif direction == "read" and key not in aliases_to_field_names: - converted_object[key] = convert_and_respect_annotation_metadata( - object_=value, annotation=type_, direction=direction - ) - else: - converted_object[_alias_key(key, type_, direction, aliases_to_field_names)] = ( - convert_and_respect_annotation_metadata(object_=value, annotation=type_, direction=direction) - ) - return converted_object - - -def _get_annotation(type_: typing.Any) -> typing.Optional[typing.Any]: - maybe_annotated_type = typing_extensions.get_origin(type_) - if maybe_annotated_type is None: - return None - - if maybe_annotated_type == typing_extensions.NotRequired: - type_ = typing_extensions.get_args(type_)[0] - maybe_annotated_type = typing_extensions.get_origin(type_) - - if maybe_annotated_type == typing_extensions.Annotated: - return type_ - - return None - - -def _remove_annotations(type_: typing.Any) -> typing.Any: - maybe_annotated_type = typing_extensions.get_origin(type_) - if maybe_annotated_type is None: - return type_ - - if maybe_annotated_type == typing_extensions.NotRequired: - return _remove_annotations(typing_extensions.get_args(type_)[0]) - - if maybe_annotated_type == typing_extensions.Annotated: - return _remove_annotations(typing_extensions.get_args(type_)[0]) - - return type_ - - -def get_alias_to_field_mapping(type_: typing.Any) -> typing.Dict[str, str]: - annotations = typing_extensions.get_type_hints(type_, include_extras=True) - return _get_alias_to_field_name(annotations) - - -def get_field_to_alias_mapping(type_: typing.Any) -> typing.Dict[str, str]: - annotations = typing_extensions.get_type_hints(type_, include_extras=True) - return _get_field_to_alias_name(annotations) - - -def _get_alias_to_field_name( - field_to_hint: typing.Dict[str, typing.Any], -) -> typing.Dict[str, str]: - aliases = {} - for field, hint in field_to_hint.items(): - maybe_alias = _get_alias_from_type(hint) - if maybe_alias is not None: - aliases[maybe_alias] = field - return aliases - - -def _get_field_to_alias_name( - field_to_hint: typing.Dict[str, typing.Any], -) -> typing.Dict[str, str]: - aliases = {} - for field, hint in field_to_hint.items(): - maybe_alias = _get_alias_from_type(hint) - if maybe_alias is not None: - aliases[field] = maybe_alias - return aliases - - -def _get_alias_from_type(type_: typing.Any) -> typing.Optional[str]: - maybe_annotated_type = _get_annotation(type_) - - if maybe_annotated_type is not None: - # The actual annotations are 1 onward, the first is the annotated type - annotations = typing_extensions.get_args(maybe_annotated_type)[1:] - - for annotation in annotations: - if isinstance(annotation, FieldMetadata) and annotation.alias is not None: - return annotation.alias - return None - - -def _alias_key( - key: str, - type_: typing.Any, - direction: typing.Literal["read", "write"], - aliases_to_field_names: typing.Dict[str, str], -) -> str: - if direction == "read": - return aliases_to_field_names.get(key, key) - return _get_alias_from_type(type_=type_) or key diff --git a/seed/pydantic/inline-types/src/seed/object/inline_enum.py b/seed/pydantic/inline-types/src/seed/object/inline_enum.py deleted file mode 100644 index 1692aa9af84..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/inline_enum.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -InlineEnum = typing.Union[typing.Literal["SUNNY", "CLOUDY", "RAINING", "SNOWING"], typing.Any] diff --git a/seed/pydantic/inline-types/src/seed/object/inline_type_1.py b/seed/pydantic/inline-types/src/seed/object/inline_type_1.py deleted file mode 100644 index c198d47e762..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/inline_type_1.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .core.pydantic_utilities import UniversalBaseModel -from .nested_inline_type_1 import NestedInlineType1 -from .core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class InlineType1(UniversalBaseModel): - foo: str - bar: NestedInlineType1 - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.allow diff --git a/seed/pydantic/inline-types/src/seed/object/inline_type_2.py b/seed/pydantic/inline-types/src/seed/object/inline_type_2.py deleted file mode 100644 index 0080a451cb0..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/inline_type_2.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .core.pydantic_utilities import UniversalBaseModel -from .core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class InlineType2(UniversalBaseModel): - baz: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.allow diff --git a/seed/pydantic/inline-types/src/seed/object/inlined_discriminated_union_1.py b/seed/pydantic/inline-types/src/seed/object/inlined_discriminated_union_1.py deleted file mode 100644 index 75e35b89f87..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/inlined_discriminated_union_1.py +++ /dev/null @@ -1,36 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -from .core.pydantic_utilities import UniversalBaseModel -import typing -from .nested_inline_type_1 import NestedInlineType1 -from .core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic - - -class InlinedDiscriminatedUnion1_Type1(UniversalBaseModel): - type: typing.Literal["type1"] = "type1" - foo: str - bar: NestedInlineType1 - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.allow - - -class InlinedDiscriminatedUnion1_Type2(UniversalBaseModel): - type: typing.Literal["type2"] = "type2" - baz: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.allow - - -InlinedDiscriminatedUnion1 = typing.Union[InlinedDiscriminatedUnion1_Type1, InlinedDiscriminatedUnion1_Type2] diff --git a/seed/pydantic/inline-types/src/seed/object/inlined_undiscriminated_union_1.py b/seed/pydantic/inline-types/src/seed/object/inlined_undiscriminated_union_1.py deleted file mode 100644 index aaf1f02b5df..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/inlined_undiscriminated_union_1.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .inline_type_1 import InlineType1 -from .inline_type_2 import InlineType2 - -InlinedUndiscriminatedUnion1 = typing.Union[InlineType1, InlineType2] diff --git a/seed/pydantic/inline-types/src/seed/object/nested_inline_type_1.py b/seed/pydantic/inline-types/src/seed/object/nested_inline_type_1.py deleted file mode 100644 index dfc89353b41..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/nested_inline_type_1.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .core.pydantic_utilities import UniversalBaseModel -from .inline_enum import InlineEnum -import pydantic -from .core.pydantic_utilities import IS_PYDANTIC_V2 -import typing - - -class NestedInlineType1(UniversalBaseModel): - foo: str - bar: str - my_enum: InlineEnum = pydantic.Field(alias="myEnum") - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.allow diff --git a/seed/pydantic/inline-types/src/seed/object/py.typed b/seed/pydantic/inline-types/src/seed/object/py.typed deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/pydantic/inline-types/src/seed/object/root_type_1.py b/seed/pydantic/inline-types/src/seed/object/root_type_1.py deleted file mode 100644 index 8e739f0e59b..00000000000 --- a/seed/pydantic/inline-types/src/seed/object/root_type_1.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .core.pydantic_utilities import UniversalBaseModel -from .inline_type_1 import InlineType1 -from .core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class RootType1(UniversalBaseModel): - foo: str - bar: InlineType1 - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow") # type: ignore # Pydantic v2 - else: - - class Config: - extra = pydantic.Extra.allow diff --git a/seed/pydantic/inline-types/tests/custom/test_client.py b/seed/pydantic/inline-types/tests/custom/test_client.py deleted file mode 100644 index 73f811f5ede..00000000000 --- a/seed/pydantic/inline-types/tests/custom/test_client.py +++ /dev/null @@ -1,7 +0,0 @@ -import pytest - - -# Get started with writing tests with pytest at https://docs.pytest.org -@pytest.mark.skip(reason="Unimplemented") -def test_client() -> None: - assert True == True diff --git a/seed/python-sdk/inline-types/.github/workflows/ci.yml b/seed/python-sdk/inline-types/.github/workflows/ci.yml deleted file mode 100644 index b7316b8cab7..00000000000 --- a/seed/python-sdk/inline-types/.github/workflows/ci.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: ci - -on: [push] -jobs: - compile: - runs-on: ubuntu-20.04 - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Set up python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Bootstrap poetry - run: | - curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 - - name: Install dependencies - run: poetry install - - name: Compile - run: poetry run mypy . - test: - runs-on: ubuntu-20.04 - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Set up python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Bootstrap poetry - run: | - curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 - - name: Install dependencies - run: poetry install - - - name: Install Fern - run: npm install -g fern-api - - name: Test - run: fern test --command "poetry run pytest -rP ." - - publish: - needs: [compile, test] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-20.04 - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Set up python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Bootstrap poetry - run: | - curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 - - name: Install dependencies - run: poetry install - - name: Publish to pypi - run: | - poetry config repositories.remote - poetry --no-interaction -v publish --build --repository remote --username "$" --password "$" - env: - : ${{ secrets. }} - : ${{ secrets. }} diff --git a/seed/python-sdk/inline-types/.gitignore b/seed/python-sdk/inline-types/.gitignore deleted file mode 100644 index 0da665feeef..00000000000 --- a/seed/python-sdk/inline-types/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -dist/ -.mypy_cache/ -__pycache__/ -poetry.toml -.ruff_cache/ diff --git a/seed/python-sdk/inline-types/.mock/definition/__package__.yml b/seed/python-sdk/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/python-sdk/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/python-sdk/inline-types/.mock/definition/api.yml b/seed/python-sdk/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/python-sdk/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/python-sdk/inline-types/.mock/fern.config.json b/seed/python-sdk/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/python-sdk/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/python-sdk/inline-types/.mock/generators.yml b/seed/python-sdk/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/python-sdk/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/python-sdk/inline-types/README.md b/seed/python-sdk/inline-types/README.md deleted file mode 100644 index ffc62102750..00000000000 --- a/seed/python-sdk/inline-types/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Seed Python 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%2FPython) -[![pypi](https://img.shields.io/pypi/v/fern_inline-types)](https://pypi.python.org/pypi/fern_inline-types) - -The Seed Python library provides convenient access to the Seed API from Python. - -## Installation - -```sh -pip install fern_inline-types -``` - -## Reference - -A full reference for this library is available [here](./reference.md). - -## Usage - -Instantiate and use the client with the following: - -```python -from seed import InlineType1, NestedInlineType1, SeedObject - -client = SeedObject( - base_url="https://yourhost.com/path/to/api", -) -client.get_root( - bar=InlineType1( - foo="foo", - bar=NestedInlineType1( - foo="foo", - bar="bar", - my_enum="SUNNY", - ), - ), - foo="foo", -) -``` - -## Async Client - -The SDK also exports an `async` client so that you can make non-blocking calls to our API. - -```python -import asyncio - -from seed import AsyncSeedObject, InlineType1, NestedInlineType1 - -client = AsyncSeedObject( - base_url="https://yourhost.com/path/to/api", -) - - -async def main() -> None: - await client.get_root( - bar=InlineType1( - foo="foo", - bar=NestedInlineType1( - foo="foo", - bar="bar", - my_enum="SUNNY", - ), - ), - foo="foo", - ) - - -asyncio.run(main()) -``` - -## Exception Handling - -When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error -will be thrown. - -```python -from seed.core.api_error import ApiError - -try: - client.get_root() -except ApiError as e: - print(e.status_code) - print(e.body) -``` - -## Advanced - -### Retries - -The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long -as the request is deemed retriable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). - -A request is deemed retriable when any of the following HTTP status codes is returned: - -- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) -- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) -- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) - -Use the `max_retries` request option to configure this behavior. - -```python -client.get_root(request_options={ - "max_retries": 1 -}) -``` - -### Timeouts - -The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level. - -```python - -from seed import SeedObject - -client = SeedObject( - ..., - timeout=20.0, -) - - -# Override timeout for a specific method -client.get_root(request_options={ - "timeout_in_seconds": 1 -}) -``` - -### Custom Client - -You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies -and transports. -```python -import httpx -from seed import SeedObject - -client = SeedObject( - ..., - httpx_client=httpx.Client( - proxies="http://my.test.proxy.example.com", - transport=httpx.HTTPTransport(local_address="0.0.0.0"), - ), -) -``` - -## 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/python-sdk/inline-types/pyproject.toml b/seed/python-sdk/inline-types/pyproject.toml deleted file mode 100644 index 7f8997f3abe..00000000000 --- a/seed/python-sdk/inline-types/pyproject.toml +++ /dev/null @@ -1,61 +0,0 @@ -[tool.poetry] -name = "fern_inline-types" -version = "0.0.1" -description = "" -readme = "README.md" -authors = [] -keywords = [] - -classifiers = [ - "Intended Audience :: Developers", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Operating System :: OS Independent", - "Operating System :: POSIX", - "Operating System :: MacOS", - "Operating System :: POSIX :: Linux", - "Operating System :: Microsoft :: Windows", - "Topic :: Software Development :: Libraries :: Python Modules", - "Typing :: Typed" -] -packages = [ - { include = "seed", from = "src"} -] - -[project.urls] -Repository = 'https://github.com/inline-types/fern' - -[tool.poetry.dependencies] -python = "^3.8" -httpx = ">=0.21.2" -pydantic = ">= 1.9.2" -pydantic-core = "^2.18.2" -typing_extensions = ">= 4.0.0" - -[tool.poetry.dev-dependencies] -mypy = "1.0.1" -pytest = "^7.4.0" -pytest-asyncio = "^0.23.5" -python-dateutil = "^2.9.0" -types-python-dateutil = "^2.9.0.20240316" -ruff = "^0.5.6" - -[tool.pytest.ini_options] -testpaths = [ "tests" ] -asyncio_mode = "auto" - -[tool.mypy] -plugins = ["pydantic.mypy"] - -[tool.ruff] -line-length = 120 - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/seed/python-sdk/inline-types/reference.md b/seed/python-sdk/inline-types/reference.md deleted file mode 100644 index cab3ee56ef3..00000000000 --- a/seed/python-sdk/inline-types/reference.md +++ /dev/null @@ -1,73 +0,0 @@ -# Reference -
client.get_root(...) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```python -from seed import InlineType1, NestedInlineType1, SeedObject - -client = SeedObject( - base_url="https://yourhost.com/path/to/api", -) -client.get_root( - bar=InlineType1( - foo="foo", - bar=NestedInlineType1( - foo="foo", - bar="bar", - my_enum="SUNNY", - ), - ), - foo="foo", -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**bar:** `InlineType1` - -
-
- -
-
- -**foo:** `str` - -
-
- -
-
- -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
-
-
- - -
-
-
- diff --git a/seed/python-sdk/inline-types/resolved-snippet-templates.md b/seed/python-sdk/inline-types/resolved-snippet-templates.md deleted file mode 100644 index 7949e4a2c1c..00000000000 --- a/seed/python-sdk/inline-types/resolved-snippet-templates.md +++ /dev/null @@ -1,18 +0,0 @@ -```python -from seed import InlineType1 -from seed import NestedInlineType1 - -client = SeedObject(base_url="https://yourhost.com/path/to/api", ) -client.get_root( - bar=InlineType1( - foo="foo", - bar=NestedInlineType1( - foo="foo" - ) - ), - foo="foo" -) - -``` - - diff --git a/seed/python-sdk/inline-types/snippet-templates.json b/seed/python-sdk/inline-types/snippet-templates.json deleted file mode 100644 index 358d9bb086f..00000000000 --- a/seed/python-sdk/inline-types/snippet-templates.json +++ /dev/null @@ -1,282 +0,0 @@ -[ - { - "sdk": { - "package": "fern_inline-types", - "version": "0.0.1", - "type": "python" - }, - "endpointId": { - "path": "/root/root", - "method": "POST", - "identifierOverride": "endpoint_.getRoot" - }, - "snippetTemplate": { - "clientInstantiation": { - "imports": [ - "from seed import SeedObject" - ], - "isOptional": true, - "templateString": "client = SeedObject(base_url=\"https://yourhost.com/path/to/api\", )", - "templateInputs": [], - "inputDelimiter": ",", - "type": "generic" - }, - "functionInvocation": { - "imports": [], - "isOptional": true, - "templateString": "client.get_root(\n\t$FERN_INPUT\n)", - "templateInputs": [ - { - "type": "template", - "value": { - "imports": [ - "from seed import InlineType1" - ], - "isOptional": true, - "templateString": "bar=InlineType1(\n\t\t$FERN_INPUT\n\t)", - "templateInputs": [ - { - "type": "template", - "value": { - "imports": [], - "isOptional": true, - "templateString": "foo=$FERN_INPUT", - "templateInputs": [ - { - "location": "BODY", - "path": "bar.foo", - "type": "payload" - } - ], - "type": "generic" - } - }, - { - "type": "template", - "value": { - "imports": [ - "from seed import NestedInlineType1" - ], - "isOptional": true, - "templateString": "bar=NestedInlineType1(\n\t\t\t$FERN_INPUT\n\t\t)", - "templateInputs": [ - { - "type": "template", - "value": { - "imports": [], - "isOptional": true, - "templateString": "foo=$FERN_INPUT", - "templateInputs": [ - { - "location": "BODY", - "path": "bar.bar.foo", - "type": "payload" - } - ], - "type": "generic" - } - }, - { - "type": "template", - "value": { - "imports": [], - "isOptional": true, - "templateString": "bar=$FERN_INPUT", - "templateInputs": [ - { - "location": "BODY", - "path": "bar.bar.foo.bar.bar", - "type": "payload" - } - ], - "type": "generic" - } - }, - { - "type": "template", - "value": { - "imports": [], - "isOptional": true, - "templateString": "my_enum=$FERN_INPUT", - "values": { - "SUNNY": "\"SUNNY\"", - "CLOUDY": "\"CLOUDY\"", - "RAINING": "\"RAINING\"", - "SNOWING": "\"SNOWING\"" - }, - "templateInput": { - "location": "BODY", - "path": "bar.bar.foo.bar.bar.bar.myEnum" - }, - "type": "enum" - } - } - ], - "inputDelimiter": ",\n\t\t\t", - "type": "generic" - } - } - ], - "inputDelimiter": ",\n\t\t", - "type": "generic" - } - }, - { - "type": "template", - "value": { - "imports": [], - "isOptional": true, - "templateString": "foo=$FERN_INPUT", - "templateInputs": [ - { - "location": "BODY", - "path": "foo", - "type": "payload" - } - ], - "type": "generic" - } - } - ], - "inputDelimiter": ",\n\t", - "type": "generic" - }, - "type": "v1" - }, - "additionalTemplates": { - "async": { - "clientInstantiation": { - "imports": [ - "from seed import AsyncSeedObject" - ], - "isOptional": true, - "templateString": "client = AsyncSeedObject(base_url=\"https://yourhost.com/path/to/api\", )", - "templateInputs": [], - "inputDelimiter": ",", - "type": "generic" - }, - "functionInvocation": { - "imports": [], - "isOptional": true, - "templateString": "await client.get_root(\n\t$FERN_INPUT\n)", - "templateInputs": [ - { - "type": "template", - "value": { - "imports": [ - "from seed import InlineType1" - ], - "isOptional": true, - "templateString": "bar=InlineType1(\n\t\t$FERN_INPUT\n\t)", - "templateInputs": [ - { - "type": "template", - "value": { - "imports": [], - "isOptional": true, - "templateString": "foo=$FERN_INPUT", - "templateInputs": [ - { - "location": "BODY", - "path": "bar.foo", - "type": "payload" - } - ], - "type": "generic" - } - }, - { - "type": "template", - "value": { - "imports": [ - "from seed import NestedInlineType1" - ], - "isOptional": true, - "templateString": "bar=NestedInlineType1(\n\t\t\t$FERN_INPUT\n\t\t)", - "templateInputs": [ - { - "type": "template", - "value": { - "imports": [], - "isOptional": true, - "templateString": "foo=$FERN_INPUT", - "templateInputs": [ - { - "location": "BODY", - "path": "bar.bar.foo", - "type": "payload" - } - ], - "type": "generic" - } - }, - { - "type": "template", - "value": { - "imports": [], - "isOptional": true, - "templateString": "bar=$FERN_INPUT", - "templateInputs": [ - { - "location": "BODY", - "path": "bar.bar.foo.bar.bar", - "type": "payload" - } - ], - "type": "generic" - } - }, - { - "type": "template", - "value": { - "imports": [], - "isOptional": true, - "templateString": "my_enum=$FERN_INPUT", - "values": { - "SUNNY": "\"SUNNY\"", - "CLOUDY": "\"CLOUDY\"", - "RAINING": "\"RAINING\"", - "SNOWING": "\"SNOWING\"" - }, - "templateInput": { - "location": "BODY", - "path": "bar.bar.foo.bar.bar.bar.myEnum" - }, - "type": "enum" - } - } - ], - "inputDelimiter": ",\n\t\t\t", - "type": "generic" - } - } - ], - "inputDelimiter": ",\n\t\t", - "type": "generic" - } - }, - { - "type": "template", - "value": { - "imports": [], - "isOptional": true, - "templateString": "foo=$FERN_INPUT", - "templateInputs": [ - { - "location": "BODY", - "path": "foo", - "type": "payload" - } - ], - "type": "generic" - } - } - ], - "inputDelimiter": ",\n\t", - "type": "generic" - }, - "type": "v1" - } - } - } -] \ No newline at end of file diff --git a/seed/python-sdk/inline-types/snippet.json b/seed/python-sdk/inline-types/snippet.json deleted file mode 100644 index 8923dc7cfa7..00000000000 --- a/seed/python-sdk/inline-types/snippet.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "types": {}, - "endpoints": [ - { - "example_identifier": "default", - "id": { - "path": "/root/root", - "method": "POST", - "identifier_override": "endpoint_.getRoot" - }, - "snippet": { - "sync_client": "from seed import InlineType1, NestedInlineType1, SeedObject\n\nclient = SeedObject(\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.get_root(\n bar=InlineType1(\n foo=\"foo\",\n bar=NestedInlineType1(\n foo=\"foo\",\n bar=\"bar\",\n my_enum=\"SUNNY\",\n ),\n ),\n foo=\"foo\",\n)\n", - "async_client": "import asyncio\n\nfrom seed import AsyncSeedObject, InlineType1, NestedInlineType1\n\nclient = AsyncSeedObject(\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.get_root(\n bar=InlineType1(\n foo=\"foo\",\n bar=NestedInlineType1(\n foo=\"foo\",\n bar=\"bar\",\n my_enum=\"SUNNY\",\n ),\n ),\n foo=\"foo\",\n )\n\n\nasyncio.run(main())\n", - "type": "python" - } - } - ] -} \ No newline at end of file diff --git a/seed/python-sdk/inline-types/src/seed/__init__.py b/seed/python-sdk/inline-types/src/seed/__init__.py deleted file mode 100644 index 8f8ec3e978f..00000000000 --- a/seed/python-sdk/inline-types/src/seed/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .types import ( - InlineEnum, - InlineType1, - InlineType2, - InlinedDiscriminatedUnion1, - InlinedDiscriminatedUnion1_Type1, - InlinedDiscriminatedUnion1_Type2, - InlinedUndiscriminatedUnion1, - NestedInlineType1, - RootType1, -) -from .client import AsyncSeedObject, SeedObject -from .version import __version__ - -__all__ = [ - "AsyncSeedObject", - "InlineEnum", - "InlineType1", - "InlineType2", - "InlinedDiscriminatedUnion1", - "InlinedDiscriminatedUnion1_Type1", - "InlinedDiscriminatedUnion1_Type2", - "InlinedUndiscriminatedUnion1", - "NestedInlineType1", - "RootType1", - "SeedObject", - "__version__", -] diff --git a/seed/python-sdk/inline-types/src/seed/client.py b/seed/python-sdk/inline-types/src/seed/client.py deleted file mode 100644 index e1a24da7fe9..00000000000 --- a/seed/python-sdk/inline-types/src/seed/client.py +++ /dev/null @@ -1,244 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import httpx -from .core.client_wrapper import SyncClientWrapper -from .types.inline_type_1 import InlineType1 -from .core.request_options import RequestOptions -from .types.root_type_1 import RootType1 -from .core.serialization import convert_and_respect_annotation_metadata -from .core.pydantic_utilities import parse_obj_as -from json.decoder import JSONDecodeError -from .core.api_error import ApiError -from .core.client_wrapper import AsyncClientWrapper - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class SeedObject: - """ - Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions. - - Parameters - ---------- - base_url : str - The base url to use for requests from the client. - - timeout : typing.Optional[float] - The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. - - follow_redirects : typing.Optional[bool] - Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in. - - httpx_client : typing.Optional[httpx.Client] - The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. - - Examples - -------- - from seed import SeedObject - - client = SeedObject( - base_url="https://yourhost.com/path/to/api", - ) - """ - - def __init__( - self, - *, - base_url: str, - timeout: typing.Optional[float] = None, - follow_redirects: typing.Optional[bool] = True, - httpx_client: typing.Optional[httpx.Client] = None, - ): - _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None - self._client_wrapper = SyncClientWrapper( - base_url=base_url, - httpx_client=httpx_client - if httpx_client is not None - else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects) - if follow_redirects is not None - else httpx.Client(timeout=_defaulted_timeout), - timeout=_defaulted_timeout, - ) - - def get_root( - self, *, bar: InlineType1, foo: str, request_options: typing.Optional[RequestOptions] = None - ) -> RootType1: - """ - Parameters - ---------- - bar : InlineType1 - - foo : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - RootType1 - - Examples - -------- - from seed import InlineType1, NestedInlineType1, SeedObject - - client = SeedObject( - base_url="https://yourhost.com/path/to/api", - ) - client.get_root( - bar=InlineType1( - foo="foo", - bar=NestedInlineType1( - foo="foo", - bar="bar", - my_enum="SUNNY", - ), - ), - foo="foo", - ) - """ - _response = self._client_wrapper.httpx_client.request( - "root/root", - method="POST", - json={ - "bar": convert_and_respect_annotation_metadata(object_=bar, annotation=InlineType1, direction="write"), - "foo": foo, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - RootType1, - parse_obj_as( - type_=RootType1, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncSeedObject: - """ - Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions. - - Parameters - ---------- - base_url : str - The base url to use for requests from the client. - - timeout : typing.Optional[float] - The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. - - follow_redirects : typing.Optional[bool] - Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in. - - httpx_client : typing.Optional[httpx.AsyncClient] - The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. - - Examples - -------- - from seed import AsyncSeedObject - - client = AsyncSeedObject( - base_url="https://yourhost.com/path/to/api", - ) - """ - - def __init__( - self, - *, - base_url: str, - timeout: typing.Optional[float] = None, - follow_redirects: typing.Optional[bool] = True, - httpx_client: typing.Optional[httpx.AsyncClient] = None, - ): - _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None - self._client_wrapper = AsyncClientWrapper( - base_url=base_url, - httpx_client=httpx_client - if httpx_client is not None - else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects) - if follow_redirects is not None - else httpx.AsyncClient(timeout=_defaulted_timeout), - timeout=_defaulted_timeout, - ) - - async def get_root( - self, *, bar: InlineType1, foo: str, request_options: typing.Optional[RequestOptions] = None - ) -> RootType1: - """ - Parameters - ---------- - bar : InlineType1 - - foo : str - - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - - Returns - ------- - RootType1 - - Examples - -------- - import asyncio - - from seed import AsyncSeedObject, InlineType1, NestedInlineType1 - - client = AsyncSeedObject( - base_url="https://yourhost.com/path/to/api", - ) - - - async def main() -> None: - await client.get_root( - bar=InlineType1( - foo="foo", - bar=NestedInlineType1( - foo="foo", - bar="bar", - my_enum="SUNNY", - ), - ), - foo="foo", - ) - - - asyncio.run(main()) - """ - _response = await self._client_wrapper.httpx_client.request( - "root/root", - method="POST", - json={ - "bar": convert_and_respect_annotation_metadata(object_=bar, annotation=InlineType1, direction="write"), - "foo": foo, - }, - headers={ - "content-type": "application/json", - }, - request_options=request_options, - omit=OMIT, - ) - try: - if 200 <= _response.status_code < 300: - return typing.cast( - RootType1, - parse_obj_as( - type_=RootType1, # type: ignore - object_=_response.json(), - ), - ) - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/seed/python-sdk/inline-types/src/seed/core/__init__.py b/seed/python-sdk/inline-types/src/seed/core/__init__.py deleted file mode 100644 index f03aecbfe18..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/__init__.py +++ /dev/null @@ -1,47 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .api_error import ApiError -from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper -from .datetime_utils import serialize_datetime -from .file import File, convert_file_dict_to_httpx_tuples, with_content_type -from .http_client import AsyncHttpClient, HttpClient -from .jsonable_encoder import jsonable_encoder -from .pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - UniversalRootModel, - parse_obj_as, - universal_field_validator, - universal_root_validator, - update_forward_refs, -) -from .query_encoder import encode_query -from .remove_none_from_dict import remove_none_from_dict -from .request_options import RequestOptions -from .serialization import FieldMetadata, convert_and_respect_annotation_metadata - -__all__ = [ - "ApiError", - "AsyncClientWrapper", - "AsyncHttpClient", - "BaseClientWrapper", - "FieldMetadata", - "File", - "HttpClient", - "IS_PYDANTIC_V2", - "RequestOptions", - "SyncClientWrapper", - "UniversalBaseModel", - "UniversalRootModel", - "convert_and_respect_annotation_metadata", - "convert_file_dict_to_httpx_tuples", - "encode_query", - "jsonable_encoder", - "parse_obj_as", - "remove_none_from_dict", - "serialize_datetime", - "universal_field_validator", - "universal_root_validator", - "update_forward_refs", - "with_content_type", -] diff --git a/seed/python-sdk/inline-types/src/seed/core/api_error.py b/seed/python-sdk/inline-types/src/seed/core/api_error.py deleted file mode 100644 index 2e9fc5431cd..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/api_error.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - - -class ApiError(Exception): - status_code: typing.Optional[int] - body: typing.Any - - def __init__(self, *, status_code: typing.Optional[int] = None, body: typing.Any = None): - self.status_code = status_code - self.body = body - - def __str__(self) -> str: - return f"status_code: {self.status_code}, body: {self.body}" diff --git a/seed/python-sdk/inline-types/src/seed/core/client_wrapper.py b/seed/python-sdk/inline-types/src/seed/core/client_wrapper.py deleted file mode 100644 index 95d27752c65..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/client_wrapper.py +++ /dev/null @@ -1,48 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import httpx -from .http_client import HttpClient -from .http_client import AsyncHttpClient - - -class BaseClientWrapper: - def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None): - self._base_url = base_url - self._timeout = timeout - - def get_headers(self) -> typing.Dict[str, str]: - headers: typing.Dict[str, str] = { - "X-Fern-Language": "Python", - "X-Fern-SDK-Name": "fern_inline-types", - "X-Fern-SDK-Version": "0.0.1", - } - return headers - - def get_base_url(self) -> str: - return self._base_url - - def get_timeout(self) -> typing.Optional[float]: - return self._timeout - - -class SyncClientWrapper(BaseClientWrapper): - def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client): - super().__init__(base_url=base_url, timeout=timeout) - self.httpx_client = HttpClient( - httpx_client=httpx_client, - base_headers=self.get_headers, - base_timeout=self.get_timeout, - base_url=self.get_base_url, - ) - - -class AsyncClientWrapper(BaseClientWrapper): - def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient): - super().__init__(base_url=base_url, timeout=timeout) - self.httpx_client = AsyncHttpClient( - httpx_client=httpx_client, - base_headers=self.get_headers, - base_timeout=self.get_timeout, - base_url=self.get_base_url, - ) diff --git a/seed/python-sdk/inline-types/src/seed/core/datetime_utils.py b/seed/python-sdk/inline-types/src/seed/core/datetime_utils.py deleted file mode 100644 index 7c9864a944c..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/datetime_utils.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import datetime as dt - - -def serialize_datetime(v: dt.datetime) -> str: - """ - Serialize a datetime including timezone info. - - Uses the timezone info provided if present, otherwise uses the current runtime's timezone info. - - UTC datetimes end in "Z" while all other timezones are represented as offset from UTC, e.g. +05:00. - """ - - def _serialize_zoned_datetime(v: dt.datetime) -> str: - if v.tzinfo is not None and v.tzinfo.tzname(None) == dt.timezone.utc.tzname(None): - # UTC is a special case where we use "Z" at the end instead of "+00:00" - return v.isoformat().replace("+00:00", "Z") - else: - # Delegate to the typical +/- offset format - return v.isoformat() - - if v.tzinfo is not None: - return _serialize_zoned_datetime(v) - else: - local_tz = dt.datetime.now().astimezone().tzinfo - localized_dt = v.replace(tzinfo=local_tz) - return _serialize_zoned_datetime(localized_dt) diff --git a/seed/python-sdk/inline-types/src/seed/core/file.py b/seed/python-sdk/inline-types/src/seed/core/file.py deleted file mode 100644 index 44b0d27c089..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/file.py +++ /dev/null @@ -1,67 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from typing import IO, Dict, List, Mapping, Optional, Tuple, Union, cast - -# File typing inspired by the flexibility of types within the httpx library -# https://github.com/encode/httpx/blob/master/httpx/_types.py -FileContent = Union[IO[bytes], bytes, str] -File = Union[ - # file (or bytes) - FileContent, - # (filename, file (or bytes)) - Tuple[Optional[str], FileContent], - # (filename, file (or bytes), content_type) - Tuple[Optional[str], FileContent, Optional[str]], - # (filename, file (or bytes), content_type, headers) - Tuple[ - Optional[str], - FileContent, - Optional[str], - Mapping[str, str], - ], -] - - -def convert_file_dict_to_httpx_tuples( - d: Dict[str, Union[File, List[File]]], -) -> List[Tuple[str, File]]: - """ - The format we use is a list of tuples, where the first element is the - name of the file and the second is the file object. Typically HTTPX wants - a dict, but to be able to send lists of files, you have to use the list - approach (which also works for non-lists) - https://github.com/encode/httpx/pull/1032 - """ - - httpx_tuples = [] - for key, file_like in d.items(): - if isinstance(file_like, list): - for file_like_item in file_like: - httpx_tuples.append((key, file_like_item)) - else: - httpx_tuples.append((key, file_like)) - return httpx_tuples - - -def with_content_type(*, file: File, default_content_type: str) -> File: - """ - This function resolves to the file's content type, if provided, and defaults - to the default_content_type value if not. - """ - if isinstance(file, tuple): - if len(file) == 2: - filename, content = cast(Tuple[Optional[str], FileContent], file) # type: ignore - return (filename, content, default_content_type) - elif len(file) == 3: - filename, content, file_content_type = cast(Tuple[Optional[str], FileContent, Optional[str]], file) # type: ignore - out_content_type = file_content_type or default_content_type - return (filename, content, out_content_type) - elif len(file) == 4: - filename, content, file_content_type, headers = cast( # type: ignore - Tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], file - ) - out_content_type = file_content_type or default_content_type - return (filename, content, out_content_type, headers) - else: - raise ValueError(f"Unexpected tuple length: {len(file)}") - return (None, file, default_content_type) diff --git a/seed/python-sdk/inline-types/src/seed/core/http_client.py b/seed/python-sdk/inline-types/src/seed/core/http_client.py deleted file mode 100644 index 1a1a1311a66..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/http_client.py +++ /dev/null @@ -1,499 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import asyncio -import email.utils -import json -import re -import time -import typing -import urllib.parse -from contextlib import asynccontextmanager, contextmanager -from random import random - -import httpx - -from .file import File, convert_file_dict_to_httpx_tuples -from .jsonable_encoder import jsonable_encoder -from .query_encoder import encode_query -from .remove_none_from_dict import remove_none_from_dict -from .request_options import RequestOptions - -INITIAL_RETRY_DELAY_SECONDS = 0.5 -MAX_RETRY_DELAY_SECONDS = 10 -MAX_RETRY_DELAY_SECONDS_FROM_HEADER = 30 - - -def _parse_retry_after(response_headers: httpx.Headers) -> typing.Optional[float]: - """ - This function parses the `Retry-After` header in a HTTP response and returns the number of seconds to wait. - - Inspired by the urllib3 retry implementation. - """ - retry_after_ms = response_headers.get("retry-after-ms") - if retry_after_ms is not None: - try: - return int(retry_after_ms) / 1000 if retry_after_ms > 0 else 0 - except Exception: - pass - - retry_after = response_headers.get("retry-after") - if retry_after is None: - return None - - # Attempt to parse the header as an int. - if re.match(r"^\s*[0-9]+\s*$", retry_after): - seconds = float(retry_after) - # Fallback to parsing it as a date. - else: - retry_date_tuple = email.utils.parsedate_tz(retry_after) - if retry_date_tuple is None: - return None - if retry_date_tuple[9] is None: # Python 2 - # Assume UTC if no timezone was specified - # On Python2.7, parsedate_tz returns None for a timezone offset - # instead of 0 if no timezone is given, where mktime_tz treats - # a None timezone offset as local time. - retry_date_tuple = retry_date_tuple[:9] + (0,) + retry_date_tuple[10:] - - retry_date = email.utils.mktime_tz(retry_date_tuple) - seconds = retry_date - time.time() - - if seconds < 0: - seconds = 0 - - return seconds - - -def _retry_timeout(response: httpx.Response, retries: int) -> float: - """ - Determine the amount of time to wait before retrying a request. - This function begins by trying to parse a retry-after header from the response, and then proceeds to use exponential backoff - with a jitter to determine the number of seconds to wait. - """ - - # If the API asks us to wait a certain amount of time (and it's a reasonable amount), just do what it says. - retry_after = _parse_retry_after(response.headers) - if retry_after is not None and retry_after <= MAX_RETRY_DELAY_SECONDS_FROM_HEADER: - return retry_after - - # Apply exponential backoff, capped at MAX_RETRY_DELAY_SECONDS. - retry_delay = min(INITIAL_RETRY_DELAY_SECONDS * pow(2.0, retries), MAX_RETRY_DELAY_SECONDS) - - # Add a randomness / jitter to the retry delay to avoid overwhelming the server with retries. - timeout = retry_delay * (1 - 0.25 * random()) - return timeout if timeout >= 0 else 0 - - -def _should_retry(response: httpx.Response) -> bool: - retriable_400s = [429, 408, 409] - return response.status_code >= 500 or response.status_code in retriable_400s - - -def remove_omit_from_dict( - original: typing.Dict[str, typing.Optional[typing.Any]], - omit: typing.Optional[typing.Any], -) -> typing.Dict[str, typing.Any]: - if omit is None: - return original - new: typing.Dict[str, typing.Any] = {} - for key, value in original.items(): - if value is not omit: - new[key] = value - return new - - -def maybe_filter_request_body( - data: typing.Optional[typing.Any], - request_options: typing.Optional[RequestOptions], - omit: typing.Optional[typing.Any], -) -> typing.Optional[typing.Any]: - if data is None: - return ( - jsonable_encoder(request_options.get("additional_body_parameters", {})) or {} - if request_options is not None - else None - ) - elif not isinstance(data, typing.Mapping): - data_content = jsonable_encoder(data) - else: - data_content = { - **(jsonable_encoder(remove_omit_from_dict(data, omit))), # type: ignore - **( - jsonable_encoder(request_options.get("additional_body_parameters", {})) or {} - if request_options is not None - else {} - ), - } - return data_content - - -# Abstracted out for testing purposes -def get_request_body( - *, - json: typing.Optional[typing.Any], - data: typing.Optional[typing.Any], - request_options: typing.Optional[RequestOptions], - omit: typing.Optional[typing.Any], -) -> typing.Tuple[typing.Optional[typing.Any], typing.Optional[typing.Any]]: - json_body = None - data_body = None - if data is not None: - data_body = maybe_filter_request_body(data, request_options, omit) - else: - # If both data and json are None, we send json data in the event extra properties are specified - json_body = maybe_filter_request_body(json, request_options, omit) - - # If you have an empty JSON body, you should just send None - return (json_body if json_body != {} else None), data_body if data_body != {} else None - - -class HttpClient: - def __init__( - self, - *, - httpx_client: httpx.Client, - base_timeout: typing.Callable[[], typing.Optional[float]], - base_headers: typing.Callable[[], typing.Dict[str, str]], - base_url: typing.Optional[typing.Callable[[], str]] = None, - ): - self.base_url = base_url - self.base_timeout = base_timeout - self.base_headers = base_headers - self.httpx_client = httpx_client - - def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str: - base_url = maybe_base_url - if self.base_url is not None and base_url is None: - base_url = self.base_url() - - if base_url is None: - raise ValueError("A base_url is required to make this request, please provide one and try again.") - return base_url - - def request( - self, - path: typing.Optional[str] = None, - *, - method: str, - base_url: typing.Optional[str] = None, - params: typing.Optional[typing.Dict[str, typing.Any]] = None, - json: typing.Optional[typing.Any] = None, - data: typing.Optional[typing.Any] = None, - content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, - headers: typing.Optional[typing.Dict[str, typing.Any]] = None, - request_options: typing.Optional[RequestOptions] = None, - retries: int = 0, - omit: typing.Optional[typing.Any] = None, - ) -> httpx.Response: - base_url = self.get_base_url(base_url) - timeout = ( - request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else self.base_timeout() - ) - - json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) - - response = self.httpx_client.request( - method=method, - url=urllib.parse.urljoin(f"{base_url}/", path), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self.base_headers(), - **(headers if headers is not None else {}), - **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}), - } - ) - ), - params=encode_query( - jsonable_encoder( - remove_none_from_dict( - remove_omit_from_dict( - { - **(params if params is not None else {}), - **( - request_options.get("additional_query_parameters", {}) or {} - if request_options is not None - else {} - ), - }, - omit, - ) - ) - ) - ), - json=json_body, - data=data_body, - content=content, - files=( - convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) - if (files is not None and files is not omit) - else None - ), - timeout=timeout, - ) - - max_retries: int = request_options.get("max_retries", 0) if request_options is not None else 0 - if _should_retry(response=response): - if max_retries > retries: - time.sleep(_retry_timeout(response=response, retries=retries)) - return self.request( - path=path, - method=method, - base_url=base_url, - params=params, - json=json, - content=content, - files=files, - headers=headers, - request_options=request_options, - retries=retries + 1, - omit=omit, - ) - - return response - - @contextmanager - def stream( - self, - path: typing.Optional[str] = None, - *, - method: str, - base_url: typing.Optional[str] = None, - params: typing.Optional[typing.Dict[str, typing.Any]] = None, - json: typing.Optional[typing.Any] = None, - data: typing.Optional[typing.Any] = None, - content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, - headers: typing.Optional[typing.Dict[str, typing.Any]] = None, - request_options: typing.Optional[RequestOptions] = None, - retries: int = 0, - omit: typing.Optional[typing.Any] = None, - ) -> typing.Iterator[httpx.Response]: - base_url = self.get_base_url(base_url) - timeout = ( - request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else self.base_timeout() - ) - - json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) - - with self.httpx_client.stream( - method=method, - url=urllib.parse.urljoin(f"{base_url}/", path), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self.base_headers(), - **(headers if headers is not None else {}), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - params=encode_query( - jsonable_encoder( - remove_none_from_dict( - remove_omit_from_dict( - { - **(params if params is not None else {}), - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - }, - omit, - ) - ) - ) - ), - json=json_body, - data=data_body, - content=content, - files=( - convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) - if (files is not None and files is not omit) - else None - ), - timeout=timeout, - ) as stream: - yield stream - - -class AsyncHttpClient: - def __init__( - self, - *, - httpx_client: httpx.AsyncClient, - base_timeout: typing.Callable[[], typing.Optional[float]], - base_headers: typing.Callable[[], typing.Dict[str, str]], - base_url: typing.Optional[typing.Callable[[], str]] = None, - ): - self.base_url = base_url - self.base_timeout = base_timeout - self.base_headers = base_headers - self.httpx_client = httpx_client - - def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str: - base_url = maybe_base_url - if self.base_url is not None and base_url is None: - base_url = self.base_url() - - if base_url is None: - raise ValueError("A base_url is required to make this request, please provide one and try again.") - return base_url - - async def request( - self, - path: typing.Optional[str] = None, - *, - method: str, - base_url: typing.Optional[str] = None, - params: typing.Optional[typing.Dict[str, typing.Any]] = None, - json: typing.Optional[typing.Any] = None, - data: typing.Optional[typing.Any] = None, - content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, - headers: typing.Optional[typing.Dict[str, typing.Any]] = None, - request_options: typing.Optional[RequestOptions] = None, - retries: int = 0, - omit: typing.Optional[typing.Any] = None, - ) -> httpx.Response: - base_url = self.get_base_url(base_url) - timeout = ( - request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else self.base_timeout() - ) - - json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) - - # Add the input to each of these and do None-safety checks - response = await self.httpx_client.request( - method=method, - url=urllib.parse.urljoin(f"{base_url}/", path), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self.base_headers(), - **(headers if headers is not None else {}), - **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}), - } - ) - ), - params=encode_query( - jsonable_encoder( - remove_none_from_dict( - remove_omit_from_dict( - { - **(params if params is not None else {}), - **( - request_options.get("additional_query_parameters", {}) or {} - if request_options is not None - else {} - ), - }, - omit, - ) - ) - ) - ), - json=json_body, - data=data_body, - content=content, - files=( - convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) - if files is not None - else None - ), - timeout=timeout, - ) - - max_retries: int = request_options.get("max_retries", 0) if request_options is not None else 0 - if _should_retry(response=response): - if max_retries > retries: - await asyncio.sleep(_retry_timeout(response=response, retries=retries)) - return await self.request( - path=path, - method=method, - base_url=base_url, - params=params, - json=json, - content=content, - files=files, - headers=headers, - request_options=request_options, - retries=retries + 1, - omit=omit, - ) - return response - - @asynccontextmanager - async def stream( - self, - path: typing.Optional[str] = None, - *, - method: str, - base_url: typing.Optional[str] = None, - params: typing.Optional[typing.Dict[str, typing.Any]] = None, - json: typing.Optional[typing.Any] = None, - data: typing.Optional[typing.Any] = None, - content: typing.Optional[typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]] = None, - files: typing.Optional[typing.Dict[str, typing.Optional[typing.Union[File, typing.List[File]]]]] = None, - headers: typing.Optional[typing.Dict[str, typing.Any]] = None, - request_options: typing.Optional[RequestOptions] = None, - retries: int = 0, - omit: typing.Optional[typing.Any] = None, - ) -> typing.AsyncIterator[httpx.Response]: - base_url = self.get_base_url(base_url) - timeout = ( - request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else self.base_timeout() - ) - - json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) - - async with self.httpx_client.stream( - method=method, - url=urllib.parse.urljoin(f"{base_url}/", path), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self.base_headers(), - **(headers if headers is not None else {}), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - params=encode_query( - jsonable_encoder( - remove_none_from_dict( - remove_omit_from_dict( - { - **(params if params is not None else {}), - **( - request_options.get("additional_query_parameters", {}) - if request_options is not None - else {} - ), - }, - omit=omit, - ) - ) - ) - ), - json=json_body, - data=data_body, - content=content, - files=( - convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) - if files is not None - else None - ), - timeout=timeout, - ) as stream: - yield stream diff --git a/seed/python-sdk/inline-types/src/seed/core/jsonable_encoder.py b/seed/python-sdk/inline-types/src/seed/core/jsonable_encoder.py deleted file mode 100644 index 1b631e9017c..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/jsonable_encoder.py +++ /dev/null @@ -1,101 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -""" -jsonable_encoder converts a Python object to a JSON-friendly dict -(e.g. datetimes to strings, Pydantic models to dicts). - -Taken from FastAPI, and made a bit simpler -https://github.com/tiangolo/fastapi/blob/master/fastapi/encoders.py -""" - -import base64 -import dataclasses -import datetime as dt -from enum import Enum -from pathlib import PurePath -from types import GeneratorType -from typing import Any, Callable, Dict, List, Optional, Set, Union - -import pydantic - -from .datetime_utils import serialize_datetime -from .pydantic_utilities import ( - IS_PYDANTIC_V2, - encode_by_type, - to_jsonable_with_fallback, -) - -SetIntStr = Set[Union[int, str]] -DictIntStrAny = Dict[Union[int, str], Any] - - -def jsonable_encoder(obj: Any, custom_encoder: Optional[Dict[Any, Callable[[Any], Any]]] = None) -> Any: - custom_encoder = custom_encoder or {} - if custom_encoder: - if type(obj) in custom_encoder: - return custom_encoder[type(obj)](obj) - else: - for encoder_type, encoder_instance in custom_encoder.items(): - if isinstance(obj, encoder_type): - return encoder_instance(obj) - if isinstance(obj, pydantic.BaseModel): - if IS_PYDANTIC_V2: - encoder = getattr(obj.model_config, "json_encoders", {}) # type: ignore # Pydantic v2 - else: - encoder = getattr(obj.__config__, "json_encoders", {}) # type: ignore # Pydantic v1 - if custom_encoder: - encoder.update(custom_encoder) - obj_dict = obj.dict(by_alias=True) - if "__root__" in obj_dict: - obj_dict = obj_dict["__root__"] - if "root" in obj_dict: - obj_dict = obj_dict["root"] - return jsonable_encoder(obj_dict, custom_encoder=encoder) - if dataclasses.is_dataclass(obj): - obj_dict = dataclasses.asdict(obj) # type: ignore - return jsonable_encoder(obj_dict, custom_encoder=custom_encoder) - if isinstance(obj, bytes): - return base64.b64encode(obj).decode("utf-8") - if isinstance(obj, Enum): - return obj.value - if isinstance(obj, PurePath): - return str(obj) - if isinstance(obj, (str, int, float, type(None))): - return obj - if isinstance(obj, dt.datetime): - return serialize_datetime(obj) - if isinstance(obj, dt.date): - return str(obj) - if isinstance(obj, dict): - encoded_dict = {} - allowed_keys = set(obj.keys()) - for key, value in obj.items(): - if key in allowed_keys: - encoded_key = jsonable_encoder(key, custom_encoder=custom_encoder) - encoded_value = jsonable_encoder(value, custom_encoder=custom_encoder) - encoded_dict[encoded_key] = encoded_value - return encoded_dict - if isinstance(obj, (list, set, frozenset, GeneratorType, tuple)): - encoded_list = [] - for item in obj: - encoded_list.append(jsonable_encoder(item, custom_encoder=custom_encoder)) - return encoded_list - - def fallback_serializer(o: Any) -> Any: - attempt_encode = encode_by_type(o) - if attempt_encode is not None: - return attempt_encode - - try: - data = dict(o) - except Exception as e: - errors: List[Exception] = [] - errors.append(e) - try: - data = vars(o) - except Exception as e: - errors.append(e) - raise ValueError(errors) from e - return jsonable_encoder(data, custom_encoder=custom_encoder) - - return to_jsonable_with_fallback(obj, fallback_serializer) diff --git a/seed/python-sdk/inline-types/src/seed/core/pydantic_utilities.py b/seed/python-sdk/inline-types/src/seed/core/pydantic_utilities.py deleted file mode 100644 index ee8f0e4105f..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/pydantic_utilities.py +++ /dev/null @@ -1,296 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# nopycln: file -import datetime as dt -import typing -from collections import defaultdict - -import typing_extensions - -import pydantic - -from .datetime_utils import serialize_datetime -from .serialization import convert_and_respect_annotation_metadata - -IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.") - -if IS_PYDANTIC_V2: - # isort will try to reformat the comments on these imports, which breaks mypy - # isort: off - from pydantic.v1.datetime_parse import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - parse_date as parse_date, - ) - from pydantic.v1.datetime_parse import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - parse_datetime as parse_datetime, - ) - from pydantic.v1.json import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - ENCODERS_BY_TYPE as encoders_by_type, - ) - from pydantic.v1.typing import ( # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 - get_args as get_args, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - get_origin as get_origin, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - is_literal_type as is_literal_type, - ) - from pydantic.v1.typing import ( # pyright: ignore[reportMissingImports] # Pydantic v2 - is_union as is_union, - ) - from pydantic.v1.fields import ModelField as ModelField # type: ignore # pyright: ignore[reportMissingImports] # Pydantic v2 -else: - from pydantic.datetime_parse import parse_date as parse_date # type: ignore # Pydantic v1 - from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore # Pydantic v1 - from pydantic.fields import ModelField as ModelField # type: ignore # Pydantic v1 - from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore # Pydantic v1 - from pydantic.typing import get_args as get_args # type: ignore # Pydantic v1 - from pydantic.typing import get_origin as get_origin # type: ignore # Pydantic v1 - from pydantic.typing import is_literal_type as is_literal_type # type: ignore # Pydantic v1 - from pydantic.typing import is_union as is_union # type: ignore # Pydantic v1 - - # isort: on - - -T = typing.TypeVar("T") -Model = typing.TypeVar("Model", bound=pydantic.BaseModel) - - -def parse_obj_as(type_: typing.Type[T], object_: typing.Any) -> T: - dealiased_object = convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read") - if IS_PYDANTIC_V2: - adapter = pydantic.TypeAdapter(type_) # type: ignore # Pydantic v2 - return adapter.validate_python(dealiased_object) - else: - return pydantic.parse_obj_as(type_, dealiased_object) - - -def to_jsonable_with_fallback( - obj: typing.Any, fallback_serializer: typing.Callable[[typing.Any], typing.Any] -) -> typing.Any: - if IS_PYDANTIC_V2: - from pydantic_core import to_jsonable_python - - return to_jsonable_python(obj, fallback=fallback_serializer) - else: - return fallback_serializer(obj) - - -class UniversalBaseModel(pydantic.BaseModel): - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - # Allow fields begining with `model_` to be used in the model - protected_namespaces=(), - ) # type: ignore # Pydantic v2 - - @pydantic.model_serializer(mode="wrap", when_used="json") # type: ignore # Pydantic v2 - def serialize_model(self, handler: pydantic.SerializerFunctionWrapHandler) -> typing.Any: # type: ignore # Pydantic v2 - serialized = handler(self) - data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()} - return data - - else: - - class Config: - smart_union = True - json_encoders = {dt.datetime: serialize_datetime} - - @classmethod - def model_construct( - cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any - ) -> "Model": - dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read") - return cls.construct(_fields_set, **dealiased_object) - - @classmethod - def construct( - cls: typing.Type["Model"], _fields_set: typing.Optional[typing.Set[str]] = None, **values: typing.Any - ) -> "Model": - dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read") - if IS_PYDANTIC_V2: - return super().model_construct(_fields_set, **dealiased_object) # type: ignore # Pydantic v2 - else: - return super().construct(_fields_set, **dealiased_object) - - def json(self, **kwargs: typing.Any) -> str: - kwargs_with_defaults: typing.Any = { - "by_alias": True, - "exclude_unset": True, - **kwargs, - } - if IS_PYDANTIC_V2: - return super().model_dump_json(**kwargs_with_defaults) # type: ignore # Pydantic v2 - else: - return super().json(**kwargs_with_defaults) - - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: - """ - Override the default dict method to `exclude_unset` by default. This function patches - `exclude_unset` to work include fields within non-None default values. - """ - # Note: the logic here is multi-plexed given the levers exposed in Pydantic V1 vs V2 - # Pydantic V1's .dict can be extremely slow, so we do not want to call it twice. - # - # We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models - # that we have less control over, and this is less intrusive than custom serializers for now. - if IS_PYDANTIC_V2: - kwargs_with_defaults_exclude_unset: typing.Any = { - **kwargs, - "by_alias": True, - "exclude_unset": True, - "exclude_none": False, - } - kwargs_with_defaults_exclude_none: typing.Any = { - **kwargs, - "by_alias": True, - "exclude_none": True, - "exclude_unset": False, - } - dict_dump = deep_union_pydantic_dicts( - super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore # Pydantic v2 - super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore # Pydantic v2 - ) - - else: - _fields_set = self.__fields_set__.copy() - - fields = _get_model_fields(self.__class__) - for name, field in fields.items(): - if name not in _fields_set: - default = _get_field_default(field) - - # If the default values are non-null act like they've been set - # This effectively allows exclude_unset to work like exclude_none where - # the latter passes through intentionally set none values. - if default is not None or ("exclude_unset" in kwargs and not kwargs["exclude_unset"]): - _fields_set.add(name) - - if default is not None: - self.__fields_set__.add(name) - - kwargs_with_defaults_exclude_unset_include_fields: typing.Any = { - "by_alias": True, - "exclude_unset": True, - "include": _fields_set, - **kwargs, - } - - dict_dump = super().dict(**kwargs_with_defaults_exclude_unset_include_fields) - - return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write") - - -def _union_list_of_pydantic_dicts( - source: typing.List[typing.Any], destination: typing.List[typing.Any] -) -> typing.List[typing.Any]: - converted_list: typing.List[typing.Any] = [] - for i, item in enumerate(source): - destination_value = destination[i] # type: ignore - if isinstance(item, dict): - converted_list.append(deep_union_pydantic_dicts(item, destination_value)) - elif isinstance(item, list): - converted_list.append(_union_list_of_pydantic_dicts(item, destination_value)) - else: - converted_list.append(item) - return converted_list - - -def deep_union_pydantic_dicts( - source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any] -) -> typing.Dict[str, typing.Any]: - for key, value in source.items(): - node = destination.setdefault(key, {}) - if isinstance(value, dict): - deep_union_pydantic_dicts(value, node) - # Note: we do not do this same processing for sets given we do not have sets of models - # and given the sets are unordered, the processing of the set and matching objects would - # be non-trivial. - elif isinstance(value, list): - destination[key] = _union_list_of_pydantic_dicts(value, node) - else: - destination[key] = value - - return destination - - -if IS_PYDANTIC_V2: - - class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore # Pydantic v2 - pass - - UniversalRootModel: typing_extensions.TypeAlias = V2RootModel # type: ignore -else: - UniversalRootModel: typing_extensions.TypeAlias = UniversalBaseModel # type: ignore - - -def encode_by_type(o: typing.Any) -> typing.Any: - encoders_by_class_tuples: typing.Dict[typing.Callable[[typing.Any], typing.Any], typing.Tuple[typing.Any, ...]] = ( - defaultdict(tuple) - ) - for type_, encoder in encoders_by_type.items(): - encoders_by_class_tuples[encoder] += (type_,) - - if type(o) in encoders_by_type: - return encoders_by_type[type(o)](o) - for encoder, classes_tuple in encoders_by_class_tuples.items(): - if isinstance(o, classes_tuple): - return encoder(o) - - -def update_forward_refs(model: typing.Type["Model"], **localns: typing.Any) -> None: - if IS_PYDANTIC_V2: - model.model_rebuild(raise_errors=False) # type: ignore # Pydantic v2 - else: - model.update_forward_refs(**localns) - - -# Mirrors Pydantic's internal typing -AnyCallable = typing.Callable[..., typing.Any] - - -def universal_root_validator( - pre: bool = False, -) -> typing.Callable[[AnyCallable], AnyCallable]: - def decorator(func: AnyCallable) -> AnyCallable: - if IS_PYDANTIC_V2: - return pydantic.model_validator(mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 - else: - return pydantic.root_validator(pre=pre)(func) # type: ignore # Pydantic v1 - - return decorator - - -def universal_field_validator(field_name: str, pre: bool = False) -> typing.Callable[[AnyCallable], AnyCallable]: - def decorator(func: AnyCallable) -> AnyCallable: - if IS_PYDANTIC_V2: - return pydantic.field_validator(field_name, mode="before" if pre else "after")(func) # type: ignore # Pydantic v2 - else: - return pydantic.validator(field_name, pre=pre)(func) # type: ignore # Pydantic v1 - - return decorator - - -PydanticField = typing.Union[ModelField, pydantic.fields.FieldInfo] - - -def _get_model_fields( - model: typing.Type["Model"], -) -> typing.Mapping[str, PydanticField]: - if IS_PYDANTIC_V2: - return model.model_fields # type: ignore # Pydantic v2 - else: - return model.__fields__ # type: ignore # Pydantic v1 - - -def _get_field_default(field: PydanticField) -> typing.Any: - try: - value = field.get_default() # type: ignore # Pydantic < v1.10.15 - except: - value = field.default - if IS_PYDANTIC_V2: - from pydantic_core import PydanticUndefined - - if value == PydanticUndefined: - return None - return value - return value diff --git a/seed/python-sdk/inline-types/src/seed/core/query_encoder.py b/seed/python-sdk/inline-types/src/seed/core/query_encoder.py deleted file mode 100644 index 3183001d404..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/query_encoder.py +++ /dev/null @@ -1,58 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from typing import Any, Dict, List, Optional, Tuple - -import pydantic - - -# Flattens dicts to be of the form {"key[subkey][subkey2]": value} where value is not a dict -def traverse_query_dict(dict_flat: Dict[str, Any], key_prefix: Optional[str] = None) -> List[Tuple[str, Any]]: - result = [] - for k, v in dict_flat.items(): - key = f"{key_prefix}[{k}]" if key_prefix is not None else k - if isinstance(v, dict): - result.extend(traverse_query_dict(v, key)) - elif isinstance(v, list): - for arr_v in v: - if isinstance(arr_v, dict): - result.extend(traverse_query_dict(arr_v, key)) - else: - result.append((key, arr_v)) - else: - result.append((key, v)) - return result - - -def single_query_encoder(query_key: str, query_value: Any) -> List[Tuple[str, Any]]: - if isinstance(query_value, pydantic.BaseModel) or isinstance(query_value, dict): - if isinstance(query_value, pydantic.BaseModel): - obj_dict = query_value.dict(by_alias=True) - else: - obj_dict = query_value - return traverse_query_dict(obj_dict, query_key) - elif isinstance(query_value, list): - encoded_values: List[Tuple[str, Any]] = [] - for value in query_value: - if isinstance(value, pydantic.BaseModel) or isinstance(value, dict): - if isinstance(value, pydantic.BaseModel): - obj_dict = value.dict(by_alias=True) - elif isinstance(value, dict): - obj_dict = value - - encoded_values.extend(single_query_encoder(query_key, obj_dict)) - else: - encoded_values.append((query_key, value)) - - return encoded_values - - return [(query_key, query_value)] - - -def encode_query(query: Optional[Dict[str, Any]]) -> Optional[List[Tuple[str, Any]]]: - if query is None: - return None - - encoded_query = [] - for k, v in query.items(): - encoded_query.extend(single_query_encoder(k, v)) - return encoded_query diff --git a/seed/python-sdk/inline-types/src/seed/core/remove_none_from_dict.py b/seed/python-sdk/inline-types/src/seed/core/remove_none_from_dict.py deleted file mode 100644 index c2298143f14..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/remove_none_from_dict.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from typing import Any, Dict, Mapping, Optional - - -def remove_none_from_dict(original: Mapping[str, Optional[Any]]) -> Dict[str, Any]: - new: Dict[str, Any] = {} - for key, value in original.items(): - if value is not None: - new[key] = value - return new diff --git a/seed/python-sdk/inline-types/src/seed/core/request_options.py b/seed/python-sdk/inline-types/src/seed/core/request_options.py deleted file mode 100644 index 1b38804432b..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/request_options.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -try: - from typing import NotRequired # type: ignore -except ImportError: - from typing_extensions import NotRequired - - -class RequestOptions(typing.TypedDict, total=False): - """ - Additional options for request-specific configuration when calling APIs via the SDK. - This is used primarily as an optional final parameter for service functions. - - Attributes: - - timeout_in_seconds: int. The number of seconds to await an API call before timing out. - - - max_retries: int. The max number of retries to attempt if the API call fails. - - - additional_headers: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's header dict - - - additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict - - - additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict - - - chunk_size: int. The size, in bytes, to process each chunk of data being streamed back within the response. This equates to leveraging `chunk_size` within `requests` or `httpx`, and is only leveraged for file downloads. - """ - - timeout_in_seconds: NotRequired[int] - max_retries: NotRequired[int] - additional_headers: NotRequired[typing.Dict[str, typing.Any]] - additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]] - additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]] - chunk_size: NotRequired[int] diff --git a/seed/python-sdk/inline-types/src/seed/core/serialization.py b/seed/python-sdk/inline-types/src/seed/core/serialization.py deleted file mode 100644 index cb5dcbf93a9..00000000000 --- a/seed/python-sdk/inline-types/src/seed/core/serialization.py +++ /dev/null @@ -1,272 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import collections -import inspect -import typing - -import typing_extensions - -import pydantic - - -class FieldMetadata: - """ - Metadata class used to annotate fields to provide additional information. - - Example: - class MyDict(TypedDict): - field: typing.Annotated[str, FieldMetadata(alias="field_name")] - - Will serialize: `{"field": "value"}` - To: `{"field_name": "value"}` - """ - - alias: str - - def __init__(self, *, alias: str) -> None: - self.alias = alias - - -def convert_and_respect_annotation_metadata( - *, - object_: typing.Any, - annotation: typing.Any, - inner_type: typing.Optional[typing.Any] = None, - direction: typing.Literal["read", "write"], -) -> typing.Any: - """ - Respect the metadata annotations on a field, such as aliasing. This function effectively - manipulates the dict-form of an object to respect the metadata annotations. This is primarily used for - TypedDicts, which cannot support aliasing out of the box, and can be extended for additional - utilities, such as defaults. - - Parameters - ---------- - object_ : typing.Any - - annotation : type - The type we're looking to apply typing annotations from - - inner_type : typing.Optional[type] - - Returns - ------- - typing.Any - """ - - if object_ is None: - return None - if inner_type is None: - inner_type = annotation - - clean_type = _remove_annotations(inner_type) - # Pydantic models - if ( - inspect.isclass(clean_type) - and issubclass(clean_type, pydantic.BaseModel) - and isinstance(object_, typing.Mapping) - ): - return _convert_mapping(object_, clean_type, direction) - # TypedDicts - if typing_extensions.is_typeddict(clean_type) and isinstance(object_, typing.Mapping): - return _convert_mapping(object_, clean_type, direction) - - if ( - typing_extensions.get_origin(clean_type) == typing.Dict - or typing_extensions.get_origin(clean_type) == dict - or clean_type == typing.Dict - ) and isinstance(object_, typing.Dict): - key_type = typing_extensions.get_args(clean_type)[0] - value_type = typing_extensions.get_args(clean_type)[1] - - return { - key: convert_and_respect_annotation_metadata( - object_=value, - annotation=annotation, - inner_type=value_type, - direction=direction, - ) - for key, value in object_.items() - } - - # If you're iterating on a string, do not bother to coerce it to a sequence. - if not isinstance(object_, str): - if ( - typing_extensions.get_origin(clean_type) == typing.Set - or typing_extensions.get_origin(clean_type) == set - or clean_type == typing.Set - ) and isinstance(object_, typing.Set): - inner_type = typing_extensions.get_args(clean_type)[0] - return { - convert_and_respect_annotation_metadata( - object_=item, - annotation=annotation, - inner_type=inner_type, - direction=direction, - ) - for item in object_ - } - elif ( - ( - typing_extensions.get_origin(clean_type) == typing.List - or typing_extensions.get_origin(clean_type) == list - or clean_type == typing.List - ) - and isinstance(object_, typing.List) - ) or ( - ( - typing_extensions.get_origin(clean_type) == typing.Sequence - or typing_extensions.get_origin(clean_type) == collections.abc.Sequence - or clean_type == typing.Sequence - ) - and isinstance(object_, typing.Sequence) - ): - inner_type = typing_extensions.get_args(clean_type)[0] - return [ - convert_and_respect_annotation_metadata( - object_=item, - annotation=annotation, - inner_type=inner_type, - direction=direction, - ) - for item in object_ - ] - - if typing_extensions.get_origin(clean_type) == typing.Union: - # We should be able to ~relatively~ safely try to convert keys against all - # member types in the union, the edge case here is if one member aliases a field - # of the same name to a different name from another member - # Or if another member aliases a field of the same name that another member does not. - for member in typing_extensions.get_args(clean_type): - object_ = convert_and_respect_annotation_metadata( - object_=object_, - annotation=annotation, - inner_type=member, - direction=direction, - ) - return object_ - - annotated_type = _get_annotation(annotation) - if annotated_type is None: - return object_ - - # If the object is not a TypedDict, a Union, or other container (list, set, sequence, etc.) - # Then we can safely call it on the recursive conversion. - return object_ - - -def _convert_mapping( - object_: typing.Mapping[str, object], - expected_type: typing.Any, - direction: typing.Literal["read", "write"], -) -> typing.Mapping[str, object]: - converted_object: typing.Dict[str, object] = {} - annotations = typing_extensions.get_type_hints(expected_type, include_extras=True) - aliases_to_field_names = _get_alias_to_field_name(annotations) - for key, value in object_.items(): - if direction == "read" and key in aliases_to_field_names: - dealiased_key = aliases_to_field_names.get(key) - if dealiased_key is not None: - type_ = annotations.get(dealiased_key) - else: - type_ = annotations.get(key) - # Note you can't get the annotation by the field name if you're in read mode, so you must check the aliases map - # - # So this is effectively saying if we're in write mode, and we don't have a type, or if we're in read mode and we don't have an alias - # then we can just pass the value through as is - if type_ is None: - converted_object[key] = value - elif direction == "read" and key not in aliases_to_field_names: - converted_object[key] = convert_and_respect_annotation_metadata( - object_=value, annotation=type_, direction=direction - ) - else: - converted_object[_alias_key(key, type_, direction, aliases_to_field_names)] = ( - convert_and_respect_annotation_metadata(object_=value, annotation=type_, direction=direction) - ) - return converted_object - - -def _get_annotation(type_: typing.Any) -> typing.Optional[typing.Any]: - maybe_annotated_type = typing_extensions.get_origin(type_) - if maybe_annotated_type is None: - return None - - if maybe_annotated_type == typing_extensions.NotRequired: - type_ = typing_extensions.get_args(type_)[0] - maybe_annotated_type = typing_extensions.get_origin(type_) - - if maybe_annotated_type == typing_extensions.Annotated: - return type_ - - return None - - -def _remove_annotations(type_: typing.Any) -> typing.Any: - maybe_annotated_type = typing_extensions.get_origin(type_) - if maybe_annotated_type is None: - return type_ - - if maybe_annotated_type == typing_extensions.NotRequired: - return _remove_annotations(typing_extensions.get_args(type_)[0]) - - if maybe_annotated_type == typing_extensions.Annotated: - return _remove_annotations(typing_extensions.get_args(type_)[0]) - - return type_ - - -def get_alias_to_field_mapping(type_: typing.Any) -> typing.Dict[str, str]: - annotations = typing_extensions.get_type_hints(type_, include_extras=True) - return _get_alias_to_field_name(annotations) - - -def get_field_to_alias_mapping(type_: typing.Any) -> typing.Dict[str, str]: - annotations = typing_extensions.get_type_hints(type_, include_extras=True) - return _get_field_to_alias_name(annotations) - - -def _get_alias_to_field_name( - field_to_hint: typing.Dict[str, typing.Any], -) -> typing.Dict[str, str]: - aliases = {} - for field, hint in field_to_hint.items(): - maybe_alias = _get_alias_from_type(hint) - if maybe_alias is not None: - aliases[maybe_alias] = field - return aliases - - -def _get_field_to_alias_name( - field_to_hint: typing.Dict[str, typing.Any], -) -> typing.Dict[str, str]: - aliases = {} - for field, hint in field_to_hint.items(): - maybe_alias = _get_alias_from_type(hint) - if maybe_alias is not None: - aliases[field] = maybe_alias - return aliases - - -def _get_alias_from_type(type_: typing.Any) -> typing.Optional[str]: - maybe_annotated_type = _get_annotation(type_) - - if maybe_annotated_type is not None: - # The actual annotations are 1 onward, the first is the annotated type - annotations = typing_extensions.get_args(maybe_annotated_type)[1:] - - for annotation in annotations: - if isinstance(annotation, FieldMetadata) and annotation.alias is not None: - return annotation.alias - return None - - -def _alias_key( - key: str, - type_: typing.Any, - direction: typing.Literal["read", "write"], - aliases_to_field_names: typing.Dict[str, str], -) -> str: - if direction == "read": - return aliases_to_field_names.get(key, key) - return _get_alias_from_type(type_=type_) or key diff --git a/seed/python-sdk/inline-types/src/seed/py.typed b/seed/python-sdk/inline-types/src/seed/py.typed deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/python-sdk/inline-types/src/seed/types/__init__.py b/seed/python-sdk/inline-types/src/seed/types/__init__.py deleted file mode 100644 index 5646342ae20..00000000000 --- a/seed/python-sdk/inline-types/src/seed/types/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from .inline_enum import InlineEnum -from .inline_type_1 import InlineType1 -from .inline_type_2 import InlineType2 -from .inlined_discriminated_union_1 import ( - InlinedDiscriminatedUnion1, - InlinedDiscriminatedUnion1_Type1, - InlinedDiscriminatedUnion1_Type2, -) -from .inlined_undiscriminated_union_1 import InlinedUndiscriminatedUnion1 -from .nested_inline_type_1 import NestedInlineType1 -from .root_type_1 import RootType1 - -__all__ = [ - "InlineEnum", - "InlineType1", - "InlineType2", - "InlinedDiscriminatedUnion1", - "InlinedDiscriminatedUnion1_Type1", - "InlinedDiscriminatedUnion1_Type2", - "InlinedUndiscriminatedUnion1", - "NestedInlineType1", - "RootType1", -] diff --git a/seed/python-sdk/inline-types/src/seed/types/inline_enum.py b/seed/python-sdk/inline-types/src/seed/types/inline_enum.py deleted file mode 100644 index 1692aa9af84..00000000000 --- a/seed/python-sdk/inline-types/src/seed/types/inline_enum.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -InlineEnum = typing.Union[typing.Literal["SUNNY", "CLOUDY", "RAINING", "SNOWING"], typing.Any] diff --git a/seed/python-sdk/inline-types/src/seed/types/inline_type_1.py b/seed/python-sdk/inline-types/src/seed/types/inline_type_1.py deleted file mode 100644 index 4ca2993183e..00000000000 --- a/seed/python-sdk/inline-types/src/seed/types/inline_type_1.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -from .nested_inline_type_1 import NestedInlineType1 -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class InlineType1(UniversalBaseModel): - foo: str - bar: NestedInlineType1 - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/seed/python-sdk/inline-types/src/seed/types/inline_type_2.py b/seed/python-sdk/inline-types/src/seed/types/inline_type_2.py deleted file mode 100644 index d865dc4db3c..00000000000 --- a/seed/python-sdk/inline-types/src/seed/types/inline_type_2.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class InlineType2(UniversalBaseModel): - baz: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/seed/python-sdk/inline-types/src/seed/types/inlined_discriminated_union_1.py b/seed/python-sdk/inline-types/src/seed/types/inlined_discriminated_union_1.py deleted file mode 100644 index 0cac47b71da..00000000000 --- a/seed/python-sdk/inline-types/src/seed/types/inlined_discriminated_union_1.py +++ /dev/null @@ -1,40 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -from ..core.pydantic_utilities import UniversalBaseModel -import typing -from .nested_inline_type_1 import NestedInlineType1 -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import pydantic - - -class InlinedDiscriminatedUnion1_Type1(UniversalBaseModel): - type: typing.Literal["type1"] = "type1" - foo: str - bar: NestedInlineType1 - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -class InlinedDiscriminatedUnion1_Type2(UniversalBaseModel): - type: typing.Literal["type2"] = "type2" - baz: str - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow - - -InlinedDiscriminatedUnion1 = typing.Union[InlinedDiscriminatedUnion1_Type1, InlinedDiscriminatedUnion1_Type2] diff --git a/seed/python-sdk/inline-types/src/seed/types/inlined_undiscriminated_union_1.py b/seed/python-sdk/inline-types/src/seed/types/inlined_undiscriminated_union_1.py deleted file mode 100644 index aaf1f02b5df..00000000000 --- a/seed/python-sdk/inline-types/src/seed/types/inlined_undiscriminated_union_1.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -from .inline_type_1 import InlineType1 -from .inline_type_2 import InlineType2 - -InlinedUndiscriminatedUnion1 = typing.Union[InlineType1, InlineType2] diff --git a/seed/python-sdk/inline-types/src/seed/types/nested_inline_type_1.py b/seed/python-sdk/inline-types/src/seed/types/nested_inline_type_1.py deleted file mode 100644 index 144be43eaa3..00000000000 --- a/seed/python-sdk/inline-types/src/seed/types/nested_inline_type_1.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -import typing_extensions -from .inline_enum import InlineEnum -from ..core.serialization import FieldMetadata -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class NestedInlineType1(UniversalBaseModel): - foo: str - bar: str - my_enum: typing_extensions.Annotated[InlineEnum, FieldMetadata(alias="myEnum")] - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/seed/python-sdk/inline-types/src/seed/types/root_type_1.py b/seed/python-sdk/inline-types/src/seed/types/root_type_1.py deleted file mode 100644 index e24e9d2237e..00000000000 --- a/seed/python-sdk/inline-types/src/seed/types/root_type_1.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from ..core.pydantic_utilities import UniversalBaseModel -from .inline_type_1 import InlineType1 -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -import typing -import pydantic - - -class RootType1(UniversalBaseModel): - foo: str - bar: InlineType1 - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/seed/python-sdk/inline-types/src/seed/version.py b/seed/python-sdk/inline-types/src/seed/version.py deleted file mode 100644 index 31ee46c0461..00000000000 --- a/seed/python-sdk/inline-types/src/seed/version.py +++ /dev/null @@ -1,3 +0,0 @@ -from importlib import metadata - -__version__ = metadata.version("fern_inline-types") diff --git a/seed/python-sdk/inline-types/tests/__init__.py b/seed/python-sdk/inline-types/tests/__init__.py deleted file mode 100644 index f3ea2659bb1..00000000000 --- a/seed/python-sdk/inline-types/tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - diff --git a/seed/python-sdk/inline-types/tests/conftest.py b/seed/python-sdk/inline-types/tests/conftest.py deleted file mode 100644 index bd27e8b59c3..00000000000 --- a/seed/python-sdk/inline-types/tests/conftest.py +++ /dev/null @@ -1,16 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from seed import SeedObject -import os -import pytest -from seed import AsyncSeedObject - - -@pytest.fixture -def client() -> SeedObject: - return SeedObject(base_url=os.getenv("TESTS_BASE_URL", "base_url")) - - -@pytest.fixture -def async_client() -> AsyncSeedObject: - return AsyncSeedObject(base_url=os.getenv("TESTS_BASE_URL", "base_url")) diff --git a/seed/python-sdk/inline-types/tests/custom/test_client.py b/seed/python-sdk/inline-types/tests/custom/test_client.py deleted file mode 100644 index 73f811f5ede..00000000000 --- a/seed/python-sdk/inline-types/tests/custom/test_client.py +++ /dev/null @@ -1,7 +0,0 @@ -import pytest - - -# Get started with writing tests with pytest at https://docs.pytest.org -@pytest.mark.skip(reason="Unimplemented") -def test_client() -> None: - assert True == True diff --git a/seed/python-sdk/inline-types/tests/test_root.py b/seed/python-sdk/inline-types/tests/test_root.py deleted file mode 100644 index 2730cff73c4..00000000000 --- a/seed/python-sdk/inline-types/tests/test_root.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from seed import SeedObject -from seed import AsyncSeedObject -import typing -from seed import InlineType1 -from seed import NestedInlineType1 -from .utilities import validate_response - - -async def test_get_root(client: SeedObject, async_client: AsyncSeedObject) -> None: - expected_response: typing.Any = { - "foo": "foo", - "bar": {"foo": "foo", "bar": {"foo": "foo", "bar": "bar", "myEnum": "SUNNY"}}, - } - expected_types: typing.Any = {"foo": None, "bar": {"foo": None, "bar": {"foo": None, "bar": None, "myEnum": None}}} - response = client.get_root( - bar=InlineType1(foo="foo", bar=NestedInlineType1(foo="foo", bar="bar", my_enum="SUNNY")), foo="foo" - ) - validate_response(response, expected_response, expected_types) - - async_response = await async_client.get_root( - bar=InlineType1(foo="foo", bar=NestedInlineType1(foo="foo", bar="bar", my_enum="SUNNY")), foo="foo" - ) - validate_response(async_response, expected_response, expected_types) diff --git a/seed/python-sdk/inline-types/tests/utilities.py b/seed/python-sdk/inline-types/tests/utilities.py deleted file mode 100644 index 3d228806a9c..00000000000 --- a/seed/python-sdk/inline-types/tests/utilities.py +++ /dev/null @@ -1,162 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import uuid - -from dateutil import parser - -import pydantic - - -def cast_field(json_expectation: typing.Any, type_expectation: typing.Any) -> typing.Any: - # Cast these specific types which come through as string and expect our - # models to cast to the correct type. - if type_expectation == "uuid": - return uuid.UUID(json_expectation) - elif type_expectation == "date": - return parser.parse(json_expectation).date() - elif type_expectation == "datetime": - return parser.parse(json_expectation) - elif type_expectation == "set": - return set(json_expectation) - elif type_expectation == "integer": - # Necessary as we allow numeric keys, but JSON makes them strings - return int(json_expectation) - - return json_expectation - - -def validate_field(response: typing.Any, json_expectation: typing.Any, type_expectation: typing.Any) -> None: - # Allow for an escape hatch if the object cannot be validated - if type_expectation == "no_validate": - return - - is_container_of_complex_type = False - # Parse types in containers, note that dicts are handled within `validate_response` - if isinstance(json_expectation, list): - if isinstance(type_expectation, tuple): - container_expectation = type_expectation[0] - contents_expectation = type_expectation[1] - - cast_json_expectation = [] - for idx, ex in enumerate(json_expectation): - if isinstance(contents_expectation, dict): - entry_expectation = contents_expectation.get(idx) - if isinstance(entry_expectation, dict): - is_container_of_complex_type = True - validate_response( - response=response[idx], - json_expectation=ex, - type_expectations=entry_expectation, - ) - else: - cast_json_expectation.append(cast_field(ex, entry_expectation)) - else: - cast_json_expectation.append(ex) - json_expectation = cast_json_expectation - - # Note that we explicitly do not allow for sets of pydantic models as they are not hashable, so - # if any of the values of the set have a type_expectation of a dict, we're assuming it's a pydantic - # model and keeping it a list. - if container_expectation != "set" or not any( - map( - lambda value: isinstance(value, dict), - list(contents_expectation.values()), - ) - ): - json_expectation = cast_field(json_expectation, container_expectation) - elif isinstance(type_expectation, tuple): - container_expectation = type_expectation[0] - contents_expectation = type_expectation[1] - if isinstance(contents_expectation, dict): - json_expectation = { - cast_field( - key, - contents_expectation.get(idx)[0] # type: ignore - if contents_expectation.get(idx) is not None - else None, - ): cast_field( - value, - contents_expectation.get(idx)[1] # type: ignore - if contents_expectation.get(idx) is not None - else None, - ) - for idx, (key, value) in enumerate(json_expectation.items()) - } - else: - json_expectation = cast_field(json_expectation, container_expectation) - elif type_expectation is not None: - json_expectation = cast_field(json_expectation, type_expectation) - - # When dealing with containers of models, etc. we're validating them implicitly, so no need to check the resultant list - if not is_container_of_complex_type: - assert ( - json_expectation == response - ), "Primitives found, expected: {0} (type: {1}), Actual: {2} (type: {3})".format( - json_expectation, type(json_expectation), response, type(response) - ) - - -# Arg type_expectations is a deeply nested structure that matches the response, but with the values replaced with the expected types -def validate_response(response: typing.Any, json_expectation: typing.Any, type_expectations: typing.Any) -> None: - # Allow for an escape hatch if the object cannot be validated - if type_expectations == "no_validate": - return - - if ( - not isinstance(response, list) - and not isinstance(response, dict) - and not issubclass(type(response), pydantic.BaseModel) - ): - validate_field( - response=response, - json_expectation=json_expectation, - type_expectation=type_expectations, - ) - return - - if isinstance(response, list): - assert len(response) == len(json_expectation), "Length mismatch, expected: {0}, Actual: {1}".format( - len(response), len(json_expectation) - ) - content_expectation = type_expectations - if isinstance(type_expectations, tuple): - content_expectation = type_expectations[1] - for idx, item in enumerate(response): - validate_response( - response=item, - json_expectation=json_expectation[idx], - type_expectations=content_expectation[idx], - ) - else: - response_json = response - if issubclass(type(response), pydantic.BaseModel): - response_json = response.dict(by_alias=True) - - for key, value in json_expectation.items(): - assert key in response_json, "Field {0} not found within the response object: {1}".format( - key, response_json - ) - - type_expectation = None - if type_expectations is not None and isinstance(type_expectations, dict): - type_expectation = type_expectations.get(key) - - # If your type_expectation is a tuple then you have a container field, process it as such - # Otherwise, we're just validating a single field that's a pydantic model. - if isinstance(value, dict) and not isinstance(type_expectation, tuple): - validate_response( - response=response_json[key], - json_expectation=value, - type_expectations=type_expectation, - ) - else: - validate_field( - response=response_json[key], - json_expectation=value, - type_expectation=type_expectation, - ) - - # Ensure there are no additional fields here either - del response_json[key] - assert len(response_json) == 0, "Additional fields found, expected None: {0}".format(response_json) diff --git a/seed/python-sdk/inline-types/tests/utils/__init__.py b/seed/python-sdk/inline-types/tests/utils/__init__.py deleted file mode 100644 index f3ea2659bb1..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - diff --git a/seed/python-sdk/inline-types/tests/utils/assets/models/__init__.py b/seed/python-sdk/inline-types/tests/utils/assets/models/__init__.py deleted file mode 100644 index 3a1c852e71e..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/assets/models/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# This file was auto-generated by Fern from our API Definition. - -from .circle import CircleParams -from .object_with_defaults import ObjectWithDefaultsParams -from .object_with_optional_field import ObjectWithOptionalFieldParams -from .shape import ShapeParams, Shape_CircleParams, Shape_SquareParams -from .square import SquareParams -from .undiscriminated_shape import UndiscriminatedShapeParams - -__all__ = [ - "CircleParams", - "ObjectWithDefaultsParams", - "ObjectWithOptionalFieldParams", - "ShapeParams", - "Shape_CircleParams", - "Shape_SquareParams", - "SquareParams", - "UndiscriminatedShapeParams", -] diff --git a/seed/python-sdk/inline-types/tests/utils/assets/models/circle.py b/seed/python-sdk/inline-types/tests/utils/assets/models/circle.py deleted file mode 100644 index 6522dc58c5a..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/assets/models/circle.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# This file was auto-generated by Fern from our API Definition. - -import typing_extensions -import typing_extensions -from seed.core.serialization import FieldMetadata - - -class CircleParams(typing_extensions.TypedDict): - radius_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="radiusMeasurement")] diff --git a/seed/python-sdk/inline-types/tests/utils/assets/models/color.py b/seed/python-sdk/inline-types/tests/utils/assets/models/color.py deleted file mode 100644 index 2aa2c4c52f0..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/assets/models/color.py +++ /dev/null @@ -1,7 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# This file was auto-generated by Fern from our API Definition. - -import typing - -Color = typing.Union[typing.Literal["red", "blue"], typing.Any] diff --git a/seed/python-sdk/inline-types/tests/utils/assets/models/object_with_defaults.py b/seed/python-sdk/inline-types/tests/utils/assets/models/object_with_defaults.py deleted file mode 100644 index ef14f7b2c9d..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/assets/models/object_with_defaults.py +++ /dev/null @@ -1,16 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# This file was auto-generated by Fern from our API Definition. - -import typing_extensions -import typing_extensions - - -class ObjectWithDefaultsParams(typing_extensions.TypedDict): - """ - Defines properties with default values and validation rules. - """ - - decimal: typing_extensions.NotRequired[float] - string: typing_extensions.NotRequired[str] - required_string: str diff --git a/seed/python-sdk/inline-types/tests/utils/assets/models/object_with_optional_field.py b/seed/python-sdk/inline-types/tests/utils/assets/models/object_with_optional_field.py deleted file mode 100644 index fc5a379b967..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/assets/models/object_with_optional_field.py +++ /dev/null @@ -1,34 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# This file was auto-generated by Fern from our API Definition. - -import typing_extensions -import typing -import typing_extensions -from seed.core.serialization import FieldMetadata -import datetime as dt -import uuid -from .color import Color -from .shape import ShapeParams -from .undiscriminated_shape import UndiscriminatedShapeParams - - -class ObjectWithOptionalFieldParams(typing_extensions.TypedDict): - literal: typing.Literal["lit_one"] - string: typing_extensions.NotRequired[str] - integer: typing_extensions.NotRequired[int] - long_: typing_extensions.NotRequired[typing_extensions.Annotated[int, FieldMetadata(alias="long")]] - double: typing_extensions.NotRequired[float] - bool_: typing_extensions.NotRequired[typing_extensions.Annotated[bool, FieldMetadata(alias="bool")]] - datetime: typing_extensions.NotRequired[dt.datetime] - date: typing_extensions.NotRequired[dt.date] - uuid_: typing_extensions.NotRequired[typing_extensions.Annotated[uuid.UUID, FieldMetadata(alias="uuid")]] - base_64: typing_extensions.NotRequired[typing_extensions.Annotated[str, FieldMetadata(alias="base64")]] - list_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Sequence[str], FieldMetadata(alias="list")]] - set_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Set[str], FieldMetadata(alias="set")]] - map_: typing_extensions.NotRequired[typing_extensions.Annotated[typing.Dict[int, str], FieldMetadata(alias="map")]] - enum: typing_extensions.NotRequired[Color] - union: typing_extensions.NotRequired[ShapeParams] - second_union: typing_extensions.NotRequired[ShapeParams] - undiscriminated_union: typing_extensions.NotRequired[UndiscriminatedShapeParams] - any: typing.Optional[typing.Any] diff --git a/seed/python-sdk/inline-types/tests/utils/assets/models/shape.py b/seed/python-sdk/inline-types/tests/utils/assets/models/shape.py deleted file mode 100644 index ae113ae0609..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/assets/models/shape.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations -import typing_extensions -import typing_extensions -import typing -from seed.core.serialization import FieldMetadata - - -class Base(typing_extensions.TypedDict): - id: str - - -class Shape_CircleParams(Base): - shape_type: typing_extensions.Annotated[typing.Literal["circle"], FieldMetadata(alias="shapeType")] - radius_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="radiusMeasurement")] - - -class Shape_SquareParams(Base): - shape_type: typing_extensions.Annotated[typing.Literal["square"], FieldMetadata(alias="shapeType")] - length_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="lengthMeasurement")] - - -ShapeParams = typing.Union[Shape_CircleParams, Shape_SquareParams] diff --git a/seed/python-sdk/inline-types/tests/utils/assets/models/square.py b/seed/python-sdk/inline-types/tests/utils/assets/models/square.py deleted file mode 100644 index 7f6f79a3ddc..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/assets/models/square.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# This file was auto-generated by Fern from our API Definition. - -import typing_extensions -import typing_extensions -from seed.core.serialization import FieldMetadata - - -class SquareParams(typing_extensions.TypedDict): - length_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="lengthMeasurement")] diff --git a/seed/python-sdk/inline-types/tests/utils/assets/models/undiscriminated_shape.py b/seed/python-sdk/inline-types/tests/utils/assets/models/undiscriminated_shape.py deleted file mode 100644 index 68876a23c38..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/assets/models/undiscriminated_shape.py +++ /dev/null @@ -1,9 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -# This file was auto-generated by Fern from our API Definition. - -import typing -from .circle import CircleParams -from .square import SquareParams - -UndiscriminatedShapeParams = typing.Union[CircleParams, SquareParams] diff --git a/seed/python-sdk/inline-types/tests/utils/test_http_client.py b/seed/python-sdk/inline-types/tests/utils/test_http_client.py deleted file mode 100644 index a541bae6531..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/test_http_client.py +++ /dev/null @@ -1,61 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from seed.core.http_client import get_request_body -from seed.core.request_options import RequestOptions - - -def get_request_options() -> RequestOptions: - return {"additional_body_parameters": {"see you": "later"}} - - -def test_get_json_request_body() -> None: - json_body, data_body = get_request_body(json={"hello": "world"}, data=None, request_options=None, omit=None) - assert json_body == {"hello": "world"} - assert data_body is None - - json_body_extras, data_body_extras = get_request_body( - json={"goodbye": "world"}, data=None, request_options=get_request_options(), omit=None - ) - - assert json_body_extras == {"goodbye": "world", "see you": "later"} - assert data_body_extras is None - - -def test_get_files_request_body() -> None: - json_body, data_body = get_request_body(json=None, data={"hello": "world"}, request_options=None, omit=None) - assert data_body == {"hello": "world"} - assert json_body is None - - json_body_extras, data_body_extras = get_request_body( - json=None, data={"goodbye": "world"}, request_options=get_request_options(), omit=None - ) - - assert data_body_extras == {"goodbye": "world", "see you": "later"} - assert json_body_extras is None - - -def test_get_none_request_body() -> None: - json_body, data_body = get_request_body(json=None, data=None, request_options=None, omit=None) - assert data_body is None - assert json_body is None - - json_body_extras, data_body_extras = get_request_body( - json=None, data=None, request_options=get_request_options(), omit=None - ) - - assert json_body_extras == {"see you": "later"} - assert data_body_extras is None - - -def test_get_empty_json_request_body() -> None: - unrelated_request_options: RequestOptions = {"max_retries": 3} - json_body, data_body = get_request_body(json=None, data=None, request_options=unrelated_request_options, omit=None) - assert json_body is None - assert data_body is None - - json_body_extras, data_body_extras = get_request_body( - json={}, data=None, request_options=unrelated_request_options, omit=None - ) - - assert json_body_extras is None - assert data_body_extras is None diff --git a/seed/python-sdk/inline-types/tests/utils/test_query_encoding.py b/seed/python-sdk/inline-types/tests/utils/test_query_encoding.py deleted file mode 100644 index e075394a502..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/test_query_encoding.py +++ /dev/null @@ -1,37 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - - -from seed.core.query_encoder import encode_query - - -def test_query_encoding_deep_objects() -> None: - assert encode_query({"hello world": "hello world"}) == [("hello world", "hello world")] - assert encode_query({"hello_world": {"hello": "world"}}) == [("hello_world[hello]", "world")] - assert encode_query({"hello_world": {"hello": {"world": "today"}, "test": "this"}, "hi": "there"}) == [ - ("hello_world[hello][world]", "today"), - ("hello_world[test]", "this"), - ("hi", "there"), - ] - - -def test_query_encoding_deep_object_arrays() -> None: - assert encode_query({"objects": [{"key": "hello", "value": "world"}, {"key": "foo", "value": "bar"}]}) == [ - ("objects[key]", "hello"), - ("objects[value]", "world"), - ("objects[key]", "foo"), - ("objects[value]", "bar"), - ] - assert encode_query( - {"users": [{"name": "string", "tags": ["string"]}, {"name": "string2", "tags": ["string2", "string3"]}]} - ) == [ - ("users[name]", "string"), - ("users[tags]", "string"), - ("users[name]", "string2"), - ("users[tags]", "string2"), - ("users[tags]", "string3"), - ] - - -def test_encode_query_with_none() -> None: - encoded = encode_query(None) - assert encoded == None diff --git a/seed/python-sdk/inline-types/tests/utils/test_serialization.py b/seed/python-sdk/inline-types/tests/utils/test_serialization.py deleted file mode 100644 index dd74836366c..00000000000 --- a/seed/python-sdk/inline-types/tests/utils/test_serialization.py +++ /dev/null @@ -1,72 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from typing import List, Any - -from seed.core.serialization import convert_and_respect_annotation_metadata -from .assets.models import ShapeParams, ObjectWithOptionalFieldParams - - -UNION_TEST: ShapeParams = {"radius_measurement": 1.0, "shape_type": "circle", "id": "1"} -UNION_TEST_CONVERTED = {"shapeType": "circle", "radiusMeasurement": 1.0, "id": "1"} - - -def test_convert_and_respect_annotation_metadata() -> None: - data: ObjectWithOptionalFieldParams = { - "string": "string", - "long_": 12345, - "bool_": True, - "literal": "lit_one", - "any": "any", - } - converted = convert_and_respect_annotation_metadata( - object_=data, annotation=ObjectWithOptionalFieldParams, direction="write" - ) - assert converted == {"string": "string", "long": 12345, "bool": True, "literal": "lit_one", "any": "any"} - - -def test_convert_and_respect_annotation_metadata_in_list() -> None: - data: List[ObjectWithOptionalFieldParams] = [ - {"string": "string", "long_": 12345, "bool_": True, "literal": "lit_one", "any": "any"}, - {"string": "another string", "long_": 67890, "list_": [], "literal": "lit_one", "any": "any"}, - ] - converted = convert_and_respect_annotation_metadata( - object_=data, annotation=List[ObjectWithOptionalFieldParams], direction="write" - ) - - assert converted == [ - {"string": "string", "long": 12345, "bool": True, "literal": "lit_one", "any": "any"}, - {"string": "another string", "long": 67890, "list": [], "literal": "lit_one", "any": "any"}, - ] - - -def test_convert_and_respect_annotation_metadata_in_nested_object() -> None: - data: ObjectWithOptionalFieldParams = { - "string": "string", - "long_": 12345, - "union": UNION_TEST, - "literal": "lit_one", - "any": "any", - } - converted = convert_and_respect_annotation_metadata( - object_=data, annotation=ObjectWithOptionalFieldParams, direction="write" - ) - - assert converted == { - "string": "string", - "long": 12345, - "union": UNION_TEST_CONVERTED, - "literal": "lit_one", - "any": "any", - } - - -def test_convert_and_respect_annotation_metadata_in_union() -> None: - converted = convert_and_respect_annotation_metadata(object_=UNION_TEST, annotation=ShapeParams, direction="write") - - assert converted == UNION_TEST_CONVERTED - - -def test_convert_and_respect_annotation_metadata_with_empty_object() -> None: - data: Any = {} - converted = convert_and_respect_annotation_metadata(object_=data, annotation=ShapeParams, direction="write") - assert converted == data diff --git a/seed/ruby-model/inline-types/.mock/definition/__package__.yml b/seed/ruby-model/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/ruby-model/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/ruby-model/inline-types/.mock/definition/api.yml b/seed/ruby-model/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/ruby-model/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/ruby-model/inline-types/.mock/fern.config.json b/seed/ruby-model/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/ruby-model/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/ruby-model/inline-types/.mock/generators.yml b/seed/ruby-model/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/ruby-model/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/ruby-model/inline-types/.rubocop.yml b/seed/ruby-model/inline-types/.rubocop.yml deleted file mode 100644 index c1d2344d6e6..00000000000 --- a/seed/ruby-model/inline-types/.rubocop.yml +++ /dev/null @@ -1,36 +0,0 @@ -AllCops: - TargetRubyVersion: 2.7 - -Style/StringLiterals: - Enabled: true - EnforcedStyle: double_quotes - -Style/StringLiteralsInInterpolation: - Enabled: true - EnforcedStyle: double_quotes - -Layout/FirstHashElementLineBreak: - Enabled: true - -Layout/MultilineHashKeyLineBreaks: - Enabled: true - -# Generated files may be more complex than standard, disable -# these rules for now as a known limitation. -Metrics/ParameterLists: - Enabled: false - -Metrics/MethodLength: - Enabled: false - -Metrics/AbcSize: - Enabled: false - -Metrics/ClassLength: - Enabled: false - -Metrics/CyclomaticComplexity: - Enabled: false - -Metrics/PerceivedComplexity: - Enabled: false diff --git a/seed/ruby-model/inline-types/Gemfile b/seed/ruby-model/inline-types/Gemfile deleted file mode 100644 index 49bd9cd0173..00000000000 --- a/seed/ruby-model/inline-types/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" - -gemspec - -gem "minitest", "~> 5.0" -gem "rake", "~> 13.0" -gem "rubocop", "~> 1.21" diff --git a/seed/ruby-model/inline-types/Rakefile b/seed/ruby-model/inline-types/Rakefile deleted file mode 100644 index 2bdbce0cf2c..00000000000 --- a/seed/ruby-model/inline-types/Rakefile +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -require "rake/testtask" -require "rubocop/rake_task" - -task default: %i[test rubocop] - -Rake::TestTask.new do |t| - t.pattern = "./test/**/test_*.rb" -end - -RuboCop::RakeTask.new diff --git a/seed/ruby-model/inline-types/lib/gemconfig.rb b/seed/ruby-model/inline-types/lib/gemconfig.rb deleted file mode 100644 index d90831f0fcd..00000000000 --- a/seed/ruby-model/inline-types/lib/gemconfig.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module SeedObjectClient - module Gemconfig - VERSION = "" - AUTHORS = [""].freeze - EMAIL = "" - SUMMARY = "" - DESCRIPTION = "" - HOMEPAGE = "https://github.com/REPO/URL" - SOURCE_CODE_URI = "https://github.com/REPO/URL" - CHANGELOG_URI = "https://github.com/REPO/URL/blob/master/CHANGELOG.md" - end -end diff --git a/seed/ruby-model/inline-types/lib/seed_object_client.rb b/seed/ruby-model/inline-types/lib/seed_object_client.rb deleted file mode 100644 index 8ea9b99068b..00000000000 --- a/seed/ruby-model/inline-types/lib/seed_object_client.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -require_relative "seed_object_client/types/root_type_1" -require_relative "seed_object_client/types/inline_type_1" -require_relative "seed_object_client/types/inline_type_2" -require_relative "seed_object_client/types/nested_inline_type_1" -require_relative "seed_object_client/types/inlined_discriminated_union_1" -require_relative "seed_object_client/types/inlined_undiscriminated_union_1" -require_relative "seed_object_client/types/inline_enum" diff --git a/seed/ruby-model/inline-types/lib/seed_object_client/types/inline_enum.rb b/seed/ruby-model/inline-types/lib/seed_object_client/types/inline_enum.rb deleted file mode 100644 index c5cc415cac6..00000000000 --- a/seed/ruby-model/inline-types/lib/seed_object_client/types/inline_enum.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -module SeedObjectClient - class InlineEnum - SUNNY = "SUNNY" - CLOUDY = "CLOUDY" - RAINING = "RAINING" - SNOWING = "SNOWING" - end -end diff --git a/seed/ruby-model/inline-types/lib/seed_object_client/types/inline_type_1.rb b/seed/ruby-model/inline-types/lib/seed_object_client/types/inline_type_1.rb deleted file mode 100644 index b2f58248832..00000000000 --- a/seed/ruby-model/inline-types/lib/seed_object_client/types/inline_type_1.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -require_relative "nested_inline_type_1" -require "ostruct" -require "json" - -module SeedObjectClient - class InlineType1 - # @return [String] - attr_reader :foo - # @return [SeedObjectClient::NestedInlineType1] - attr_reader :bar - # @return [OpenStruct] Additional properties unmapped to the current class definition - attr_reader :additional_properties - # @return [Object] - attr_reader :_field_set - protected :_field_set - - OMIT = Object.new - - # @param foo [String] - # @param bar [SeedObjectClient::NestedInlineType1] - # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition - # @return [SeedObjectClient::InlineType1] - def initialize(foo:, bar:, additional_properties: nil) - @foo = foo - @bar = bar - @additional_properties = additional_properties - @_field_set = { "foo": foo, "bar": bar } - end - - # Deserialize a JSON object to an instance of InlineType1 - # - # @param json_object [String] - # @return [SeedObjectClient::InlineType1] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - parsed_json = JSON.parse(json_object) - foo = parsed_json["foo"] - if parsed_json["bar"].nil? - bar = nil - else - bar = parsed_json["bar"].to_json - bar = SeedObjectClient::NestedInlineType1.from_json(json_object: bar) - end - new( - foo: foo, - bar: bar, - additional_properties: struct - ) - end - - # Serialize an instance of InlineType1 to a JSON object - # - # @return [String] - def to_json(*_args) - @_field_set&.to_json - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - obj.foo.is_a?(String) != false || raise("Passed value for field obj.foo is not the expected type, validation failed.") - SeedObjectClient::NestedInlineType1.validate_raw(obj: obj.bar) - end - end -end diff --git a/seed/ruby-model/inline-types/lib/seed_object_client/types/inline_type_2.rb b/seed/ruby-model/inline-types/lib/seed_object_client/types/inline_type_2.rb deleted file mode 100644 index 232e0e5f47f..00000000000 --- a/seed/ruby-model/inline-types/lib/seed_object_client/types/inline_type_2.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -require "ostruct" -require "json" - -module SeedObjectClient - class InlineType2 - # @return [String] - attr_reader :baz - # @return [OpenStruct] Additional properties unmapped to the current class definition - attr_reader :additional_properties - # @return [Object] - attr_reader :_field_set - protected :_field_set - - OMIT = Object.new - - # @param baz [String] - # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition - # @return [SeedObjectClient::InlineType2] - def initialize(baz:, additional_properties: nil) - @baz = baz - @additional_properties = additional_properties - @_field_set = { "baz": baz } - end - - # Deserialize a JSON object to an instance of InlineType2 - # - # @param json_object [String] - # @return [SeedObjectClient::InlineType2] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - parsed_json = JSON.parse(json_object) - baz = parsed_json["baz"] - new(baz: baz, additional_properties: struct) - end - - # Serialize an instance of InlineType2 to a JSON object - # - # @return [String] - def to_json(*_args) - @_field_set&.to_json - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - obj.baz.is_a?(String) != false || raise("Passed value for field obj.baz is not the expected type, validation failed.") - end - end -end diff --git a/seed/ruby-model/inline-types/lib/seed_object_client/types/inlined_discriminated_union_1.rb b/seed/ruby-model/inline-types/lib/seed_object_client/types/inlined_discriminated_union_1.rb deleted file mode 100644 index 8efbcfeb3bf..00000000000 --- a/seed/ruby-model/inline-types/lib/seed_object_client/types/inlined_discriminated_union_1.rb +++ /dev/null @@ -1,94 +0,0 @@ -# frozen_string_literal: true - -require "json" -require_relative "inline_type_1" -require_relative "inline_type_2" - -module SeedObjectClient - class InlinedDiscriminatedUnion1 - # @return [Object] - attr_reader :member - # @return [String] - attr_reader :discriminant - - private_class_method :new - alias kind_of? is_a? - - # @param member [Object] - # @param discriminant [String] - # @return [SeedObjectClient::InlinedDiscriminatedUnion1] - def initialize(member:, discriminant:) - @member = member - @discriminant = discriminant - end - - # Deserialize a JSON object to an instance of InlinedDiscriminatedUnion1 - # - # @param json_object [String] - # @return [SeedObjectClient::InlinedDiscriminatedUnion1] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - member = case struct.type - when "type1" - SeedObjectClient::InlineType1.from_json(json_object: json_object) - when "type2" - SeedObjectClient::InlineType2.from_json(json_object: json_object) - else - SeedObjectClient::InlineType1.from_json(json_object: json_object) - end - new(member: member, discriminant: struct.type) - end - - # For Union Types, to_json functionality is delegated to the wrapped member. - # - # @return [String] - def to_json(*_args) - case @discriminant - when "type1" - { **@member.to_json, type: @discriminant }.to_json - when "type2" - { **@member.to_json, type: @discriminant }.to_json - else - { "type": @discriminant, value: @member }.to_json - end - @member.to_json - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - case obj.type - when "type1" - SeedObjectClient::InlineType1.validate_raw(obj: obj) - when "type2" - SeedObjectClient::InlineType2.validate_raw(obj: obj) - else - raise("Passed value matched no type within the union, validation failed.") - end - end - - # For Union Types, is_a? functionality is delegated to the wrapped member. - # - # @param obj [Object] - # @return [Boolean] - def is_a?(obj) - @member.is_a?(obj) - end - - # @param member [SeedObjectClient::InlineType1] - # @return [SeedObjectClient::InlinedDiscriminatedUnion1] - def self.type_1(member:) - new(member: member, discriminant: "type1") - end - - # @param member [SeedObjectClient::InlineType2] - # @return [SeedObjectClient::InlinedDiscriminatedUnion1] - def self.type_2(member:) - new(member: member, discriminant: "type2") - end - end -end diff --git a/seed/ruby-model/inline-types/lib/seed_object_client/types/inlined_undiscriminated_union_1.rb b/seed/ruby-model/inline-types/lib/seed_object_client/types/inlined_undiscriminated_union_1.rb deleted file mode 100644 index ec4ef8064b6..00000000000 --- a/seed/ruby-model/inline-types/lib/seed_object_client/types/inlined_undiscriminated_union_1.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -require "json" -require_relative "inline_type_1" -require_relative "inline_type_2" - -module SeedObjectClient - class InlinedUndiscriminatedUnion1 - # Deserialize a JSON object to an instance of InlinedUndiscriminatedUnion1 - # - # @param json_object [String] - # @return [SeedObjectClient::InlinedUndiscriminatedUnion1] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - begin - SeedObjectClient::InlineType1.validate_raw(obj: struct) - return SeedObjectClient::InlineType1.from_json(json_object: struct) unless struct.nil? - - return nil - rescue StandardError - # noop - end - begin - SeedObjectClient::InlineType2.validate_raw(obj: struct) - return SeedObjectClient::InlineType2.from_json(json_object: struct) unless struct.nil? - - return nil - rescue StandardError - # noop - end - struct - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - begin - return SeedObjectClient::InlineType1.validate_raw(obj: obj) - rescue StandardError - # noop - end - begin - return SeedObjectClient::InlineType2.validate_raw(obj: obj) - rescue StandardError - # noop - end - raise("Passed value matched no type within the union, validation failed.") - end - end -end diff --git a/seed/ruby-model/inline-types/lib/seed_object_client/types/nested_inline_type_1.rb b/seed/ruby-model/inline-types/lib/seed_object_client/types/nested_inline_type_1.rb deleted file mode 100644 index 863971a0fa7..00000000000 --- a/seed/ruby-model/inline-types/lib/seed_object_client/types/nested_inline_type_1.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -require_relative "inline_enum" -require "ostruct" -require "json" - -module SeedObjectClient - class NestedInlineType1 - # @return [String] - attr_reader :foo - # @return [String] - attr_reader :bar - # @return [SeedObjectClient::InlineEnum] - attr_reader :my_enum - # @return [OpenStruct] Additional properties unmapped to the current class definition - attr_reader :additional_properties - # @return [Object] - attr_reader :_field_set - protected :_field_set - - OMIT = Object.new - - # @param foo [String] - # @param bar [String] - # @param my_enum [SeedObjectClient::InlineEnum] - # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition - # @return [SeedObjectClient::NestedInlineType1] - def initialize(foo:, bar:, my_enum:, additional_properties: nil) - @foo = foo - @bar = bar - @my_enum = my_enum - @additional_properties = additional_properties - @_field_set = { "foo": foo, "bar": bar, "myEnum": my_enum } - end - - # Deserialize a JSON object to an instance of NestedInlineType1 - # - # @param json_object [String] - # @return [SeedObjectClient::NestedInlineType1] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - parsed_json = JSON.parse(json_object) - foo = parsed_json["foo"] - bar = parsed_json["bar"] - my_enum = parsed_json["myEnum"] - new( - foo: foo, - bar: bar, - my_enum: my_enum, - additional_properties: struct - ) - end - - # Serialize an instance of NestedInlineType1 to a JSON object - # - # @return [String] - def to_json(*_args) - @_field_set&.to_json - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - obj.foo.is_a?(String) != false || raise("Passed value for field obj.foo is not the expected type, validation failed.") - obj.bar.is_a?(String) != false || raise("Passed value for field obj.bar is not the expected type, validation failed.") - obj.my_enum.is_a?(SeedObjectClient::InlineEnum) != false || raise("Passed value for field obj.my_enum is not the expected type, validation failed.") - end - end -end diff --git a/seed/ruby-model/inline-types/lib/seed_object_client/types/root_type_1.rb b/seed/ruby-model/inline-types/lib/seed_object_client/types/root_type_1.rb deleted file mode 100644 index a17734f2980..00000000000 --- a/seed/ruby-model/inline-types/lib/seed_object_client/types/root_type_1.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -require_relative "inline_type_1" -require "ostruct" -require "json" - -module SeedObjectClient - class RootType1 - # @return [String] - attr_reader :foo - # @return [SeedObjectClient::InlineType1] - attr_reader :bar - # @return [OpenStruct] Additional properties unmapped to the current class definition - attr_reader :additional_properties - # @return [Object] - attr_reader :_field_set - protected :_field_set - - OMIT = Object.new - - # @param foo [String] - # @param bar [SeedObjectClient::InlineType1] - # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition - # @return [SeedObjectClient::RootType1] - def initialize(foo:, bar:, additional_properties: nil) - @foo = foo - @bar = bar - @additional_properties = additional_properties - @_field_set = { "foo": foo, "bar": bar } - end - - # Deserialize a JSON object to an instance of RootType1 - # - # @param json_object [String] - # @return [SeedObjectClient::RootType1] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - parsed_json = JSON.parse(json_object) - foo = parsed_json["foo"] - if parsed_json["bar"].nil? - bar = nil - else - bar = parsed_json["bar"].to_json - bar = SeedObjectClient::InlineType1.from_json(json_object: bar) - end - new( - foo: foo, - bar: bar, - additional_properties: struct - ) - end - - # Serialize an instance of RootType1 to a JSON object - # - # @return [String] - def to_json(*_args) - @_field_set&.to_json - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - obj.foo.is_a?(String) != false || raise("Passed value for field obj.foo is not the expected type, validation failed.") - SeedObjectClient::InlineType1.validate_raw(obj: obj.bar) - end - end -end diff --git a/seed/ruby-model/inline-types/seed_object_client.gemspec b/seed/ruby-model/inline-types/seed_object_client.gemspec deleted file mode 100644 index d3b0d2a70a4..00000000000 --- a/seed/ruby-model/inline-types/seed_object_client.gemspec +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -require_relative "lib/gemconfig" - -Gem::Specification.new do |spec| - spec.name = "seed_object_client" - spec.version = SeedObjectClient::Gemconfig::VERSION - spec.authors = SeedObjectClient::Gemconfig::AUTHORS - spec.email = SeedObjectClient::Gemconfig::EMAIL - spec.summary = SeedObjectClient::Gemconfig::SUMMARY - spec.description = SeedObjectClient::Gemconfig::DESCRIPTION - spec.homepage = SeedObjectClient::Gemconfig::HOMEPAGE - spec.required_ruby_version = ">= 2.7.0" - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = SeedObjectClient::Gemconfig::SOURCE_CODE_URI - spec.metadata["changelog_uri"] = SeedObjectClient::Gemconfig::CHANGELOG_URI - spec.files = Dir.glob("lib/**/*") - spec.bindir = "exe" - spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } - spec.require_paths = ["lib"] -end diff --git a/seed/ruby-model/inline-types/snippet-templates.json b/seed/ruby-model/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/ruby-model/inline-types/snippet.json b/seed/ruby-model/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/ruby-model/inline-types/test/test_helper.rb b/seed/ruby-model/inline-types/test/test_helper.rb deleted file mode 100644 index 30691efbd9e..00000000000 --- a/seed/ruby-model/inline-types/test/test_helper.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -$LOAD_PATH.unshift File.expand_path("../lib", __dir__) - -require "minitest/autorun" -require "seed_object_client" diff --git a/seed/ruby-model/inline-types/test/test_seed_object_client.rb b/seed/ruby-model/inline-types/test/test_seed_object_client.rb deleted file mode 100644 index d44f9b1e8ec..00000000000 --- a/seed/ruby-model/inline-types/test/test_seed_object_client.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -require_relative "test_helper" -require "seed_object_client" - -# Basic SeedObjectClient tests -class TestSeedObjectClient < Minitest::Test - def test_function - # SeedObjectClient::Client.new - end -end diff --git a/seed/ruby-sdk/inline-types/.github/workflows/publish.yml b/seed/ruby-sdk/inline-types/.github/workflows/publish.yml deleted file mode 100644 index ba4ed2d9e2d..00000000000 --- a/seed/ruby-sdk/inline-types/.github/workflows/publish.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Publish - -on: [push] -jobs: - publish: - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.7 - bundler-cache: true - - - name: Test gem - run: bundle install && bundle exec rake test - - - name: Build and Push Gem - env: - GEM_HOST_API_KEY: ${{ secrets. }} - run: | - gem build fern_inline_types.gemspec - - gem push fern_inline_types-*.gem --host diff --git a/seed/ruby-sdk/inline-types/.gitignore b/seed/ruby-sdk/inline-types/.gitignore deleted file mode 100644 index a97c182a2e1..00000000000 --- a/seed/ruby-sdk/inline-types/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/.bundle/ -/.yardoc -/_yardoc/ -/coverage/ -/doc/ -/pkg/ -/spec/reports/ -/tmp/ -*.gem -.env diff --git a/seed/ruby-sdk/inline-types/.mock/definition/__package__.yml b/seed/ruby-sdk/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/ruby-sdk/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/ruby-sdk/inline-types/.mock/definition/api.yml b/seed/ruby-sdk/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/ruby-sdk/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/ruby-sdk/inline-types/.mock/fern.config.json b/seed/ruby-sdk/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/ruby-sdk/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/ruby-sdk/inline-types/.mock/generators.yml b/seed/ruby-sdk/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/ruby-sdk/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/ruby-sdk/inline-types/.rubocop.yml b/seed/ruby-sdk/inline-types/.rubocop.yml deleted file mode 100644 index c1d2344d6e6..00000000000 --- a/seed/ruby-sdk/inline-types/.rubocop.yml +++ /dev/null @@ -1,36 +0,0 @@ -AllCops: - TargetRubyVersion: 2.7 - -Style/StringLiterals: - Enabled: true - EnforcedStyle: double_quotes - -Style/StringLiteralsInInterpolation: - Enabled: true - EnforcedStyle: double_quotes - -Layout/FirstHashElementLineBreak: - Enabled: true - -Layout/MultilineHashKeyLineBreaks: - Enabled: true - -# Generated files may be more complex than standard, disable -# these rules for now as a known limitation. -Metrics/ParameterLists: - Enabled: false - -Metrics/MethodLength: - Enabled: false - -Metrics/AbcSize: - Enabled: false - -Metrics/ClassLength: - Enabled: false - -Metrics/CyclomaticComplexity: - Enabled: false - -Metrics/PerceivedComplexity: - Enabled: false diff --git a/seed/ruby-sdk/inline-types/Gemfile b/seed/ruby-sdk/inline-types/Gemfile deleted file mode 100644 index 49bd9cd0173..00000000000 --- a/seed/ruby-sdk/inline-types/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" - -gemspec - -gem "minitest", "~> 5.0" -gem "rake", "~> 13.0" -gem "rubocop", "~> 1.21" diff --git a/seed/ruby-sdk/inline-types/README.md b/seed/ruby-sdk/inline-types/README.md deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/ruby-sdk/inline-types/Rakefile b/seed/ruby-sdk/inline-types/Rakefile deleted file mode 100644 index 2bdbce0cf2c..00000000000 --- a/seed/ruby-sdk/inline-types/Rakefile +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -require "rake/testtask" -require "rubocop/rake_task" - -task default: %i[test rubocop] - -Rake::TestTask.new do |t| - t.pattern = "./test/**/test_*.rb" -end - -RuboCop::RakeTask.new diff --git a/seed/ruby-sdk/inline-types/fern_inline_types.gemspec b/seed/ruby-sdk/inline-types/fern_inline_types.gemspec deleted file mode 100644 index c1801fe45db..00000000000 --- a/seed/ruby-sdk/inline-types/fern_inline_types.gemspec +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -require_relative "lib/gemconfig" - -Gem::Specification.new do |spec| - spec.name = "fern_inline_types" - spec.version = "0.0.1" - spec.authors = SeedObjectClient::Gemconfig::AUTHORS - spec.email = SeedObjectClient::Gemconfig::EMAIL - spec.summary = SeedObjectClient::Gemconfig::SUMMARY - spec.description = SeedObjectClient::Gemconfig::DESCRIPTION - spec.homepage = SeedObjectClient::Gemconfig::HOMEPAGE - spec.required_ruby_version = ">= 2.7.0" - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = SeedObjectClient::Gemconfig::SOURCE_CODE_URI - spec.metadata["changelog_uri"] = SeedObjectClient::Gemconfig::CHANGELOG_URI - spec.files = Dir.glob("lib/**/*") - spec.bindir = "exe" - spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } - spec.require_paths = ["lib"] - spec.add_dependency "async-http-faraday", ">= 0.0", "< 1.0" - spec.add_dependency "faraday", ">= 1.10", "< 3.0" - spec.add_dependency "faraday-net_http", ">= 1.0", "< 4.0" - spec.add_dependency "faraday-retry", ">= 1.0", "< 3.0" -end diff --git a/seed/ruby-sdk/inline-types/lib/fern_inline_types.rb b/seed/ruby-sdk/inline-types/lib/fern_inline_types.rb deleted file mode 100644 index 7e89860cb66..00000000000 --- a/seed/ruby-sdk/inline-types/lib/fern_inline_types.rb +++ /dev/null @@ -1,94 +0,0 @@ -# frozen_string_literal: true - -require_relative "types_export" -require_relative "requests" -require_relative "fern_inline_types/types/inline_type_1" -require_relative "fern_inline_types/types/root_type_1" - -module SeedObjectClient - class Client - # @param base_url [String] - # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. - # @param timeout_in_seconds [Long] - # @return [SeedObjectClient::Client] - def initialize(base_url: nil, max_retries: nil, timeout_in_seconds: nil) - @request_client = SeedObjectClient::RequestClient.new( - base_url: base_url, - max_retries: max_retries, - timeout_in_seconds: timeout_in_seconds - ) - end - - # @param bar [Hash] Request of type SeedObjectClient::InlineType1, as a Hash - # * :foo (String) - # * :bar (Hash) - # * :foo (String) - # * :bar (String) - # * :my_enum (SeedObjectClient::InlineEnum) - # @param foo [String] - # @param request_options [SeedObjectClient::RequestOptions] - # @return [SeedObjectClient::RootType1] - # @example - # object = SeedObjectClient::Client.new(base_url: "https://api.example.com") - # object.get_root(bar: { foo: "foo", bar: { foo: "foo", bar: "bar", my_enum: SUNNY } }, foo: "foo") - def get_root(bar:, foo:, request_options: nil) - response = @request_client.conn.post do |req| - req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? - req.headers = { - **(req.headers || {}), - **@request_client.get_headers, - **(request_options&.additional_headers || {}) - }.compact - unless request_options.nil? || request_options&.additional_query_parameters.nil? - req.params = { **(request_options&.additional_query_parameters || {}) }.compact - end - req.body = { **(request_options&.additional_body_parameters || {}), bar: bar, foo: foo }.compact - req.url "#{@request_client.get_url(request_options: request_options)}/root/root" - end - SeedObjectClient::RootType1.from_json(json_object: response.body) - end - end - - class AsyncClient - # @param base_url [String] - # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. - # @param timeout_in_seconds [Long] - # @return [SeedObjectClient::AsyncClient] - def initialize(base_url: nil, max_retries: nil, timeout_in_seconds: nil) - @async_request_client = SeedObjectClient::AsyncRequestClient.new( - base_url: base_url, - max_retries: max_retries, - timeout_in_seconds: timeout_in_seconds - ) - end - - # @param bar [Hash] Request of type SeedObjectClient::InlineType1, as a Hash - # * :foo (String) - # * :bar (Hash) - # * :foo (String) - # * :bar (String) - # * :my_enum (SeedObjectClient::InlineEnum) - # @param foo [String] - # @param request_options [SeedObjectClient::RequestOptions] - # @return [SeedObjectClient::RootType1] - # @example - # object = SeedObjectClient::Client.new(base_url: "https://api.example.com") - # object.get_root(bar: { foo: "foo", bar: { foo: "foo", bar: "bar", my_enum: SUNNY } }, foo: "foo") - def get_root(bar:, foo:, request_options: nil) - response = @async_request_client.conn.post do |req| - req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? - req.headers = { - **(req.headers || {}), - **@async_request_client.get_headers, - **(request_options&.additional_headers || {}) - }.compact - unless request_options.nil? || request_options&.additional_query_parameters.nil? - req.params = { **(request_options&.additional_query_parameters || {}) }.compact - end - req.body = { **(request_options&.additional_body_parameters || {}), bar: bar, foo: foo }.compact - req.url "#{@async_request_client.get_url(request_options: request_options)}/root/root" - end - SeedObjectClient::RootType1.from_json(json_object: response.body) - end - end -end diff --git a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inline_enum.rb b/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inline_enum.rb deleted file mode 100644 index c5cc415cac6..00000000000 --- a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inline_enum.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -module SeedObjectClient - class InlineEnum - SUNNY = "SUNNY" - CLOUDY = "CLOUDY" - RAINING = "RAINING" - SNOWING = "SNOWING" - end -end diff --git a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inline_type_1.rb b/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inline_type_1.rb deleted file mode 100644 index b2f58248832..00000000000 --- a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inline_type_1.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -require_relative "nested_inline_type_1" -require "ostruct" -require "json" - -module SeedObjectClient - class InlineType1 - # @return [String] - attr_reader :foo - # @return [SeedObjectClient::NestedInlineType1] - attr_reader :bar - # @return [OpenStruct] Additional properties unmapped to the current class definition - attr_reader :additional_properties - # @return [Object] - attr_reader :_field_set - protected :_field_set - - OMIT = Object.new - - # @param foo [String] - # @param bar [SeedObjectClient::NestedInlineType1] - # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition - # @return [SeedObjectClient::InlineType1] - def initialize(foo:, bar:, additional_properties: nil) - @foo = foo - @bar = bar - @additional_properties = additional_properties - @_field_set = { "foo": foo, "bar": bar } - end - - # Deserialize a JSON object to an instance of InlineType1 - # - # @param json_object [String] - # @return [SeedObjectClient::InlineType1] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - parsed_json = JSON.parse(json_object) - foo = parsed_json["foo"] - if parsed_json["bar"].nil? - bar = nil - else - bar = parsed_json["bar"].to_json - bar = SeedObjectClient::NestedInlineType1.from_json(json_object: bar) - end - new( - foo: foo, - bar: bar, - additional_properties: struct - ) - end - - # Serialize an instance of InlineType1 to a JSON object - # - # @return [String] - def to_json(*_args) - @_field_set&.to_json - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - obj.foo.is_a?(String) != false || raise("Passed value for field obj.foo is not the expected type, validation failed.") - SeedObjectClient::NestedInlineType1.validate_raw(obj: obj.bar) - end - end -end diff --git a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inline_type_2.rb b/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inline_type_2.rb deleted file mode 100644 index 232e0e5f47f..00000000000 --- a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inline_type_2.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -require "ostruct" -require "json" - -module SeedObjectClient - class InlineType2 - # @return [String] - attr_reader :baz - # @return [OpenStruct] Additional properties unmapped to the current class definition - attr_reader :additional_properties - # @return [Object] - attr_reader :_field_set - protected :_field_set - - OMIT = Object.new - - # @param baz [String] - # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition - # @return [SeedObjectClient::InlineType2] - def initialize(baz:, additional_properties: nil) - @baz = baz - @additional_properties = additional_properties - @_field_set = { "baz": baz } - end - - # Deserialize a JSON object to an instance of InlineType2 - # - # @param json_object [String] - # @return [SeedObjectClient::InlineType2] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - parsed_json = JSON.parse(json_object) - baz = parsed_json["baz"] - new(baz: baz, additional_properties: struct) - end - - # Serialize an instance of InlineType2 to a JSON object - # - # @return [String] - def to_json(*_args) - @_field_set&.to_json - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - obj.baz.is_a?(String) != false || raise("Passed value for field obj.baz is not the expected type, validation failed.") - end - end -end diff --git a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inlined_discriminated_union_1.rb b/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inlined_discriminated_union_1.rb deleted file mode 100644 index 8efbcfeb3bf..00000000000 --- a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inlined_discriminated_union_1.rb +++ /dev/null @@ -1,94 +0,0 @@ -# frozen_string_literal: true - -require "json" -require_relative "inline_type_1" -require_relative "inline_type_2" - -module SeedObjectClient - class InlinedDiscriminatedUnion1 - # @return [Object] - attr_reader :member - # @return [String] - attr_reader :discriminant - - private_class_method :new - alias kind_of? is_a? - - # @param member [Object] - # @param discriminant [String] - # @return [SeedObjectClient::InlinedDiscriminatedUnion1] - def initialize(member:, discriminant:) - @member = member - @discriminant = discriminant - end - - # Deserialize a JSON object to an instance of InlinedDiscriminatedUnion1 - # - # @param json_object [String] - # @return [SeedObjectClient::InlinedDiscriminatedUnion1] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - member = case struct.type - when "type1" - SeedObjectClient::InlineType1.from_json(json_object: json_object) - when "type2" - SeedObjectClient::InlineType2.from_json(json_object: json_object) - else - SeedObjectClient::InlineType1.from_json(json_object: json_object) - end - new(member: member, discriminant: struct.type) - end - - # For Union Types, to_json functionality is delegated to the wrapped member. - # - # @return [String] - def to_json(*_args) - case @discriminant - when "type1" - { **@member.to_json, type: @discriminant }.to_json - when "type2" - { **@member.to_json, type: @discriminant }.to_json - else - { "type": @discriminant, value: @member }.to_json - end - @member.to_json - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - case obj.type - when "type1" - SeedObjectClient::InlineType1.validate_raw(obj: obj) - when "type2" - SeedObjectClient::InlineType2.validate_raw(obj: obj) - else - raise("Passed value matched no type within the union, validation failed.") - end - end - - # For Union Types, is_a? functionality is delegated to the wrapped member. - # - # @param obj [Object] - # @return [Boolean] - def is_a?(obj) - @member.is_a?(obj) - end - - # @param member [SeedObjectClient::InlineType1] - # @return [SeedObjectClient::InlinedDiscriminatedUnion1] - def self.type_1(member:) - new(member: member, discriminant: "type1") - end - - # @param member [SeedObjectClient::InlineType2] - # @return [SeedObjectClient::InlinedDiscriminatedUnion1] - def self.type_2(member:) - new(member: member, discriminant: "type2") - end - end -end diff --git a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inlined_undiscriminated_union_1.rb b/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inlined_undiscriminated_union_1.rb deleted file mode 100644 index ec4ef8064b6..00000000000 --- a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/inlined_undiscriminated_union_1.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -require "json" -require_relative "inline_type_1" -require_relative "inline_type_2" - -module SeedObjectClient - class InlinedUndiscriminatedUnion1 - # Deserialize a JSON object to an instance of InlinedUndiscriminatedUnion1 - # - # @param json_object [String] - # @return [SeedObjectClient::InlinedUndiscriminatedUnion1] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - begin - SeedObjectClient::InlineType1.validate_raw(obj: struct) - return SeedObjectClient::InlineType1.from_json(json_object: struct) unless struct.nil? - - return nil - rescue StandardError - # noop - end - begin - SeedObjectClient::InlineType2.validate_raw(obj: struct) - return SeedObjectClient::InlineType2.from_json(json_object: struct) unless struct.nil? - - return nil - rescue StandardError - # noop - end - struct - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - begin - return SeedObjectClient::InlineType1.validate_raw(obj: obj) - rescue StandardError - # noop - end - begin - return SeedObjectClient::InlineType2.validate_raw(obj: obj) - rescue StandardError - # noop - end - raise("Passed value matched no type within the union, validation failed.") - end - end -end diff --git a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/nested_inline_type_1.rb b/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/nested_inline_type_1.rb deleted file mode 100644 index 863971a0fa7..00000000000 --- a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/nested_inline_type_1.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -require_relative "inline_enum" -require "ostruct" -require "json" - -module SeedObjectClient - class NestedInlineType1 - # @return [String] - attr_reader :foo - # @return [String] - attr_reader :bar - # @return [SeedObjectClient::InlineEnum] - attr_reader :my_enum - # @return [OpenStruct] Additional properties unmapped to the current class definition - attr_reader :additional_properties - # @return [Object] - attr_reader :_field_set - protected :_field_set - - OMIT = Object.new - - # @param foo [String] - # @param bar [String] - # @param my_enum [SeedObjectClient::InlineEnum] - # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition - # @return [SeedObjectClient::NestedInlineType1] - def initialize(foo:, bar:, my_enum:, additional_properties: nil) - @foo = foo - @bar = bar - @my_enum = my_enum - @additional_properties = additional_properties - @_field_set = { "foo": foo, "bar": bar, "myEnum": my_enum } - end - - # Deserialize a JSON object to an instance of NestedInlineType1 - # - # @param json_object [String] - # @return [SeedObjectClient::NestedInlineType1] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - parsed_json = JSON.parse(json_object) - foo = parsed_json["foo"] - bar = parsed_json["bar"] - my_enum = parsed_json["myEnum"] - new( - foo: foo, - bar: bar, - my_enum: my_enum, - additional_properties: struct - ) - end - - # Serialize an instance of NestedInlineType1 to a JSON object - # - # @return [String] - def to_json(*_args) - @_field_set&.to_json - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - obj.foo.is_a?(String) != false || raise("Passed value for field obj.foo is not the expected type, validation failed.") - obj.bar.is_a?(String) != false || raise("Passed value for field obj.bar is not the expected type, validation failed.") - obj.my_enum.is_a?(SeedObjectClient::InlineEnum) != false || raise("Passed value for field obj.my_enum is not the expected type, validation failed.") - end - end -end diff --git a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/root_type_1.rb b/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/root_type_1.rb deleted file mode 100644 index a17734f2980..00000000000 --- a/seed/ruby-sdk/inline-types/lib/fern_inline_types/types/root_type_1.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -require_relative "inline_type_1" -require "ostruct" -require "json" - -module SeedObjectClient - class RootType1 - # @return [String] - attr_reader :foo - # @return [SeedObjectClient::InlineType1] - attr_reader :bar - # @return [OpenStruct] Additional properties unmapped to the current class definition - attr_reader :additional_properties - # @return [Object] - attr_reader :_field_set - protected :_field_set - - OMIT = Object.new - - # @param foo [String] - # @param bar [SeedObjectClient::InlineType1] - # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition - # @return [SeedObjectClient::RootType1] - def initialize(foo:, bar:, additional_properties: nil) - @foo = foo - @bar = bar - @additional_properties = additional_properties - @_field_set = { "foo": foo, "bar": bar } - end - - # Deserialize a JSON object to an instance of RootType1 - # - # @param json_object [String] - # @return [SeedObjectClient::RootType1] - def self.from_json(json_object:) - struct = JSON.parse(json_object, object_class: OpenStruct) - parsed_json = JSON.parse(json_object) - foo = parsed_json["foo"] - if parsed_json["bar"].nil? - bar = nil - else - bar = parsed_json["bar"].to_json - bar = SeedObjectClient::InlineType1.from_json(json_object: bar) - end - new( - foo: foo, - bar: bar, - additional_properties: struct - ) - end - - # Serialize an instance of RootType1 to a JSON object - # - # @return [String] - def to_json(*_args) - @_field_set&.to_json - end - - # Leveraged for Union-type generation, validate_raw attempts to parse the given - # hash and check each fields type against the current object's property - # definitions. - # - # @param obj [Object] - # @return [Void] - def self.validate_raw(obj:) - obj.foo.is_a?(String) != false || raise("Passed value for field obj.foo is not the expected type, validation failed.") - SeedObjectClient::InlineType1.validate_raw(obj: obj.bar) - end - end -end diff --git a/seed/ruby-sdk/inline-types/lib/gemconfig.rb b/seed/ruby-sdk/inline-types/lib/gemconfig.rb deleted file mode 100644 index 87100746b48..00000000000 --- a/seed/ruby-sdk/inline-types/lib/gemconfig.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module SeedObjectClient - module Gemconfig - VERSION = "" - AUTHORS = [""].freeze - EMAIL = "" - SUMMARY = "" - DESCRIPTION = "" - HOMEPAGE = "https://github.com/inline-types/fern" - SOURCE_CODE_URI = "https://github.com/inline-types/fern" - CHANGELOG_URI = "https://github.com/inline-types/fern/blob/master/CHANGELOG.md" - end -end diff --git a/seed/ruby-sdk/inline-types/lib/requests.rb b/seed/ruby-sdk/inline-types/lib/requests.rb deleted file mode 100644 index 3510d05bf7b..00000000000 --- a/seed/ruby-sdk/inline-types/lib/requests.rb +++ /dev/null @@ -1,132 +0,0 @@ -# frozen_string_literal: true - -require "faraday" -require "faraday/retry" -require "async/http/faraday" - -module SeedObjectClient - class RequestClient - # @return [Faraday] - attr_reader :conn - # @return [String] - attr_reader :base_url - - # @param base_url [String] - # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. - # @param timeout_in_seconds [Long] - # @return [SeedObjectClient::RequestClient] - def initialize(base_url: nil, max_retries: nil, timeout_in_seconds: nil) - @base_url = base_url - @conn = Faraday.new do |faraday| - faraday.request :json - faraday.response :raise_error, include_request: true - faraday.request :retry, { max: max_retries } unless max_retries.nil? - faraday.options.timeout = timeout_in_seconds unless timeout_in_seconds.nil? - end - end - - # @param request_options [SeedObjectClient::RequestOptions] - # @return [String] - def get_url(request_options: nil) - request_options&.base_url || @base_url - end - - # @return [Hash{String => String}] - def get_headers - { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_inline_types", "X-Fern-SDK-Version": "0.0.1" } - end - end - - class AsyncRequestClient - # @return [Faraday] - attr_reader :conn - # @return [String] - attr_reader :base_url - - # @param base_url [String] - # @param max_retries [Long] The number of times to retry a failed request, defaults to 2. - # @param timeout_in_seconds [Long] - # @return [SeedObjectClient::AsyncRequestClient] - def initialize(base_url: nil, max_retries: nil, timeout_in_seconds: nil) - @base_url = base_url - @conn = Faraday.new do |faraday| - faraday.request :json - faraday.response :raise_error, include_request: true - faraday.adapter :async_http - faraday.request :retry, { max: max_retries } unless max_retries.nil? - faraday.options.timeout = timeout_in_seconds unless timeout_in_seconds.nil? - end - end - - # @param request_options [SeedObjectClient::RequestOptions] - # @return [String] - def get_url(request_options: nil) - request_options&.base_url || @base_url - end - - # @return [Hash{String => String}] - def get_headers - { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "fern_inline_types", "X-Fern-SDK-Version": "0.0.1" } - end - end - - # Additional options for request-specific configuration when calling APIs via the - # SDK. - class RequestOptions - # @return [String] - attr_reader :base_url - # @return [Hash{String => Object}] - attr_reader :additional_headers - # @return [Hash{String => Object}] - attr_reader :additional_query_parameters - # @return [Hash{String => Object}] - attr_reader :additional_body_parameters - # @return [Long] - attr_reader :timeout_in_seconds - - # @param base_url [String] - # @param additional_headers [Hash{String => Object}] - # @param additional_query_parameters [Hash{String => Object}] - # @param additional_body_parameters [Hash{String => Object}] - # @param timeout_in_seconds [Long] - # @return [SeedObjectClient::RequestOptions] - def initialize(base_url: nil, additional_headers: nil, additional_query_parameters: nil, - additional_body_parameters: nil, timeout_in_seconds: nil) - @base_url = base_url - @additional_headers = additional_headers - @additional_query_parameters = additional_query_parameters - @additional_body_parameters = additional_body_parameters - @timeout_in_seconds = timeout_in_seconds - end - end - - # Additional options for request-specific configuration when calling APIs via the - # SDK. - class IdempotencyRequestOptions - # @return [String] - attr_reader :base_url - # @return [Hash{String => Object}] - attr_reader :additional_headers - # @return [Hash{String => Object}] - attr_reader :additional_query_parameters - # @return [Hash{String => Object}] - attr_reader :additional_body_parameters - # @return [Long] - attr_reader :timeout_in_seconds - - # @param base_url [String] - # @param additional_headers [Hash{String => Object}] - # @param additional_query_parameters [Hash{String => Object}] - # @param additional_body_parameters [Hash{String => Object}] - # @param timeout_in_seconds [Long] - # @return [SeedObjectClient::IdempotencyRequestOptions] - def initialize(base_url: nil, additional_headers: nil, additional_query_parameters: nil, - additional_body_parameters: nil, timeout_in_seconds: nil) - @base_url = base_url - @additional_headers = additional_headers - @additional_query_parameters = additional_query_parameters - @additional_body_parameters = additional_body_parameters - @timeout_in_seconds = timeout_in_seconds - end - end -end diff --git a/seed/ruby-sdk/inline-types/lib/types_export.rb b/seed/ruby-sdk/inline-types/lib/types_export.rb deleted file mode 100644 index adae273e434..00000000000 --- a/seed/ruby-sdk/inline-types/lib/types_export.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -require_relative "fern_inline_types/types/root_type_1" -require_relative "fern_inline_types/types/inline_type_1" -require_relative "fern_inline_types/types/inline_type_2" -require_relative "fern_inline_types/types/nested_inline_type_1" -require_relative "fern_inline_types/types/inlined_discriminated_union_1" -require_relative "fern_inline_types/types/inlined_undiscriminated_union_1" -require_relative "fern_inline_types/types/inline_enum" diff --git a/seed/ruby-sdk/inline-types/snippet-templates.json b/seed/ruby-sdk/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/ruby-sdk/inline-types/snippet.json b/seed/ruby-sdk/inline-types/snippet.json deleted file mode 100644 index ef341eb4337..00000000000 --- a/seed/ruby-sdk/inline-types/snippet.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "endpoints": [ - { - "id": { - "path": "/root/root", - "method": "POST", - "identifierOverride": "endpoint_.getRoot" - }, - "snippet": { - "client": "require \"fern_inline_types\"\n\nobject = SeedObjectClient::Client.new(base_url: \"https://api.example.com\")\nobject.get_root(bar: { foo: \"foo\", bar: { foo: \"foo\", bar: \"bar\", my_enum: SUNNY } }, foo: \"foo\")", - "type": "ruby" - } - }, - { - "id": { - "path": "/root/root", - "method": "POST", - "identifierOverride": "endpoint_.getRoot" - }, - "snippet": { - "client": "require \"fern_inline_types\"\n\nobject = SeedObjectClient::Client.new(base_url: \"https://api.example.com\")\nobject.get_root(bar: { foo: \"foo\", bar: { foo: \"foo\", bar: \"bar\", my_enum: SUNNY } }, foo: \"foo\")", - "type": "ruby" - } - } - ], - "types": {} -} \ No newline at end of file diff --git a/seed/ruby-sdk/inline-types/test/test_fern_inline_types.rb b/seed/ruby-sdk/inline-types/test/test_fern_inline_types.rb deleted file mode 100644 index c4ac74a66e3..00000000000 --- a/seed/ruby-sdk/inline-types/test/test_fern_inline_types.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -require_relative "test_helper" -require "fern_inline_types" - -# Basic SeedObjectClient tests -class TestSeedObjectClient < Minitest::Test - def test_function - # SeedObjectClient::Client.new - end -end diff --git a/seed/ruby-sdk/inline-types/test/test_helper.rb b/seed/ruby-sdk/inline-types/test/test_helper.rb deleted file mode 100644 index c49fbd539bd..00000000000 --- a/seed/ruby-sdk/inline-types/test/test_helper.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -$LOAD_PATH.unshift File.expand_path("../lib", __dir__) - -require "minitest/autorun" -require "fern_inline_types" diff --git a/seed/ts-express/circular-references-advanced/api/resources/ast/types/ContainerValue.ts b/seed/ts-express/circular-references-advanced/api/resources/ast/types/ContainerValue.ts index 04cfa4e089e..0377dd788a2 100644 --- a/seed/ts-express/circular-references-advanced/api/resources/ast/types/ContainerValue.ts +++ b/seed/ts-express/circular-references-advanced/api/resources/ast/types/ContainerValue.ts @@ -6,13 +6,13 @@ import * as SeedApi from "../../../index"; export type ContainerValue = SeedApi.ContainerValue.List | SeedApi.ContainerValue.Optional; -export declare namespace ContainerValue { - interface List { +export namespace ContainerValue { + export interface List { type: "list"; value: SeedApi.FieldValue[]; } - interface Optional { + export interface Optional { type: "optional"; value?: SeedApi.FieldValue; } diff --git a/seed/ts-express/circular-references-advanced/api/resources/ast/types/FieldValue.ts b/seed/ts-express/circular-references-advanced/api/resources/ast/types/FieldValue.ts index 30d0c699a91..0b114997310 100644 --- a/seed/ts-express/circular-references-advanced/api/resources/ast/types/FieldValue.ts +++ b/seed/ts-express/circular-references-advanced/api/resources/ast/types/FieldValue.ts @@ -9,17 +9,17 @@ export type FieldValue = | SeedApi.FieldValue.ObjectValue | SeedApi.FieldValue.ContainerValue; -export declare namespace FieldValue { - interface PrimitiveValue { +export namespace FieldValue { + export interface PrimitiveValue { type: "primitive_value"; value: SeedApi.PrimitiveValue; } - interface ObjectValue extends SeedApi.ObjectValue { + export interface ObjectValue extends SeedApi.ObjectValue { type: "object_value"; } - interface ContainerValue { + export interface ContainerValue { type: "container_value"; value: SeedApi.ContainerValue; } diff --git a/seed/ts-express/circular-references-advanced/api/resources/ast/types/PrimitiveValue.ts b/seed/ts-express/circular-references-advanced/api/resources/ast/types/PrimitiveValue.ts index 58baf11d749..1b01851df2f 100644 --- a/seed/ts-express/circular-references-advanced/api/resources/ast/types/PrimitiveValue.ts +++ b/seed/ts-express/circular-references-advanced/api/resources/ast/types/PrimitiveValue.ts @@ -3,7 +3,6 @@ */ export type PrimitiveValue = "STRING" | "NUMBER"; - export const PrimitiveValue = { String: "STRING", Number: "NUMBER", diff --git a/seed/ts-express/circular-references/api/resources/ast/types/ContainerValue.ts b/seed/ts-express/circular-references/api/resources/ast/types/ContainerValue.ts index 04cfa4e089e..0377dd788a2 100644 --- a/seed/ts-express/circular-references/api/resources/ast/types/ContainerValue.ts +++ b/seed/ts-express/circular-references/api/resources/ast/types/ContainerValue.ts @@ -6,13 +6,13 @@ import * as SeedApi from "../../../index"; export type ContainerValue = SeedApi.ContainerValue.List | SeedApi.ContainerValue.Optional; -export declare namespace ContainerValue { - interface List { +export namespace ContainerValue { + export interface List { type: "list"; value: SeedApi.FieldValue[]; } - interface Optional { + export interface Optional { type: "optional"; value?: SeedApi.FieldValue; } diff --git a/seed/ts-express/circular-references/api/resources/ast/types/FieldValue.ts b/seed/ts-express/circular-references/api/resources/ast/types/FieldValue.ts index 30d0c699a91..0b114997310 100644 --- a/seed/ts-express/circular-references/api/resources/ast/types/FieldValue.ts +++ b/seed/ts-express/circular-references/api/resources/ast/types/FieldValue.ts @@ -9,17 +9,17 @@ export type FieldValue = | SeedApi.FieldValue.ObjectValue | SeedApi.FieldValue.ContainerValue; -export declare namespace FieldValue { - interface PrimitiveValue { +export namespace FieldValue { + export interface PrimitiveValue { type: "primitive_value"; value: SeedApi.PrimitiveValue; } - interface ObjectValue extends SeedApi.ObjectValue { + export interface ObjectValue extends SeedApi.ObjectValue { type: "object_value"; } - interface ContainerValue { + export interface ContainerValue { type: "container_value"; value: SeedApi.ContainerValue; } diff --git a/seed/ts-express/circular-references/api/resources/ast/types/PrimitiveValue.ts b/seed/ts-express/circular-references/api/resources/ast/types/PrimitiveValue.ts index 58baf11d749..1b01851df2f 100644 --- a/seed/ts-express/circular-references/api/resources/ast/types/PrimitiveValue.ts +++ b/seed/ts-express/circular-references/api/resources/ast/types/PrimitiveValue.ts @@ -3,7 +3,6 @@ */ export type PrimitiveValue = "STRING" | "NUMBER"; - export const PrimitiveValue = { String: "STRING", Number: "NUMBER", diff --git a/seed/ts-express/enum/api/types/Color.ts b/seed/ts-express/enum/api/types/Color.ts index 2fa67f67f83..fab9171627b 100644 --- a/seed/ts-express/enum/api/types/Color.ts +++ b/seed/ts-express/enum/api/types/Color.ts @@ -7,7 +7,6 @@ * SeedEnum.Color.Red */ export type Color = "red" | "blue"; - export const Color = { Red: "red", Blue: "blue", diff --git a/seed/ts-express/enum/api/types/Operand.ts b/seed/ts-express/enum/api/types/Operand.ts index b527c10e61b..b023f9444b9 100644 --- a/seed/ts-express/enum/api/types/Operand.ts +++ b/seed/ts-express/enum/api/types/Operand.ts @@ -19,7 +19,6 @@ export type Operand = * The name and value should be similar * are similar for less than. */ | "less_than"; - export const Operand = { GreaterThan: ">", EqualTo: "=", diff --git a/seed/ts-express/examples/api/resources/commons/resources/types/types/Data.ts b/seed/ts-express/examples/api/resources/commons/resources/types/types/Data.ts index ca73fda6852..ff6636b20e7 100644 --- a/seed/ts-express/examples/api/resources/commons/resources/types/types/Data.ts +++ b/seed/ts-express/examples/api/resources/commons/resources/types/types/Data.ts @@ -13,13 +13,13 @@ import * as SeedExamples from "../../../../../index"; */ export type Data = SeedExamples.commons.Data.String | SeedExamples.commons.Data.Base64; -export declare namespace Data { - interface String { +export namespace Data { + export interface String { type: "string"; value: string; } - interface Base64 { + export interface Base64 { type: "base64"; value: string; } diff --git a/seed/ts-express/examples/api/resources/commons/resources/types/types/EventInfo.ts b/seed/ts-express/examples/api/resources/commons/resources/types/types/EventInfo.ts index 559f7726408..619f49001c6 100644 --- a/seed/ts-express/examples/api/resources/commons/resources/types/types/EventInfo.ts +++ b/seed/ts-express/examples/api/resources/commons/resources/types/types/EventInfo.ts @@ -17,12 +17,12 @@ import * as SeedExamples from "../../../../../index"; */ export type EventInfo = SeedExamples.commons.EventInfo.Metadata | SeedExamples.commons.EventInfo.Tag; -export declare namespace EventInfo { - interface Metadata extends SeedExamples.commons.Metadata { +export namespace EventInfo { + export interface Metadata extends SeedExamples.commons.Metadata { type: "metadata"; } - interface Tag { + export interface Tag { type: "tag"; value: SeedExamples.commons.Tag; } diff --git a/seed/ts-express/examples/api/resources/types/types/Exception.ts b/seed/ts-express/examples/api/resources/types/types/Exception.ts index e83b4952829..11ef21c1f01 100644 --- a/seed/ts-express/examples/api/resources/types/types/Exception.ts +++ b/seed/ts-express/examples/api/resources/types/types/Exception.ts @@ -15,12 +15,12 @@ import * as SeedExamples from "../../../index"; */ export type Exception = SeedExamples.Exception.Generic | SeedExamples.Exception.Timeout; -export declare namespace Exception { - interface Generic extends SeedExamples.ExceptionInfo { +export namespace Exception { + export interface Generic extends SeedExamples.ExceptionInfo { type: "generic"; } - interface Timeout { + export interface Timeout { type: "timeout"; } } diff --git a/seed/ts-express/examples/api/resources/types/types/Metadata.ts b/seed/ts-express/examples/api/resources/types/types/Metadata.ts index d35087a1c66..b99d4869a53 100644 --- a/seed/ts-express/examples/api/resources/types/types/Metadata.ts +++ b/seed/ts-express/examples/api/resources/types/types/Metadata.ts @@ -13,13 +13,13 @@ import * as SeedExamples from "../../../index"; */ export type Metadata = SeedExamples.Metadata.Html | SeedExamples.Metadata.Markdown; -export declare namespace Metadata { - interface Html extends _Base { +export namespace Metadata { + export interface Html extends _Base { type: "html"; value: string; } - interface Markdown extends _Base { + export interface Markdown extends _Base { type: "markdown"; value: string; } diff --git a/seed/ts-express/examples/api/resources/types/types/MigrationStatus.ts b/seed/ts-express/examples/api/resources/types/types/MigrationStatus.ts index c45e7382155..11502aa2e9d 100644 --- a/seed/ts-express/examples/api/resources/types/types/MigrationStatus.ts +++ b/seed/ts-express/examples/api/resources/types/types/MigrationStatus.ts @@ -17,7 +17,6 @@ export type MigrationStatus = * The migration failed. */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-express/examples/api/resources/types/types/Test.ts b/seed/ts-express/examples/api/resources/types/types/Test.ts index c1d733da0eb..7fcc346381e 100644 --- a/seed/ts-express/examples/api/resources/types/types/Test.ts +++ b/seed/ts-express/examples/api/resources/types/types/Test.ts @@ -19,13 +19,13 @@ import * as SeedExamples from "../../../index"; */ export type Test = SeedExamples.Test.And | SeedExamples.Test.Or; -export declare namespace Test { - interface And { +export namespace Test { + export interface And { type: "and"; value: boolean; } - interface Or { + export interface Or { type: "or"; value: boolean; } diff --git a/seed/ts-express/examples/api/types/BasicType.ts b/seed/ts-express/examples/api/types/BasicType.ts index 32e12a88016..d20f2862feb 100644 --- a/seed/ts-express/examples/api/types/BasicType.ts +++ b/seed/ts-express/examples/api/types/BasicType.ts @@ -3,7 +3,6 @@ */ export type BasicType = "primitive" | "literal"; - export const BasicType = { Primitive: "primitive", Literal: "literal", diff --git a/seed/ts-express/examples/api/types/ComplexType.ts b/seed/ts-express/examples/api/types/ComplexType.ts index f61ca784ac5..4ef541c74d4 100644 --- a/seed/ts-express/examples/api/types/ComplexType.ts +++ b/seed/ts-express/examples/api/types/ComplexType.ts @@ -3,7 +3,6 @@ */ export type ComplexType = "object" | "union" | "unknown"; - export const ComplexType = { Object: "object", Union: "union", diff --git a/seed/ts-express/exhaustive/allow-extra-fields/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-express/exhaustive/allow-extra-fields/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-express/exhaustive/allow-extra-fields/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-express/exhaustive/allow-extra-fields/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-express/exhaustive/allow-extra-fields/api/resources/types/resources/union/types/Animal.ts b/seed/ts-express/exhaustive/allow-extra-fields/api/resources/types/resources/union/types/Animal.ts index b03ca8d422a..c05e5891781 100644 --- a/seed/ts-express/exhaustive/allow-extra-fields/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-express/exhaustive/allow-extra-fields/api/resources/types/resources/union/types/Animal.ts @@ -6,12 +6,12 @@ import * as SeedExhaustive from "../../../../../index"; export type Animal = SeedExhaustive.types.Animal.Dog | SeedExhaustive.types.Animal.Cat; -export declare namespace Animal { - interface Dog extends SeedExhaustive.types.Dog { +export namespace Animal { + export interface Dog extends SeedExhaustive.types.Dog { animal: "dog"; } - interface Cat extends SeedExhaustive.types.Cat { + export interface Cat extends SeedExhaustive.types.Cat { animal: "cat"; } } diff --git a/seed/ts-express/exhaustive/no-custom-config/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-express/exhaustive/no-custom-config/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-express/exhaustive/no-custom-config/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-express/exhaustive/no-custom-config/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-express/exhaustive/no-custom-config/api/resources/types/resources/union/types/Animal.ts b/seed/ts-express/exhaustive/no-custom-config/api/resources/types/resources/union/types/Animal.ts index b03ca8d422a..c05e5891781 100644 --- a/seed/ts-express/exhaustive/no-custom-config/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-express/exhaustive/no-custom-config/api/resources/types/resources/union/types/Animal.ts @@ -6,12 +6,12 @@ import * as SeedExhaustive from "../../../../../index"; export type Animal = SeedExhaustive.types.Animal.Dog | SeedExhaustive.types.Animal.Cat; -export declare namespace Animal { - interface Dog extends SeedExhaustive.types.Dog { +export namespace Animal { + export interface Dog extends SeedExhaustive.types.Dog { animal: "dog"; } - interface Cat extends SeedExhaustive.types.Cat { + export interface Cat extends SeedExhaustive.types.Cat { animal: "cat"; } } diff --git a/seed/ts-express/exhaustive/no-optional-properties/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-express/exhaustive/no-optional-properties/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-express/exhaustive/no-optional-properties/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-express/exhaustive/no-optional-properties/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-express/exhaustive/no-optional-properties/api/resources/types/resources/union/types/Animal.ts b/seed/ts-express/exhaustive/no-optional-properties/api/resources/types/resources/union/types/Animal.ts index b03ca8d422a..c05e5891781 100644 --- a/seed/ts-express/exhaustive/no-optional-properties/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-express/exhaustive/no-optional-properties/api/resources/types/resources/union/types/Animal.ts @@ -6,12 +6,12 @@ import * as SeedExhaustive from "../../../../../index"; export type Animal = SeedExhaustive.types.Animal.Dog | SeedExhaustive.types.Animal.Cat; -export declare namespace Animal { - interface Dog extends SeedExhaustive.types.Dog { +export namespace Animal { + export interface Dog extends SeedExhaustive.types.Dog { animal: "dog"; } - interface Cat extends SeedExhaustive.types.Cat { + export interface Cat extends SeedExhaustive.types.Cat { animal: "cat"; } } diff --git a/seed/ts-express/exhaustive/retain-original-casing/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-express/exhaustive/retain-original-casing/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-express/exhaustive/retain-original-casing/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-express/exhaustive/retain-original-casing/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-express/exhaustive/retain-original-casing/api/resources/types/resources/union/types/Animal.ts b/seed/ts-express/exhaustive/retain-original-casing/api/resources/types/resources/union/types/Animal.ts index b03ca8d422a..c05e5891781 100644 --- a/seed/ts-express/exhaustive/retain-original-casing/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-express/exhaustive/retain-original-casing/api/resources/types/resources/union/types/Animal.ts @@ -6,12 +6,12 @@ import * as SeedExhaustive from "../../../../../index"; export type Animal = SeedExhaustive.types.Animal.Dog | SeedExhaustive.types.Animal.Cat; -export declare namespace Animal { - interface Dog extends SeedExhaustive.types.Dog { +export namespace Animal { + export interface Dog extends SeedExhaustive.types.Dog { animal: "dog"; } - interface Cat extends SeedExhaustive.types.Cat { + export interface Cat extends SeedExhaustive.types.Cat { animal: "cat"; } } diff --git a/seed/ts-express/exhaustive/union-utils/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-express/exhaustive/union-utils/api/resources/types/resources/enum/types/WeatherReport.ts index 4cd2ac175cf..babba9a7b3c 100644 --- a/seed/ts-express/exhaustive/union-utils/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-express/exhaustive/union-utils/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", @@ -25,7 +24,7 @@ export const WeatherReport = { }, } as const; -export declare namespace WeatherReport { +export namespace WeatherReport { interface Visitor { sunny: () => R; cloudy: () => R; diff --git a/seed/ts-express/exhaustive/union-utils/api/resources/types/resources/union/types/Animal.ts b/seed/ts-express/exhaustive/union-utils/api/resources/types/resources/union/types/Animal.ts index 08bf92a3afc..0c2188d3201 100644 --- a/seed/ts-express/exhaustive/union-utils/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-express/exhaustive/union-utils/api/resources/types/resources/union/types/Animal.ts @@ -9,16 +9,16 @@ export type Animal = | SeedExhaustive.types.Animal.Cat | SeedExhaustive.types.Animal._Unknown; -export declare namespace Animal { - interface Dog extends SeedExhaustive.types.Dog, _Utils { +export namespace Animal { + export interface Dog extends SeedExhaustive.types.Dog, _Utils { animal: "dog"; } - interface Cat extends SeedExhaustive.types.Cat, _Utils { + export interface Cat extends SeedExhaustive.types.Cat, _Utils { animal: "cat"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { animal: void; } diff --git a/seed/ts-express/idempotency-headers/api/resources/payment/types/Currency.ts b/seed/ts-express/idempotency-headers/api/resources/payment/types/Currency.ts index 16022be914e..17ebd363838 100644 --- a/seed/ts-express/idempotency-headers/api/resources/payment/types/Currency.ts +++ b/seed/ts-express/idempotency-headers/api/resources/payment/types/Currency.ts @@ -3,7 +3,6 @@ */ export type Currency = "USD" | "YEN"; - export const Currency = { Usd: "USD", Yen: "YEN", diff --git a/seed/ts-express/inline-types/.mock/definition/__package__.yml b/seed/ts-express/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/ts-express/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/ts-express/inline-types/.mock/definition/api.yml b/seed/ts-express/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/ts-express/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/ts-express/inline-types/.mock/fern.config.json b/seed/ts-express/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/ts-express/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/ts-express/inline-types/.mock/generators.yml b/seed/ts-express/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/ts-express/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/ts-express/inline-types/api/index.ts b/seed/ts-express/inline-types/api/index.ts deleted file mode 100644 index fcc81debec4..00000000000 --- a/seed/ts-express/inline-types/api/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./types"; -export * from "./service"; diff --git a/seed/ts-express/inline-types/api/service/RootService.ts b/seed/ts-express/inline-types/api/service/RootService.ts deleted file mode 100644 index 8b818d49332..00000000000 --- a/seed/ts-express/inline-types/api/service/RootService.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; -import express from "express"; -import * as serializers from "../../serialization/index"; -import * as errors from "../../errors/index"; - -export interface RootServiceMethods { - getRoot( - req: express.Request, - res: { - send: (responseBody: SeedObject.RootType1) => Promise; - cookie: (cookie: string, value: string, options?: express.CookieOptions) => void; - locals: any; - }, - next: express.NextFunction - ): void | Promise; -} - -export class RootService { - private router; - - constructor(private readonly methods: RootServiceMethods, middleware: express.RequestHandler[] = []) { - this.router = express.Router({ mergeParams: true }).use( - express.json({ - strict: false, - }), - ...middleware - ); - } - - public addMiddleware(handler: express.RequestHandler): this { - this.router.use(handler); - return this; - } - - public toRouter(): express.Router { - this.router.post("/root", async (req, res, next) => { - const request = serializers.PostRootRequest.parse(req.body); - if (request.ok) { - req.body = request.value; - try { - await this.methods.getRoot( - req as any, - { - send: async (responseBody) => { - res.json( - serializers.RootType1.jsonOrThrow(responseBody, { unrecognizedObjectKeys: "strip" }) - ); - }, - cookie: res.cookie.bind(res), - locals: res.locals, - }, - next - ); - next(); - } catch (error) { - if (error instanceof errors.SeedObjectError) { - console.warn( - `Endpoint 'getRoot' unexpectedly threw ${error.constructor.name}.` + - ` If this was intentional, please add ${error.constructor.name} to` + - " the endpoint's errors list in your Fern Definition." - ); - await error.send(res); - } else { - res.status(500).json("Internal Server Error"); - } - next(error); - } - } else { - res.status(422).json({ - errors: request.errors.map( - (error) => ["request", ...error.path].join(" -> ") + ": " + error.message - ), - }); - next(request.errors); - } - }); - return this.router; - } -} diff --git a/seed/ts-express/inline-types/api/service/requests/PostRootRequest.ts b/seed/ts-express/inline-types/api/service/requests/PostRootRequest.ts deleted file mode 100644 index ec6749bed53..00000000000 --- a/seed/ts-express/inline-types/api/service/requests/PostRootRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../../index"; - -export interface PostRootRequest { - bar: SeedObject.InlineType1; - foo: string; -} diff --git a/seed/ts-express/inline-types/api/service/requests/index.ts b/seed/ts-express/inline-types/api/service/requests/index.ts deleted file mode 100644 index 497781074f3..00000000000 --- a/seed/ts-express/inline-types/api/service/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { PostRootRequest } from "./PostRootRequest"; diff --git a/seed/ts-express/inline-types/api/types/InlineEnum.ts b/seed/ts-express/inline-types/api/types/InlineEnum.ts deleted file mode 100644 index efc9b2dc13b..00000000000 --- a/seed/ts-express/inline-types/api/types/InlineEnum.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type InlineEnum = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - -export const InlineEnum = { - Sunny: "SUNNY", - Cloudy: "CLOUDY", - Raining: "RAINING", - Snowing: "SNOWING", -} as const; diff --git a/seed/ts-express/inline-types/api/types/InlineType1.ts b/seed/ts-express/inline-types/api/types/InlineType1.ts deleted file mode 100644 index 46eb751da7c..00000000000 --- a/seed/ts-express/inline-types/api/types/InlineType1.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; - -export interface InlineType1 { - foo: string; - bar: SeedObject.NestedInlineType1; -} diff --git a/seed/ts-express/inline-types/api/types/InlineType2.ts b/seed/ts-express/inline-types/api/types/InlineType2.ts deleted file mode 100644 index 6fd9bee2f7c..00000000000 --- a/seed/ts-express/inline-types/api/types/InlineType2.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface InlineType2 { - baz: string; -} diff --git a/seed/ts-express/inline-types/api/types/InlinedDiscriminatedUnion1.ts b/seed/ts-express/inline-types/api/types/InlinedDiscriminatedUnion1.ts deleted file mode 100644 index 6fd939b1ecd..00000000000 --- a/seed/ts-express/inline-types/api/types/InlinedDiscriminatedUnion1.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; - -export type InlinedDiscriminatedUnion1 = - | SeedObject.InlinedDiscriminatedUnion1.Type1 - | SeedObject.InlinedDiscriminatedUnion1.Type2; - -export declare namespace InlinedDiscriminatedUnion1 { - interface Type1 extends SeedObject.InlineType1 { - type: "type1"; - } - - interface Type2 extends SeedObject.InlineType2 { - type: "type2"; - } -} diff --git a/seed/ts-express/inline-types/api/types/InlinedUndiscriminatedUnion1.ts b/seed/ts-express/inline-types/api/types/InlinedUndiscriminatedUnion1.ts deleted file mode 100644 index aa17b80bb9a..00000000000 --- a/seed/ts-express/inline-types/api/types/InlinedUndiscriminatedUnion1.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; - -export type InlinedUndiscriminatedUnion1 = SeedObject.InlineType1 | SeedObject.InlineType2; diff --git a/seed/ts-express/inline-types/api/types/NestedInlineType1.ts b/seed/ts-express/inline-types/api/types/NestedInlineType1.ts deleted file mode 100644 index 149f04ffa10..00000000000 --- a/seed/ts-express/inline-types/api/types/NestedInlineType1.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; - -export interface NestedInlineType1 { - foo: string; - bar: string; - myEnum: SeedObject.InlineEnum; -} diff --git a/seed/ts-express/inline-types/api/types/RootType1.ts b/seed/ts-express/inline-types/api/types/RootType1.ts deleted file mode 100644 index 5fd2ba90356..00000000000 --- a/seed/ts-express/inline-types/api/types/RootType1.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; - -export interface RootType1 { - foo: string; - bar: SeedObject.InlineType1; -} diff --git a/seed/ts-express/inline-types/api/types/index.ts b/seed/ts-express/inline-types/api/types/index.ts deleted file mode 100644 index bb183ec944a..00000000000 --- a/seed/ts-express/inline-types/api/types/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from "./RootType1"; -export * from "./InlineType1"; -export * from "./InlineType2"; -export * from "./NestedInlineType1"; -export * from "./InlinedDiscriminatedUnion1"; -export * from "./InlinedUndiscriminatedUnion1"; -export * from "./InlineEnum"; diff --git a/seed/ts-express/inline-types/core/index.ts b/seed/ts-express/inline-types/core/index.ts deleted file mode 100644 index 3ae53c06d38..00000000000 --- a/seed/ts-express/inline-types/core/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as serialization from "./schemas"; diff --git a/seed/ts-express/inline-types/core/schemas/Schema.ts b/seed/ts-express/inline-types/core/schemas/Schema.ts deleted file mode 100644 index 2a72eacec99..00000000000 --- a/seed/ts-express/inline-types/core/schemas/Schema.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { SchemaUtils } from "./builders"; - -export type Schema = BaseSchema & SchemaUtils; - -export type inferRaw = S extends Schema ? Raw : never; -export type inferParsed = S extends Schema ? Parsed : never; - -export interface BaseSchema { - parse: (raw: unknown, opts?: SchemaOptions) => MaybeValid; - json: (parsed: unknown, opts?: SchemaOptions) => MaybeValid; - getType: () => SchemaType | SchemaType; -} - -export const SchemaType = { - BIGINT: "bigint", - DATE: "date", - ENUM: "enum", - LIST: "list", - STRING_LITERAL: "stringLiteral", - BOOLEAN_LITERAL: "booleanLiteral", - OBJECT: "object", - ANY: "any", - BOOLEAN: "boolean", - NUMBER: "number", - STRING: "string", - UNKNOWN: "unknown", - RECORD: "record", - SET: "set", - UNION: "union", - UNDISCRIMINATED_UNION: "undiscriminatedUnion", - OPTIONAL: "optional", -} as const; -export type SchemaType = typeof SchemaType[keyof typeof SchemaType]; - -export type MaybeValid = Valid | Invalid; - -export interface Valid { - ok: true; - value: T; -} - -export interface Invalid { - ok: false; - errors: ValidationError[]; -} - -export interface ValidationError { - path: string[]; - message: string; -} - -export interface SchemaOptions { - /** - * how to handle unrecognized keys in objects - * - * @default "fail" - */ - unrecognizedObjectKeys?: "fail" | "passthrough" | "strip"; - - /** - * whether to fail when an unrecognized discriminant value is - * encountered in a union - * - * @default false - */ - allowUnrecognizedUnionMembers?: boolean; - - /** - * whether to fail when an unrecognized enum value is encountered - * - * @default false - */ - allowUnrecognizedEnumValues?: boolean; - - /** - * whether to allow data that doesn't conform to the schema. - * invalid data is passed through without transformation. - * - * when this is enabled, .parse() and .json() will always - * return `ok: true`. `.parseOrThrow()` and `.jsonOrThrow()` - * will never fail. - * - * @default false - */ - skipValidation?: boolean; - - /** - * each validation failure contains a "path" property, which is - * the breadcrumbs to the offending node in the JSON. you can supply - * a prefix that is prepended to all the errors' paths. this can be - * helpful for zurg's internal debug logging. - */ - breadcrumbsPrefix?: string[]; - - /** - * whether to send 'null' for optional properties explicitly set to 'undefined'. - */ - omitUndefined?: boolean; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/bigint/bigint.ts b/seed/ts-express/inline-types/core/schemas/builders/bigint/bigint.ts deleted file mode 100644 index dc9c742e007..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/bigint/bigint.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { BaseSchema, Schema, SchemaType } from "../../Schema"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { getSchemaUtils } from "../schema-utils"; - -export function bigint(): Schema { - const baseSchema: BaseSchema = { - parse: (raw, { breadcrumbsPrefix = [] } = {}) => { - if (typeof raw !== "string") { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(raw, "string"), - }, - ], - }; - } - return { - ok: true, - value: BigInt(raw), - }; - }, - json: (bigint, { breadcrumbsPrefix = [] } = {}) => { - if (typeof bigint === "bigint") { - return { - ok: true, - value: bigint.toString(), - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(bigint, "bigint"), - }, - ], - }; - } - }, - getType: () => SchemaType.BIGINT, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/bigint/index.ts b/seed/ts-express/inline-types/core/schemas/builders/bigint/index.ts deleted file mode 100644 index e5843043fcb..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/bigint/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { bigint } from "./bigint"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/date/date.ts b/seed/ts-express/inline-types/core/schemas/builders/date/date.ts deleted file mode 100644 index b70f24b045a..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/date/date.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { BaseSchema, Schema, SchemaType } from "../../Schema"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { getSchemaUtils } from "../schema-utils"; - -// https://stackoverflow.com/questions/12756159/regex-and-iso8601-formatted-datetime -const ISO_8601_REGEX = - /^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; - -export function date(): Schema { - const baseSchema: BaseSchema = { - parse: (raw, { breadcrumbsPrefix = [] } = {}) => { - if (typeof raw !== "string") { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(raw, "string"), - }, - ], - }; - } - if (!ISO_8601_REGEX.test(raw)) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(raw, "ISO 8601 date string"), - }, - ], - }; - } - return { - ok: true, - value: new Date(raw), - }; - }, - json: (date, { breadcrumbsPrefix = [] } = {}) => { - if (date instanceof Date) { - return { - ok: true, - value: date.toISOString(), - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(date, "Date object"), - }, - ], - }; - } - }, - getType: () => SchemaType.DATE, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/date/index.ts b/seed/ts-express/inline-types/core/schemas/builders/date/index.ts deleted file mode 100644 index 187b29040f6..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/date/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { date } from "./date"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/enum/enum.ts b/seed/ts-express/inline-types/core/schemas/builders/enum/enum.ts deleted file mode 100644 index c1e24d69dec..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/enum/enum.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Schema, SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export function enum_(values: E): Schema { - const validValues = new Set(values); - - const schemaCreator = createIdentitySchemaCreator( - SchemaType.ENUM, - (value, { allowUnrecognizedEnumValues, breadcrumbsPrefix = [] } = {}) => { - if (typeof value !== "string") { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "string"), - }, - ], - }; - } - - if (!validValues.has(value) && !allowUnrecognizedEnumValues) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "enum"), - }, - ], - }; - } - - return { - ok: true, - value: value as U, - }; - } - ); - - return schemaCreator(); -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/enum/index.ts b/seed/ts-express/inline-types/core/schemas/builders/enum/index.ts deleted file mode 100644 index fe6faed93e3..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/enum/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { enum_ } from "./enum"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/index.ts b/seed/ts-express/inline-types/core/schemas/builders/index.ts deleted file mode 100644 index 65211f92522..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -export * from "./bigint"; -export * from "./date"; -export * from "./enum"; -export * from "./lazy"; -export * from "./list"; -export * from "./literals"; -export * from "./object"; -export * from "./object-like"; -export * from "./primitives"; -export * from "./record"; -export * from "./schema-utils"; -export * from "./set"; -export * from "./undiscriminated-union"; -export * from "./union"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/lazy/index.ts b/seed/ts-express/inline-types/core/schemas/builders/lazy/index.ts deleted file mode 100644 index 77420fb031c..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/lazy/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { lazy } from "./lazy"; -export type { SchemaGetter } from "./lazy"; -export { lazyObject } from "./lazyObject"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/lazy/lazy.ts b/seed/ts-express/inline-types/core/schemas/builders/lazy/lazy.ts deleted file mode 100644 index 835c61f8a56..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/lazy/lazy.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { BaseSchema, Schema } from "../../Schema"; -import { getSchemaUtils } from "../schema-utils"; - -export type SchemaGetter> = () => SchemaType; - -export function lazy(getter: SchemaGetter>): Schema { - const baseSchema = constructLazyBaseSchema(getter); - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - }; -} - -export function constructLazyBaseSchema( - getter: SchemaGetter> -): BaseSchema { - return { - parse: (raw, opts) => getMemoizedSchema(getter).parse(raw, opts), - json: (parsed, opts) => getMemoizedSchema(getter).json(parsed, opts), - getType: () => getMemoizedSchema(getter).getType(), - }; -} - -type MemoizedGetter> = SchemaGetter & { __zurg_memoized?: SchemaType }; - -export function getMemoizedSchema>(getter: SchemaGetter): SchemaType { - const castedGetter = getter as MemoizedGetter; - if (castedGetter.__zurg_memoized == null) { - castedGetter.__zurg_memoized = getter(); - } - return castedGetter.__zurg_memoized; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/lazy/lazyObject.ts b/seed/ts-express/inline-types/core/schemas/builders/lazy/lazyObject.ts deleted file mode 100644 index 38c9e28404b..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/lazy/lazyObject.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { getObjectUtils } from "../object"; -import { getObjectLikeUtils } from "../object-like"; -import { BaseObjectSchema, ObjectSchema } from "../object/types"; -import { getSchemaUtils } from "../schema-utils"; -import { constructLazyBaseSchema, getMemoizedSchema, SchemaGetter } from "./lazy"; - -export function lazyObject(getter: SchemaGetter>): ObjectSchema { - const baseSchema: BaseObjectSchema = { - ...constructLazyBaseSchema(getter), - _getRawProperties: () => getMemoizedSchema(getter)._getRawProperties(), - _getParsedProperties: () => getMemoizedSchema(getter)._getParsedProperties(), - }; - - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - ...getObjectLikeUtils(baseSchema), - ...getObjectUtils(baseSchema), - }; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/list/index.ts b/seed/ts-express/inline-types/core/schemas/builders/list/index.ts deleted file mode 100644 index 25f4bcc1737..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/list/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { list } from "./list"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/list/list.ts b/seed/ts-express/inline-types/core/schemas/builders/list/list.ts deleted file mode 100644 index e4c5c4a4a99..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/list/list.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { BaseSchema, MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { getSchemaUtils } from "../schema-utils"; - -export function list(schema: Schema): Schema { - const baseSchema: BaseSchema = { - parse: (raw, opts) => - validateAndTransformArray(raw, (item, index) => - schema.parse(item, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `[${index}]`], - }) - ), - json: (parsed, opts) => - validateAndTransformArray(parsed, (item, index) => - schema.json(item, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `[${index}]`], - }) - ), - getType: () => SchemaType.LIST, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} - -function validateAndTransformArray( - value: unknown, - transformItem: (item: Raw, index: number) => MaybeValid -): MaybeValid { - if (!Array.isArray(value)) { - return { - ok: false, - errors: [ - { - message: getErrorMessageForIncorrectType(value, "list"), - path: [], - }, - ], - }; - } - - const maybeValidItems = value.map((item, index) => transformItem(item, index)); - - return maybeValidItems.reduce>( - (acc, item) => { - if (acc.ok && item.ok) { - return { - ok: true, - value: [...acc.value, item.value], - }; - } - - const errors: ValidationError[] = []; - if (!acc.ok) { - errors.push(...acc.errors); - } - if (!item.ok) { - errors.push(...item.errors); - } - - return { - ok: false, - errors, - }; - }, - { ok: true, value: [] } - ); -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/literals/booleanLiteral.ts b/seed/ts-express/inline-types/core/schemas/builders/literals/booleanLiteral.ts deleted file mode 100644 index a83d22cd48a..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/literals/booleanLiteral.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Schema, SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export function booleanLiteral(literal: V): Schema { - const schemaCreator = createIdentitySchemaCreator( - SchemaType.BOOLEAN_LITERAL, - (value, { breadcrumbsPrefix = [] } = {}) => { - if (value === literal) { - return { - ok: true, - value: literal, - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, `${literal.toString()}`), - }, - ], - }; - } - } - ); - - return schemaCreator(); -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/literals/index.ts b/seed/ts-express/inline-types/core/schemas/builders/literals/index.ts deleted file mode 100644 index d2bf08fc6ca..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/literals/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { stringLiteral } from "./stringLiteral"; -export { booleanLiteral } from "./booleanLiteral"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/literals/stringLiteral.ts b/seed/ts-express/inline-types/core/schemas/builders/literals/stringLiteral.ts deleted file mode 100644 index 3939b76b48d..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/literals/stringLiteral.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Schema, SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export function stringLiteral(literal: V): Schema { - const schemaCreator = createIdentitySchemaCreator( - SchemaType.STRING_LITERAL, - (value, { breadcrumbsPrefix = [] } = {}) => { - if (value === literal) { - return { - ok: true, - value: literal, - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, `"${literal}"`), - }, - ], - }; - } - } - ); - - return schemaCreator(); -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/object-like/getObjectLikeUtils.ts b/seed/ts-express/inline-types/core/schemas/builders/object-like/getObjectLikeUtils.ts deleted file mode 100644 index 8331d08da89..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/object-like/getObjectLikeUtils.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { BaseSchema } from "../../Schema"; -import { filterObject } from "../../utils/filterObject"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { isPlainObject } from "../../utils/isPlainObject"; -import { getSchemaUtils } from "../schema-utils"; -import { ObjectLikeSchema, ObjectLikeUtils } from "./types"; - -export function getObjectLikeUtils(schema: BaseSchema): ObjectLikeUtils { - return { - withParsedProperties: (properties) => withParsedProperties(schema, properties), - }; -} - -/** - * object-like utils are defined in one file to resolve issues with circular imports - */ - -export function withParsedProperties( - objectLike: BaseSchema, - properties: { [K in keyof Properties]: Properties[K] | ((parsed: ParsedObjectShape) => Properties[K]) } -): ObjectLikeSchema { - const objectSchema: BaseSchema = { - parse: (raw, opts) => { - const parsedObject = objectLike.parse(raw, opts); - if (!parsedObject.ok) { - return parsedObject; - } - - const additionalProperties = Object.entries(properties).reduce>( - (processed, [key, value]) => { - return { - ...processed, - [key]: typeof value === "function" ? value(parsedObject.value) : value, - }; - }, - {} - ); - - return { - ok: true, - value: { - ...parsedObject.value, - ...(additionalProperties as Properties), - }, - }; - }, - - json: (parsed, opts) => { - if (!isPlainObject(parsed)) { - return { - ok: false, - errors: [ - { - path: opts?.breadcrumbsPrefix ?? [], - message: getErrorMessageForIncorrectType(parsed, "object"), - }, - ], - }; - } - - // strip out added properties - const addedPropertyKeys = new Set(Object.keys(properties)); - const parsedWithoutAddedProperties = filterObject( - parsed, - Object.keys(parsed).filter((key) => !addedPropertyKeys.has(key)) - ); - - return objectLike.json(parsedWithoutAddedProperties as ParsedObjectShape, opts); - }, - - getType: () => objectLike.getType(), - }; - - return { - ...objectSchema, - ...getSchemaUtils(objectSchema), - ...getObjectLikeUtils(objectSchema), - }; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/object-like/index.ts b/seed/ts-express/inline-types/core/schemas/builders/object-like/index.ts deleted file mode 100644 index c342e72cf9d..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/object-like/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { getObjectLikeUtils, withParsedProperties } from "./getObjectLikeUtils"; -export type { ObjectLikeSchema, ObjectLikeUtils } from "./types"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/object-like/types.ts b/seed/ts-express/inline-types/core/schemas/builders/object-like/types.ts deleted file mode 100644 index 75b3698729c..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/object-like/types.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseSchema, Schema } from "../../Schema"; - -export type ObjectLikeSchema = Schema & - BaseSchema & - ObjectLikeUtils; - -export interface ObjectLikeUtils { - withParsedProperties: >(properties: { - [K in keyof T]: T[K] | ((parsed: Parsed) => T[K]); - }) => ObjectLikeSchema; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/object/index.ts b/seed/ts-express/inline-types/core/schemas/builders/object/index.ts deleted file mode 100644 index e3f4388db28..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/object/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -export { getObjectUtils, object } from "./object"; -export { objectWithoutOptionalProperties } from "./objectWithoutOptionalProperties"; -export type { - inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas, - inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas, -} from "./objectWithoutOptionalProperties"; -export { isProperty, property } from "./property"; -export type { Property } from "./property"; -export type { - BaseObjectSchema, - inferObjectSchemaFromPropertySchemas, - inferParsedObject, - inferParsedObjectFromPropertySchemas, - inferParsedPropertySchema, - inferRawKey, - inferRawObject, - inferRawObjectFromPropertySchemas, - inferRawPropertySchema, - ObjectSchema, - ObjectUtils, - PropertySchemas, -} from "./types"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/object/object.ts b/seed/ts-express/inline-types/core/schemas/builders/object/object.ts deleted file mode 100644 index 8d40c33c80a..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/object/object.ts +++ /dev/null @@ -1,365 +0,0 @@ -import { MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; -import { entries } from "../../utils/entries"; -import { filterObject } from "../../utils/filterObject"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { isPlainObject } from "../../utils/isPlainObject"; -import { keys } from "../../utils/keys"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { partition } from "../../utils/partition"; -import { getObjectLikeUtils } from "../object-like"; -import { getSchemaUtils } from "../schema-utils"; -import { isProperty } from "./property"; -import { - BaseObjectSchema, - inferObjectSchemaFromPropertySchemas, - inferParsedObjectFromPropertySchemas, - inferRawObjectFromPropertySchemas, - ObjectSchema, - ObjectUtils, - PropertySchemas, -} from "./types"; - -interface ObjectPropertyWithRawKey { - rawKey: string; - parsedKey: string; - valueSchema: Schema; -} - -export function object>( - schemas: T -): inferObjectSchemaFromPropertySchemas { - const baseSchema: BaseObjectSchema< - inferRawObjectFromPropertySchemas, - inferParsedObjectFromPropertySchemas - > = { - _getRawProperties: () => - Object.entries(schemas).map(([parsedKey, propertySchema]) => - isProperty(propertySchema) ? propertySchema.rawKey : parsedKey - ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], - _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], - - parse: (raw, opts) => { - const rawKeyToProperty: Record = {}; - const requiredKeys: string[] = []; - - for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { - const rawKey = isProperty(schemaOrObjectProperty) ? schemaOrObjectProperty.rawKey : parsedKey; - const valueSchema: Schema = isProperty(schemaOrObjectProperty) - ? schemaOrObjectProperty.valueSchema - : schemaOrObjectProperty; - - const property: ObjectPropertyWithRawKey = { - rawKey, - parsedKey: parsedKey as string, - valueSchema, - }; - - rawKeyToProperty[rawKey] = property; - - if (isSchemaRequired(valueSchema)) { - requiredKeys.push(rawKey); - } - } - - return validateAndTransformObject({ - value: raw, - requiredKeys, - getProperty: (rawKey) => { - const property = rawKeyToProperty[rawKey]; - if (property == null) { - return undefined; - } - return { - transformedKey: property.parsedKey, - transform: (propertyValue) => - property.valueSchema.parse(propertyValue, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), rawKey], - }), - }; - }, - unrecognizedObjectKeys: opts?.unrecognizedObjectKeys, - skipValidation: opts?.skipValidation, - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - omitUndefined: opts?.omitUndefined, - }); - }, - - json: (parsed, opts) => { - const requiredKeys: string[] = []; - - for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { - const valueSchema: Schema = isProperty(schemaOrObjectProperty) - ? schemaOrObjectProperty.valueSchema - : schemaOrObjectProperty; - - if (isSchemaRequired(valueSchema)) { - requiredKeys.push(parsedKey as string); - } - } - - return validateAndTransformObject({ - value: parsed, - requiredKeys, - getProperty: ( - parsedKey - ): { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined => { - const property = schemas[parsedKey as keyof T]; - - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - if (property == null) { - return undefined; - } - - if (isProperty(property)) { - return { - transformedKey: property.rawKey, - transform: (propertyValue) => - property.valueSchema.json(propertyValue, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedKey], - }), - }; - } else { - return { - transformedKey: parsedKey, - transform: (propertyValue) => - property.json(propertyValue, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedKey], - }), - }; - } - }, - unrecognizedObjectKeys: opts?.unrecognizedObjectKeys, - skipValidation: opts?.skipValidation, - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - omitUndefined: opts?.omitUndefined, - }); - }, - - getType: () => SchemaType.OBJECT, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - ...getObjectLikeUtils(baseSchema), - ...getObjectUtils(baseSchema), - }; -} - -function validateAndTransformObject({ - value, - requiredKeys, - getProperty, - unrecognizedObjectKeys = "fail", - skipValidation = false, - breadcrumbsPrefix = [], -}: { - value: unknown; - requiredKeys: string[]; - getProperty: ( - preTransformedKey: string - ) => { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined; - unrecognizedObjectKeys: "fail" | "passthrough" | "strip" | undefined; - skipValidation: boolean | undefined; - breadcrumbsPrefix: string[] | undefined; - omitUndefined: boolean | undefined; -}): MaybeValid { - if (!isPlainObject(value)) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "object"), - }, - ], - }; - } - - const missingRequiredKeys = new Set(requiredKeys); - const errors: ValidationError[] = []; - const transformed: Record = {}; - - for (const [preTransformedKey, preTransformedItemValue] of Object.entries(value)) { - const property = getProperty(preTransformedKey); - - if (property != null) { - missingRequiredKeys.delete(preTransformedKey); - - const value = property.transform(preTransformedItemValue); - if (value.ok) { - transformed[property.transformedKey] = value.value; - } else { - transformed[preTransformedKey] = preTransformedItemValue; - errors.push(...value.errors); - } - } else { - switch (unrecognizedObjectKeys) { - case "fail": - errors.push({ - path: [...breadcrumbsPrefix, preTransformedKey], - message: `Unexpected key "${preTransformedKey}"`, - }); - break; - case "strip": - break; - case "passthrough": - transformed[preTransformedKey] = preTransformedItemValue; - break; - } - } - } - - errors.push( - ...requiredKeys - .filter((key) => missingRequiredKeys.has(key)) - .map((key) => ({ - path: breadcrumbsPrefix, - message: `Missing required key "${key}"`, - })) - ); - - if (errors.length === 0 || skipValidation) { - return { - ok: true, - value: transformed as Transformed, - }; - } else { - return { - ok: false, - errors, - }; - } -} - -export function getObjectUtils(schema: BaseObjectSchema): ObjectUtils { - return { - extend: (extension: ObjectSchema) => { - const baseSchema: BaseObjectSchema = { - _getParsedProperties: () => [...schema._getParsedProperties(), ...extension._getParsedProperties()], - _getRawProperties: () => [...schema._getRawProperties(), ...extension._getRawProperties()], - parse: (raw, opts) => { - return validateAndTransformExtendedObject({ - extensionKeys: extension._getRawProperties(), - value: raw, - transformBase: (rawBase) => schema.parse(rawBase, opts), - transformExtension: (rawExtension) => extension.parse(rawExtension, opts), - }); - }, - json: (parsed, opts) => { - return validateAndTransformExtendedObject({ - extensionKeys: extension._getParsedProperties(), - value: parsed, - transformBase: (parsedBase) => schema.json(parsedBase, opts), - transformExtension: (parsedExtension) => extension.json(parsedExtension, opts), - }); - }, - getType: () => SchemaType.OBJECT, - }; - - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - ...getObjectLikeUtils(baseSchema), - ...getObjectUtils(baseSchema), - }; - }, - passthrough: () => { - const baseSchema: BaseObjectSchema = - { - _getParsedProperties: () => schema._getParsedProperties(), - _getRawProperties: () => schema._getRawProperties(), - parse: (raw, opts) => { - const transformed = schema.parse(raw, { ...opts, unrecognizedObjectKeys: "passthrough" }); - if (!transformed.ok) { - return transformed; - } - return { - ok: true, - value: { - ...(raw as any), - ...transformed.value, - }, - }; - }, - json: (parsed, opts) => { - const transformed = schema.json(parsed, { ...opts, unrecognizedObjectKeys: "passthrough" }); - if (!transformed.ok) { - return transformed; - } - return { - ok: true, - value: { - ...(parsed as any), - ...transformed.value, - }, - }; - }, - getType: () => SchemaType.OBJECT, - }; - - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - ...getObjectLikeUtils(baseSchema), - ...getObjectUtils(baseSchema), - }; - }, - }; -} - -function validateAndTransformExtendedObject({ - extensionKeys, - value, - transformBase, - transformExtension, -}: { - extensionKeys: (keyof PreTransformedExtension)[]; - value: unknown; - transformBase: (value: unknown) => MaybeValid; - transformExtension: (value: unknown) => MaybeValid; -}): MaybeValid { - const extensionPropertiesSet = new Set(extensionKeys); - const [extensionProperties, baseProperties] = partition(keys(value), (key) => - extensionPropertiesSet.has(key as keyof PreTransformedExtension) - ); - - const transformedBase = transformBase(filterObject(value, baseProperties)); - const transformedExtension = transformExtension(filterObject(value, extensionProperties)); - - if (transformedBase.ok && transformedExtension.ok) { - return { - ok: true, - value: { - ...transformedBase.value, - ...transformedExtension.value, - }, - }; - } else { - return { - ok: false, - errors: [ - ...(transformedBase.ok ? [] : transformedBase.errors), - ...(transformedExtension.ok ? [] : transformedExtension.errors), - ], - }; - } -} - -function isSchemaRequired(schema: Schema): boolean { - return !isSchemaOptional(schema); -} - -function isSchemaOptional(schema: Schema): boolean { - switch (schema.getType()) { - case SchemaType.ANY: - case SchemaType.UNKNOWN: - case SchemaType.OPTIONAL: - return true; - default: - return false; - } -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/object/objectWithoutOptionalProperties.ts b/seed/ts-express/inline-types/core/schemas/builders/object/objectWithoutOptionalProperties.ts deleted file mode 100644 index a0951f48efc..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/object/objectWithoutOptionalProperties.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { object } from "./object"; -import { inferParsedPropertySchema, inferRawObjectFromPropertySchemas, ObjectSchema, PropertySchemas } from "./types"; - -export function objectWithoutOptionalProperties>( - schemas: T -): inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas { - return object(schemas) as unknown as inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas; -} - -export type inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas> = - ObjectSchema< - inferRawObjectFromPropertySchemas, - inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas - >; - -export type inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas> = { - [K in keyof T]: inferParsedPropertySchema; -}; diff --git a/seed/ts-express/inline-types/core/schemas/builders/object/property.ts b/seed/ts-express/inline-types/core/schemas/builders/object/property.ts deleted file mode 100644 index d245c4b193a..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/object/property.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Schema } from "../../Schema"; - -export function property( - rawKey: RawKey, - valueSchema: Schema -): Property { - return { - rawKey, - valueSchema, - isProperty: true, - }; -} - -export interface Property { - rawKey: RawKey; - valueSchema: Schema; - isProperty: true; -} - -export function isProperty>(maybeProperty: unknown): maybeProperty is O { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - return (maybeProperty as O).isProperty; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/object/types.ts b/seed/ts-express/inline-types/core/schemas/builders/object/types.ts deleted file mode 100644 index 9f87cbb787b..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/object/types.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { BaseSchema, inferParsed, inferRaw, Schema } from "../../Schema"; -import { addQuestionMarksToNullableProperties } from "../../utils/addQuestionMarksToNullableProperties"; -import { ObjectLikeUtils } from "../object-like"; -import { SchemaUtils } from "../schema-utils"; -import { Property } from "./property"; - -export type ObjectSchema = BaseObjectSchema & - ObjectLikeUtils & - ObjectUtils & - SchemaUtils; - -export interface BaseObjectSchema extends BaseSchema { - _getRawProperties: () => (keyof Raw)[]; - _getParsedProperties: () => (keyof Parsed)[]; -} - -export interface ObjectUtils { - extend: ( - schemas: ObjectSchema - ) => ObjectSchema; - passthrough: () => ObjectSchema; -} - -export type inferRawObject> = O extends ObjectSchema ? Raw : never; - -export type inferParsedObject> = O extends ObjectSchema - ? Parsed - : never; - -export type inferObjectSchemaFromPropertySchemas> = ObjectSchema< - inferRawObjectFromPropertySchemas, - inferParsedObjectFromPropertySchemas ->; - -export type inferRawObjectFromPropertySchemas> = - addQuestionMarksToNullableProperties<{ - [ParsedKey in keyof T as inferRawKey]: inferRawPropertySchema; - }>; - -export type inferParsedObjectFromPropertySchemas> = - addQuestionMarksToNullableProperties<{ - [K in keyof T]: inferParsedPropertySchema; - }>; - -export type PropertySchemas = Record< - ParsedKeys, - Property | Schema ->; - -export type inferRawPropertySchema

| Schema> = P extends Property< - any, - infer Raw, - any -> - ? Raw - : P extends Schema - ? inferRaw

- : never; - -export type inferParsedPropertySchema

| Schema> = P extends Property< - any, - any, - infer Parsed -> - ? Parsed - : P extends Schema - ? inferParsed

- : never; - -export type inferRawKey< - ParsedKey extends string | number | symbol, - P extends Property | Schema -> = P extends Property ? Raw : ParsedKey; diff --git a/seed/ts-express/inline-types/core/schemas/builders/primitives/any.ts b/seed/ts-express/inline-types/core/schemas/builders/primitives/any.ts deleted file mode 100644 index fcaeb04255a..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/primitives/any.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; - -export const any = createIdentitySchemaCreator(SchemaType.ANY, (value) => ({ ok: true, value })); diff --git a/seed/ts-express/inline-types/core/schemas/builders/primitives/boolean.ts b/seed/ts-express/inline-types/core/schemas/builders/primitives/boolean.ts deleted file mode 100644 index fad60562120..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/primitives/boolean.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export const boolean = createIdentitySchemaCreator( - SchemaType.BOOLEAN, - (value, { breadcrumbsPrefix = [] } = {}) => { - if (typeof value === "boolean") { - return { - ok: true, - value, - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "boolean"), - }, - ], - }; - } - } -); diff --git a/seed/ts-express/inline-types/core/schemas/builders/primitives/index.ts b/seed/ts-express/inline-types/core/schemas/builders/primitives/index.ts deleted file mode 100644 index 788f9416bfe..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/primitives/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { any } from "./any"; -export { boolean } from "./boolean"; -export { number } from "./number"; -export { string } from "./string"; -export { unknown } from "./unknown"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/primitives/number.ts b/seed/ts-express/inline-types/core/schemas/builders/primitives/number.ts deleted file mode 100644 index c2689456936..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/primitives/number.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export const number = createIdentitySchemaCreator( - SchemaType.NUMBER, - (value, { breadcrumbsPrefix = [] } = {}) => { - if (typeof value === "number") { - return { - ok: true, - value, - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "number"), - }, - ], - }; - } - } -); diff --git a/seed/ts-express/inline-types/core/schemas/builders/primitives/string.ts b/seed/ts-express/inline-types/core/schemas/builders/primitives/string.ts deleted file mode 100644 index 949f1f2a630..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/primitives/string.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export const string = createIdentitySchemaCreator( - SchemaType.STRING, - (value, { breadcrumbsPrefix = [] } = {}) => { - if (typeof value === "string") { - return { - ok: true, - value, - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "string"), - }, - ], - }; - } - } -); diff --git a/seed/ts-express/inline-types/core/schemas/builders/primitives/unknown.ts b/seed/ts-express/inline-types/core/schemas/builders/primitives/unknown.ts deleted file mode 100644 index 4d5249571f5..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/primitives/unknown.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; - -export const unknown = createIdentitySchemaCreator(SchemaType.UNKNOWN, (value) => ({ ok: true, value })); diff --git a/seed/ts-express/inline-types/core/schemas/builders/record/index.ts b/seed/ts-express/inline-types/core/schemas/builders/record/index.ts deleted file mode 100644 index 82e25c5c2af..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/record/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { record } from "./record"; -export type { BaseRecordSchema, RecordSchema } from "./types"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/record/record.ts b/seed/ts-express/inline-types/core/schemas/builders/record/record.ts deleted file mode 100644 index 6683ac3609f..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/record/record.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; -import { entries } from "../../utils/entries"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { isPlainObject } from "../../utils/isPlainObject"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { getSchemaUtils } from "../schema-utils"; -import { BaseRecordSchema, RecordSchema } from "./types"; - -export function record( - keySchema: Schema, - valueSchema: Schema -): RecordSchema { - const baseSchema: BaseRecordSchema = { - parse: (raw, opts) => { - return validateAndTransformRecord({ - value: raw, - isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, - transformKey: (key) => - keySchema.parse(key, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key} (key)`], - }), - transformValue: (value, key) => - valueSchema.parse(value, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key}`], - }), - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - }); - }, - json: (parsed, opts) => { - return validateAndTransformRecord({ - value: parsed, - isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, - transformKey: (key) => - keySchema.json(key, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key} (key)`], - }), - transformValue: (value, key) => - valueSchema.json(value, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key}`], - }), - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - }); - }, - getType: () => SchemaType.RECORD, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} - -function validateAndTransformRecord({ - value, - isKeyNumeric, - transformKey, - transformValue, - breadcrumbsPrefix = [], -}: { - value: unknown; - isKeyNumeric: boolean; - transformKey: (key: string | number) => MaybeValid; - transformValue: (value: unknown, key: string | number) => MaybeValid; - breadcrumbsPrefix: string[] | undefined; -}): MaybeValid> { - if (!isPlainObject(value)) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "object"), - }, - ], - }; - } - - return entries(value).reduce>>( - (accPromise, [stringKey, value]) => { - // skip nullish keys - if (value == null) { - return accPromise; - } - - const acc = accPromise; - - let key: string | number = stringKey; - if (isKeyNumeric) { - const numberKey = stringKey.length > 0 ? Number(stringKey) : NaN; - if (!isNaN(numberKey)) { - key = numberKey; - } - } - const transformedKey = transformKey(key); - - const transformedValue = transformValue(value, key); - - if (acc.ok && transformedKey.ok && transformedValue.ok) { - return { - ok: true, - value: { - ...acc.value, - [transformedKey.value]: transformedValue.value, - }, - }; - } - - const errors: ValidationError[] = []; - if (!acc.ok) { - errors.push(...acc.errors); - } - if (!transformedKey.ok) { - errors.push(...transformedKey.errors); - } - if (!transformedValue.ok) { - errors.push(...transformedValue.errors); - } - - return { - ok: false, - errors, - }; - }, - { ok: true, value: {} as Record } - ); -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/record/types.ts b/seed/ts-express/inline-types/core/schemas/builders/record/types.ts deleted file mode 100644 index eb82cc7f65c..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/record/types.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseSchema } from "../../Schema"; -import { SchemaUtils } from "../schema-utils"; - -export type RecordSchema< - RawKey extends string | number, - RawValue, - ParsedKey extends string | number, - ParsedValue -> = BaseRecordSchema & - SchemaUtils, Record>; - -export type BaseRecordSchema< - RawKey extends string | number, - RawValue, - ParsedKey extends string | number, - ParsedValue -> = BaseSchema, Record>; diff --git a/seed/ts-express/inline-types/core/schemas/builders/schema-utils/JsonError.ts b/seed/ts-express/inline-types/core/schemas/builders/schema-utils/JsonError.ts deleted file mode 100644 index 2b89ca0e7ad..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/schema-utils/JsonError.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ValidationError } from "../../Schema"; -import { stringifyValidationError } from "./stringifyValidationErrors"; - -export class JsonError extends Error { - constructor(public readonly errors: ValidationError[]) { - super(errors.map(stringifyValidationError).join("; ")); - Object.setPrototypeOf(this, JsonError.prototype); - } -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/schema-utils/ParseError.ts b/seed/ts-express/inline-types/core/schemas/builders/schema-utils/ParseError.ts deleted file mode 100644 index d056eb45cf7..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/schema-utils/ParseError.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ValidationError } from "../../Schema"; -import { stringifyValidationError } from "./stringifyValidationErrors"; - -export class ParseError extends Error { - constructor(public readonly errors: ValidationError[]) { - super(errors.map(stringifyValidationError).join("; ")); - Object.setPrototypeOf(this, ParseError.prototype); - } -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/schema-utils/getSchemaUtils.ts b/seed/ts-express/inline-types/core/schemas/builders/schema-utils/getSchemaUtils.ts deleted file mode 100644 index 79ecad92132..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/schema-utils/getSchemaUtils.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { BaseSchema, Schema, SchemaOptions, SchemaType } from "../../Schema"; -import { JsonError } from "./JsonError"; -import { ParseError } from "./ParseError"; - -export interface SchemaUtils { - optional: () => Schema; - transform: (transformer: SchemaTransformer) => Schema; - parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed; - jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw; -} - -export interface SchemaTransformer { - transform: (parsed: Parsed) => Transformed; - untransform: (transformed: any) => Parsed; -} - -export function getSchemaUtils(schema: BaseSchema): SchemaUtils { - return { - optional: () => optional(schema), - transform: (transformer) => transform(schema, transformer), - parseOrThrow: (raw, opts) => { - const parsed = schema.parse(raw, opts); - if (parsed.ok) { - return parsed.value; - } - throw new ParseError(parsed.errors); - }, - jsonOrThrow: (parsed, opts) => { - const raw = schema.json(parsed, opts); - if (raw.ok) { - return raw.value; - } - throw new JsonError(raw.errors); - }, - }; -} - -/** - * schema utils are defined in one file to resolve issues with circular imports - */ - -export function optional( - schema: BaseSchema -): Schema { - const baseSchema: BaseSchema = { - parse: (raw, opts) => { - if (raw == null) { - return { - ok: true, - value: undefined, - }; - } - return schema.parse(raw, opts); - }, - json: (parsed, opts) => { - if (opts?.omitUndefined && parsed === undefined) { - return { - ok: true, - value: undefined, - }; - } - if (parsed == null) { - return { - ok: true, - value: null, - }; - } - return schema.json(parsed, opts); - }, - getType: () => SchemaType.OPTIONAL, - }; - - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - }; -} - -export function transform( - schema: BaseSchema, - transformer: SchemaTransformer -): Schema { - const baseSchema: BaseSchema = { - parse: (raw, opts) => { - const parsed = schema.parse(raw, opts); - if (!parsed.ok) { - return parsed; - } - return { - ok: true, - value: transformer.transform(parsed.value), - }; - }, - json: (transformed, opts) => { - const parsed = transformer.untransform(transformed); - return schema.json(parsed, opts); - }, - getType: () => schema.getType(), - }; - - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - }; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/schema-utils/index.ts b/seed/ts-express/inline-types/core/schemas/builders/schema-utils/index.ts deleted file mode 100644 index aa04e051dfa..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/schema-utils/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { getSchemaUtils, optional, transform } from "./getSchemaUtils"; -export type { SchemaUtils } from "./getSchemaUtils"; -export { JsonError } from "./JsonError"; -export { ParseError } from "./ParseError"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/schema-utils/stringifyValidationErrors.ts b/seed/ts-express/inline-types/core/schemas/builders/schema-utils/stringifyValidationErrors.ts deleted file mode 100644 index 4160f0a2617..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/schema-utils/stringifyValidationErrors.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ValidationError } from "../../Schema"; - -export function stringifyValidationError(error: ValidationError): string { - if (error.path.length === 0) { - return error.message; - } - return `${error.path.join(" -> ")}: ${error.message}`; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/set/index.ts b/seed/ts-express/inline-types/core/schemas/builders/set/index.ts deleted file mode 100644 index f3310e8bdad..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/set/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { set } from "./set"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/set/set.ts b/seed/ts-express/inline-types/core/schemas/builders/set/set.ts deleted file mode 100644 index e9e6bb7e539..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/set/set.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { BaseSchema, Schema, SchemaType } from "../../Schema"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { list } from "../list"; -import { getSchemaUtils } from "../schema-utils"; - -export function set(schema: Schema): Schema> { - const listSchema = list(schema); - const baseSchema: BaseSchema> = { - parse: (raw, opts) => { - const parsedList = listSchema.parse(raw, opts); - if (parsedList.ok) { - return { - ok: true, - value: new Set(parsedList.value), - }; - } else { - return parsedList; - } - }, - json: (parsed, opts) => { - if (!(parsed instanceof Set)) { - return { - ok: false, - errors: [ - { - path: opts?.breadcrumbsPrefix ?? [], - message: getErrorMessageForIncorrectType(parsed, "Set"), - }, - ], - }; - } - const jsonList = listSchema.json([...parsed], opts); - return jsonList; - }, - getType: () => SchemaType.SET, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/undiscriminated-union/index.ts b/seed/ts-express/inline-types/core/schemas/builders/undiscriminated-union/index.ts deleted file mode 100644 index 75b71cb3565..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/undiscriminated-union/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type { - inferParsedUnidiscriminatedUnionSchema, - inferRawUnidiscriminatedUnionSchema, - UndiscriminatedUnionSchema, -} from "./types"; -export { undiscriminatedUnion } from "./undiscriminatedUnion"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/undiscriminated-union/types.ts b/seed/ts-express/inline-types/core/schemas/builders/undiscriminated-union/types.ts deleted file mode 100644 index 43e7108a060..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/undiscriminated-union/types.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { inferParsed, inferRaw, Schema } from "../../Schema"; - -export type UndiscriminatedUnionSchema = Schema< - inferRawUnidiscriminatedUnionSchema, - inferParsedUnidiscriminatedUnionSchema ->; - -export type inferRawUnidiscriminatedUnionSchema = inferRaw; - -export type inferParsedUnidiscriminatedUnionSchema = inferParsed; diff --git a/seed/ts-express/inline-types/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts b/seed/ts-express/inline-types/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts deleted file mode 100644 index 21ed3df0f40..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType, ValidationError } from "../../Schema"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { getSchemaUtils } from "../schema-utils"; -import { inferParsedUnidiscriminatedUnionSchema, inferRawUnidiscriminatedUnionSchema } from "./types"; - -export function undiscriminatedUnion, ...Schema[]]>( - schemas: Schemas -): Schema, inferParsedUnidiscriminatedUnionSchema> { - const baseSchema: BaseSchema< - inferRawUnidiscriminatedUnionSchema, - inferParsedUnidiscriminatedUnionSchema - > = { - parse: (raw, opts) => { - return validateAndTransformUndiscriminatedUnion>( - (schema, opts) => schema.parse(raw, opts), - schemas, - opts - ); - }, - json: (parsed, opts) => { - return validateAndTransformUndiscriminatedUnion>( - (schema, opts) => schema.json(parsed, opts), - schemas, - opts - ); - }, - getType: () => SchemaType.UNDISCRIMINATED_UNION, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} - -function validateAndTransformUndiscriminatedUnion( - transform: (schema: Schema, opts: SchemaOptions) => MaybeValid, - schemas: Schema[], - opts: SchemaOptions | undefined -): MaybeValid { - const errors: ValidationError[] = []; - for (const [index, schema] of schemas.entries()) { - const transformed = transform(schema, { ...opts, skipValidation: false }); - if (transformed.ok) { - return transformed; - } else { - for (const error of transformed.errors) { - errors.push({ - path: error.path, - message: `[Variant ${index}] ${error.message}`, - }); - } - } - } - - return { - ok: false, - errors, - }; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/union/discriminant.ts b/seed/ts-express/inline-types/core/schemas/builders/union/discriminant.ts deleted file mode 100644 index 55065bc8946..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/union/discriminant.ts +++ /dev/null @@ -1,14 +0,0 @@ -export function discriminant( - parsedDiscriminant: ParsedDiscriminant, - rawDiscriminant: RawDiscriminant -): Discriminant { - return { - parsedDiscriminant, - rawDiscriminant, - }; -} - -export interface Discriminant { - parsedDiscriminant: ParsedDiscriminant; - rawDiscriminant: RawDiscriminant; -} diff --git a/seed/ts-express/inline-types/core/schemas/builders/union/index.ts b/seed/ts-express/inline-types/core/schemas/builders/union/index.ts deleted file mode 100644 index 85fc008a2d8..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/union/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export { discriminant } from "./discriminant"; -export type { Discriminant } from "./discriminant"; -export type { - inferParsedDiscriminant, - inferParsedUnion, - inferRawDiscriminant, - inferRawUnion, - UnionSubtypes, -} from "./types"; -export { union } from "./union"; diff --git a/seed/ts-express/inline-types/core/schemas/builders/union/types.ts b/seed/ts-express/inline-types/core/schemas/builders/union/types.ts deleted file mode 100644 index 6f82c868b2d..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/union/types.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { inferParsedObject, inferRawObject, ObjectSchema } from "../object"; -import { Discriminant } from "./discriminant"; - -export type UnionSubtypes = { - [K in DiscriminantValues]: ObjectSchema; -}; - -export type inferRawUnion, U extends UnionSubtypes> = { - [K in keyof U]: Record, K> & inferRawObject; -}[keyof U]; - -export type inferParsedUnion, U extends UnionSubtypes> = { - [K in keyof U]: Record, K> & inferParsedObject; -}[keyof U]; - -export type inferRawDiscriminant> = D extends string - ? D - : D extends Discriminant - ? Raw - : never; - -export type inferParsedDiscriminant> = D extends string - ? D - : D extends Discriminant - ? Parsed - : never; diff --git a/seed/ts-express/inline-types/core/schemas/builders/union/union.ts b/seed/ts-express/inline-types/core/schemas/builders/union/union.ts deleted file mode 100644 index ab61475a572..00000000000 --- a/seed/ts-express/inline-types/core/schemas/builders/union/union.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { BaseSchema, MaybeValid, SchemaType } from "../../Schema"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { isPlainObject } from "../../utils/isPlainObject"; -import { keys } from "../../utils/keys"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { enum_ } from "../enum"; -import { ObjectSchema } from "../object"; -import { getObjectLikeUtils, ObjectLikeSchema } from "../object-like"; -import { getSchemaUtils } from "../schema-utils"; -import { Discriminant } from "./discriminant"; -import { inferParsedDiscriminant, inferParsedUnion, inferRawDiscriminant, inferRawUnion, UnionSubtypes } from "./types"; - -export function union, U extends UnionSubtypes>( - discriminant: D, - union: U -): ObjectLikeSchema, inferParsedUnion> { - const rawDiscriminant = - typeof discriminant === "string" ? discriminant : (discriminant.rawDiscriminant as inferRawDiscriminant); - const parsedDiscriminant = - typeof discriminant === "string" - ? discriminant - : (discriminant.parsedDiscriminant as inferParsedDiscriminant); - - const discriminantValueSchema = enum_(keys(union) as string[]); - - const baseSchema: BaseSchema, inferParsedUnion> = { - parse: (raw, opts) => { - return transformAndValidateUnion({ - value: raw, - discriminant: rawDiscriminant, - transformedDiscriminant: parsedDiscriminant, - transformDiscriminantValue: (discriminantValue) => - discriminantValueSchema.parse(discriminantValue, { - allowUnrecognizedEnumValues: opts?.allowUnrecognizedUnionMembers, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), rawDiscriminant], - }), - getAdditionalPropertiesSchema: (discriminantValue) => union[discriminantValue], - allowUnrecognizedUnionMembers: opts?.allowUnrecognizedUnionMembers, - transformAdditionalProperties: (additionalProperties, additionalPropertiesSchema) => - additionalPropertiesSchema.parse(additionalProperties, opts), - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - }); - }, - json: (parsed, opts) => { - return transformAndValidateUnion({ - value: parsed, - discriminant: parsedDiscriminant, - transformedDiscriminant: rawDiscriminant, - transformDiscriminantValue: (discriminantValue) => - discriminantValueSchema.json(discriminantValue, { - allowUnrecognizedEnumValues: opts?.allowUnrecognizedUnionMembers, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedDiscriminant], - }), - getAdditionalPropertiesSchema: (discriminantValue) => union[discriminantValue], - allowUnrecognizedUnionMembers: opts?.allowUnrecognizedUnionMembers, - transformAdditionalProperties: (additionalProperties, additionalPropertiesSchema) => - additionalPropertiesSchema.json(additionalProperties, opts), - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - }); - }, - getType: () => SchemaType.UNION, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - ...getObjectLikeUtils(baseSchema), - }; -} - -function transformAndValidateUnion< - TransformedDiscriminant extends string, - TransformedDiscriminantValue extends string, - TransformedAdditionalProperties ->({ - value, - discriminant, - transformedDiscriminant, - transformDiscriminantValue, - getAdditionalPropertiesSchema, - allowUnrecognizedUnionMembers = false, - transformAdditionalProperties, - breadcrumbsPrefix = [], -}: { - value: unknown; - discriminant: string; - transformedDiscriminant: TransformedDiscriminant; - transformDiscriminantValue: (discriminantValue: unknown) => MaybeValid; - getAdditionalPropertiesSchema: (discriminantValue: string) => ObjectSchema | undefined; - allowUnrecognizedUnionMembers: boolean | undefined; - transformAdditionalProperties: ( - additionalProperties: unknown, - additionalPropertiesSchema: ObjectSchema - ) => MaybeValid; - breadcrumbsPrefix: string[] | undefined; -}): MaybeValid & TransformedAdditionalProperties> { - if (!isPlainObject(value)) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "object"), - }, - ], - }; - } - - const { [discriminant]: discriminantValue, ...additionalProperties } = value; - - if (discriminantValue == null) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: `Missing discriminant ("${discriminant}")`, - }, - ], - }; - } - - const transformedDiscriminantValue = transformDiscriminantValue(discriminantValue); - if (!transformedDiscriminantValue.ok) { - return { - ok: false, - errors: transformedDiscriminantValue.errors, - }; - } - - const additionalPropertiesSchema = getAdditionalPropertiesSchema(transformedDiscriminantValue.value); - - if (additionalPropertiesSchema == null) { - if (allowUnrecognizedUnionMembers) { - return { - ok: true, - value: { - [transformedDiscriminant]: transformedDiscriminantValue.value, - ...additionalProperties, - } as Record & TransformedAdditionalProperties, - }; - } else { - return { - ok: false, - errors: [ - { - path: [...breadcrumbsPrefix, discriminant], - message: "Unexpected discriminant value", - }, - ], - }; - } - } - - const transformedAdditionalProperties = transformAdditionalProperties( - additionalProperties, - additionalPropertiesSchema - ); - if (!transformedAdditionalProperties.ok) { - return transformedAdditionalProperties; - } - - return { - ok: true, - value: { - [transformedDiscriminant]: discriminantValue, - ...transformedAdditionalProperties.value, - } as Record & TransformedAdditionalProperties, - }; -} diff --git a/seed/ts-express/inline-types/core/schemas/index.ts b/seed/ts-express/inline-types/core/schemas/index.ts deleted file mode 100644 index 5429d8b43eb..00000000000 --- a/seed/ts-express/inline-types/core/schemas/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./builders"; -export type { inferParsed, inferRaw, Schema, SchemaOptions } from "./Schema"; diff --git a/seed/ts-express/inline-types/core/schemas/utils/MaybePromise.ts b/seed/ts-express/inline-types/core/schemas/utils/MaybePromise.ts deleted file mode 100644 index 9cd354b3418..00000000000 --- a/seed/ts-express/inline-types/core/schemas/utils/MaybePromise.ts +++ /dev/null @@ -1 +0,0 @@ -export type MaybePromise = T | Promise; diff --git a/seed/ts-express/inline-types/core/schemas/utils/addQuestionMarksToNullableProperties.ts b/seed/ts-express/inline-types/core/schemas/utils/addQuestionMarksToNullableProperties.ts deleted file mode 100644 index 4111d703cd0..00000000000 --- a/seed/ts-express/inline-types/core/schemas/utils/addQuestionMarksToNullableProperties.ts +++ /dev/null @@ -1,15 +0,0 @@ -export type addQuestionMarksToNullableProperties = { - [K in OptionalKeys]?: T[K]; -} & Pick>; - -export type OptionalKeys = { - [K in keyof T]-?: undefined extends T[K] - ? K - : null extends T[K] - ? K - : 1 extends (any extends T[K] ? 0 : 1) - ? never - : K; -}[keyof T]; - -export type RequiredKeys = Exclude>; diff --git a/seed/ts-express/inline-types/core/schemas/utils/createIdentitySchemaCreator.ts b/seed/ts-express/inline-types/core/schemas/utils/createIdentitySchemaCreator.ts deleted file mode 100644 index de107cf5ee1..00000000000 --- a/seed/ts-express/inline-types/core/schemas/utils/createIdentitySchemaCreator.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { getSchemaUtils } from "../builders/schema-utils"; -import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType } from "../Schema"; -import { maybeSkipValidation } from "./maybeSkipValidation"; - -export function createIdentitySchemaCreator( - schemaType: SchemaType, - validate: (value: unknown, opts?: SchemaOptions) => MaybeValid -): () => Schema { - return () => { - const baseSchema: BaseSchema = { - parse: validate, - json: validate, - getType: () => schemaType, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; - }; -} diff --git a/seed/ts-express/inline-types/core/schemas/utils/entries.ts b/seed/ts-express/inline-types/core/schemas/utils/entries.ts deleted file mode 100644 index e122952137d..00000000000 --- a/seed/ts-express/inline-types/core/schemas/utils/entries.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function entries(object: T): [keyof T, T[keyof T]][] { - return Object.entries(object) as [keyof T, T[keyof T]][]; -} diff --git a/seed/ts-express/inline-types/core/schemas/utils/filterObject.ts b/seed/ts-express/inline-types/core/schemas/utils/filterObject.ts deleted file mode 100644 index 2c25a3455bc..00000000000 --- a/seed/ts-express/inline-types/core/schemas/utils/filterObject.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function filterObject(obj: T, keysToInclude: K[]): Pick { - const keysToIncludeSet = new Set(keysToInclude); - return Object.entries(obj).reduce((acc, [key, value]) => { - if (keysToIncludeSet.has(key as K)) { - acc[key as K] = value; - } - return acc; - // eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter - }, {} as Pick); -} diff --git a/seed/ts-express/inline-types/core/schemas/utils/getErrorMessageForIncorrectType.ts b/seed/ts-express/inline-types/core/schemas/utils/getErrorMessageForIncorrectType.ts deleted file mode 100644 index 1a5c31027ce..00000000000 --- a/seed/ts-express/inline-types/core/schemas/utils/getErrorMessageForIncorrectType.ts +++ /dev/null @@ -1,25 +0,0 @@ -export function getErrorMessageForIncorrectType(value: unknown, expectedType: string): string { - return `Expected ${expectedType}. Received ${getTypeAsString(value)}.`; -} - -function getTypeAsString(value: unknown): string { - if (Array.isArray(value)) { - return "list"; - } - if (value === null) { - return "null"; - } - if (value instanceof BigInt) { - return "BigInt"; - } - switch (typeof value) { - case "string": - return `"${value}"`; - case "bigint": - case "number": - case "boolean": - case "undefined": - return `${value}`; - } - return typeof value; -} diff --git a/seed/ts-express/inline-types/core/schemas/utils/isPlainObject.ts b/seed/ts-express/inline-types/core/schemas/utils/isPlainObject.ts deleted file mode 100644 index db82a722c35..00000000000 --- a/seed/ts-express/inline-types/core/schemas/utils/isPlainObject.ts +++ /dev/null @@ -1,17 +0,0 @@ -// borrowed from https://github.com/lodash/lodash/blob/master/isPlainObject.js -export function isPlainObject(value: unknown): value is Record { - if (typeof value !== "object" || value === null) { - return false; - } - - if (Object.getPrototypeOf(value) === null) { - return true; - } - - let proto = value; - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto); - } - - return Object.getPrototypeOf(value) === proto; -} diff --git a/seed/ts-express/inline-types/core/schemas/utils/keys.ts b/seed/ts-express/inline-types/core/schemas/utils/keys.ts deleted file mode 100644 index 01867098287..00000000000 --- a/seed/ts-express/inline-types/core/schemas/utils/keys.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function keys(object: T): (keyof T)[] { - return Object.keys(object) as (keyof T)[]; -} diff --git a/seed/ts-express/inline-types/core/schemas/utils/maybeSkipValidation.ts b/seed/ts-express/inline-types/core/schemas/utils/maybeSkipValidation.ts deleted file mode 100644 index 86c07abf2b4..00000000000 --- a/seed/ts-express/inline-types/core/schemas/utils/maybeSkipValidation.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { BaseSchema, MaybeValid, SchemaOptions } from "../Schema"; - -export function maybeSkipValidation, Raw, Parsed>(schema: S): S { - return { - ...schema, - json: transformAndMaybeSkipValidation(schema.json), - parse: transformAndMaybeSkipValidation(schema.parse), - }; -} - -function transformAndMaybeSkipValidation( - transform: (value: unknown, opts?: SchemaOptions) => MaybeValid -): (value: unknown, opts?: SchemaOptions) => MaybeValid { - return (value, opts): MaybeValid => { - const transformed = transform(value, opts); - const { skipValidation = false } = opts ?? {}; - if (!transformed.ok && skipValidation) { - // eslint-disable-next-line no-console - console.warn( - [ - "Failed to validate.", - ...transformed.errors.map( - (error) => - " - " + - (error.path.length > 0 ? `${error.path.join(".")}: ${error.message}` : error.message) - ), - ].join("\n") - ); - - return { - ok: true, - value: value as T, - }; - } else { - return transformed; - } - }; -} diff --git a/seed/ts-express/inline-types/core/schemas/utils/partition.ts b/seed/ts-express/inline-types/core/schemas/utils/partition.ts deleted file mode 100644 index f58d6f3d35f..00000000000 --- a/seed/ts-express/inline-types/core/schemas/utils/partition.ts +++ /dev/null @@ -1,12 +0,0 @@ -export function partition(items: readonly T[], predicate: (item: T) => boolean): [T[], T[]] { - const trueItems: T[] = [], - falseItems: T[] = []; - for (const item of items) { - if (predicate(item)) { - trueItems.push(item); - } else { - falseItems.push(item); - } - } - return [trueItems, falseItems]; -} diff --git a/seed/ts-express/inline-types/errors/SeedObjectError.ts b/seed/ts-express/inline-types/errors/SeedObjectError.ts deleted file mode 100644 index 18591bb0774..00000000000 --- a/seed/ts-express/inline-types/errors/SeedObjectError.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import express from "express"; - -export abstract class SeedObjectError extends Error { - constructor(public readonly errorName?: string) { - super(); - Object.setPrototypeOf(this, SeedObjectError.prototype); - } - - public abstract send(res: express.Response): Promise; -} diff --git a/seed/ts-express/inline-types/errors/index.ts b/seed/ts-express/inline-types/errors/index.ts deleted file mode 100644 index 4092350d630..00000000000 --- a/seed/ts-express/inline-types/errors/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { SeedObjectError } from "./SeedObjectError"; diff --git a/seed/ts-express/inline-types/index.ts b/seed/ts-express/inline-types/index.ts deleted file mode 100644 index be26b5526a5..00000000000 --- a/seed/ts-express/inline-types/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as SeedObject from "./api"; -export { register } from "./register"; -export { SeedObjectError } from "./errors"; diff --git a/seed/ts-express/inline-types/register.ts b/seed/ts-express/inline-types/register.ts deleted file mode 100644 index 0758a536615..00000000000 --- a/seed/ts-express/inline-types/register.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import express from "express"; -import { RootService } from "./api/service/RootService"; - -export function register( - expressApp: express.Express | express.Router, - services: { - _root: RootService; - } -): void { - (expressApp as any).use("/root", services._root.toRouter()); -} diff --git a/seed/ts-express/inline-types/serialization/index.ts b/seed/ts-express/inline-types/serialization/index.ts deleted file mode 100644 index fcc81debec4..00000000000 --- a/seed/ts-express/inline-types/serialization/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./types"; -export * from "./service"; diff --git a/seed/ts-express/inline-types/serialization/service/requests/PostRootRequest.ts b/seed/ts-express/inline-types/serialization/service/requests/PostRootRequest.ts deleted file mode 100644 index eb7ecde3fb8..00000000000 --- a/seed/ts-express/inline-types/serialization/service/requests/PostRootRequest.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../index"; -import * as SeedObject from "../../../api/index"; -import * as core from "../../../core"; - -export const PostRootRequest: core.serialization.Schema = - core.serialization.object({ - bar: core.serialization.lazyObject(() => serializers.InlineType1), - foo: core.serialization.string(), - }); - -export declare namespace PostRootRequest { - interface Raw { - bar: serializers.InlineType1.Raw; - foo: string; - } -} diff --git a/seed/ts-express/inline-types/serialization/service/requests/index.ts b/seed/ts-express/inline-types/serialization/service/requests/index.ts deleted file mode 100644 index 497781074f3..00000000000 --- a/seed/ts-express/inline-types/serialization/service/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { PostRootRequest } from "./PostRootRequest"; diff --git a/seed/ts-express/inline-types/serialization/types/InlineEnum.ts b/seed/ts-express/inline-types/serialization/types/InlineEnum.ts deleted file mode 100644 index ee1e24ef1f6..00000000000 --- a/seed/ts-express/inline-types/serialization/types/InlineEnum.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; - -export const InlineEnum: core.serialization.Schema = - core.serialization.enum_(["SUNNY", "CLOUDY", "RAINING", "SNOWING"]); - -export declare namespace InlineEnum { - type Raw = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; -} diff --git a/seed/ts-express/inline-types/serialization/types/InlineType1.ts b/seed/ts-express/inline-types/serialization/types/InlineType1.ts deleted file mode 100644 index 8ea05d90b78..00000000000 --- a/seed/ts-express/inline-types/serialization/types/InlineType1.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; - -export const InlineType1: core.serialization.ObjectSchema = - core.serialization.object({ - foo: core.serialization.string(), - bar: core.serialization.lazyObject(() => serializers.NestedInlineType1), - }); - -export declare namespace InlineType1 { - interface Raw { - foo: string; - bar: serializers.NestedInlineType1.Raw; - } -} diff --git a/seed/ts-express/inline-types/serialization/types/InlineType2.ts b/seed/ts-express/inline-types/serialization/types/InlineType2.ts deleted file mode 100644 index a2590844567..00000000000 --- a/seed/ts-express/inline-types/serialization/types/InlineType2.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; - -export const InlineType2: core.serialization.ObjectSchema = - core.serialization.object({ - baz: core.serialization.string(), - }); - -export declare namespace InlineType2 { - interface Raw { - baz: string; - } -} diff --git a/seed/ts-express/inline-types/serialization/types/InlinedDiscriminatedUnion1.ts b/seed/ts-express/inline-types/serialization/types/InlinedDiscriminatedUnion1.ts deleted file mode 100644 index 79a2c023337..00000000000 --- a/seed/ts-express/inline-types/serialization/types/InlinedDiscriminatedUnion1.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; - -export const InlinedDiscriminatedUnion1: core.serialization.Schema< - serializers.InlinedDiscriminatedUnion1.Raw, - SeedObject.InlinedDiscriminatedUnion1 -> = core.serialization - .union("type", { - type1: core.serialization.lazyObject(() => serializers.InlineType1), - type2: core.serialization.lazyObject(() => serializers.InlineType2), - }) - .transform({ - transform: (value) => value, - untransform: (value) => value, - }); - -export declare namespace InlinedDiscriminatedUnion1 { - type Raw = InlinedDiscriminatedUnion1.Type1 | InlinedDiscriminatedUnion1.Type2; - - interface Type1 extends serializers.InlineType1.Raw { - type: "type1"; - } - - interface Type2 extends serializers.InlineType2.Raw { - type: "type2"; - } -} diff --git a/seed/ts-express/inline-types/serialization/types/InlinedUndiscriminatedUnion1.ts b/seed/ts-express/inline-types/serialization/types/InlinedUndiscriminatedUnion1.ts deleted file mode 100644 index 64402d9358b..00000000000 --- a/seed/ts-express/inline-types/serialization/types/InlinedUndiscriminatedUnion1.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; - -export const InlinedUndiscriminatedUnion1: core.serialization.Schema< - serializers.InlinedUndiscriminatedUnion1.Raw, - SeedObject.InlinedUndiscriminatedUnion1 -> = core.serialization.undiscriminatedUnion([ - core.serialization.lazyObject(() => serializers.InlineType1), - core.serialization.lazyObject(() => serializers.InlineType2), -]); - -export declare namespace InlinedUndiscriminatedUnion1 { - type Raw = serializers.InlineType1.Raw | serializers.InlineType2.Raw; -} diff --git a/seed/ts-express/inline-types/serialization/types/NestedInlineType1.ts b/seed/ts-express/inline-types/serialization/types/NestedInlineType1.ts deleted file mode 100644 index 91c30faa4fc..00000000000 --- a/seed/ts-express/inline-types/serialization/types/NestedInlineType1.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; - -export const NestedInlineType1: core.serialization.ObjectSchema< - serializers.NestedInlineType1.Raw, - SeedObject.NestedInlineType1 -> = core.serialization.object({ - foo: core.serialization.string(), - bar: core.serialization.string(), - myEnum: core.serialization.lazy(() => serializers.InlineEnum), -}); - -export declare namespace NestedInlineType1 { - interface Raw { - foo: string; - bar: string; - myEnum: serializers.InlineEnum.Raw; - } -} diff --git a/seed/ts-express/inline-types/serialization/types/RootType1.ts b/seed/ts-express/inline-types/serialization/types/RootType1.ts deleted file mode 100644 index 6a546d9df61..00000000000 --- a/seed/ts-express/inline-types/serialization/types/RootType1.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; - -export const RootType1: core.serialization.ObjectSchema = - core.serialization.object({ - foo: core.serialization.string(), - bar: core.serialization.lazyObject(() => serializers.InlineType1), - }); - -export declare namespace RootType1 { - interface Raw { - foo: string; - bar: serializers.InlineType1.Raw; - } -} diff --git a/seed/ts-express/inline-types/serialization/types/index.ts b/seed/ts-express/inline-types/serialization/types/index.ts deleted file mode 100644 index bb183ec944a..00000000000 --- a/seed/ts-express/inline-types/serialization/types/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from "./RootType1"; -export * from "./InlineType1"; -export * from "./InlineType2"; -export * from "./NestedInlineType1"; -export * from "./InlinedDiscriminatedUnion1"; -export * from "./InlinedUndiscriminatedUnion1"; -export * from "./InlineEnum"; diff --git a/seed/ts-express/inline-types/snippet-templates.json b/seed/ts-express/inline-types/snippet-templates.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/ts-express/inline-types/snippet.json b/seed/ts-express/inline-types/snippet.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/seed/ts-express/mixed-case/no-custom-config/api/resources/service/types/Resource.ts b/seed/ts-express/mixed-case/no-custom-config/api/resources/service/types/Resource.ts index a57573e4223..07cc54e8be3 100644 --- a/seed/ts-express/mixed-case/no-custom-config/api/resources/service/types/Resource.ts +++ b/seed/ts-express/mixed-case/no-custom-config/api/resources/service/types/Resource.ts @@ -18,12 +18,12 @@ import * as SeedMixedCase from "../../../index"; */ export type Resource = SeedMixedCase.Resource.User | SeedMixedCase.Resource.Organization; -export declare namespace Resource { - interface User extends SeedMixedCase.User, _Base { +export namespace Resource { + export interface User extends SeedMixedCase.User, _Base { resourceType: "user"; } - interface Organization extends SeedMixedCase.Organization, _Base { + export interface Organization extends SeedMixedCase.Organization, _Base { resourceType: "Organization"; } diff --git a/seed/ts-express/mixed-case/no-custom-config/api/resources/service/types/ResourceStatus.ts b/seed/ts-express/mixed-case/no-custom-config/api/resources/service/types/ResourceStatus.ts index 62f07d2f99a..7205d324fcc 100644 --- a/seed/ts-express/mixed-case/no-custom-config/api/resources/service/types/ResourceStatus.ts +++ b/seed/ts-express/mixed-case/no-custom-config/api/resources/service/types/ResourceStatus.ts @@ -3,7 +3,6 @@ */ export type ResourceStatus = "ACTIVE" | "INACTIVE"; - export const ResourceStatus = { Active: "ACTIVE", Inactive: "INACTIVE", diff --git a/seed/ts-express/mixed-case/retain-original-casing/api/resources/service/types/Resource.ts b/seed/ts-express/mixed-case/retain-original-casing/api/resources/service/types/Resource.ts index b8366ea37d7..ef2a74911b0 100644 --- a/seed/ts-express/mixed-case/retain-original-casing/api/resources/service/types/Resource.ts +++ b/seed/ts-express/mixed-case/retain-original-casing/api/resources/service/types/Resource.ts @@ -18,12 +18,12 @@ import * as SeedMixedCase from "../../../index"; */ export type Resource = SeedMixedCase.Resource.User | SeedMixedCase.Resource.Organization; -export declare namespace Resource { - interface User extends SeedMixedCase.User, _Base { +export namespace Resource { + export interface User extends SeedMixedCase.User, _Base { resourceType: "user"; } - interface Organization extends SeedMixedCase.Organization, _Base { + export interface Organization extends SeedMixedCase.Organization, _Base { resourceType: "Organization"; } diff --git a/seed/ts-express/mixed-case/retain-original-casing/api/resources/service/types/ResourceStatus.ts b/seed/ts-express/mixed-case/retain-original-casing/api/resources/service/types/ResourceStatus.ts index 62f07d2f99a..7205d324fcc 100644 --- a/seed/ts-express/mixed-case/retain-original-casing/api/resources/service/types/ResourceStatus.ts +++ b/seed/ts-express/mixed-case/retain-original-casing/api/resources/service/types/ResourceStatus.ts @@ -3,7 +3,6 @@ */ export type ResourceStatus = "ACTIVE" | "INACTIVE"; - export const ResourceStatus = { Active: "ACTIVE", Inactive: "INACTIVE", diff --git a/seed/ts-express/multi-line-docs/api/types/Operand.ts b/seed/ts-express/multi-line-docs/api/types/Operand.ts index c7565c6f971..aaf4cd3090c 100644 --- a/seed/ts-express/multi-line-docs/api/types/Operand.ts +++ b/seed/ts-express/multi-line-docs/api/types/Operand.ts @@ -19,7 +19,6 @@ export type Operand = * The name and value should be similar * are similar for less than. */ | "less_than"; - export const Operand = { GreaterThan: ">", EqualTo: "=", diff --git a/seed/ts-express/objects-with-imports/api/resources/file/types/FileInfo.ts b/seed/ts-express/objects-with-imports/api/resources/file/types/FileInfo.ts index 26407d4b8aa..f2bc29c15db 100644 --- a/seed/ts-express/objects-with-imports/api/resources/file/types/FileInfo.ts +++ b/seed/ts-express/objects-with-imports/api/resources/file/types/FileInfo.ts @@ -16,7 +16,6 @@ export type FileInfo = /** * A directory (e.g. foo/). */ | "DIRECTORY"; - export const FileInfo = { Regular: "REGULAR", Directory: "DIRECTORY", diff --git a/seed/ts-express/pagination/api/resources/users/types/Order.ts b/seed/ts-express/pagination/api/resources/users/types/Order.ts index e5763cabff4..a6405828876 100644 --- a/seed/ts-express/pagination/api/resources/users/types/Order.ts +++ b/seed/ts-express/pagination/api/resources/users/types/Order.ts @@ -3,7 +3,6 @@ */ export type Order = "asc" | "desc"; - export const Order = { Asc: "asc", Desc: "desc", diff --git a/seed/ts-express/trace/no-custom-config/api/resources/admin/types/Test.ts b/seed/ts-express/trace/no-custom-config/api/resources/admin/types/Test.ts index 70dd2b7fc56..ae63f5ef12d 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/admin/types/Test.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/admin/types/Test.ts @@ -6,13 +6,13 @@ import * as SeedTrace from "../../../index"; export type Test = SeedTrace.Test.And | SeedTrace.Test.Or; -export declare namespace Test { - interface And { +export namespace Test { + export interface And { type: "and"; value: boolean; } - interface Or { + export interface Or { type: "or"; value: boolean; } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/commons/types/DebugVariableValue.ts b/seed/ts-express/trace/no-custom-config/api/resources/commons/types/DebugVariableValue.ts index 7c3eaed6311..ac7f88480fc 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/commons/types/DebugVariableValue.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/commons/types/DebugVariableValue.ts @@ -19,62 +19,62 @@ export type DebugVariableValue = | SeedTrace.DebugVariableValue.NullValue | SeedTrace.DebugVariableValue.GenericValue; -export declare namespace DebugVariableValue { - interface IntegerValue { +export namespace DebugVariableValue { + export interface IntegerValue { type: "integerValue"; value: number; } - interface BooleanValue { + export interface BooleanValue { type: "booleanValue"; value: boolean; } - interface DoubleValue { + export interface DoubleValue { type: "doubleValue"; value: number; } - interface StringValue { + export interface StringValue { type: "stringValue"; value: string; } - interface CharValue { + export interface CharValue { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.DebugMapValue { + export interface MapValue extends SeedTrace.DebugMapValue { type: "mapValue"; } - interface ListValue { + export interface ListValue { type: "listValue"; value: SeedTrace.DebugVariableValue[]; } - interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue { + export interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue { type: "binaryTreeNodeValue"; } - interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue { + export interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue { type: "singlyLinkedListNodeValue"; } - interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue { + export interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue { type: "doublyLinkedListNodeValue"; } - interface UndefinedValue { + export interface UndefinedValue { type: "undefinedValue"; } - interface NullValue { + export interface NullValue { type: "nullValue"; } - interface GenericValue extends SeedTrace.GenericValue { + export interface GenericValue extends SeedTrace.GenericValue { type: "genericValue"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/commons/types/Language.ts b/seed/ts-express/trace/no-custom-config/api/resources/commons/types/Language.ts index 0cc47c2d31f..7f1719a43ea 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/commons/types/Language.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/commons/types/Language.ts @@ -3,7 +3,6 @@ */ export type Language = "JAVA" | "JAVASCRIPT" | "PYTHON"; - export const Language = { Java: "JAVA", Javascript: "JAVASCRIPT", diff --git a/seed/ts-express/trace/no-custom-config/api/resources/commons/types/VariableType.ts b/seed/ts-express/trace/no-custom-config/api/resources/commons/types/VariableType.ts index 3725c71223d..d38a364dfe5 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/commons/types/VariableType.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/commons/types/VariableType.ts @@ -16,44 +16,44 @@ export type VariableType = | SeedTrace.VariableType.SinglyLinkedListType | SeedTrace.VariableType.DoublyLinkedListType; -export declare namespace VariableType { - interface IntegerType { +export namespace VariableType { + export interface IntegerType { type: "integerType"; } - interface DoubleType { + export interface DoubleType { type: "doubleType"; } - interface BooleanType { + export interface BooleanType { type: "booleanType"; } - interface StringType { + export interface StringType { type: "stringType"; } - interface CharType { + export interface CharType { type: "charType"; } - interface ListType extends SeedTrace.ListType { + export interface ListType extends SeedTrace.ListType { type: "listType"; } - interface MapType extends SeedTrace.MapType { + export interface MapType extends SeedTrace.MapType { type: "mapType"; } - interface BinaryTreeType { + export interface BinaryTreeType { type: "binaryTreeType"; } - interface SinglyLinkedListType { + export interface SinglyLinkedListType { type: "singlyLinkedListType"; } - interface DoublyLinkedListType { + export interface DoublyLinkedListType { type: "doublyLinkedListType"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/commons/types/VariableValue.ts b/seed/ts-express/trace/no-custom-config/api/resources/commons/types/VariableValue.ts index d73c90ca9d7..94240a2c2b4 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/commons/types/VariableValue.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/commons/types/VariableValue.ts @@ -17,54 +17,54 @@ export type VariableValue = | SeedTrace.VariableValue.DoublyLinkedListValue | SeedTrace.VariableValue.NullValue; -export declare namespace VariableValue { - interface IntegerValue { +export namespace VariableValue { + export interface IntegerValue { type: "integerValue"; value: number; } - interface BooleanValue { + export interface BooleanValue { type: "booleanValue"; value: boolean; } - interface DoubleValue { + export interface DoubleValue { type: "doubleValue"; value: number; } - interface StringValue { + export interface StringValue { type: "stringValue"; value: string; } - interface CharValue { + export interface CharValue { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.MapValue { + export interface MapValue extends SeedTrace.MapValue { type: "mapValue"; } - interface ListValue { + export interface ListValue { type: "listValue"; value: SeedTrace.VariableValue[]; } - interface BinaryTreeValue extends SeedTrace.BinaryTreeValue { + export interface BinaryTreeValue extends SeedTrace.BinaryTreeValue { type: "binaryTreeValue"; } - interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue { + export interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue { type: "singlyLinkedListValue"; } - interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue { + export interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue { type: "doublyLinkedListValue"; } - interface NullValue { + export interface NullValue { type: "nullValue"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/migration/types/MigrationStatus.ts b/seed/ts-express/trace/no-custom-config/api/resources/migration/types/MigrationStatus.ts index 0a6bc6f9b03..a38078ae2c0 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/migration/types/MigrationStatus.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/migration/types/MigrationStatus.ts @@ -10,7 +10,6 @@ export type MigrationStatus = * The migration is failed */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-express/trace/no-custom-config/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts b/seed/ts-express/trace/no-custom-config/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts index 577034ea128..83901a81226 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts @@ -6,8 +6,8 @@ import * as SeedTrace from "../../../index"; export type PlaylistIdNotFoundErrorBody = SeedTrace.PlaylistIdNotFoundErrorBody.PlaylistId; -export declare namespace PlaylistIdNotFoundErrorBody { - interface PlaylistId { +export namespace PlaylistIdNotFoundErrorBody { + export interface PlaylistId { type: "playlistId"; value: SeedTrace.PlaylistId; } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/playlist/types/ReservedKeywordEnum.ts b/seed/ts-express/trace/no-custom-config/api/resources/playlist/types/ReservedKeywordEnum.ts index 8ccd3d4c13e..a77a48fd64a 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/playlist/types/ReservedKeywordEnum.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/playlist/types/ReservedKeywordEnum.ts @@ -3,7 +3,6 @@ */ export type ReservedKeywordEnum = "is" | "as"; - export const ReservedKeywordEnum = { Is: "is", As: "as", diff --git a/seed/ts-express/trace/no-custom-config/api/resources/problem/types/CreateProblemError.ts b/seed/ts-express/trace/no-custom-config/api/resources/problem/types/CreateProblemError.ts index 3543a716884..b49568ddd08 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/problem/types/CreateProblemError.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/problem/types/CreateProblemError.ts @@ -6,8 +6,8 @@ import * as SeedTrace from "../../../index"; export type CreateProblemError = SeedTrace.CreateProblemError.Generic; -export declare namespace CreateProblemError { - interface Generic extends SeedTrace.GenericCreateProblemError { +export namespace CreateProblemError { + export interface Generic extends SeedTrace.GenericCreateProblemError { errorType: "generic"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/problem/types/CreateProblemResponse.ts b/seed/ts-express/trace/no-custom-config/api/resources/problem/types/CreateProblemResponse.ts index 80f89cfcb84..0e4095cac69 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/problem/types/CreateProblemResponse.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/problem/types/CreateProblemResponse.ts @@ -6,13 +6,13 @@ import * as SeedTrace from "../../../index"; export type CreateProblemResponse = SeedTrace.CreateProblemResponse.Success | SeedTrace.CreateProblemResponse.Error_; -export declare namespace CreateProblemResponse { - interface Success { +export namespace CreateProblemResponse { + export interface Success { type: "success"; value: SeedTrace.ProblemId; } - interface Error_ { + export interface Error_ { type: "error"; value: SeedTrace.CreateProblemError; } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/problem/types/ProblemDescriptionBoard.ts b/seed/ts-express/trace/no-custom-config/api/resources/problem/types/ProblemDescriptionBoard.ts index ae5a369c3e7..efcc213fcbb 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/problem/types/ProblemDescriptionBoard.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/problem/types/ProblemDescriptionBoard.ts @@ -9,18 +9,18 @@ export type ProblemDescriptionBoard = | SeedTrace.ProblemDescriptionBoard.Variable | SeedTrace.ProblemDescriptionBoard.TestCaseId; -export declare namespace ProblemDescriptionBoard { - interface Html { +export namespace ProblemDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface Variable { + export interface Variable { type: "variable"; value: SeedTrace.VariableValue; } - interface TestCaseId { + export interface TestCaseId { type: "testCaseId"; value: string; } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ActualResult.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ActualResult.ts index 6986afad702..b78eb0c13b9 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ActualResult.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ActualResult.ts @@ -9,17 +9,17 @@ export type ActualResult = | SeedTrace.ActualResult.Exception | SeedTrace.ActualResult.ExceptionV2; -export declare namespace ActualResult { - interface Value { +export namespace ActualResult { + export interface Value { type: "value"; value: SeedTrace.VariableValue; } - interface Exception extends SeedTrace.ExceptionInfo { + export interface Exception extends SeedTrace.ExceptionInfo { type: "exception"; } - interface ExceptionV2 { + export interface ExceptionV2 { type: "exceptionV2"; value: SeedTrace.ExceptionV2; } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/CodeExecutionUpdate.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/CodeExecutionUpdate.ts index 7e17d4aa354..9e41b5a9000 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/CodeExecutionUpdate.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/CodeExecutionUpdate.ts @@ -39,48 +39,48 @@ export type CodeExecutionUpdate = * Sent once a submission is graded and fully recorded. */ | SeedTrace.CodeExecutionUpdate.Finished; -export declare namespace CodeExecutionUpdate { - interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse { +export namespace CodeExecutionUpdate { + export interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse { type: "buildingExecutor"; } - interface Running extends SeedTrace.RunningResponse { + export interface Running extends SeedTrace.RunningResponse { type: "running"; } - interface Errored extends SeedTrace.ErroredResponse { + export interface Errored extends SeedTrace.ErroredResponse { type: "errored"; } - interface Stopped extends SeedTrace.StoppedResponse { + export interface Stopped extends SeedTrace.StoppedResponse { type: "stopped"; } - interface Graded extends SeedTrace.GradedResponse { + export interface Graded extends SeedTrace.GradedResponse { type: "graded"; } - interface GradedV2 extends SeedTrace.GradedResponseV2 { + export interface GradedV2 extends SeedTrace.GradedResponseV2 { type: "gradedV2"; } - interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse { + export interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse { type: "workspaceRan"; } - interface Recording extends SeedTrace.RecordingResponseNotification { + export interface Recording extends SeedTrace.RecordingResponseNotification { type: "recording"; } - interface Recorded extends SeedTrace.RecordedResponseNotification { + export interface Recorded extends SeedTrace.RecordedResponseNotification { type: "recorded"; } - interface InvalidRequest extends SeedTrace.InvalidRequestResponse { + export interface InvalidRequest extends SeedTrace.InvalidRequestResponse { type: "invalidRequest"; } - interface Finished extends SeedTrace.FinishedResponse { + export interface Finished extends SeedTrace.FinishedResponse { type: "finished"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ErrorInfo.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ErrorInfo.ts index ef3283fe81e..ddb886b4c9a 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ErrorInfo.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ErrorInfo.ts @@ -15,16 +15,16 @@ export type ErrorInfo = * */ | SeedTrace.ErrorInfo.InternalError; -export declare namespace ErrorInfo { - interface CompileError extends SeedTrace.CompileError { +export namespace ErrorInfo { + export interface CompileError extends SeedTrace.CompileError { type: "compileError"; } - interface RuntimeError extends SeedTrace.RuntimeError { + export interface RuntimeError extends SeedTrace.RuntimeError { type: "runtimeError"; } - interface InternalError extends SeedTrace.InternalError { + export interface InternalError extends SeedTrace.InternalError { type: "internalError"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ExceptionV2.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ExceptionV2.ts index 880817d708d..f43362137ad 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ExceptionV2.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ExceptionV2.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type ExceptionV2 = SeedTrace.ExceptionV2.Generic | SeedTrace.ExceptionV2.Timeout; -export declare namespace ExceptionV2 { - interface Generic extends SeedTrace.ExceptionInfo { +export namespace ExceptionV2 { + export interface Generic extends SeedTrace.ExceptionInfo { type: "generic"; } - interface Timeout { + export interface Timeout { type: "timeout"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ExecutionSessionStatus.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ExecutionSessionStatus.ts index a14d2035332..3709aaa7a69 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ExecutionSessionStatus.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/ExecutionSessionStatus.ts @@ -9,7 +9,6 @@ export type ExecutionSessionStatus = | "RUNNING_CONTAINER" | "LIVE_CONTAINER" | "FAILED_TO_LAUNCH"; - export const ExecutionSessionStatus = { CreatingContainer: "CREATING_CONTAINER", ProvisioningContainer: "PROVISIONING_CONTAINER", diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/InvalidRequestCause.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/InvalidRequestCause.ts index 3bb60f89b0f..3504cf7eaa3 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/InvalidRequestCause.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/InvalidRequestCause.ts @@ -13,16 +13,16 @@ export type InvalidRequestCause = * The submission request was routed to an incorrect language executor. */ | SeedTrace.InvalidRequestCause.UnexpectedLanguage; -export declare namespace InvalidRequestCause { - interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound { +export namespace InvalidRequestCause { + export interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound { type: "submissionIdNotFound"; } - interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported { + export interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported { type: "customTestCasesUnsupported"; } - interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError { + export interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError { type: "unexpectedLanguage"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/RunningSubmissionState.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/RunningSubmissionState.ts index 5d15c5180a9..38031ccd887 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/RunningSubmissionState.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/RunningSubmissionState.ts @@ -8,7 +8,6 @@ export type RunningSubmissionState = | "WRITING_SUBMISSION_TO_FILE" | "COMPILING_SUBMISSION" | "RUNNING_SUBMISSION"; - export const RunningSubmissionState = { QueueingSubmission: "QUEUEING_SUBMISSION", KillingHistoricalSubmissions: "KILLING_HISTORICAL_SUBMISSIONS", diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionRequest.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionRequest.ts index e63f940c5b8..e4907b98e7c 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionRequest.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionRequest.ts @@ -11,24 +11,24 @@ export type SubmissionRequest = | SeedTrace.SubmissionRequest.WorkspaceSubmit | SeedTrace.SubmissionRequest.Stop; -export declare namespace SubmissionRequest { - interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest { +export namespace SubmissionRequest { + export interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest { type: "initializeProblemRequest"; } - interface InitializeWorkspaceRequest { + export interface InitializeWorkspaceRequest { type: "initializeWorkspaceRequest"; } - interface SubmitV2 extends SeedTrace.SubmitRequestV2 { + export interface SubmitV2 extends SeedTrace.SubmitRequestV2 { type: "submitV2"; } - interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest { + export interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest { type: "workspaceSubmit"; } - interface Stop extends SeedTrace.StopRequest { + export interface Stop extends SeedTrace.StopRequest { type: "stop"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionResponse.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionResponse.ts index d2fb3f8172f..ca463a332a6 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionResponse.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionResponse.ts @@ -12,30 +12,30 @@ export type SubmissionResponse = | SeedTrace.SubmissionResponse.CodeExecutionUpdate | SeedTrace.SubmissionResponse.Terminated; -export declare namespace SubmissionResponse { - interface ServerInitialized { +export namespace SubmissionResponse { + export interface ServerInitialized { type: "serverInitialized"; } - interface ProblemInitialized { + export interface ProblemInitialized { type: "problemInitialized"; value: SeedTrace.ProblemId; } - interface WorkspaceInitialized { + export interface WorkspaceInitialized { type: "workspaceInitialized"; } - interface ServerErrored extends SeedTrace.ExceptionInfo { + export interface ServerErrored extends SeedTrace.ExceptionInfo { type: "serverErrored"; } - interface CodeExecutionUpdate { + export interface CodeExecutionUpdate { type: "codeExecutionUpdate"; value: SeedTrace.CodeExecutionUpdate; } - interface Terminated extends SeedTrace.TerminatedResponse { + export interface Terminated extends SeedTrace.TerminatedResponse { type: "terminated"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionStatusForTestCase.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionStatusForTestCase.ts index 8698643d86b..dd0d6039fee 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionStatusForTestCase.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionStatusForTestCase.ts @@ -9,17 +9,17 @@ export type SubmissionStatusForTestCase = | SeedTrace.SubmissionStatusForTestCase.GradedV2 | SeedTrace.SubmissionStatusForTestCase.Traced; -export declare namespace SubmissionStatusForTestCase { - interface Graded extends SeedTrace.TestCaseResultWithStdout { +export namespace SubmissionStatusForTestCase { + export interface Graded extends SeedTrace.TestCaseResultWithStdout { type: "graded"; } - interface GradedV2 { + export interface GradedV2 { type: "gradedV2"; value: SeedTrace.TestCaseGrade; } - interface Traced extends SeedTrace.TracedTestCase { + export interface Traced extends SeedTrace.TracedTestCase { type: "traced"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionStatusV2.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionStatusV2.ts index 652c732c408..95710f67978 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionStatusV2.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionStatusV2.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type SubmissionStatusV2 = SeedTrace.SubmissionStatusV2.Test | SeedTrace.SubmissionStatusV2.Workspace; -export declare namespace SubmissionStatusV2 { - interface Test extends SeedTrace.TestSubmissionStatusV2 { +export namespace SubmissionStatusV2 { + export interface Test extends SeedTrace.TestSubmissionStatusV2 { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2 { + export interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2 { type: "workspace"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionTypeEnum.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionTypeEnum.ts index bff5583dad7..8414392abfc 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionTypeEnum.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionTypeEnum.ts @@ -6,7 +6,6 @@ * Keep in sync with SubmissionType. */ export type SubmissionTypeEnum = "TEST"; - export const SubmissionTypeEnum = { Test: "TEST", } as const; diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionTypeState.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionTypeState.ts index fa4855ce698..c811ee050db 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionTypeState.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/SubmissionTypeState.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type SubmissionTypeState = SeedTrace.SubmissionTypeState.Test | SeedTrace.SubmissionTypeState.Workspace; -export declare namespace SubmissionTypeState { - interface Test extends SeedTrace.TestSubmissionState { +export namespace SubmissionTypeState { + export interface Test extends SeedTrace.TestSubmissionState { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionState { + export interface Workspace extends SeedTrace.WorkspaceSubmissionState { type: "workspace"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestCaseGrade.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestCaseGrade.ts index 2f02296e05a..901cf5fc6ec 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestCaseGrade.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestCaseGrade.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type TestCaseGrade = SeedTrace.TestCaseGrade.Hidden | SeedTrace.TestCaseGrade.NonHidden; -export declare namespace TestCaseGrade { - interface Hidden extends SeedTrace.TestCaseHiddenGrade { +export namespace TestCaseGrade { + export interface Hidden extends SeedTrace.TestCaseHiddenGrade { type: "hidden"; } - interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade { + export interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade { type: "nonHidden"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestSubmissionStatus.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestSubmissionStatus.ts index da3e7c63984..04dc0c011e9 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestSubmissionStatus.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestSubmissionStatus.ts @@ -10,22 +10,22 @@ export type TestSubmissionStatus = | SeedTrace.TestSubmissionStatus.Running | SeedTrace.TestSubmissionStatus.TestCaseIdToState; -export declare namespace TestSubmissionStatus { - interface Stopped { +export namespace TestSubmissionStatus { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface TestCaseIdToState { + export interface TestCaseIdToState { type: "testCaseIdToState"; value: Record; } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestSubmissionUpdateInfo.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestSubmissionUpdateInfo.ts index 69a146a5067..f04f0e0479c 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestSubmissionUpdateInfo.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/TestSubmissionUpdateInfo.ts @@ -12,30 +12,30 @@ export type TestSubmissionUpdateInfo = | SeedTrace.TestSubmissionUpdateInfo.RecordedTestCase | SeedTrace.TestSubmissionUpdateInfo.Finished; -export declare namespace TestSubmissionUpdateInfo { - interface Running { +export namespace TestSubmissionUpdateInfo { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Stopped { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate { + export interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate { type: "gradedTestCase"; } - interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate { + export interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate { type: "recordedTestCase"; } - interface Finished { + export interface Finished { type: "finished"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/WorkspaceSubmissionStatus.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/WorkspaceSubmissionStatus.ts index 5151126e193..cad2d60cdae 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/WorkspaceSubmissionStatus.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/WorkspaceSubmissionStatus.ts @@ -11,26 +11,26 @@ export type WorkspaceSubmissionStatus = | SeedTrace.WorkspaceSubmissionStatus.Ran | SeedTrace.WorkspaceSubmissionStatus.Traced; -export declare namespace WorkspaceSubmissionStatus { - interface Stopped { +export namespace WorkspaceSubmissionStatus { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails { + export interface Ran extends SeedTrace.WorkspaceRunDetails { type: "ran"; } - interface Traced extends SeedTrace.WorkspaceRunDetails { + export interface Traced extends SeedTrace.WorkspaceRunDetails { type: "traced"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts index 78c1249225c..a8b008b38fb 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts @@ -13,34 +13,34 @@ export type WorkspaceSubmissionUpdateInfo = | SeedTrace.WorkspaceSubmissionUpdateInfo.Errored | SeedTrace.WorkspaceSubmissionUpdateInfo.Finished; -export declare namespace WorkspaceSubmissionUpdateInfo { - interface Running { +export namespace WorkspaceSubmissionUpdateInfo { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails { + export interface Ran extends SeedTrace.WorkspaceRunDetails { type: "ran"; } - interface Stopped { + export interface Stopped { type: "stopped"; } - interface Traced { + export interface Traced { type: "traced"; } - interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate { + export interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate { type: "tracedV2"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Finished { + export interface Finished { type: "finished"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts index 85c6b996461..d2be6b87b97 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts @@ -8,12 +8,12 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.AssertCorrectnessCheck.DeepEquality | SeedTrace.v2.AssertCorrectnessCheck.Custom; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult { type: "custom"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/CustomFiles.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/CustomFiles.ts index b430b089eaf..06ccba9d49d 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/CustomFiles.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/CustomFiles.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../index"; export type CustomFiles = SeedTrace.v2.CustomFiles.Basic | SeedTrace.v2.CustomFiles.Custom; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.BasicCustomFiles { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.BasicCustomFiles { type: "basic"; } - interface Custom { + export interface Custom { type: "custom"; value: Record; } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/FunctionSignature.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/FunctionSignature.ts index 251760cd97e..f4adeea0b90 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/FunctionSignature.ts @@ -11,16 +11,16 @@ export type FunctionSignature = * Useful when specifying custom grading for a testcase where actualResult is defined. */ | SeedTrace.v2.FunctionSignature.VoidThatTakesActualResult; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.VoidFunctionSignature { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.VoidFunctionSignature { type: "void"; } - interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature { + export interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult { + export interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult { type: "voidThatTakesActualResult"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseFunction.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseFunction.ts index c70bdafe6bb..cc8ea6e85c2 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseFunction.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../index"; export type TestCaseFunction = SeedTrace.v2.TestCaseFunction.WithActualResult | SeedTrace.v2.TestCaseFunction.Custom; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinition { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinition { type: "custom"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index af60df46b61..3a83452376c 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.TestCaseImplementationDescriptionBoard.Html | SeedTrace.v2.TestCaseImplementationDescriptionBoard.ParamId; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface ParamId { + export interface ParamId { type: "paramId"; value: SeedTrace.v2.ParameterId; } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts index 045115835ab..66182e14e9f 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationReference = | SeedTrace.v2.TestCaseImplementationReference.TemplateId | SeedTrace.v2.TestCaseImplementationReference.Implementation; -export declare namespace TestCaseImplementationReference { - interface TemplateId { +export namespace TestCaseImplementationReference { + export interface TemplateId { type: "templateId"; value: SeedTrace.v2.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.TestCaseImplementation { + export interface Implementation extends SeedTrace.v2.TestCaseImplementation { type: "implementation"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts index 79d32643560..2c0e9b49c7c 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts @@ -8,12 +8,12 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.v3.AssertCorrectnessCheck.DeepEquality | SeedTrace.v2.v3.AssertCorrectnessCheck.Custom; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult { type: "custom"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts index 4ac8078742b..c287f6286f3 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../../../index"; export type CustomFiles = SeedTrace.v2.v3.CustomFiles.Basic | SeedTrace.v2.v3.CustomFiles.Custom; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.v3.BasicCustomFiles { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.v3.BasicCustomFiles { type: "basic"; } - interface Custom { + export interface Custom { type: "custom"; value: Record; } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts index 548b1d9092b..82243201aba 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts @@ -11,16 +11,16 @@ export type FunctionSignature = * Useful when specifying custom grading for a testcase where actualResult is defined. */ | SeedTrace.v2.v3.FunctionSignature.VoidThatTakesActualResult; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.v3.VoidFunctionSignature { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.v3.VoidFunctionSignature { type: "void"; } - interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature { + export interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult { + export interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult { type: "voidThatTakesActualResult"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts index 2381196a692..031ff15274d 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts @@ -8,12 +8,12 @@ export type TestCaseFunction = | SeedTrace.v2.v3.TestCaseFunction.WithActualResult | SeedTrace.v2.v3.TestCaseFunction.Custom; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition { type: "custom"; } } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index 8d670c214fc..157e99b52ac 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.Html | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.ParamId; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface ParamId { + export interface ParamId { type: "paramId"; value: SeedTrace.v2.v3.ParameterId; } diff --git a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts index 0fad5ef9988..67af0e57047 100644 --- a/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-express/trace/no-custom-config/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationReference = | SeedTrace.v2.v3.TestCaseImplementationReference.TemplateId | SeedTrace.v2.v3.TestCaseImplementationReference.Implementation; -export declare namespace TestCaseImplementationReference { - interface TemplateId { +export namespace TestCaseImplementationReference { + export interface TemplateId { type: "templateId"; value: SeedTrace.v2.v3.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation { + export interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation { type: "implementation"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/admin/types/Test.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/admin/types/Test.ts index 70dd2b7fc56..ae63f5ef12d 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/admin/types/Test.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/admin/types/Test.ts @@ -6,13 +6,13 @@ import * as SeedTrace from "../../../index"; export type Test = SeedTrace.Test.And | SeedTrace.Test.Or; -export declare namespace Test { - interface And { +export namespace Test { + export interface And { type: "and"; value: boolean; } - interface Or { + export interface Or { type: "or"; value: boolean; } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/DebugVariableValue.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/DebugVariableValue.ts index 7c3eaed6311..ac7f88480fc 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/DebugVariableValue.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/DebugVariableValue.ts @@ -19,62 +19,62 @@ export type DebugVariableValue = | SeedTrace.DebugVariableValue.NullValue | SeedTrace.DebugVariableValue.GenericValue; -export declare namespace DebugVariableValue { - interface IntegerValue { +export namespace DebugVariableValue { + export interface IntegerValue { type: "integerValue"; value: number; } - interface BooleanValue { + export interface BooleanValue { type: "booleanValue"; value: boolean; } - interface DoubleValue { + export interface DoubleValue { type: "doubleValue"; value: number; } - interface StringValue { + export interface StringValue { type: "stringValue"; value: string; } - interface CharValue { + export interface CharValue { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.DebugMapValue { + export interface MapValue extends SeedTrace.DebugMapValue { type: "mapValue"; } - interface ListValue { + export interface ListValue { type: "listValue"; value: SeedTrace.DebugVariableValue[]; } - interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue { + export interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue { type: "binaryTreeNodeValue"; } - interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue { + export interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue { type: "singlyLinkedListNodeValue"; } - interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue { + export interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue { type: "doublyLinkedListNodeValue"; } - interface UndefinedValue { + export interface UndefinedValue { type: "undefinedValue"; } - interface NullValue { + export interface NullValue { type: "nullValue"; } - interface GenericValue extends SeedTrace.GenericValue { + export interface GenericValue extends SeedTrace.GenericValue { type: "genericValue"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/Language.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/Language.ts index 0cc47c2d31f..7f1719a43ea 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/Language.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/Language.ts @@ -3,7 +3,6 @@ */ export type Language = "JAVA" | "JAVASCRIPT" | "PYTHON"; - export const Language = { Java: "JAVA", Javascript: "JAVASCRIPT", diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/VariableType.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/VariableType.ts index 3725c71223d..d38a364dfe5 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/VariableType.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/VariableType.ts @@ -16,44 +16,44 @@ export type VariableType = | SeedTrace.VariableType.SinglyLinkedListType | SeedTrace.VariableType.DoublyLinkedListType; -export declare namespace VariableType { - interface IntegerType { +export namespace VariableType { + export interface IntegerType { type: "integerType"; } - interface DoubleType { + export interface DoubleType { type: "doubleType"; } - interface BooleanType { + export interface BooleanType { type: "booleanType"; } - interface StringType { + export interface StringType { type: "stringType"; } - interface CharType { + export interface CharType { type: "charType"; } - interface ListType extends SeedTrace.ListType { + export interface ListType extends SeedTrace.ListType { type: "listType"; } - interface MapType extends SeedTrace.MapType { + export interface MapType extends SeedTrace.MapType { type: "mapType"; } - interface BinaryTreeType { + export interface BinaryTreeType { type: "binaryTreeType"; } - interface SinglyLinkedListType { + export interface SinglyLinkedListType { type: "singlyLinkedListType"; } - interface DoublyLinkedListType { + export interface DoublyLinkedListType { type: "doublyLinkedListType"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/VariableValue.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/VariableValue.ts index d73c90ca9d7..94240a2c2b4 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/VariableValue.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/commons/types/VariableValue.ts @@ -17,54 +17,54 @@ export type VariableValue = | SeedTrace.VariableValue.DoublyLinkedListValue | SeedTrace.VariableValue.NullValue; -export declare namespace VariableValue { - interface IntegerValue { +export namespace VariableValue { + export interface IntegerValue { type: "integerValue"; value: number; } - interface BooleanValue { + export interface BooleanValue { type: "booleanValue"; value: boolean; } - interface DoubleValue { + export interface DoubleValue { type: "doubleValue"; value: number; } - interface StringValue { + export interface StringValue { type: "stringValue"; value: string; } - interface CharValue { + export interface CharValue { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.MapValue { + export interface MapValue extends SeedTrace.MapValue { type: "mapValue"; } - interface ListValue { + export interface ListValue { type: "listValue"; value: SeedTrace.VariableValue[]; } - interface BinaryTreeValue extends SeedTrace.BinaryTreeValue { + export interface BinaryTreeValue extends SeedTrace.BinaryTreeValue { type: "binaryTreeValue"; } - interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue { + export interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue { type: "singlyLinkedListValue"; } - interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue { + export interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue { type: "doublyLinkedListValue"; } - interface NullValue { + export interface NullValue { type: "nullValue"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/migration/types/MigrationStatus.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/migration/types/MigrationStatus.ts index 0a6bc6f9b03..a38078ae2c0 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/migration/types/MigrationStatus.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/migration/types/MigrationStatus.ts @@ -10,7 +10,6 @@ export type MigrationStatus = * The migration is failed */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts index 577034ea128..83901a81226 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts @@ -6,8 +6,8 @@ import * as SeedTrace from "../../../index"; export type PlaylistIdNotFoundErrorBody = SeedTrace.PlaylistIdNotFoundErrorBody.PlaylistId; -export declare namespace PlaylistIdNotFoundErrorBody { - interface PlaylistId { +export namespace PlaylistIdNotFoundErrorBody { + export interface PlaylistId { type: "playlistId"; value: SeedTrace.PlaylistId; } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/playlist/types/ReservedKeywordEnum.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/playlist/types/ReservedKeywordEnum.ts index 8ccd3d4c13e..a77a48fd64a 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/playlist/types/ReservedKeywordEnum.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/playlist/types/ReservedKeywordEnum.ts @@ -3,7 +3,6 @@ */ export type ReservedKeywordEnum = "is" | "as"; - export const ReservedKeywordEnum = { Is: "is", As: "as", diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/CreateProblemError.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/CreateProblemError.ts index e764e29d34c..c43c26296dc 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/CreateProblemError.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/CreateProblemError.ts @@ -6,8 +6,8 @@ import * as SeedTrace from "../../../index"; export type CreateProblemError = SeedTrace.CreateProblemError.Generic; -export declare namespace CreateProblemError { - interface Generic extends SeedTrace.GenericCreateProblemError { +export namespace CreateProblemError { + export interface Generic extends SeedTrace.GenericCreateProblemError { _type: "generic"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/CreateProblemResponse.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/CreateProblemResponse.ts index 80f89cfcb84..0e4095cac69 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/CreateProblemResponse.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/CreateProblemResponse.ts @@ -6,13 +6,13 @@ import * as SeedTrace from "../../../index"; export type CreateProblemResponse = SeedTrace.CreateProblemResponse.Success | SeedTrace.CreateProblemResponse.Error_; -export declare namespace CreateProblemResponse { - interface Success { +export namespace CreateProblemResponse { + export interface Success { type: "success"; value: SeedTrace.ProblemId; } - interface Error_ { + export interface Error_ { type: "error"; value: SeedTrace.CreateProblemError; } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/ProblemDescriptionBoard.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/ProblemDescriptionBoard.ts index ae5a369c3e7..efcc213fcbb 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/ProblemDescriptionBoard.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/problem/types/ProblemDescriptionBoard.ts @@ -9,18 +9,18 @@ export type ProblemDescriptionBoard = | SeedTrace.ProblemDescriptionBoard.Variable | SeedTrace.ProblemDescriptionBoard.TestCaseId; -export declare namespace ProblemDescriptionBoard { - interface Html { +export namespace ProblemDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface Variable { + export interface Variable { type: "variable"; value: SeedTrace.VariableValue; } - interface TestCaseId { + export interface TestCaseId { type: "testCaseId"; value: string; } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ActualResult.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ActualResult.ts index 6986afad702..b78eb0c13b9 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ActualResult.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ActualResult.ts @@ -9,17 +9,17 @@ export type ActualResult = | SeedTrace.ActualResult.Exception | SeedTrace.ActualResult.ExceptionV2; -export declare namespace ActualResult { - interface Value { +export namespace ActualResult { + export interface Value { type: "value"; value: SeedTrace.VariableValue; } - interface Exception extends SeedTrace.ExceptionInfo { + export interface Exception extends SeedTrace.ExceptionInfo { type: "exception"; } - interface ExceptionV2 { + export interface ExceptionV2 { type: "exceptionV2"; value: SeedTrace.ExceptionV2; } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/CodeExecutionUpdate.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/CodeExecutionUpdate.ts index 7e17d4aa354..9e41b5a9000 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/CodeExecutionUpdate.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/CodeExecutionUpdate.ts @@ -39,48 +39,48 @@ export type CodeExecutionUpdate = * Sent once a submission is graded and fully recorded. */ | SeedTrace.CodeExecutionUpdate.Finished; -export declare namespace CodeExecutionUpdate { - interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse { +export namespace CodeExecutionUpdate { + export interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse { type: "buildingExecutor"; } - interface Running extends SeedTrace.RunningResponse { + export interface Running extends SeedTrace.RunningResponse { type: "running"; } - interface Errored extends SeedTrace.ErroredResponse { + export interface Errored extends SeedTrace.ErroredResponse { type: "errored"; } - interface Stopped extends SeedTrace.StoppedResponse { + export interface Stopped extends SeedTrace.StoppedResponse { type: "stopped"; } - interface Graded extends SeedTrace.GradedResponse { + export interface Graded extends SeedTrace.GradedResponse { type: "graded"; } - interface GradedV2 extends SeedTrace.GradedResponseV2 { + export interface GradedV2 extends SeedTrace.GradedResponseV2 { type: "gradedV2"; } - interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse { + export interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse { type: "workspaceRan"; } - interface Recording extends SeedTrace.RecordingResponseNotification { + export interface Recording extends SeedTrace.RecordingResponseNotification { type: "recording"; } - interface Recorded extends SeedTrace.RecordedResponseNotification { + export interface Recorded extends SeedTrace.RecordedResponseNotification { type: "recorded"; } - interface InvalidRequest extends SeedTrace.InvalidRequestResponse { + export interface InvalidRequest extends SeedTrace.InvalidRequestResponse { type: "invalidRequest"; } - interface Finished extends SeedTrace.FinishedResponse { + export interface Finished extends SeedTrace.FinishedResponse { type: "finished"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ErrorInfo.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ErrorInfo.ts index ef3283fe81e..ddb886b4c9a 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ErrorInfo.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ErrorInfo.ts @@ -15,16 +15,16 @@ export type ErrorInfo = * */ | SeedTrace.ErrorInfo.InternalError; -export declare namespace ErrorInfo { - interface CompileError extends SeedTrace.CompileError { +export namespace ErrorInfo { + export interface CompileError extends SeedTrace.CompileError { type: "compileError"; } - interface RuntimeError extends SeedTrace.RuntimeError { + export interface RuntimeError extends SeedTrace.RuntimeError { type: "runtimeError"; } - interface InternalError extends SeedTrace.InternalError { + export interface InternalError extends SeedTrace.InternalError { type: "internalError"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ExceptionV2.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ExceptionV2.ts index 880817d708d..f43362137ad 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ExceptionV2.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ExceptionV2.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type ExceptionV2 = SeedTrace.ExceptionV2.Generic | SeedTrace.ExceptionV2.Timeout; -export declare namespace ExceptionV2 { - interface Generic extends SeedTrace.ExceptionInfo { +export namespace ExceptionV2 { + export interface Generic extends SeedTrace.ExceptionInfo { type: "generic"; } - interface Timeout { + export interface Timeout { type: "timeout"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ExecutionSessionStatus.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ExecutionSessionStatus.ts index a14d2035332..3709aaa7a69 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ExecutionSessionStatus.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/ExecutionSessionStatus.ts @@ -9,7 +9,6 @@ export type ExecutionSessionStatus = | "RUNNING_CONTAINER" | "LIVE_CONTAINER" | "FAILED_TO_LAUNCH"; - export const ExecutionSessionStatus = { CreatingContainer: "CREATING_CONTAINER", ProvisioningContainer: "PROVISIONING_CONTAINER", diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/InvalidRequestCause.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/InvalidRequestCause.ts index 3bb60f89b0f..3504cf7eaa3 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/InvalidRequestCause.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/InvalidRequestCause.ts @@ -13,16 +13,16 @@ export type InvalidRequestCause = * The submission request was routed to an incorrect language executor. */ | SeedTrace.InvalidRequestCause.UnexpectedLanguage; -export declare namespace InvalidRequestCause { - interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound { +export namespace InvalidRequestCause { + export interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound { type: "submissionIdNotFound"; } - interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported { + export interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported { type: "customTestCasesUnsupported"; } - interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError { + export interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError { type: "unexpectedLanguage"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/RunningSubmissionState.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/RunningSubmissionState.ts index 5d15c5180a9..38031ccd887 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/RunningSubmissionState.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/RunningSubmissionState.ts @@ -8,7 +8,6 @@ export type RunningSubmissionState = | "WRITING_SUBMISSION_TO_FILE" | "COMPILING_SUBMISSION" | "RUNNING_SUBMISSION"; - export const RunningSubmissionState = { QueueingSubmission: "QUEUEING_SUBMISSION", KillingHistoricalSubmissions: "KILLING_HISTORICAL_SUBMISSIONS", diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionRequest.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionRequest.ts index e63f940c5b8..e4907b98e7c 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionRequest.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionRequest.ts @@ -11,24 +11,24 @@ export type SubmissionRequest = | SeedTrace.SubmissionRequest.WorkspaceSubmit | SeedTrace.SubmissionRequest.Stop; -export declare namespace SubmissionRequest { - interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest { +export namespace SubmissionRequest { + export interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest { type: "initializeProblemRequest"; } - interface InitializeWorkspaceRequest { + export interface InitializeWorkspaceRequest { type: "initializeWorkspaceRequest"; } - interface SubmitV2 extends SeedTrace.SubmitRequestV2 { + export interface SubmitV2 extends SeedTrace.SubmitRequestV2 { type: "submitV2"; } - interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest { + export interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest { type: "workspaceSubmit"; } - interface Stop extends SeedTrace.StopRequest { + export interface Stop extends SeedTrace.StopRequest { type: "stop"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionResponse.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionResponse.ts index d2fb3f8172f..ca463a332a6 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionResponse.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionResponse.ts @@ -12,30 +12,30 @@ export type SubmissionResponse = | SeedTrace.SubmissionResponse.CodeExecutionUpdate | SeedTrace.SubmissionResponse.Terminated; -export declare namespace SubmissionResponse { - interface ServerInitialized { +export namespace SubmissionResponse { + export interface ServerInitialized { type: "serverInitialized"; } - interface ProblemInitialized { + export interface ProblemInitialized { type: "problemInitialized"; value: SeedTrace.ProblemId; } - interface WorkspaceInitialized { + export interface WorkspaceInitialized { type: "workspaceInitialized"; } - interface ServerErrored extends SeedTrace.ExceptionInfo { + export interface ServerErrored extends SeedTrace.ExceptionInfo { type: "serverErrored"; } - interface CodeExecutionUpdate { + export interface CodeExecutionUpdate { type: "codeExecutionUpdate"; value: SeedTrace.CodeExecutionUpdate; } - interface Terminated extends SeedTrace.TerminatedResponse { + export interface Terminated extends SeedTrace.TerminatedResponse { type: "terminated"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionStatusForTestCase.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionStatusForTestCase.ts index 8698643d86b..dd0d6039fee 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionStatusForTestCase.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionStatusForTestCase.ts @@ -9,17 +9,17 @@ export type SubmissionStatusForTestCase = | SeedTrace.SubmissionStatusForTestCase.GradedV2 | SeedTrace.SubmissionStatusForTestCase.Traced; -export declare namespace SubmissionStatusForTestCase { - interface Graded extends SeedTrace.TestCaseResultWithStdout { +export namespace SubmissionStatusForTestCase { + export interface Graded extends SeedTrace.TestCaseResultWithStdout { type: "graded"; } - interface GradedV2 { + export interface GradedV2 { type: "gradedV2"; value: SeedTrace.TestCaseGrade; } - interface Traced extends SeedTrace.TracedTestCase { + export interface Traced extends SeedTrace.TracedTestCase { type: "traced"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionStatusV2.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionStatusV2.ts index 652c732c408..95710f67978 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionStatusV2.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionStatusV2.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type SubmissionStatusV2 = SeedTrace.SubmissionStatusV2.Test | SeedTrace.SubmissionStatusV2.Workspace; -export declare namespace SubmissionStatusV2 { - interface Test extends SeedTrace.TestSubmissionStatusV2 { +export namespace SubmissionStatusV2 { + export interface Test extends SeedTrace.TestSubmissionStatusV2 { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2 { + export interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2 { type: "workspace"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionTypeEnum.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionTypeEnum.ts index bff5583dad7..8414392abfc 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionTypeEnum.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionTypeEnum.ts @@ -6,7 +6,6 @@ * Keep in sync with SubmissionType. */ export type SubmissionTypeEnum = "TEST"; - export const SubmissionTypeEnum = { Test: "TEST", } as const; diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionTypeState.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionTypeState.ts index fa4855ce698..c811ee050db 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionTypeState.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/SubmissionTypeState.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type SubmissionTypeState = SeedTrace.SubmissionTypeState.Test | SeedTrace.SubmissionTypeState.Workspace; -export declare namespace SubmissionTypeState { - interface Test extends SeedTrace.TestSubmissionState { +export namespace SubmissionTypeState { + export interface Test extends SeedTrace.TestSubmissionState { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionState { + export interface Workspace extends SeedTrace.WorkspaceSubmissionState { type: "workspace"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestCaseGrade.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestCaseGrade.ts index 2f02296e05a..901cf5fc6ec 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestCaseGrade.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestCaseGrade.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type TestCaseGrade = SeedTrace.TestCaseGrade.Hidden | SeedTrace.TestCaseGrade.NonHidden; -export declare namespace TestCaseGrade { - interface Hidden extends SeedTrace.TestCaseHiddenGrade { +export namespace TestCaseGrade { + export interface Hidden extends SeedTrace.TestCaseHiddenGrade { type: "hidden"; } - interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade { + export interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade { type: "nonHidden"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestSubmissionStatus.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestSubmissionStatus.ts index da3e7c63984..04dc0c011e9 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestSubmissionStatus.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestSubmissionStatus.ts @@ -10,22 +10,22 @@ export type TestSubmissionStatus = | SeedTrace.TestSubmissionStatus.Running | SeedTrace.TestSubmissionStatus.TestCaseIdToState; -export declare namespace TestSubmissionStatus { - interface Stopped { +export namespace TestSubmissionStatus { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface TestCaseIdToState { + export interface TestCaseIdToState { type: "testCaseIdToState"; value: Record; } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestSubmissionUpdateInfo.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestSubmissionUpdateInfo.ts index 69a146a5067..f04f0e0479c 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestSubmissionUpdateInfo.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/TestSubmissionUpdateInfo.ts @@ -12,30 +12,30 @@ export type TestSubmissionUpdateInfo = | SeedTrace.TestSubmissionUpdateInfo.RecordedTestCase | SeedTrace.TestSubmissionUpdateInfo.Finished; -export declare namespace TestSubmissionUpdateInfo { - interface Running { +export namespace TestSubmissionUpdateInfo { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Stopped { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate { + export interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate { type: "gradedTestCase"; } - interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate { + export interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate { type: "recordedTestCase"; } - interface Finished { + export interface Finished { type: "finished"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/WorkspaceSubmissionStatus.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/WorkspaceSubmissionStatus.ts index 5151126e193..cad2d60cdae 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/WorkspaceSubmissionStatus.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/WorkspaceSubmissionStatus.ts @@ -11,26 +11,26 @@ export type WorkspaceSubmissionStatus = | SeedTrace.WorkspaceSubmissionStatus.Ran | SeedTrace.WorkspaceSubmissionStatus.Traced; -export declare namespace WorkspaceSubmissionStatus { - interface Stopped { +export namespace WorkspaceSubmissionStatus { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails { + export interface Ran extends SeedTrace.WorkspaceRunDetails { type: "ran"; } - interface Traced extends SeedTrace.WorkspaceRunDetails { + export interface Traced extends SeedTrace.WorkspaceRunDetails { type: "traced"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts index 78c1249225c..a8b008b38fb 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts @@ -13,34 +13,34 @@ export type WorkspaceSubmissionUpdateInfo = | SeedTrace.WorkspaceSubmissionUpdateInfo.Errored | SeedTrace.WorkspaceSubmissionUpdateInfo.Finished; -export declare namespace WorkspaceSubmissionUpdateInfo { - interface Running { +export namespace WorkspaceSubmissionUpdateInfo { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails { + export interface Ran extends SeedTrace.WorkspaceRunDetails { type: "ran"; } - interface Stopped { + export interface Stopped { type: "stopped"; } - interface Traced { + export interface Traced { type: "traced"; } - interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate { + export interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate { type: "tracedV2"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Finished { + export interface Finished { type: "finished"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts index 85c6b996461..d2be6b87b97 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts @@ -8,12 +8,12 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.AssertCorrectnessCheck.DeepEquality | SeedTrace.v2.AssertCorrectnessCheck.Custom; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult { type: "custom"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/CustomFiles.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/CustomFiles.ts index b430b089eaf..06ccba9d49d 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/CustomFiles.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/CustomFiles.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../index"; export type CustomFiles = SeedTrace.v2.CustomFiles.Basic | SeedTrace.v2.CustomFiles.Custom; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.BasicCustomFiles { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.BasicCustomFiles { type: "basic"; } - interface Custom { + export interface Custom { type: "custom"; value: Record; } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/FunctionSignature.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/FunctionSignature.ts index 251760cd97e..f4adeea0b90 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/FunctionSignature.ts @@ -11,16 +11,16 @@ export type FunctionSignature = * Useful when specifying custom grading for a testcase where actualResult is defined. */ | SeedTrace.v2.FunctionSignature.VoidThatTakesActualResult; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.VoidFunctionSignature { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.VoidFunctionSignature { type: "void"; } - interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature { + export interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult { + export interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult { type: "voidThatTakesActualResult"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseFunction.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseFunction.ts index c70bdafe6bb..cc8ea6e85c2 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseFunction.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../index"; export type TestCaseFunction = SeedTrace.v2.TestCaseFunction.WithActualResult | SeedTrace.v2.TestCaseFunction.Custom; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinition { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinition { type: "custom"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index af60df46b61..3a83452376c 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.TestCaseImplementationDescriptionBoard.Html | SeedTrace.v2.TestCaseImplementationDescriptionBoard.ParamId; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface ParamId { + export interface ParamId { type: "paramId"; value: SeedTrace.v2.ParameterId; } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts index 045115835ab..66182e14e9f 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationReference = | SeedTrace.v2.TestCaseImplementationReference.TemplateId | SeedTrace.v2.TestCaseImplementationReference.Implementation; -export declare namespace TestCaseImplementationReference { - interface TemplateId { +export namespace TestCaseImplementationReference { + export interface TemplateId { type: "templateId"; value: SeedTrace.v2.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.TestCaseImplementation { + export interface Implementation extends SeedTrace.v2.TestCaseImplementation { type: "implementation"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts index 79d32643560..2c0e9b49c7c 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts @@ -8,12 +8,12 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.v3.AssertCorrectnessCheck.DeepEquality | SeedTrace.v2.v3.AssertCorrectnessCheck.Custom; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult { type: "custom"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts index 4ac8078742b..c287f6286f3 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../../../index"; export type CustomFiles = SeedTrace.v2.v3.CustomFiles.Basic | SeedTrace.v2.v3.CustomFiles.Custom; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.v3.BasicCustomFiles { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.v3.BasicCustomFiles { type: "basic"; } - interface Custom { + export interface Custom { type: "custom"; value: Record; } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts index 548b1d9092b..82243201aba 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts @@ -11,16 +11,16 @@ export type FunctionSignature = * Useful when specifying custom grading for a testcase where actualResult is defined. */ | SeedTrace.v2.v3.FunctionSignature.VoidThatTakesActualResult; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.v3.VoidFunctionSignature { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.v3.VoidFunctionSignature { type: "void"; } - interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature { + export interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult { + export interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult { type: "voidThatTakesActualResult"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts index 2381196a692..031ff15274d 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts @@ -8,12 +8,12 @@ export type TestCaseFunction = | SeedTrace.v2.v3.TestCaseFunction.WithActualResult | SeedTrace.v2.v3.TestCaseFunction.Custom; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition { type: "custom"; } } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index 8d670c214fc..157e99b52ac 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.Html | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.ParamId; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface ParamId { + export interface ParamId { type: "paramId"; value: SeedTrace.v2.v3.ParameterId; } diff --git a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts index 0fad5ef9988..67af0e57047 100644 --- a/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-express/trace/no-zurg-trace/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationReference = | SeedTrace.v2.v3.TestCaseImplementationReference.TemplateId | SeedTrace.v2.v3.TestCaseImplementationReference.Implementation; -export declare namespace TestCaseImplementationReference { - interface TemplateId { +export namespace TestCaseImplementationReference { + export interface TemplateId { type: "templateId"; value: SeedTrace.v2.v3.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation { + export interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation { type: "implementation"; } } diff --git a/seed/ts-express/undiscriminated-unions/api/resources/union/types/KeyType.ts b/seed/ts-express/undiscriminated-unions/api/resources/union/types/KeyType.ts index 90f84c1ff15..e40980b26f7 100644 --- a/seed/ts-express/undiscriminated-unions/api/resources/union/types/KeyType.ts +++ b/seed/ts-express/undiscriminated-unions/api/resources/union/types/KeyType.ts @@ -3,7 +3,6 @@ */ export type KeyType = "name" | "value"; - export const KeyType = { Name: "name", Value: "value", diff --git a/seed/ts-express/unions/api/resources/types/types/Union.ts b/seed/ts-express/unions/api/resources/types/types/Union.ts index 1215df193a6..fec56bcc719 100644 --- a/seed/ts-express/unions/api/resources/types/types/Union.ts +++ b/seed/ts-express/unions/api/resources/types/types/Union.ts @@ -9,13 +9,13 @@ import * as SeedUnions from "../../../index"; */ export type Union = SeedUnions.Union.Foo | SeedUnions.Union.Bar; -export declare namespace Union { - interface Foo { +export namespace Union { + export interface Foo { type: "foo"; foo: SeedUnions.Foo; } - interface Bar { + export interface Bar { type: "bar"; bar: SeedUnions.Bar; } diff --git a/seed/ts-express/unions/api/resources/types/types/UnionWithBaseProperties.ts b/seed/ts-express/unions/api/resources/types/types/UnionWithBaseProperties.ts index c70f3054c60..3933d4aa9af 100644 --- a/seed/ts-express/unions/api/resources/types/types/UnionWithBaseProperties.ts +++ b/seed/ts-express/unions/api/resources/types/types/UnionWithBaseProperties.ts @@ -9,18 +9,18 @@ export type UnionWithBaseProperties = | SeedUnions.UnionWithBaseProperties.String | SeedUnions.UnionWithBaseProperties.Foo; -export declare namespace UnionWithBaseProperties { - interface Integer extends _Base { +export namespace UnionWithBaseProperties { + export interface Integer extends _Base { type: "integer"; value: number; } - interface String extends _Base { + export interface String extends _Base { type: "string"; value: string; } - interface Foo extends SeedUnions.Foo, _Base { + export interface Foo extends SeedUnions.Foo, _Base { type: "foo"; } diff --git a/seed/ts-express/unions/api/resources/types/types/UnionWithDiscriminant.ts b/seed/ts-express/unions/api/resources/types/types/UnionWithDiscriminant.ts index a5f1174798a..0d5b2c23e7c 100644 --- a/seed/ts-express/unions/api/resources/types/types/UnionWithDiscriminant.ts +++ b/seed/ts-express/unions/api/resources/types/types/UnionWithDiscriminant.ts @@ -9,13 +9,13 @@ export type UnionWithDiscriminant = * This is a Foo field. */ SeedUnions.UnionWithDiscriminant.Foo | SeedUnions.UnionWithDiscriminant.Bar; -export declare namespace UnionWithDiscriminant { - interface Foo { +export namespace UnionWithDiscriminant { + export interface Foo { type: "foo"; foo: SeedUnions.Foo; } - interface Bar { + export interface Bar { type: "bar"; bar: SeedUnions.Bar; } diff --git a/seed/ts-express/unions/api/resources/types/types/UnionWithLiteral.ts b/seed/ts-express/unions/api/resources/types/types/UnionWithLiteral.ts index 673303d649d..525d54b9031 100644 --- a/seed/ts-express/unions/api/resources/types/types/UnionWithLiteral.ts +++ b/seed/ts-express/unions/api/resources/types/types/UnionWithLiteral.ts @@ -6,8 +6,8 @@ import * as SeedUnions from "../../../index"; export type UnionWithLiteral = SeedUnions.UnionWithLiteral.Fern; -export declare namespace UnionWithLiteral { - interface Fern extends _Base { +export namespace UnionWithLiteral { + export interface Fern extends _Base { type: "fern"; value: "fern"; } diff --git a/seed/ts-express/unions/api/resources/types/types/UnionWithOptionalTime.ts b/seed/ts-express/unions/api/resources/types/types/UnionWithOptionalTime.ts index d5e2ea06176..2bfb3525ca8 100644 --- a/seed/ts-express/unions/api/resources/types/types/UnionWithOptionalTime.ts +++ b/seed/ts-express/unions/api/resources/types/types/UnionWithOptionalTime.ts @@ -6,13 +6,13 @@ import * as SeedUnions from "../../../index"; export type UnionWithOptionalTime = SeedUnions.UnionWithOptionalTime.Date_ | SeedUnions.UnionWithOptionalTime.Dateimte; -export declare namespace UnionWithOptionalTime { - interface Date_ { +export namespace UnionWithOptionalTime { + export interface Date_ { type: "date"; value?: string; } - interface Dateimte { + export interface Dateimte { type: "dateimte"; value?: Date; } diff --git a/seed/ts-express/unions/api/resources/types/types/UnionWithPrimitive.ts b/seed/ts-express/unions/api/resources/types/types/UnionWithPrimitive.ts index a5d0519e952..014c915649f 100644 --- a/seed/ts-express/unions/api/resources/types/types/UnionWithPrimitive.ts +++ b/seed/ts-express/unions/api/resources/types/types/UnionWithPrimitive.ts @@ -6,13 +6,13 @@ import * as SeedUnions from "../../../index"; export type UnionWithPrimitive = SeedUnions.UnionWithPrimitive.Integer | SeedUnions.UnionWithPrimitive.String; -export declare namespace UnionWithPrimitive { - interface Integer { +export namespace UnionWithPrimitive { + export interface Integer { type: "integer"; value: number; } - interface String { + export interface String { type: "string"; value: string; } diff --git a/seed/ts-express/unions/api/resources/types/types/UnionWithSingleElement.ts b/seed/ts-express/unions/api/resources/types/types/UnionWithSingleElement.ts index d5e0f9631ac..4be05880cb1 100644 --- a/seed/ts-express/unions/api/resources/types/types/UnionWithSingleElement.ts +++ b/seed/ts-express/unions/api/resources/types/types/UnionWithSingleElement.ts @@ -6,8 +6,8 @@ import * as SeedUnions from "../../../index"; export type UnionWithSingleElement = SeedUnions.UnionWithSingleElement.Foo; -export declare namespace UnionWithSingleElement { - interface Foo extends SeedUnions.Foo { +export namespace UnionWithSingleElement { + export interface Foo extends SeedUnions.Foo { type: "foo"; } } diff --git a/seed/ts-express/unions/api/resources/types/types/UnionWithTime.ts b/seed/ts-express/unions/api/resources/types/types/UnionWithTime.ts index 210ef6fef03..dd937debe01 100644 --- a/seed/ts-express/unions/api/resources/types/types/UnionWithTime.ts +++ b/seed/ts-express/unions/api/resources/types/types/UnionWithTime.ts @@ -9,18 +9,18 @@ export type UnionWithTime = | SeedUnions.UnionWithTime.Date_ | SeedUnions.UnionWithTime.Datetime; -export declare namespace UnionWithTime { - interface Value { +export namespace UnionWithTime { + export interface Value { type: "value"; value: number; } - interface Date_ { + export interface Date_ { type: "date"; value: string; } - interface Datetime { + export interface Datetime { type: "datetime"; value: Date; } diff --git a/seed/ts-express/unions/api/resources/types/types/UnionWithUnknown.ts b/seed/ts-express/unions/api/resources/types/types/UnionWithUnknown.ts index e05d672181a..59972746956 100644 --- a/seed/ts-express/unions/api/resources/types/types/UnionWithUnknown.ts +++ b/seed/ts-express/unions/api/resources/types/types/UnionWithUnknown.ts @@ -6,12 +6,12 @@ import * as SeedUnions from "../../../index"; export type UnionWithUnknown = SeedUnions.UnionWithUnknown.Foo | SeedUnions.UnionWithUnknown.Unknown; -export declare namespace UnionWithUnknown { - interface Foo extends SeedUnions.Foo { +export namespace UnionWithUnknown { + export interface Foo extends SeedUnions.Foo { type: "foo"; } - interface Unknown { + export interface Unknown { type: "unknown"; } } diff --git a/seed/ts-express/unions/api/resources/types/types/UnionWithoutKey.ts b/seed/ts-express/unions/api/resources/types/types/UnionWithoutKey.ts index 037fb65ab12..b4918e2526f 100644 --- a/seed/ts-express/unions/api/resources/types/types/UnionWithoutKey.ts +++ b/seed/ts-express/unions/api/resources/types/types/UnionWithoutKey.ts @@ -10,12 +10,12 @@ export type UnionWithoutKey = * This is a bar field. */ | SeedUnions.UnionWithoutKey.Bar; -export declare namespace UnionWithoutKey { - interface Foo extends SeedUnions.Foo { +export namespace UnionWithoutKey { + export interface Foo extends SeedUnions.Foo { type: "foo"; } - interface Bar extends SeedUnions.Bar { + export interface Bar extends SeedUnions.Bar { type: "bar"; } } diff --git a/seed/ts-express/unions/api/resources/union/types/Shape.ts b/seed/ts-express/unions/api/resources/union/types/Shape.ts index 95d573a7a36..d46544c5c5d 100644 --- a/seed/ts-express/unions/api/resources/union/types/Shape.ts +++ b/seed/ts-express/unions/api/resources/union/types/Shape.ts @@ -6,12 +6,12 @@ import * as SeedUnions from "../../../index"; export type Shape = SeedUnions.Shape.Circle | SeedUnions.Shape.Square; -export declare namespace Shape { - interface Circle extends SeedUnions.Circle, _Base { +export namespace Shape { + export interface Circle extends SeedUnions.Circle, _Base { type: "circle"; } - interface Square extends SeedUnions.Square, _Base { + export interface Square extends SeedUnions.Square, _Base { type: "square"; } diff --git a/seed/ts-express/validation/api/types/Shape.ts b/seed/ts-express/validation/api/types/Shape.ts index 0d256b8b1c4..d80208737b9 100644 --- a/seed/ts-express/validation/api/types/Shape.ts +++ b/seed/ts-express/validation/api/types/Shape.ts @@ -3,7 +3,6 @@ */ export type Shape = "SQUARE" | "CIRCLE" | "TRIANGLE"; - export const Shape = { Square: "SQUARE", Circle: "CIRCLE", diff --git a/seed/ts-sdk/any-auth/src/Client.ts b/seed/ts-sdk/any-auth/src/Client.ts index 45f77a755b0..b25af8ab9b6 100644 --- a/seed/ts-sdk/any-auth/src/Client.ts +++ b/seed/ts-sdk/any-auth/src/Client.ts @@ -29,6 +29,8 @@ export declare namespace SeedAnyAuthClient { export class SeedAnyAuthClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; + protected _user: User | undefined; constructor(protected readonly _options: SeedAnyAuthClient.Options) { const clientId = this._options.clientId ?? process.env["MY_CLIENT_ID"]; @@ -54,8 +56,6 @@ export class SeedAnyAuthClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, @@ -63,8 +63,6 @@ export class SeedAnyAuthClient { })); } - protected _user: User | undefined; - public get user(): User { return (this._user ??= new User({ ...this._options, diff --git a/seed/ts-sdk/api-wide-base-path/src/Client.ts b/seed/ts-sdk/api-wide-base-path/src/Client.ts index 740060cfeb5..0f7902ce3b9 100644 --- a/seed/ts-sdk/api-wide-base-path/src/Client.ts +++ b/seed/ts-sdk/api-wide-base-path/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedApiWideBasePathClient { } export class SeedApiWideBasePathClient { - constructor(protected readonly _options: SeedApiWideBasePathClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedApiWideBasePathClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/audiences/no-custom-config/src/Client.ts b/seed/ts-sdk/audiences/no-custom-config/src/Client.ts index d22419839b1..c6205ef10e9 100644 --- a/seed/ts-sdk/audiences/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/audiences/no-custom-config/src/Client.ts @@ -26,22 +26,20 @@ export declare namespace SeedAudiencesClient { } export class SeedAudiencesClient { - constructor(protected readonly _options: SeedAudiencesClient.Options) {} - protected _folderA: FolderA | undefined; + protected _folderD: FolderD | undefined; + protected _foo: Foo | undefined; + + constructor(protected readonly _options: SeedAudiencesClient.Options) {} public get folderA(): FolderA { return (this._folderA ??= new FolderA(this._options)); } - protected _folderD: FolderD | undefined; - public get folderD(): FolderD { return (this._folderD ??= new FolderD(this._options)); } - protected _foo: Foo | undefined; - public get foo(): Foo { return (this._foo ??= new Foo(this._options)); } diff --git a/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderA/client/Client.ts b/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderA/client/Client.ts index eb30358e2c9..56f024fc889 100644 --- a/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderA/client/Client.ts +++ b/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderA/client/Client.ts @@ -24,10 +24,10 @@ export declare namespace FolderA { } export class FolderA { - constructor(protected readonly _options: FolderA.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: FolderA.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderD/client/Client.ts b/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderD/client/Client.ts index bc2daead282..895b670d53b 100644 --- a/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderD/client/Client.ts +++ b/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderD/client/Client.ts @@ -24,10 +24,10 @@ export declare namespace FolderD { } export class FolderD { - constructor(protected readonly _options: FolderD.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: FolderD.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts b/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts index 9cb5420954a..425b13be819 100644 --- a/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts +++ b/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedAudiencesClient { } export class SeedAudiencesClient { - constructor(protected readonly _options: SeedAudiencesClient.Options) {} - protected _folderD: FolderD | undefined; + constructor(protected readonly _options: SeedAudiencesClient.Options) {} + public get folderD(): FolderD { return (this._folderD ??= new FolderD(this._options)); } diff --git a/seed/ts-sdk/audiences/with-partner-audience/src/api/resources/folderD/client/Client.ts b/seed/ts-sdk/audiences/with-partner-audience/src/api/resources/folderD/client/Client.ts index 3a085b790da..c5ea0e6e17c 100644 --- a/seed/ts-sdk/audiences/with-partner-audience/src/api/resources/folderD/client/Client.ts +++ b/seed/ts-sdk/audiences/with-partner-audience/src/api/resources/folderD/client/Client.ts @@ -23,10 +23,10 @@ export declare namespace FolderD { } export class FolderD { - constructor(protected readonly _options: FolderD.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: FolderD.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/auth-environment-variables/src/Client.ts b/seed/ts-sdk/auth-environment-variables/src/Client.ts index db99f8b24f4..df39c03d0a7 100644 --- a/seed/ts-sdk/auth-environment-variables/src/Client.ts +++ b/seed/ts-sdk/auth-environment-variables/src/Client.ts @@ -32,10 +32,10 @@ export declare namespace SeedAuthEnvironmentVariablesClient { } export class SeedAuthEnvironmentVariablesClient { - constructor(protected readonly _options: SeedAuthEnvironmentVariablesClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedAuthEnvironmentVariablesClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts b/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts index 035aac8211a..ed8da1e63e8 100644 --- a/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts +++ b/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts @@ -25,10 +25,10 @@ export declare namespace SeedBasicAuthEnvironmentVariablesClient { } export class SeedBasicAuthEnvironmentVariablesClient { - constructor(protected readonly _options: SeedBasicAuthEnvironmentVariablesClient.Options) {} - protected _basicAuth: BasicAuth | undefined; + constructor(protected readonly _options: SeedBasicAuthEnvironmentVariablesClient.Options) {} + public get basicAuth(): BasicAuth { return (this._basicAuth ??= new BasicAuth(this._options)); } diff --git a/seed/ts-sdk/basic-auth/src/Client.ts b/seed/ts-sdk/basic-auth/src/Client.ts index e178bc364bc..5f757f98ceb 100644 --- a/seed/ts-sdk/basic-auth/src/Client.ts +++ b/seed/ts-sdk/basic-auth/src/Client.ts @@ -25,10 +25,10 @@ export declare namespace SeedBasicAuthClient { } export class SeedBasicAuthClient { - constructor(protected readonly _options: SeedBasicAuthClient.Options) {} - protected _basicAuth: BasicAuth | undefined; + constructor(protected readonly _options: SeedBasicAuthClient.Options) {} + public get basicAuth(): BasicAuth { return (this._basicAuth ??= new BasicAuth(this._options)); } diff --git a/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts b/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts index 12dd0ac531b..536e2a04e2d 100644 --- a/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts +++ b/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedBearerTokenEnvironmentVariableClient { } export class SeedBearerTokenEnvironmentVariableClient { - constructor(protected readonly _options: SeedBearerTokenEnvironmentVariableClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedBearerTokenEnvironmentVariableClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/bytes/src/Client.ts b/seed/ts-sdk/bytes/src/Client.ts index 5b809080e1e..19f3ec412ba 100644 --- a/seed/ts-sdk/bytes/src/Client.ts +++ b/seed/ts-sdk/bytes/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedBytesClient { } export class SeedBytesClient { - constructor(protected readonly _options: SeedBytesClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedBytesClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/ContainerValue.ts b/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/ContainerValue.ts index 04cfa4e089e..0377dd788a2 100644 --- a/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/ContainerValue.ts +++ b/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/ContainerValue.ts @@ -6,13 +6,13 @@ import * as SeedApi from "../../../index"; export type ContainerValue = SeedApi.ContainerValue.List | SeedApi.ContainerValue.Optional; -export declare namespace ContainerValue { - interface List { +export namespace ContainerValue { + export interface List { type: "list"; value: SeedApi.FieldValue[]; } - interface Optional { + export interface Optional { type: "optional"; value?: SeedApi.FieldValue; } diff --git a/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/FieldValue.ts b/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/FieldValue.ts index 30d0c699a91..0b114997310 100644 --- a/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/FieldValue.ts +++ b/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/FieldValue.ts @@ -9,17 +9,17 @@ export type FieldValue = | SeedApi.FieldValue.ObjectValue | SeedApi.FieldValue.ContainerValue; -export declare namespace FieldValue { - interface PrimitiveValue { +export namespace FieldValue { + export interface PrimitiveValue { type: "primitive_value"; value: SeedApi.PrimitiveValue; } - interface ObjectValue extends SeedApi.ObjectValue { + export interface ObjectValue extends SeedApi.ObjectValue { type: "object_value"; } - interface ContainerValue { + export interface ContainerValue { type: "container_value"; value: SeedApi.ContainerValue; } diff --git a/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/PrimitiveValue.ts b/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/PrimitiveValue.ts index 58baf11d749..1b01851df2f 100644 --- a/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/PrimitiveValue.ts +++ b/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/PrimitiveValue.ts @@ -3,7 +3,6 @@ */ export type PrimitiveValue = "STRING" | "NUMBER"; - export const PrimitiveValue = { String: "STRING", Number: "NUMBER", diff --git a/seed/ts-sdk/circular-references/src/api/resources/ast/types/ContainerValue.ts b/seed/ts-sdk/circular-references/src/api/resources/ast/types/ContainerValue.ts index 04cfa4e089e..0377dd788a2 100644 --- a/seed/ts-sdk/circular-references/src/api/resources/ast/types/ContainerValue.ts +++ b/seed/ts-sdk/circular-references/src/api/resources/ast/types/ContainerValue.ts @@ -6,13 +6,13 @@ import * as SeedApi from "../../../index"; export type ContainerValue = SeedApi.ContainerValue.List | SeedApi.ContainerValue.Optional; -export declare namespace ContainerValue { - interface List { +export namespace ContainerValue { + export interface List { type: "list"; value: SeedApi.FieldValue[]; } - interface Optional { + export interface Optional { type: "optional"; value?: SeedApi.FieldValue; } diff --git a/seed/ts-sdk/circular-references/src/api/resources/ast/types/FieldValue.ts b/seed/ts-sdk/circular-references/src/api/resources/ast/types/FieldValue.ts index 30d0c699a91..0b114997310 100644 --- a/seed/ts-sdk/circular-references/src/api/resources/ast/types/FieldValue.ts +++ b/seed/ts-sdk/circular-references/src/api/resources/ast/types/FieldValue.ts @@ -9,17 +9,17 @@ export type FieldValue = | SeedApi.FieldValue.ObjectValue | SeedApi.FieldValue.ContainerValue; -export declare namespace FieldValue { - interface PrimitiveValue { +export namespace FieldValue { + export interface PrimitiveValue { type: "primitive_value"; value: SeedApi.PrimitiveValue; } - interface ObjectValue extends SeedApi.ObjectValue { + export interface ObjectValue extends SeedApi.ObjectValue { type: "object_value"; } - interface ContainerValue { + export interface ContainerValue { type: "container_value"; value: SeedApi.ContainerValue; } diff --git a/seed/ts-sdk/circular-references/src/api/resources/ast/types/PrimitiveValue.ts b/seed/ts-sdk/circular-references/src/api/resources/ast/types/PrimitiveValue.ts index 58baf11d749..1b01851df2f 100644 --- a/seed/ts-sdk/circular-references/src/api/resources/ast/types/PrimitiveValue.ts +++ b/seed/ts-sdk/circular-references/src/api/resources/ast/types/PrimitiveValue.ts @@ -3,7 +3,6 @@ */ export type PrimitiveValue = "STRING" | "NUMBER"; - export const PrimitiveValue = { String: "STRING", Number: "NUMBER", diff --git a/seed/ts-sdk/cross-package-type-names/src/Client.ts b/seed/ts-sdk/cross-package-type-names/src/Client.ts index 156252ec396..a6270ec4b53 100644 --- a/seed/ts-sdk/cross-package-type-names/src/Client.ts +++ b/seed/ts-sdk/cross-package-type-names/src/Client.ts @@ -25,22 +25,20 @@ export declare namespace SeedCrossPackageTypeNamesClient { } export class SeedCrossPackageTypeNamesClient { - constructor(protected readonly _options: SeedCrossPackageTypeNamesClient.Options) {} - protected _folderA: FolderA | undefined; + protected _folderD: FolderD | undefined; + protected _foo: Foo | undefined; + + constructor(protected readonly _options: SeedCrossPackageTypeNamesClient.Options) {} public get folderA(): FolderA { return (this._folderA ??= new FolderA(this._options)); } - protected _folderD: FolderD | undefined; - public get folderD(): FolderD { return (this._folderD ??= new FolderD(this._options)); } - protected _foo: Foo | undefined; - public get foo(): Foo { return (this._foo ??= new Foo(this._options)); } diff --git a/seed/ts-sdk/cross-package-type-names/src/api/resources/folderA/client/Client.ts b/seed/ts-sdk/cross-package-type-names/src/api/resources/folderA/client/Client.ts index 5aa684888bd..524f39daaa0 100644 --- a/seed/ts-sdk/cross-package-type-names/src/api/resources/folderA/client/Client.ts +++ b/seed/ts-sdk/cross-package-type-names/src/api/resources/folderA/client/Client.ts @@ -23,10 +23,10 @@ export declare namespace FolderA { } export class FolderA { - constructor(protected readonly _options: FolderA.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: FolderA.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/cross-package-type-names/src/api/resources/folderD/client/Client.ts b/seed/ts-sdk/cross-package-type-names/src/api/resources/folderD/client/Client.ts index 3a085b790da..c5ea0e6e17c 100644 --- a/seed/ts-sdk/cross-package-type-names/src/api/resources/folderD/client/Client.ts +++ b/seed/ts-sdk/cross-package-type-names/src/api/resources/folderD/client/Client.ts @@ -23,10 +23,10 @@ export declare namespace FolderD { } export class FolderD { - constructor(protected readonly _options: FolderD.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: FolderD.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/custom-auth/src/Client.ts b/seed/ts-sdk/custom-auth/src/Client.ts index 74409ceb17a..d4855a6f33a 100644 --- a/seed/ts-sdk/custom-auth/src/Client.ts +++ b/seed/ts-sdk/custom-auth/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedCustomAuthClient { } export class SeedCustomAuthClient { - constructor(protected readonly _options: SeedCustomAuthClient.Options) {} - protected _customAuth: CustomAuth | undefined; + constructor(protected readonly _options: SeedCustomAuthClient.Options) {} + public get customAuth(): CustomAuth { return (this._customAuth ??= new CustomAuth(this._options)); } diff --git a/seed/ts-sdk/enum/src/Client.ts b/seed/ts-sdk/enum/src/Client.ts index 317d1772fc1..0a8562b1384 100644 --- a/seed/ts-sdk/enum/src/Client.ts +++ b/seed/ts-sdk/enum/src/Client.ts @@ -25,22 +25,20 @@ export declare namespace SeedEnumClient { } export class SeedEnumClient { - constructor(protected readonly _options: SeedEnumClient.Options) {} - protected _inlinedRequest: InlinedRequest | undefined; + protected _pathParam: PathParam | undefined; + protected _queryParam: QueryParam | undefined; + + constructor(protected readonly _options: SeedEnumClient.Options) {} public get inlinedRequest(): InlinedRequest { return (this._inlinedRequest ??= new InlinedRequest(this._options)); } - protected _pathParam: PathParam | undefined; - public get pathParam(): PathParam { return (this._pathParam ??= new PathParam(this._options)); } - protected _queryParam: QueryParam | undefined; - public get queryParam(): QueryParam { return (this._queryParam ??= new QueryParam(this._options)); } diff --git a/seed/ts-sdk/enum/src/api/types/Color.ts b/seed/ts-sdk/enum/src/api/types/Color.ts index 2fa67f67f83..fab9171627b 100644 --- a/seed/ts-sdk/enum/src/api/types/Color.ts +++ b/seed/ts-sdk/enum/src/api/types/Color.ts @@ -7,7 +7,6 @@ * SeedEnum.Color.Red */ export type Color = "red" | "blue"; - export const Color = { Red: "red", Blue: "blue", diff --git a/seed/ts-sdk/enum/src/api/types/Operand.ts b/seed/ts-sdk/enum/src/api/types/Operand.ts index b527c10e61b..b023f9444b9 100644 --- a/seed/ts-sdk/enum/src/api/types/Operand.ts +++ b/seed/ts-sdk/enum/src/api/types/Operand.ts @@ -19,7 +19,6 @@ export type Operand = * The name and value should be similar * are similar for less than. */ | "less_than"; - export const Operand = { GreaterThan: ">", EqualTo: "=", diff --git a/seed/ts-sdk/error-property/union-utils/src/Client.ts b/seed/ts-sdk/error-property/union-utils/src/Client.ts index bc1b9597428..ec8a1eb055e 100644 --- a/seed/ts-sdk/error-property/union-utils/src/Client.ts +++ b/seed/ts-sdk/error-property/union-utils/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedErrorPropertyClient { } export class SeedErrorPropertyClient { - constructor(protected readonly _options: SeedErrorPropertyClient.Options) {} - protected _propertyBasedError: PropertyBasedError | undefined; + constructor(protected readonly _options: SeedErrorPropertyClient.Options) {} + public get propertyBasedError(): PropertyBasedError { return (this._propertyBasedError ??= new PropertyBasedError(this._options)); } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts index 98ed475d957..86550294c18 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts @@ -30,8 +30,24 @@ export declare namespace SeedExamplesClient { } export class SeedExamplesClient { + protected _file: File_ | undefined; + protected _health: Health | undefined; + protected _service: Service | undefined; + constructor(protected readonly _options: SeedExamplesClient.Options) {} + public get file(): File_ { + return (this._file ??= new File_(this._options)); + } + + public get health(): Health { + return (this._health ??= new Health(this._options)); + } + + public get service(): Service { + return (this._service ??= new Service(this._options)); + } + /** * @param {string} request * @param {SeedExamplesClient.RequestOptions} requestOptions - Request-specific configuration. @@ -153,24 +169,6 @@ export class SeedExamplesClient { } } - protected _file: File_ | undefined; - - public get file(): File_ { - return (this._file ??= new File_(this._options)); - } - - protected _health: Health | undefined; - - public get health(): Health { - return (this._health ??= new Health(this._options)); - } - - protected _service: Service | undefined; - - public get service(): Service { - return (this._service ??= new Service(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/commons/resources/types/types/Data.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/commons/resources/types/types/Data.ts index ca73fda6852..ff6636b20e7 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/commons/resources/types/types/Data.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/commons/resources/types/types/Data.ts @@ -13,13 +13,13 @@ import * as SeedExamples from "../../../../../index"; */ export type Data = SeedExamples.commons.Data.String | SeedExamples.commons.Data.Base64; -export declare namespace Data { - interface String { +export namespace Data { + export interface String { type: "string"; value: string; } - interface Base64 { + export interface Base64 { type: "base64"; value: string; } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/commons/resources/types/types/EventInfo.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/commons/resources/types/types/EventInfo.ts index 559f7726408..619f49001c6 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/commons/resources/types/types/EventInfo.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/commons/resources/types/types/EventInfo.ts @@ -17,12 +17,12 @@ import * as SeedExamples from "../../../../../index"; */ export type EventInfo = SeedExamples.commons.EventInfo.Metadata | SeedExamples.commons.EventInfo.Tag; -export declare namespace EventInfo { - interface Metadata extends SeedExamples.commons.Metadata { +export namespace EventInfo { + export interface Metadata extends SeedExamples.commons.Metadata { type: "metadata"; } - interface Tag { + export interface Tag { type: "tag"; value: SeedExamples.commons.Tag; } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/client/Client.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/client/Client.ts index 215152278d5..9bb28c947a2 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/client/Client.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/client/Client.ts @@ -26,16 +26,15 @@ export declare namespace File_ { } export class File_ { - constructor(protected readonly _options: File_.Options) {} - protected _notification: Notification | undefined; + protected _service: Service | undefined; + + constructor(protected readonly _options: File_.Options) {} public get notification(): Notification { return (this._notification ??= new Notification(this._options)); } - protected _service: Service | undefined; - public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/resources/notification/client/Client.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/resources/notification/client/Client.ts index b60310ce619..b656ba4419e 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/resources/notification/client/Client.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/resources/notification/client/Client.ts @@ -25,10 +25,10 @@ export declare namespace Notification { } export class Notification { - constructor(protected readonly _options: Notification.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: Notification.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/health/client/Client.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/health/client/Client.ts index 08f634494cc..eeae565550f 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/health/client/Client.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/health/client/Client.ts @@ -25,10 +25,10 @@ export declare namespace Health { } export class Health { - constructor(protected readonly _options: Health.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: Health.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Exception.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Exception.ts index e83b4952829..11ef21c1f01 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Exception.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Exception.ts @@ -15,12 +15,12 @@ import * as SeedExamples from "../../../index"; */ export type Exception = SeedExamples.Exception.Generic | SeedExamples.Exception.Timeout; -export declare namespace Exception { - interface Generic extends SeedExamples.ExceptionInfo { +export namespace Exception { + export interface Generic extends SeedExamples.ExceptionInfo { type: "generic"; } - interface Timeout { + export interface Timeout { type: "timeout"; } } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Metadata.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Metadata.ts index d35087a1c66..b99d4869a53 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Metadata.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Metadata.ts @@ -13,13 +13,13 @@ import * as SeedExamples from "../../../index"; */ export type Metadata = SeedExamples.Metadata.Html | SeedExamples.Metadata.Markdown; -export declare namespace Metadata { - interface Html extends _Base { +export namespace Metadata { + export interface Html extends _Base { type: "html"; value: string; } - interface Markdown extends _Base { + export interface Markdown extends _Base { type: "markdown"; value: string; } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/MigrationStatus.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/MigrationStatus.ts index c45e7382155..11502aa2e9d 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/MigrationStatus.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/MigrationStatus.ts @@ -17,7 +17,6 @@ export type MigrationStatus = * The migration failed. */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Test.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Test.ts index c1d733da0eb..7fcc346381e 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Test.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/Test.ts @@ -19,13 +19,13 @@ import * as SeedExamples from "../../../index"; */ export type Test = SeedExamples.Test.And | SeedExamples.Test.Or; -export declare namespace Test { - interface And { +export namespace Test { + export interface And { type: "and"; value: boolean; } - interface Or { + export interface Or { type: "or"; value: boolean; } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/BasicType.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/BasicType.ts index 32e12a88016..d20f2862feb 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/BasicType.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/BasicType.ts @@ -3,7 +3,6 @@ */ export type BasicType = "primitive" | "literal"; - export const BasicType = { Primitive: "primitive", Literal: "literal", diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/ComplexType.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/ComplexType.ts index f61ca784ac5..4ef541c74d4 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/ComplexType.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/ComplexType.ts @@ -3,7 +3,6 @@ */ export type ComplexType = "object" | "union" | "unknown"; - export const ComplexType = { Object: "object", Union: "union", diff --git a/seed/ts-sdk/examples/retain-original-casing/src/Client.ts b/seed/ts-sdk/examples/retain-original-casing/src/Client.ts index 98ed475d957..86550294c18 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/Client.ts @@ -30,8 +30,24 @@ export declare namespace SeedExamplesClient { } export class SeedExamplesClient { + protected _file: File_ | undefined; + protected _health: Health | undefined; + protected _service: Service | undefined; + constructor(protected readonly _options: SeedExamplesClient.Options) {} + public get file(): File_ { + return (this._file ??= new File_(this._options)); + } + + public get health(): Health { + return (this._health ??= new Health(this._options)); + } + + public get service(): Service { + return (this._service ??= new Service(this._options)); + } + /** * @param {string} request * @param {SeedExamplesClient.RequestOptions} requestOptions - Request-specific configuration. @@ -153,24 +169,6 @@ export class SeedExamplesClient { } } - protected _file: File_ | undefined; - - public get file(): File_ { - return (this._file ??= new File_(this._options)); - } - - protected _health: Health | undefined; - - public get health(): Health { - return (this._health ??= new Health(this._options)); - } - - protected _service: Service | undefined; - - public get service(): Service { - return (this._service ??= new Service(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/commons/resources/types/types/Data.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/commons/resources/types/types/Data.ts index ca73fda6852..ff6636b20e7 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/commons/resources/types/types/Data.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/commons/resources/types/types/Data.ts @@ -13,13 +13,13 @@ import * as SeedExamples from "../../../../../index"; */ export type Data = SeedExamples.commons.Data.String | SeedExamples.commons.Data.Base64; -export declare namespace Data { - interface String { +export namespace Data { + export interface String { type: "string"; value: string; } - interface Base64 { + export interface Base64 { type: "base64"; value: string; } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/commons/resources/types/types/EventInfo.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/commons/resources/types/types/EventInfo.ts index 559f7726408..619f49001c6 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/commons/resources/types/types/EventInfo.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/commons/resources/types/types/EventInfo.ts @@ -17,12 +17,12 @@ import * as SeedExamples from "../../../../../index"; */ export type EventInfo = SeedExamples.commons.EventInfo.Metadata | SeedExamples.commons.EventInfo.Tag; -export declare namespace EventInfo { - interface Metadata extends SeedExamples.commons.Metadata { +export namespace EventInfo { + export interface Metadata extends SeedExamples.commons.Metadata { type: "metadata"; } - interface Tag { + export interface Tag { type: "tag"; value: SeedExamples.commons.Tag; } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/client/Client.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/client/Client.ts index 215152278d5..9bb28c947a2 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/client/Client.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/client/Client.ts @@ -26,16 +26,15 @@ export declare namespace File_ { } export class File_ { - constructor(protected readonly _options: File_.Options) {} - protected _notification: Notification | undefined; + protected _service: Service | undefined; + + constructor(protected readonly _options: File_.Options) {} public get notification(): Notification { return (this._notification ??= new Notification(this._options)); } - protected _service: Service | undefined; - public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/resources/notification/client/Client.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/resources/notification/client/Client.ts index b60310ce619..b656ba4419e 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/resources/notification/client/Client.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/resources/notification/client/Client.ts @@ -25,10 +25,10 @@ export declare namespace Notification { } export class Notification { - constructor(protected readonly _options: Notification.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: Notification.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/health/client/Client.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/health/client/Client.ts index 08f634494cc..eeae565550f 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/health/client/Client.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/health/client/Client.ts @@ -25,10 +25,10 @@ export declare namespace Health { } export class Health { - constructor(protected readonly _options: Health.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: Health.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Exception.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Exception.ts index e83b4952829..11ef21c1f01 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Exception.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Exception.ts @@ -15,12 +15,12 @@ import * as SeedExamples from "../../../index"; */ export type Exception = SeedExamples.Exception.Generic | SeedExamples.Exception.Timeout; -export declare namespace Exception { - interface Generic extends SeedExamples.ExceptionInfo { +export namespace Exception { + export interface Generic extends SeedExamples.ExceptionInfo { type: "generic"; } - interface Timeout { + export interface Timeout { type: "timeout"; } } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Metadata.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Metadata.ts index d35087a1c66..b99d4869a53 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Metadata.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Metadata.ts @@ -13,13 +13,13 @@ import * as SeedExamples from "../../../index"; */ export type Metadata = SeedExamples.Metadata.Html | SeedExamples.Metadata.Markdown; -export declare namespace Metadata { - interface Html extends _Base { +export namespace Metadata { + export interface Html extends _Base { type: "html"; value: string; } - interface Markdown extends _Base { + export interface Markdown extends _Base { type: "markdown"; value: string; } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/MigrationStatus.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/MigrationStatus.ts index c45e7382155..11502aa2e9d 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/MigrationStatus.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/MigrationStatus.ts @@ -17,7 +17,6 @@ export type MigrationStatus = * The migration failed. */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Test.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Test.ts index c1d733da0eb..7fcc346381e 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Test.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/Test.ts @@ -19,13 +19,13 @@ import * as SeedExamples from "../../../index"; */ export type Test = SeedExamples.Test.And | SeedExamples.Test.Or; -export declare namespace Test { - interface And { +export namespace Test { + export interface And { type: "and"; value: boolean; } - interface Or { + export interface Or { type: "or"; value: boolean; } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/types/BasicType.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/types/BasicType.ts index 32e12a88016..d20f2862feb 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/types/BasicType.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/types/BasicType.ts @@ -3,7 +3,6 @@ */ export type BasicType = "primitive" | "literal"; - export const BasicType = { Primitive: "primitive", Literal: "literal", diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/types/ComplexType.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/types/ComplexType.ts index f61ca784ac5..4ef541c74d4 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/types/ComplexType.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/types/ComplexType.ts @@ -3,7 +3,6 @@ */ export type ComplexType = "object" | "union" | "unknown"; - export const ComplexType = { Object: "object", Union: "union", diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts index 9da7b36ff52..119821de7f2 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace SeedExhaustiveClient { } export class SeedExhaustiveClient { - constructor(protected readonly _options: SeedExhaustiveClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: SeedExhaustiveClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/union/types/Animal.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/union/types/Animal.ts index b03ca8d422a..c05e5891781 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/union/types/Animal.ts @@ -6,12 +6,12 @@ import * as SeedExhaustive from "../../../../../index"; export type Animal = SeedExhaustive.types.Animal.Dog | SeedExhaustive.types.Animal.Cat; -export declare namespace Animal { - interface Dog extends SeedExhaustive.types.Dog { +export namespace Animal { + export interface Dog extends SeedExhaustive.types.Dog { animal: "dog"; } - interface Cat extends SeedExhaustive.types.Cat { + export interface Cat extends SeedExhaustive.types.Cat { animal: "cat"; } } diff --git a/seed/ts-sdk/exhaustive/bigint/src/Client.ts b/seed/ts-sdk/exhaustive/bigint/src/Client.ts index 9da7b36ff52..119821de7f2 100644 --- a/seed/ts-sdk/exhaustive/bigint/src/Client.ts +++ b/seed/ts-sdk/exhaustive/bigint/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace SeedExhaustiveClient { } export class SeedExhaustiveClient { - constructor(protected readonly _options: SeedExhaustiveClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: SeedExhaustiveClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/union/types/Animal.ts b/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/union/types/Animal.ts index b03ca8d422a..c05e5891781 100644 --- a/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/union/types/Animal.ts @@ -6,12 +6,12 @@ import * as SeedExhaustive from "../../../../../index"; export type Animal = SeedExhaustive.types.Animal.Dog | SeedExhaustive.types.Animal.Cat; -export declare namespace Animal { - interface Dog extends SeedExhaustive.types.Dog { +export namespace Animal { + export interface Dog extends SeedExhaustive.types.Dog { animal: "dog"; } - interface Cat extends SeedExhaustive.types.Cat { + export interface Cat extends SeedExhaustive.types.Cat { animal: "cat"; } } diff --git a/seed/ts-sdk/exhaustive/bundle/src/Client.ts b/seed/ts-sdk/exhaustive/bundle/src/Client.ts index ac84bf99d12..ecf0e60dc0a 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/Client.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace FiddleClient { } export class FiddleClient { - constructor(protected readonly _options: FiddleClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: FiddleClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts index 28de602dc42..b6d96953f58 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnListOfObjects.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts index 6cc22075b93..b8e9e1bf2c6 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnListOfPrimitives.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts index c55ca2d5d9a..b27cf746001 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnMapOfPrimToObject.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts index dbba08edfaf..dcd313ba2f5 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnMapPrimToPrim.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts index 12930b17744..728c001b47e 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnOptional.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts index 5d74c307429..60af19d1d6c 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnSetOfObjects.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts index 6cbdc14fc71..2bfc53856c3 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnSetOfPrimitives.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts index c474809d2c2..5c737917554 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.contentType.postJsonPatchContentType.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts index 69cbf6e95a0..b279e096002 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.contentType.postJsonPatchContentWithCharsetType.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts index dc76cc3775f..df12d344497 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.enum_.getAndReturnEnum.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts index 29618127d0b..dbd1e9f452a 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testDelete.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts index c2e93d94b18..c5a890c5c13 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testGet.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts index 3a2041e7fe0..f2c17c5b99d 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testPatch.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts index d38d39be2f3..c800a582433 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testPost.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts index 88bd33283d8..b74a22b12fe 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testPut.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts index 68938a2d7db..a7f919567bb 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnNestedWithOptionalField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts index 83b008e3e06..029816008db 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnNestedWithRequiredField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts index 46c59aedba5..933abfd377c 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts index 668c772c3e2..eb81a1fdf19 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnWithMapOfMap.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts index 903077cf0a6..c640ab79e64 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnWithOptionalField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts index 5358a04e32b..c42dab795a2 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnWithRequiredField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts index a2f42c4ca29..977b09ec8e1 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithAllowMultipleQuery.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithPath.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithPath.ts index 04e60fe1143..3aa4dd631dc 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithPath.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithPath.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithPath.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts index 961d70b8ad1..e6c2e3aa6bb 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithPathAndQuery.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithQuery.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithQuery.ts index 20ab6597736..ef9bfe1188e 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithQuery.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/getWithQuery.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithQuery.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts index fabc6e8c92e..653916d7365 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.modifyWithPath.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts index 8301172f076..a7ef65c89cd 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnBase64.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts index 5d1712865d6..0fcd9f6e493 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnBool.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts index c3ad72823e9..ce295d2aed8 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnDate.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts index e9a5934522a..80d01fa15d1 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnDatetime.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts index c0b76f41fb5..2ca882c7f2f 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnDouble.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts index cbcbc7c9479..227f0ab9534 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnInt.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts index 37ecf2cfc09..f3c7de4acd5 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnLong.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts index 59bd4e284f9..f0f4b77395a 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnString.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts index 6fdd79c4c4d..918a3716279 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnUuid.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts index e7bf4986e24..d81cd0409c8 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.union.getAndReturnUnion.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts index a8985fd8968..8068724442e 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts @@ -9,13 +9,13 @@ export type Error = | Fiddle.inlinedRequests.postWithObjectBodyandResponse.Error.BadRequestBody | Fiddle.inlinedRequests.postWithObjectBodyandResponse.Error._Unknown; -export declare namespace Error { - interface BadRequestBody extends _Utils { +export namespace Error { + export interface BadRequestBody extends _Utils { statusCode: 400; content: Fiddle.BadObjectRequestInfo; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/noAuth/client/postWithNoAuth.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/noAuth/client/postWithNoAuth.ts index b6d422d7d4d..382c26891b5 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/noAuth/client/postWithNoAuth.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/noAuth/client/postWithNoAuth.ts @@ -7,13 +7,13 @@ import * as core from "../../../../core"; export type Error = Fiddle.noAuth.postWithNoAuth.Error.BadRequestBody | Fiddle.noAuth.postWithNoAuth.Error._Unknown; -export declare namespace Error { - interface BadRequestBody extends _Utils { +export namespace Error { + export interface BadRequestBody extends _Utils { statusCode: 400; content: Fiddle.BadObjectRequestInfo; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/noReqBody/client/getWithNoRequestBody.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/noReqBody/client/getWithNoRequestBody.ts index f2538ad3dc3..d27e21f52e5 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/noReqBody/client/getWithNoRequestBody.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/noReqBody/client/getWithNoRequestBody.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = Fiddle.noReqBody.getWithNoRequestBody.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/noReqBody/client/postWithNoRequestBody.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/noReqBody/client/postWithNoRequestBody.ts index 8e0bb96c8f8..ed5adb3cb5a 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/noReqBody/client/postWithNoRequestBody.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/noReqBody/client/postWithNoRequestBody.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = Fiddle.noReqBody.postWithNoRequestBody.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts index e3f9aa9b4a5..57504d03bfb 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = Fiddle.reqWithHeaders.getWithCustomHeader.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/enum/types/WeatherReport.ts index 4cd2ac175cf..babba9a7b3c 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", @@ -25,7 +24,7 @@ export const WeatherReport = { }, } as const; -export declare namespace WeatherReport { +export namespace WeatherReport { interface Visitor { sunny: () => R; cloudy: () => R; diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/union/types/Animal.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/union/types/Animal.ts index 159a83af453..4cddd06567e 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/union/types/Animal.ts @@ -6,16 +6,16 @@ import * as Fiddle from "../../../../../index"; export type Animal = Fiddle.types.Animal.Dog | Fiddle.types.Animal.Cat | Fiddle.types.Animal._Unknown; -export declare namespace Animal { - interface Dog extends Fiddle.types.Dog, _Utils { +export namespace Animal { + export interface Dog extends Fiddle.types.Dog, _Utils { animal: "dog"; } - interface Cat extends Fiddle.types.Cat, _Utils { + export interface Cat extends Fiddle.types.Cat, _Utils { animal: "cat"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { animal: void; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/Client.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/Client.ts index ac84bf99d12..ecf0e60dc0a 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/Client.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace FiddleClient { } export class FiddleClient { - constructor(protected readonly _options: FiddleClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: FiddleClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts index 28de602dc42..b6d96953f58 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnListOfObjects.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts index 6cc22075b93..b8e9e1bf2c6 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnListOfPrimitives.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts index c55ca2d5d9a..b27cf746001 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnMapOfPrimToObject.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts index dbba08edfaf..dcd313ba2f5 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnMapPrimToPrim.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts index 12930b17744..728c001b47e 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnOptional.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts index 5d74c307429..60af19d1d6c 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnSetOfObjects.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts index 6cbdc14fc71..2bfc53856c3 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnSetOfPrimitives.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts index c474809d2c2..5c737917554 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.contentType.postJsonPatchContentType.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts index 69cbf6e95a0..b279e096002 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.contentType.postJsonPatchContentWithCharsetType.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts index dc76cc3775f..df12d344497 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.enum_.getAndReturnEnum.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts index 29618127d0b..dbd1e9f452a 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testDelete.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts index c2e93d94b18..c5a890c5c13 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testGet.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts index 3a2041e7fe0..f2c17c5b99d 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testPatch.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts index d38d39be2f3..c800a582433 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testPost.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts index 88bd33283d8..b74a22b12fe 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testPut.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts index 68938a2d7db..a7f919567bb 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnNestedWithOptionalField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts index 83b008e3e06..029816008db 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnNestedWithRequiredField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts index 46c59aedba5..933abfd377c 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts index 668c772c3e2..eb81a1fdf19 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnWithMapOfMap.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts index 903077cf0a6..c640ab79e64 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnWithOptionalField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts index 5358a04e32b..c42dab795a2 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnWithRequiredField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts index a2f42c4ca29..977b09ec8e1 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithAllowMultipleQuery.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithPath.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithPath.ts index 04e60fe1143..3aa4dd631dc 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithPath.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithPath.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithPath.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts index 961d70b8ad1..e6c2e3aa6bb 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithPathAndQuery.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithQuery.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithQuery.ts index 20ab6597736..ef9bfe1188e 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithQuery.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/getWithQuery.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithQuery.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts index fabc6e8c92e..653916d7365 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.modifyWithPath.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts index 8301172f076..a7ef65c89cd 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnBase64.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts index 5d1712865d6..0fcd9f6e493 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnBool.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts index c3ad72823e9..ce295d2aed8 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnDate.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts index e9a5934522a..80d01fa15d1 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnDatetime.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts index c0b76f41fb5..2ca882c7f2f 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnDouble.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts index cbcbc7c9479..227f0ab9534 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnInt.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts index 37ecf2cfc09..f3c7de4acd5 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnLong.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts index 59bd4e284f9..f0f4b77395a 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnString.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts index 6fdd79c4c4d..918a3716279 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnUuid.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts index e7bf4986e24..d81cd0409c8 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.union.getAndReturnUnion.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts index a8985fd8968..8068724442e 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts @@ -9,13 +9,13 @@ export type Error = | Fiddle.inlinedRequests.postWithObjectBodyandResponse.Error.BadRequestBody | Fiddle.inlinedRequests.postWithObjectBodyandResponse.Error._Unknown; -export declare namespace Error { - interface BadRequestBody extends _Utils { +export namespace Error { + export interface BadRequestBody extends _Utils { statusCode: 400; content: Fiddle.BadObjectRequestInfo; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noAuth/client/postWithNoAuth.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noAuth/client/postWithNoAuth.ts index b6d422d7d4d..382c26891b5 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noAuth/client/postWithNoAuth.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noAuth/client/postWithNoAuth.ts @@ -7,13 +7,13 @@ import * as core from "../../../../core"; export type Error = Fiddle.noAuth.postWithNoAuth.Error.BadRequestBody | Fiddle.noAuth.postWithNoAuth.Error._Unknown; -export declare namespace Error { - interface BadRequestBody extends _Utils { +export namespace Error { + export interface BadRequestBody extends _Utils { statusCode: 400; content: Fiddle.BadObjectRequestInfo; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noReqBody/client/getWithNoRequestBody.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noReqBody/client/getWithNoRequestBody.ts index f2538ad3dc3..d27e21f52e5 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noReqBody/client/getWithNoRequestBody.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noReqBody/client/getWithNoRequestBody.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = Fiddle.noReqBody.getWithNoRequestBody.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noReqBody/client/postWithNoRequestBody.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noReqBody/client/postWithNoRequestBody.ts index 8e0bb96c8f8..ed5adb3cb5a 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noReqBody/client/postWithNoRequestBody.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/noReqBody/client/postWithNoRequestBody.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = Fiddle.noReqBody.postWithNoRequestBody.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts index e3f9aa9b4a5..57504d03bfb 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = Fiddle.reqWithHeaders.getWithCustomHeader.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/enum/types/WeatherReport.ts index 4cd2ac175cf..babba9a7b3c 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", @@ -25,7 +24,7 @@ export const WeatherReport = { }, } as const; -export declare namespace WeatherReport { +export namespace WeatherReport { interface Visitor { sunny: () => R; cloudy: () => R; diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/union/types/Animal.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/union/types/Animal.ts index 159a83af453..4cddd06567e 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/union/types/Animal.ts @@ -6,16 +6,16 @@ import * as Fiddle from "../../../../../index"; export type Animal = Fiddle.types.Animal.Dog | Fiddle.types.Animal.Cat | Fiddle.types.Animal._Unknown; -export declare namespace Animal { - interface Dog extends Fiddle.types.Dog, _Utils { +export namespace Animal { + export interface Dog extends Fiddle.types.Dog, _Utils { animal: "dog"; } - interface Cat extends Fiddle.types.Cat, _Utils { + export interface Cat extends Fiddle.types.Cat, _Utils { animal: "cat"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { animal: void; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/Client.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/Client.ts index ac84bf99d12..ecf0e60dc0a 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/Client.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace FiddleClient { } export class FiddleClient { - constructor(protected readonly _options: FiddleClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: FiddleClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts index 28de602dc42..b6d96953f58 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnListOfObjects.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnListOfObjects.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts index 6cc22075b93..b8e9e1bf2c6 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnListOfPrimitives.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnListOfPrimitives.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts index c55ca2d5d9a..b27cf746001 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnMapOfPrimToObject.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnMapOfPrimToObject.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts index dbba08edfaf..dcd313ba2f5 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnMapPrimToPrim.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnMapPrimToPrim.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts index 12930b17744..728c001b47e 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnOptional.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnOptional.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts index 5d74c307429..60af19d1d6c 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfObjects.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnSetOfObjects.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts index 6cbdc14fc71..2bfc53856c3 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/container/client/getAndReturnSetOfPrimitives.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.container.getAndReturnSetOfPrimitives.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts index c474809d2c2..5c737917554 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentType.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.contentType.postJsonPatchContentType.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts index 69cbf6e95a0..b279e096002 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/contentType/client/postJsonPatchContentWithCharsetType.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.contentType.postJsonPatchContentWithCharsetType.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts index dc76cc3775f..df12d344497 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/enum/client/getAndReturnEnum.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.enum_.getAndReturnEnum.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts index 29618127d0b..dbd1e9f452a 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testDelete.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testDelete.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts index c2e93d94b18..c5a890c5c13 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testGet.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testGet.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts index 3a2041e7fe0..f2c17c5b99d 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPatch.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testPatch.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts index d38d39be2f3..c800a582433 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPost.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testPost.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts index 88bd33283d8..b74a22b12fe 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/httpMethods/client/testPut.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.httpMethods.testPut.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts index 68938a2d7db..a7f919567bb 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithOptionalField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnNestedWithOptionalField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts index 83b008e3e06..029816008db 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnNestedWithRequiredField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts index 46c59aedba5..933abfd377c 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnNestedWithRequiredFieldAsList.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnNestedWithRequiredFieldAsList.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts index 668c772c3e2..eb81a1fdf19 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithMapOfMap.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnWithMapOfMap.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts index 903077cf0a6..c640ab79e64 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithOptionalField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnWithOptionalField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts index 5358a04e32b..c42dab795a2 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/object/client/getAndReturnWithRequiredField.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.object.getAndReturnWithRequiredField.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts index a2f42c4ca29..977b09ec8e1 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithAllowMultipleQuery.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithAllowMultipleQuery.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithPath.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithPath.ts index 04e60fe1143..3aa4dd631dc 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithPath.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithPath.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithPath.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts index 961d70b8ad1..e6c2e3aa6bb 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithPathAndQuery.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithPathAndQuery.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithQuery.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithQuery.ts index 20ab6597736..ef9bfe1188e 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithQuery.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/getWithQuery.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.getWithQuery.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts index fabc6e8c92e..653916d7365 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/params/client/modifyWithPath.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.params.modifyWithPath.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts index 8301172f076..a7ef65c89cd 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnBase64.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnBase64.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts index 5d1712865d6..0fcd9f6e493 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnBool.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnBool.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts index c3ad72823e9..ce295d2aed8 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDate.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnDate.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts index e9a5934522a..80d01fa15d1 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDatetime.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnDatetime.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts index c0b76f41fb5..2ca882c7f2f 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnDouble.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnDouble.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts index cbcbc7c9479..227f0ab9534 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnInt.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnInt.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts index 37ecf2cfc09..f3c7de4acd5 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnLong.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnLong.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts index 59bd4e284f9..f0f4b77395a 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnString.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnString.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts index 6fdd79c4c4d..918a3716279 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/primitive/client/getAndReturnUuid.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.primitive.getAndReturnUuid.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts index e7bf4986e24..d81cd0409c8 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/resources/union/client/getAndReturnUnion.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = Fiddle.endpoints.union.getAndReturnUnion.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts index a8985fd8968..8068724442e 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/inlinedRequests/client/postWithObjectBodyandResponse.ts @@ -9,13 +9,13 @@ export type Error = | Fiddle.inlinedRequests.postWithObjectBodyandResponse.Error.BadRequestBody | Fiddle.inlinedRequests.postWithObjectBodyandResponse.Error._Unknown; -export declare namespace Error { - interface BadRequestBody extends _Utils { +export namespace Error { + export interface BadRequestBody extends _Utils { statusCode: 400; content: Fiddle.BadObjectRequestInfo; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noAuth/client/postWithNoAuth.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noAuth/client/postWithNoAuth.ts index b6d422d7d4d..382c26891b5 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noAuth/client/postWithNoAuth.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noAuth/client/postWithNoAuth.ts @@ -7,13 +7,13 @@ import * as core from "../../../../core"; export type Error = Fiddle.noAuth.postWithNoAuth.Error.BadRequestBody | Fiddle.noAuth.postWithNoAuth.Error._Unknown; -export declare namespace Error { - interface BadRequestBody extends _Utils { +export namespace Error { + export interface BadRequestBody extends _Utils { statusCode: 400; content: Fiddle.BadObjectRequestInfo; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noReqBody/client/getWithNoRequestBody.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noReqBody/client/getWithNoRequestBody.ts index f2538ad3dc3..d27e21f52e5 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noReqBody/client/getWithNoRequestBody.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noReqBody/client/getWithNoRequestBody.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = Fiddle.noReqBody.getWithNoRequestBody.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noReqBody/client/postWithNoRequestBody.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noReqBody/client/postWithNoRequestBody.ts index 8e0bb96c8f8..ed5adb3cb5a 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noReqBody/client/postWithNoRequestBody.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/noReqBody/client/postWithNoRequestBody.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = Fiddle.noReqBody.postWithNoRequestBody.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts index e3f9aa9b4a5..57504d03bfb 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/reqWithHeaders/client/getWithCustomHeader.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = Fiddle.reqWithHeaders.getWithCustomHeader.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/enum/types/WeatherReport.ts index 4cd2ac175cf..babba9a7b3c 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", @@ -25,7 +24,7 @@ export const WeatherReport = { }, } as const; -export declare namespace WeatherReport { +export namespace WeatherReport { interface Visitor { sunny: () => R; cloudy: () => R; diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/union/types/Animal.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/union/types/Animal.ts index 159a83af453..4cddd06567e 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/union/types/Animal.ts @@ -6,16 +6,16 @@ import * as Fiddle from "../../../../../index"; export type Animal = Fiddle.types.Animal.Dog | Fiddle.types.Animal.Cat | Fiddle.types.Animal._Unknown; -export declare namespace Animal { - interface Dog extends Fiddle.types.Dog, _Utils { +export namespace Animal { + export interface Dog extends Fiddle.types.Dog, _Utils { animal: "dog"; } - interface Cat extends Fiddle.types.Cat, _Utils { + export interface Cat extends Fiddle.types.Cat, _Utils { animal: "cat"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { animal: void; } diff --git a/seed/ts-sdk/exhaustive/jsr/src/Client.ts b/seed/ts-sdk/exhaustive/jsr/src/Client.ts index 9da7b36ff52..119821de7f2 100644 --- a/seed/ts-sdk/exhaustive/jsr/src/Client.ts +++ b/seed/ts-sdk/exhaustive/jsr/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace SeedExhaustiveClient { } export class SeedExhaustiveClient { - constructor(protected readonly _options: SeedExhaustiveClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: SeedExhaustiveClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/jsr/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/jsr/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/jsr/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/jsr/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/union/types/Animal.ts b/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/union/types/Animal.ts index b03ca8d422a..c05e5891781 100644 --- a/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/union/types/Animal.ts @@ -6,12 +6,12 @@ import * as SeedExhaustive from "../../../../../index"; export type Animal = SeedExhaustive.types.Animal.Dog | SeedExhaustive.types.Animal.Cat; -export declare namespace Animal { - interface Dog extends SeedExhaustive.types.Dog { +export namespace Animal { + export interface Dog extends SeedExhaustive.types.Dog { animal: "dog"; } - interface Cat extends SeedExhaustive.types.Cat { + export interface Cat extends SeedExhaustive.types.Cat { animal: "cat"; } } diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts index 9da7b36ff52..119821de7f2 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace SeedExhaustiveClient { } export class SeedExhaustiveClient { - constructor(protected readonly _options: SeedExhaustiveClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: SeedExhaustiveClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/union/types/Animal.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/union/types/Animal.ts index b03ca8d422a..c05e5891781 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/union/types/Animal.ts @@ -6,12 +6,12 @@ import * as SeedExhaustive from "../../../../../index"; export type Animal = SeedExhaustive.types.Animal.Dog | SeedExhaustive.types.Animal.Cat; -export declare namespace Animal { - interface Dog extends SeedExhaustive.types.Dog { +export namespace Animal { + export interface Dog extends SeedExhaustive.types.Dog { animal: "dog"; } - interface Cat extends SeedExhaustive.types.Cat { + export interface Cat extends SeedExhaustive.types.Cat { animal: "cat"; } } diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts index 9da7b36ff52..119821de7f2 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace SeedExhaustiveClient { } export class SeedExhaustiveClient { - constructor(protected readonly _options: SeedExhaustiveClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: SeedExhaustiveClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/union/types/Animal.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/union/types/Animal.ts index b03ca8d422a..c05e5891781 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/union/types/Animal.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/union/types/Animal.ts @@ -6,12 +6,12 @@ import * as SeedExhaustive from "../../../../../index"; export type Animal = SeedExhaustive.types.Animal.Dog | SeedExhaustive.types.Animal.Cat; -export declare namespace Animal { - interface Dog extends SeedExhaustive.types.Dog { +export namespace Animal { + export interface Dog extends SeedExhaustive.types.Dog { animal: "dog"; } - interface Cat extends SeedExhaustive.types.Cat { + export interface Cat extends SeedExhaustive.types.Cat { animal: "cat"; } } diff --git a/seed/ts-sdk/extra-properties/src/Client.ts b/seed/ts-sdk/extra-properties/src/Client.ts index cac7af1b6d0..746bc930c51 100644 --- a/seed/ts-sdk/extra-properties/src/Client.ts +++ b/seed/ts-sdk/extra-properties/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedExtraPropertiesClient { } export class SeedExtraPropertiesClient { - constructor(protected readonly _options: SeedExtraPropertiesClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedExtraPropertiesClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/file-download/file-download-reponse-headers/src/Client.ts b/seed/ts-sdk/file-download/file-download-reponse-headers/src/Client.ts index 9aca32bf5c1..b45035e0c17 100644 --- a/seed/ts-sdk/file-download/file-download-reponse-headers/src/Client.ts +++ b/seed/ts-sdk/file-download/file-download-reponse-headers/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedFileDownloadClient { } export class SeedFileDownloadClient { - constructor(protected readonly _options: SeedFileDownloadClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedFileDownloadClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/file-download/no-custom-config/src/Client.ts b/seed/ts-sdk/file-download/no-custom-config/src/Client.ts index 9aca32bf5c1..b45035e0c17 100644 --- a/seed/ts-sdk/file-download/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/file-download/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedFileDownloadClient { } export class SeedFileDownloadClient { - constructor(protected readonly _options: SeedFileDownloadClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedFileDownloadClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts b/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts index d65bcc99609..1d225c25ff2 100644 --- a/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedFileUploadClient { } export class SeedFileUploadClient { - constructor(protected readonly _options: SeedFileUploadClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedFileUploadClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/file-upload/no-custom-config/src/api/resources/service/types/ObjectType.ts b/seed/ts-sdk/file-upload/no-custom-config/src/api/resources/service/types/ObjectType.ts index b660d8ceb02..7bc09b0223f 100644 --- a/seed/ts-sdk/file-upload/no-custom-config/src/api/resources/service/types/ObjectType.ts +++ b/seed/ts-sdk/file-upload/no-custom-config/src/api/resources/service/types/ObjectType.ts @@ -3,7 +3,6 @@ */ export type ObjectType = "FOO" | "BAR"; - export const ObjectType = { Foo: "FOO", Bar: "BAR", diff --git a/seed/ts-sdk/file-upload/wrap-file-properties/src/Client.ts b/seed/ts-sdk/file-upload/wrap-file-properties/src/Client.ts index d65bcc99609..1d225c25ff2 100644 --- a/seed/ts-sdk/file-upload/wrap-file-properties/src/Client.ts +++ b/seed/ts-sdk/file-upload/wrap-file-properties/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedFileUploadClient { } export class SeedFileUploadClient { - constructor(protected readonly _options: SeedFileUploadClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedFileUploadClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/file-upload/wrap-file-properties/src/api/resources/service/types/ObjectType.ts b/seed/ts-sdk/file-upload/wrap-file-properties/src/api/resources/service/types/ObjectType.ts index b660d8ceb02..7bc09b0223f 100644 --- a/seed/ts-sdk/file-upload/wrap-file-properties/src/api/resources/service/types/ObjectType.ts +++ b/seed/ts-sdk/file-upload/wrap-file-properties/src/api/resources/service/types/ObjectType.ts @@ -3,7 +3,6 @@ */ export type ObjectType = "FOO" | "BAR"; - export const ObjectType = { Foo: "FOO", Bar: "BAR", diff --git a/seed/ts-sdk/folders/src/Client.ts b/seed/ts-sdk/folders/src/Client.ts index 1c0fb057786..616b0a0e74b 100644 --- a/seed/ts-sdk/folders/src/Client.ts +++ b/seed/ts-sdk/folders/src/Client.ts @@ -25,8 +25,19 @@ export declare namespace SeedApiClient { } export class SeedApiClient { + protected _a: A | undefined; + protected _folder: Folder | undefined; + constructor(protected readonly _options: SeedApiClient.Options) {} + public get a(): A { + return (this._a ??= new A(this._options)); + } + + public get folder(): Folder { + return (this._folder ??= new Folder(this._options)); + } + /** * @param {SeedApiClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -77,16 +88,4 @@ export class SeedApiClient { }); } } - - protected _a: A | undefined; - - public get a(): A { - return (this._a ??= new A(this._options)); - } - - protected _folder: Folder | undefined; - - public get folder(): Folder { - return (this._folder ??= new Folder(this._options)); - } } diff --git a/seed/ts-sdk/folders/src/api/resources/a/client/Client.ts b/seed/ts-sdk/folders/src/api/resources/a/client/Client.ts index c325b854601..2374693fd3a 100644 --- a/seed/ts-sdk/folders/src/api/resources/a/client/Client.ts +++ b/seed/ts-sdk/folders/src/api/resources/a/client/Client.ts @@ -24,16 +24,15 @@ export declare namespace A { } export class A { - constructor(protected readonly _options: A.Options) {} - protected _b: B | undefined; + protected _c: C | undefined; + + constructor(protected readonly _options: A.Options) {} public get b(): B { return (this._b ??= new B(this._options)); } - protected _c: C | undefined; - public get c(): C { return (this._c ??= new C(this._options)); } diff --git a/seed/ts-sdk/folders/src/api/resources/folder/client/Client.ts b/seed/ts-sdk/folders/src/api/resources/folder/client/Client.ts index d0ad9155ff0..92c243cfbe4 100644 --- a/seed/ts-sdk/folders/src/api/resources/folder/client/Client.ts +++ b/seed/ts-sdk/folders/src/api/resources/folder/client/Client.ts @@ -24,8 +24,14 @@ export declare namespace Folder { } export class Folder { + protected _service: Service | undefined; + constructor(protected readonly _options: Folder.Options) {} + public get service(): Service { + return (this._service ??= new Service(this._options)); + } + /** * @param {Folder.RequestOptions} requestOptions - Request-specific configuration. * @@ -76,10 +82,4 @@ export class Folder { }); } } - - protected _service: Service | undefined; - - public get service(): Service { - return (this._service ??= new Service(this._options)); - } } diff --git a/seed/ts-sdk/idempotency-headers/src/Client.ts b/seed/ts-sdk/idempotency-headers/src/Client.ts index e1b06ab66c1..9ecaef8348a 100644 --- a/seed/ts-sdk/idempotency-headers/src/Client.ts +++ b/seed/ts-sdk/idempotency-headers/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedIdempotencyHeadersClient { } export class SeedIdempotencyHeadersClient { - constructor(protected readonly _options: SeedIdempotencyHeadersClient.Options) {} - protected _payment: Payment | undefined; + constructor(protected readonly _options: SeedIdempotencyHeadersClient.Options) {} + public get payment(): Payment { return (this._payment ??= new Payment(this._options)); } diff --git a/seed/ts-sdk/idempotency-headers/src/api/resources/payment/client/Client.ts b/seed/ts-sdk/idempotency-headers/src/api/resources/payment/client/Client.ts index da77f0c6073..ed2479483c2 100644 --- a/seed/ts-sdk/idempotency-headers/src/api/resources/payment/client/Client.ts +++ b/seed/ts-sdk/idempotency-headers/src/api/resources/payment/client/Client.ts @@ -24,11 +24,6 @@ export declare namespace Payment { /** Additional headers to include in the request. */ headers?: Record; } - - interface IdempotentRequestOptions extends RequestOptions { - idempotencyKey: string; - idempotencyExpiration: number; - } } export class Payment { diff --git a/seed/ts-sdk/idempotency-headers/src/api/resources/payment/types/Currency.ts b/seed/ts-sdk/idempotency-headers/src/api/resources/payment/types/Currency.ts index 16022be914e..17ebd363838 100644 --- a/seed/ts-sdk/idempotency-headers/src/api/resources/payment/types/Currency.ts +++ b/seed/ts-sdk/idempotency-headers/src/api/resources/payment/types/Currency.ts @@ -3,7 +3,6 @@ */ export type Currency = "USD" | "YEN"; - export const Currency = { Usd: "USD", Yen: "YEN", diff --git a/seed/ts-sdk/imdb/no-custom-config/src/Client.ts b/seed/ts-sdk/imdb/no-custom-config/src/Client.ts index 16058002bad..f31d80e954d 100644 --- a/seed/ts-sdk/imdb/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/imdb/no-custom-config/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedApiClient { } export class SeedApiClient { - constructor(protected readonly _options: SeedApiClient.Options) {} - protected _imdb: Imdb | undefined; + constructor(protected readonly _options: SeedApiClient.Options) {} + public get imdb(): Imdb { return (this._imdb ??= new Imdb(this._options)); } diff --git a/seed/ts-sdk/imdb/noScripts/src/Client.ts b/seed/ts-sdk/imdb/noScripts/src/Client.ts index ba235fe39a6..93246172fb2 100644 --- a/seed/ts-sdk/imdb/noScripts/src/Client.ts +++ b/seed/ts-sdk/imdb/noScripts/src/Client.ts @@ -24,11 +24,11 @@ export declare namespace SeedApiClient { } export class SeedApiClient { + protected _imdb: Imdb | undefined; + constructor(protected readonly _options: SeedApiClient.Options) { } - protected _imdb: Imdb | undefined; - public get imdb(): Imdb { return (this._imdb ??= new Imdb(this._options)); } diff --git a/seed/ts-sdk/imdb/omit-undefined/src/Client.ts b/seed/ts-sdk/imdb/omit-undefined/src/Client.ts index 16058002bad..f31d80e954d 100644 --- a/seed/ts-sdk/imdb/omit-undefined/src/Client.ts +++ b/seed/ts-sdk/imdb/omit-undefined/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedApiClient { } export class SeedApiClient { - constructor(protected readonly _options: SeedApiClient.Options) {} - protected _imdb: Imdb | undefined; + constructor(protected readonly _options: SeedApiClient.Options) {} + public get imdb(): Imdb { return (this._imdb ??= new Imdb(this._options)); } diff --git a/seed/ts-sdk/inline-types/.mock/definition/__package__.yml b/seed/ts-sdk/inline-types/.mock/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/seed/ts-sdk/inline-types/.mock/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/seed/ts-sdk/inline-types/.mock/definition/api.yml b/seed/ts-sdk/inline-types/.mock/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/seed/ts-sdk/inline-types/.mock/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/seed/ts-sdk/inline-types/.mock/fern.config.json b/seed/ts-sdk/inline-types/.mock/fern.config.json deleted file mode 100644 index 4c8e54ac313..00000000000 --- a/seed/ts-sdk/inline-types/.mock/fern.config.json +++ /dev/null @@ -1 +0,0 @@ -{"organization": "fern-test", "version": "*"} \ No newline at end of file diff --git a/seed/ts-sdk/inline-types/.mock/generators.yml b/seed/ts-sdk/inline-types/.mock/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/seed/ts-sdk/inline-types/.mock/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/seed/ts-sdk/inline-types/README.md b/seed/ts-sdk/inline-types/README.md deleted file mode 100644 index f4e7bca0156..00000000000 --- a/seed/ts-sdk/inline-types/README.md +++ /dev/null @@ -1,161 +0,0 @@ -# Seed TypeScript 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%2FTypeScript) -[![npm shield](https://img.shields.io/npm/v/@fern/inline-types)](https://www.npmjs.com/package/@fern/inline-types) - -The Seed TypeScript library provides convenient access to the Seed API from TypeScript. - -## Installation - -```sh -npm i -s @fern/inline-types -``` - -## Reference - -A full reference for this library is available [here](./reference.md). - -## Usage - -Instantiate and use the client with the following: - -```typescript -import { SeedObjectClient } from "@fern/inline-types"; - -const client = new SeedObjectClient({ environment: "YOUR_BASE_URL" }); -await client.getRoot({ - bar: { - foo: "foo", - bar: { - foo: "foo", - bar: "bar", - myEnum: "SUNNY", - }, - }, - foo: "foo", -}); -``` - -## Request And Response Types - -The SDK exports all request and response types as TypeScript interfaces. Simply import them with the -following namespace: - -```typescript -import { SeedObject } from "@fern/inline-types"; - -const request: SeedObject.PostRootRequest = { - ... -}; -``` - -## Exception Handling - -When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error -will be thrown. - -```typescript -import { SeedObjectError } from "@fern/inline-types"; - -try { - await client.getRoot(...); -} catch (err) { - if (err instanceof SeedObjectError) { - console.log(err.statusCode); - console.log(err.message); - console.log(err.body); - } -} -``` - -## Advanced - -### Additional Headers - -If you would like to send additional headers as part of the request, use the `headers` request option. - -```typescript -const response = await client.getRoot(..., { - headers: { - 'X-Custom-Header': 'custom value' - } -}); -``` - -### Retries - -The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long -as the request is deemed retriable and the number of retry attempts has not grown larger than the configured -retry limit (default: 2). - -A request is deemed retriable when any of the following HTTP status codes is returned: - -- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) -- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) -- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) - -Use the `maxRetries` request option to configure this behavior. - -```typescript -const response = await client.getRoot(..., { - maxRetries: 0 // override maxRetries at the request level -}); -``` - -### Timeouts - -The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior. - -```typescript -const response = await client.getRoot(..., { - timeoutInSeconds: 30 // override timeout to 30s -}); -``` - -### Aborting Requests - -The SDK allows users to abort requests at any point by passing in an abort signal. - -```typescript -const controller = new AbortController(); -const response = await client.getRoot(..., { - abortSignal: controller.signal -}); -controller.abort(); // aborts the request -``` - -### Runtime Compatibility - -The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following -runtimes: - -- Node.js 18+ -- Vercel -- Cloudflare Workers -- Deno v1.25+ -- Bun 1.0+ -- React Native - -### Customizing Fetch Client - -The SDK provides a way for your to customize the underlying HTTP client / Fetch function. If you're running in an -unsupported environment, this provides a way for you to break glass and ensure the SDK works. - -```typescript -import { SeedObjectClient } from "@fern/inline-types"; - -const client = new SeedObjectClient({ - ... - fetcher: // provide your implementation here -}); -``` - -## 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/ts-sdk/inline-types/package.json b/seed/ts-sdk/inline-types/package.json deleted file mode 100644 index c62c4aac8d7..00000000000 --- a/seed/ts-sdk/inline-types/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@fern/inline-types", - "version": "0.0.1", - "private": false, - "repository": "https://github.com/inline-types/fern", - "main": "./index.js", - "types": "./index.d.ts", - "scripts": { - "format": "prettier . --write --ignore-unknown", - "build": "tsc", - "prepack": "cp -rv dist/. .", - "test": "jest" - }, - "dependencies": { - "url-join": "4.0.1", - "form-data": "^4.0.0", - "formdata-node": "^6.0.3", - "node-fetch": "2.7.0", - "qs": "6.11.2", - "readable-stream": "^4.5.2" - }, - "devDependencies": { - "@types/url-join": "4.0.1", - "@types/qs": "6.9.8", - "@types/node-fetch": "2.6.9", - "@types/readable-stream": "^4.0.15", - "webpack": "^5.94.0", - "ts-loader": "^9.3.1", - "jest": "29.7.0", - "@types/jest": "29.5.5", - "ts-jest": "29.1.1", - "jest-environment-jsdom": "29.7.0", - "@types/node": "17.0.33", - "prettier": "2.7.1", - "typescript": "4.6.4" - }, - "browser": { - "fs": false, - "os": false, - "path": false - } -} diff --git a/seed/ts-sdk/inline-types/reference.md b/seed/ts-sdk/inline-types/reference.md deleted file mode 100644 index afb56aee833..00000000000 --- a/seed/ts-sdk/inline-types/reference.md +++ /dev/null @@ -1,61 +0,0 @@ -# Reference - -

client.getRoot({ ...params }) -> SeedObject.RootType1 -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.getRoot({ - bar: { - foo: "foo", - bar: { - foo: "foo", - bar: "bar", - myEnum: "SUNNY", - }, - }, - foo: "foo", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `SeedObject.PostRootRequest` - -
-
- -
-
- -**requestOptions:** `SeedObjectClient.RequestOptions` - -
-
-
-
- -
-
-
- -## diff --git a/seed/ts-sdk/inline-types/resolved-snippet-templates.md b/seed/ts-sdk/inline-types/resolved-snippet-templates.md deleted file mode 100644 index 21d6ab8b321..00000000000 --- a/seed/ts-sdk/inline-types/resolved-snippet-templates.md +++ /dev/null @@ -1,18 +0,0 @@ -```typescript -import { SeedObjectClient } from "@fern/inline-types"; - -const client = new SeedObjectClient({ environment: "YOUR_BASE_URL" }); -await client.getRoot({ - bar: { - foo: "foo", - bar: { - foo: "foo", - bar: "bar", - }, - }, - foo: "foo", -}); - -``` - - diff --git a/seed/ts-sdk/inline-types/snippet-templates.json b/seed/ts-sdk/inline-types/snippet-templates.json deleted file mode 100644 index 0c426fdd32c..00000000000 --- a/seed/ts-sdk/inline-types/snippet-templates.json +++ /dev/null @@ -1,178 +0,0 @@ -[ - { - "sdk": { - "package": "@fern/inline-types", - "version": "0.0.1", - "type": "typescript" - }, - "endpointId": { - "path": "/root/root", - "method": "POST", - "identifierOverride": "endpoint_.getRoot" - }, - "snippetTemplate": { - "clientInstantiation": { - "imports": [ - "import { SeedObjectClient } from \"@fern/inline-types\";" - ], - "templateString": "const client = new SeedObjectClient($FERN_INPUT);", - "isOptional": false, - "inputDelimiter": ",", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "{ $FERN_INPUT }", - "isOptional": true, - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "environment: \"YOUR_BASE_URL\"", - "isOptional": false, - "templateInputs": [], - "type": "generic" - }, - "type": "template" - } - ], - "type": "generic" - }, - "type": "template" - } - ], - "type": "generic" - }, - "functionInvocation": { - "imports": [], - "templateString": "await client.getRoot(\n\t$FERN_INPUT\n)", - "isOptional": false, - "inputDelimiter": ",\n\t", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "{\n\t\t$FERN_INPUT\n\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "bar: {\n\t\t\t$FERN_INPUT\n\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "foo: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bar.foo", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bar: {\n\t\t\t\t$FERN_INPUT\n\t\t\t}", - "isOptional": true, - "inputDelimiter": ",\n\t\t\t\t", - "templateInputs": [ - { - "value": { - "imports": [], - "templateString": "foo: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bar.bar.foo", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "bar: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "bar.bar.bar", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" - }, - { - "value": { - "imports": [], - "isOptional": true, - "values": { - "SUNNY": "\"SUNNY\"", - "CLOUDY": "\"CLOUDY\"", - "RAINING": "\"RAINING\"", - "SNOWING": "\"SNOWING\"" - }, - "templateString": "myEnum: $FERN_INPUT", - "templateInput": { - "location": "BODY", - "path": "bar.bar.myEnum", - "type": "payload" - }, - "type": "enum" - }, - "type": "template" - } - ], - "type": "generic" - }, - "type": "template" - } - ], - "type": "generic" - }, - "type": "template" - }, - { - "value": { - "imports": [], - "templateString": "foo: $FERN_INPUT", - "isOptional": true, - "templateInputs": [ - { - "location": "BODY", - "path": "foo", - "type": "payload" - } - ], - "type": "generic" - }, - "type": "template" - } - ], - "type": "generic" - }, - "type": "template" - } - ], - "type": "generic" - }, - "type": "v1" - } - } -] \ No newline at end of file diff --git a/seed/ts-sdk/inline-types/snippet.json b/seed/ts-sdk/inline-types/snippet.json deleted file mode 100644 index cc655f15e29..00000000000 --- a/seed/ts-sdk/inline-types/snippet.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "endpoints": [ - { - "id": { - "path": "/root/root", - "method": "POST", - "identifier_override": "endpoint_.getRoot" - }, - "snippet": { - "type": "typescript", - "client": "import { SeedObjectClient } from \"@fern/inline-types\";\n\nconst client = new SeedObjectClient({ environment: \"YOUR_BASE_URL\" });\nawait client.getRoot({\n bar: {\n foo: \"foo\",\n bar: {\n foo: \"foo\",\n bar: \"bar\",\n myEnum: \"SUNNY\"\n }\n },\n foo: \"foo\"\n});\n" - } - } - ], - "types": {} -} \ No newline at end of file diff --git a/seed/ts-sdk/inline-types/src/Client.ts b/seed/ts-sdk/inline-types/src/Client.ts deleted file mode 100644 index ec282732e20..00000000000 --- a/seed/ts-sdk/inline-types/src/Client.ts +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as core from "./core"; -import * as SeedObject from "./api/index"; -import * as serializers from "./serialization/index"; -import urlJoin from "url-join"; -import * as errors from "./errors/index"; - -export declare namespace SeedObjectClient { - interface Options { - environment: core.Supplier; - } - - interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional headers to include in the request. */ - headers?: Record; - } -} - -export class SeedObjectClient { - constructor(protected readonly _options: SeedObjectClient.Options) {} - - /** - * @param {SeedObject.PostRootRequest} request - * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @example - * await client.getRoot({ - * bar: { - * foo: "foo", - * bar: { - * foo: "foo", - * bar: "bar", - * myEnum: "SUNNY" - * } - * }, - * foo: "foo" - * }) - */ - public async getRoot( - request: SeedObject.PostRootRequest, - requestOptions?: SeedObjectClient.RequestOptions - ): Promise { - const _response = await core.fetcher({ - url: urlJoin(await core.Supplier.get(this._options.environment), "/root/root"), - method: "POST", - headers: { - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "@fern/inline-types", - "X-Fern-SDK-Version": "0.0.1", - "User-Agent": "@fern/inline-types/0.0.1", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - ...requestOptions?.headers, - }, - contentType: "application/json", - requestType: "json", - body: serializers.PostRootRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return serializers.RootType1.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - breadcrumbsPrefix: ["response"], - }); - } - - if (_response.error.reason === "status-code") { - throw new errors.SeedObjectError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - }); - } - - switch (_response.error.reason) { - case "non-json": - throw new errors.SeedObjectError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - }); - case "timeout": - throw new errors.SeedObjectTimeoutError("Timeout exceeded when calling POST /root/root."); - case "unknown": - throw new errors.SeedObjectError({ - message: _response.error.errorMessage, - }); - } - } -} diff --git a/seed/ts-sdk/inline-types/src/api/client/index.ts b/seed/ts-sdk/inline-types/src/api/client/index.ts deleted file mode 100644 index 415726b7fea..00000000000 --- a/seed/ts-sdk/inline-types/src/api/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/seed/ts-sdk/inline-types/src/api/client/requests/PostRootRequest.ts b/seed/ts-sdk/inline-types/src/api/client/requests/PostRootRequest.ts deleted file mode 100644 index 77a7c554453..00000000000 --- a/seed/ts-sdk/inline-types/src/api/client/requests/PostRootRequest.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../../index"; - -/** - * @example - * { - * bar: { - * foo: "foo", - * bar: { - * foo: "foo", - * bar: "bar", - * myEnum: "SUNNY" - * } - * }, - * foo: "foo" - * } - */ -export interface PostRootRequest { - bar: SeedObject.InlineType1; - foo: string; -} diff --git a/seed/ts-sdk/inline-types/src/api/client/requests/index.ts b/seed/ts-sdk/inline-types/src/api/client/requests/index.ts deleted file mode 100644 index 175cff8a599..00000000000 --- a/seed/ts-sdk/inline-types/src/api/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type PostRootRequest } from "./PostRootRequest"; diff --git a/seed/ts-sdk/inline-types/src/api/types/InlineEnum.ts b/seed/ts-sdk/inline-types/src/api/types/InlineEnum.ts deleted file mode 100644 index efc9b2dc13b..00000000000 --- a/seed/ts-sdk/inline-types/src/api/types/InlineEnum.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type InlineEnum = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - -export const InlineEnum = { - Sunny: "SUNNY", - Cloudy: "CLOUDY", - Raining: "RAINING", - Snowing: "SNOWING", -} as const; diff --git a/seed/ts-sdk/inline-types/src/api/types/InlineType1.ts b/seed/ts-sdk/inline-types/src/api/types/InlineType1.ts deleted file mode 100644 index 46eb751da7c..00000000000 --- a/seed/ts-sdk/inline-types/src/api/types/InlineType1.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; - -export interface InlineType1 { - foo: string; - bar: SeedObject.NestedInlineType1; -} diff --git a/seed/ts-sdk/inline-types/src/api/types/InlineType2.ts b/seed/ts-sdk/inline-types/src/api/types/InlineType2.ts deleted file mode 100644 index 6fd9bee2f7c..00000000000 --- a/seed/ts-sdk/inline-types/src/api/types/InlineType2.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface InlineType2 { - baz: string; -} diff --git a/seed/ts-sdk/inline-types/src/api/types/InlinedDiscriminatedUnion1.ts b/seed/ts-sdk/inline-types/src/api/types/InlinedDiscriminatedUnion1.ts deleted file mode 100644 index 6fd939b1ecd..00000000000 --- a/seed/ts-sdk/inline-types/src/api/types/InlinedDiscriminatedUnion1.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; - -export type InlinedDiscriminatedUnion1 = - | SeedObject.InlinedDiscriminatedUnion1.Type1 - | SeedObject.InlinedDiscriminatedUnion1.Type2; - -export declare namespace InlinedDiscriminatedUnion1 { - interface Type1 extends SeedObject.InlineType1 { - type: "type1"; - } - - interface Type2 extends SeedObject.InlineType2 { - type: "type2"; - } -} diff --git a/seed/ts-sdk/inline-types/src/api/types/InlinedUndiscriminatedUnion1.ts b/seed/ts-sdk/inline-types/src/api/types/InlinedUndiscriminatedUnion1.ts deleted file mode 100644 index aa17b80bb9a..00000000000 --- a/seed/ts-sdk/inline-types/src/api/types/InlinedUndiscriminatedUnion1.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; - -export type InlinedUndiscriminatedUnion1 = SeedObject.InlineType1 | SeedObject.InlineType2; diff --git a/seed/ts-sdk/inline-types/src/api/types/NestedInlineType1.ts b/seed/ts-sdk/inline-types/src/api/types/NestedInlineType1.ts deleted file mode 100644 index 149f04ffa10..00000000000 --- a/seed/ts-sdk/inline-types/src/api/types/NestedInlineType1.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; - -export interface NestedInlineType1 { - foo: string; - bar: string; - myEnum: SeedObject.InlineEnum; -} diff --git a/seed/ts-sdk/inline-types/src/api/types/RootType1.ts b/seed/ts-sdk/inline-types/src/api/types/RootType1.ts deleted file mode 100644 index 5fd2ba90356..00000000000 --- a/seed/ts-sdk/inline-types/src/api/types/RootType1.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as SeedObject from "../index"; - -export interface RootType1 { - foo: string; - bar: SeedObject.InlineType1; -} diff --git a/seed/ts-sdk/inline-types/src/api/types/index.ts b/seed/ts-sdk/inline-types/src/api/types/index.ts deleted file mode 100644 index bb183ec944a..00000000000 --- a/seed/ts-sdk/inline-types/src/api/types/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from "./RootType1"; -export * from "./InlineType1"; -export * from "./InlineType2"; -export * from "./NestedInlineType1"; -export * from "./InlinedDiscriminatedUnion1"; -export * from "./InlinedUndiscriminatedUnion1"; -export * from "./InlineEnum"; diff --git a/seed/ts-sdk/inline-types/src/core/index.ts b/seed/ts-sdk/inline-types/src/core/index.ts deleted file mode 100644 index e3006860f4d..00000000000 --- a/seed/ts-sdk/inline-types/src/core/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./fetcher"; -export * from "./runtime"; -export * as serialization from "./schemas"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/Schema.ts b/seed/ts-sdk/inline-types/src/core/schemas/Schema.ts deleted file mode 100644 index 2a72eacec99..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/Schema.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { SchemaUtils } from "./builders"; - -export type Schema = BaseSchema & SchemaUtils; - -export type inferRaw = S extends Schema ? Raw : never; -export type inferParsed = S extends Schema ? Parsed : never; - -export interface BaseSchema { - parse: (raw: unknown, opts?: SchemaOptions) => MaybeValid; - json: (parsed: unknown, opts?: SchemaOptions) => MaybeValid; - getType: () => SchemaType | SchemaType; -} - -export const SchemaType = { - BIGINT: "bigint", - DATE: "date", - ENUM: "enum", - LIST: "list", - STRING_LITERAL: "stringLiteral", - BOOLEAN_LITERAL: "booleanLiteral", - OBJECT: "object", - ANY: "any", - BOOLEAN: "boolean", - NUMBER: "number", - STRING: "string", - UNKNOWN: "unknown", - RECORD: "record", - SET: "set", - UNION: "union", - UNDISCRIMINATED_UNION: "undiscriminatedUnion", - OPTIONAL: "optional", -} as const; -export type SchemaType = typeof SchemaType[keyof typeof SchemaType]; - -export type MaybeValid = Valid | Invalid; - -export interface Valid { - ok: true; - value: T; -} - -export interface Invalid { - ok: false; - errors: ValidationError[]; -} - -export interface ValidationError { - path: string[]; - message: string; -} - -export interface SchemaOptions { - /** - * how to handle unrecognized keys in objects - * - * @default "fail" - */ - unrecognizedObjectKeys?: "fail" | "passthrough" | "strip"; - - /** - * whether to fail when an unrecognized discriminant value is - * encountered in a union - * - * @default false - */ - allowUnrecognizedUnionMembers?: boolean; - - /** - * whether to fail when an unrecognized enum value is encountered - * - * @default false - */ - allowUnrecognizedEnumValues?: boolean; - - /** - * whether to allow data that doesn't conform to the schema. - * invalid data is passed through without transformation. - * - * when this is enabled, .parse() and .json() will always - * return `ok: true`. `.parseOrThrow()` and `.jsonOrThrow()` - * will never fail. - * - * @default false - */ - skipValidation?: boolean; - - /** - * each validation failure contains a "path" property, which is - * the breadcrumbs to the offending node in the JSON. you can supply - * a prefix that is prepended to all the errors' paths. this can be - * helpful for zurg's internal debug logging. - */ - breadcrumbsPrefix?: string[]; - - /** - * whether to send 'null' for optional properties explicitly set to 'undefined'. - */ - omitUndefined?: boolean; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/bigint/bigint.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/bigint/bigint.ts deleted file mode 100644 index dc9c742e007..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/bigint/bigint.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { BaseSchema, Schema, SchemaType } from "../../Schema"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { getSchemaUtils } from "../schema-utils"; - -export function bigint(): Schema { - const baseSchema: BaseSchema = { - parse: (raw, { breadcrumbsPrefix = [] } = {}) => { - if (typeof raw !== "string") { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(raw, "string"), - }, - ], - }; - } - return { - ok: true, - value: BigInt(raw), - }; - }, - json: (bigint, { breadcrumbsPrefix = [] } = {}) => { - if (typeof bigint === "bigint") { - return { - ok: true, - value: bigint.toString(), - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(bigint, "bigint"), - }, - ], - }; - } - }, - getType: () => SchemaType.BIGINT, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/bigint/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/bigint/index.ts deleted file mode 100644 index e5843043fcb..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/bigint/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { bigint } from "./bigint"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/date/date.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/date/date.ts deleted file mode 100644 index b70f24b045a..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/date/date.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { BaseSchema, Schema, SchemaType } from "../../Schema"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { getSchemaUtils } from "../schema-utils"; - -// https://stackoverflow.com/questions/12756159/regex-and-iso8601-formatted-datetime -const ISO_8601_REGEX = - /^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; - -export function date(): Schema { - const baseSchema: BaseSchema = { - parse: (raw, { breadcrumbsPrefix = [] } = {}) => { - if (typeof raw !== "string") { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(raw, "string"), - }, - ], - }; - } - if (!ISO_8601_REGEX.test(raw)) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(raw, "ISO 8601 date string"), - }, - ], - }; - } - return { - ok: true, - value: new Date(raw), - }; - }, - json: (date, { breadcrumbsPrefix = [] } = {}) => { - if (date instanceof Date) { - return { - ok: true, - value: date.toISOString(), - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(date, "Date object"), - }, - ], - }; - } - }, - getType: () => SchemaType.DATE, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/date/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/date/index.ts deleted file mode 100644 index 187b29040f6..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/date/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { date } from "./date"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/enum/enum.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/enum/enum.ts deleted file mode 100644 index c1e24d69dec..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/enum/enum.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Schema, SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export function enum_(values: E): Schema { - const validValues = new Set(values); - - const schemaCreator = createIdentitySchemaCreator( - SchemaType.ENUM, - (value, { allowUnrecognizedEnumValues, breadcrumbsPrefix = [] } = {}) => { - if (typeof value !== "string") { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "string"), - }, - ], - }; - } - - if (!validValues.has(value) && !allowUnrecognizedEnumValues) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "enum"), - }, - ], - }; - } - - return { - ok: true, - value: value as U, - }; - } - ); - - return schemaCreator(); -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/enum/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/enum/index.ts deleted file mode 100644 index fe6faed93e3..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/enum/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { enum_ } from "./enum"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/index.ts deleted file mode 100644 index 65211f92522..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -export * from "./bigint"; -export * from "./date"; -export * from "./enum"; -export * from "./lazy"; -export * from "./list"; -export * from "./literals"; -export * from "./object"; -export * from "./object-like"; -export * from "./primitives"; -export * from "./record"; -export * from "./schema-utils"; -export * from "./set"; -export * from "./undiscriminated-union"; -export * from "./union"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/lazy/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/lazy/index.ts deleted file mode 100644 index 77420fb031c..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/lazy/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { lazy } from "./lazy"; -export type { SchemaGetter } from "./lazy"; -export { lazyObject } from "./lazyObject"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/lazy/lazy.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/lazy/lazy.ts deleted file mode 100644 index 835c61f8a56..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/lazy/lazy.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { BaseSchema, Schema } from "../../Schema"; -import { getSchemaUtils } from "../schema-utils"; - -export type SchemaGetter> = () => SchemaType; - -export function lazy(getter: SchemaGetter>): Schema { - const baseSchema = constructLazyBaseSchema(getter); - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - }; -} - -export function constructLazyBaseSchema( - getter: SchemaGetter> -): BaseSchema { - return { - parse: (raw, opts) => getMemoizedSchema(getter).parse(raw, opts), - json: (parsed, opts) => getMemoizedSchema(getter).json(parsed, opts), - getType: () => getMemoizedSchema(getter).getType(), - }; -} - -type MemoizedGetter> = SchemaGetter & { __zurg_memoized?: SchemaType }; - -export function getMemoizedSchema>(getter: SchemaGetter): SchemaType { - const castedGetter = getter as MemoizedGetter; - if (castedGetter.__zurg_memoized == null) { - castedGetter.__zurg_memoized = getter(); - } - return castedGetter.__zurg_memoized; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/lazy/lazyObject.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/lazy/lazyObject.ts deleted file mode 100644 index 38c9e28404b..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/lazy/lazyObject.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { getObjectUtils } from "../object"; -import { getObjectLikeUtils } from "../object-like"; -import { BaseObjectSchema, ObjectSchema } from "../object/types"; -import { getSchemaUtils } from "../schema-utils"; -import { constructLazyBaseSchema, getMemoizedSchema, SchemaGetter } from "./lazy"; - -export function lazyObject(getter: SchemaGetter>): ObjectSchema { - const baseSchema: BaseObjectSchema = { - ...constructLazyBaseSchema(getter), - _getRawProperties: () => getMemoizedSchema(getter)._getRawProperties(), - _getParsedProperties: () => getMemoizedSchema(getter)._getParsedProperties(), - }; - - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - ...getObjectLikeUtils(baseSchema), - ...getObjectUtils(baseSchema), - }; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/list/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/list/index.ts deleted file mode 100644 index 25f4bcc1737..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/list/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { list } from "./list"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/list/list.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/list/list.ts deleted file mode 100644 index e4c5c4a4a99..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/list/list.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { BaseSchema, MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { getSchemaUtils } from "../schema-utils"; - -export function list(schema: Schema): Schema { - const baseSchema: BaseSchema = { - parse: (raw, opts) => - validateAndTransformArray(raw, (item, index) => - schema.parse(item, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `[${index}]`], - }) - ), - json: (parsed, opts) => - validateAndTransformArray(parsed, (item, index) => - schema.json(item, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `[${index}]`], - }) - ), - getType: () => SchemaType.LIST, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} - -function validateAndTransformArray( - value: unknown, - transformItem: (item: Raw, index: number) => MaybeValid -): MaybeValid { - if (!Array.isArray(value)) { - return { - ok: false, - errors: [ - { - message: getErrorMessageForIncorrectType(value, "list"), - path: [], - }, - ], - }; - } - - const maybeValidItems = value.map((item, index) => transformItem(item, index)); - - return maybeValidItems.reduce>( - (acc, item) => { - if (acc.ok && item.ok) { - return { - ok: true, - value: [...acc.value, item.value], - }; - } - - const errors: ValidationError[] = []; - if (!acc.ok) { - errors.push(...acc.errors); - } - if (!item.ok) { - errors.push(...item.errors); - } - - return { - ok: false, - errors, - }; - }, - { ok: true, value: [] } - ); -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/literals/booleanLiteral.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/literals/booleanLiteral.ts deleted file mode 100644 index a83d22cd48a..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/literals/booleanLiteral.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Schema, SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export function booleanLiteral(literal: V): Schema { - const schemaCreator = createIdentitySchemaCreator( - SchemaType.BOOLEAN_LITERAL, - (value, { breadcrumbsPrefix = [] } = {}) => { - if (value === literal) { - return { - ok: true, - value: literal, - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, `${literal.toString()}`), - }, - ], - }; - } - } - ); - - return schemaCreator(); -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/literals/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/literals/index.ts deleted file mode 100644 index d2bf08fc6ca..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/literals/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { stringLiteral } from "./stringLiteral"; -export { booleanLiteral } from "./booleanLiteral"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/literals/stringLiteral.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/literals/stringLiteral.ts deleted file mode 100644 index 3939b76b48d..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/literals/stringLiteral.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Schema, SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export function stringLiteral(literal: V): Schema { - const schemaCreator = createIdentitySchemaCreator( - SchemaType.STRING_LITERAL, - (value, { breadcrumbsPrefix = [] } = {}) => { - if (value === literal) { - return { - ok: true, - value: literal, - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, `"${literal}"`), - }, - ], - }; - } - } - ); - - return schemaCreator(); -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/object-like/getObjectLikeUtils.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/object-like/getObjectLikeUtils.ts deleted file mode 100644 index 8331d08da89..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/object-like/getObjectLikeUtils.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { BaseSchema } from "../../Schema"; -import { filterObject } from "../../utils/filterObject"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { isPlainObject } from "../../utils/isPlainObject"; -import { getSchemaUtils } from "../schema-utils"; -import { ObjectLikeSchema, ObjectLikeUtils } from "./types"; - -export function getObjectLikeUtils(schema: BaseSchema): ObjectLikeUtils { - return { - withParsedProperties: (properties) => withParsedProperties(schema, properties), - }; -} - -/** - * object-like utils are defined in one file to resolve issues with circular imports - */ - -export function withParsedProperties( - objectLike: BaseSchema, - properties: { [K in keyof Properties]: Properties[K] | ((parsed: ParsedObjectShape) => Properties[K]) } -): ObjectLikeSchema { - const objectSchema: BaseSchema = { - parse: (raw, opts) => { - const parsedObject = objectLike.parse(raw, opts); - if (!parsedObject.ok) { - return parsedObject; - } - - const additionalProperties = Object.entries(properties).reduce>( - (processed, [key, value]) => { - return { - ...processed, - [key]: typeof value === "function" ? value(parsedObject.value) : value, - }; - }, - {} - ); - - return { - ok: true, - value: { - ...parsedObject.value, - ...(additionalProperties as Properties), - }, - }; - }, - - json: (parsed, opts) => { - if (!isPlainObject(parsed)) { - return { - ok: false, - errors: [ - { - path: opts?.breadcrumbsPrefix ?? [], - message: getErrorMessageForIncorrectType(parsed, "object"), - }, - ], - }; - } - - // strip out added properties - const addedPropertyKeys = new Set(Object.keys(properties)); - const parsedWithoutAddedProperties = filterObject( - parsed, - Object.keys(parsed).filter((key) => !addedPropertyKeys.has(key)) - ); - - return objectLike.json(parsedWithoutAddedProperties as ParsedObjectShape, opts); - }, - - getType: () => objectLike.getType(), - }; - - return { - ...objectSchema, - ...getSchemaUtils(objectSchema), - ...getObjectLikeUtils(objectSchema), - }; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/object-like/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/object-like/index.ts deleted file mode 100644 index c342e72cf9d..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/object-like/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { getObjectLikeUtils, withParsedProperties } from "./getObjectLikeUtils"; -export type { ObjectLikeSchema, ObjectLikeUtils } from "./types"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/object-like/types.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/object-like/types.ts deleted file mode 100644 index 75b3698729c..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/object-like/types.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BaseSchema, Schema } from "../../Schema"; - -export type ObjectLikeSchema = Schema & - BaseSchema & - ObjectLikeUtils; - -export interface ObjectLikeUtils { - withParsedProperties: >(properties: { - [K in keyof T]: T[K] | ((parsed: Parsed) => T[K]); - }) => ObjectLikeSchema; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/object/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/object/index.ts deleted file mode 100644 index e3f4388db28..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/object/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -export { getObjectUtils, object } from "./object"; -export { objectWithoutOptionalProperties } from "./objectWithoutOptionalProperties"; -export type { - inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas, - inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas, -} from "./objectWithoutOptionalProperties"; -export { isProperty, property } from "./property"; -export type { Property } from "./property"; -export type { - BaseObjectSchema, - inferObjectSchemaFromPropertySchemas, - inferParsedObject, - inferParsedObjectFromPropertySchemas, - inferParsedPropertySchema, - inferRawKey, - inferRawObject, - inferRawObjectFromPropertySchemas, - inferRawPropertySchema, - ObjectSchema, - ObjectUtils, - PropertySchemas, -} from "./types"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/object/object.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/object/object.ts deleted file mode 100644 index 8d40c33c80a..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/object/object.ts +++ /dev/null @@ -1,365 +0,0 @@ -import { MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; -import { entries } from "../../utils/entries"; -import { filterObject } from "../../utils/filterObject"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { isPlainObject } from "../../utils/isPlainObject"; -import { keys } from "../../utils/keys"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { partition } from "../../utils/partition"; -import { getObjectLikeUtils } from "../object-like"; -import { getSchemaUtils } from "../schema-utils"; -import { isProperty } from "./property"; -import { - BaseObjectSchema, - inferObjectSchemaFromPropertySchemas, - inferParsedObjectFromPropertySchemas, - inferRawObjectFromPropertySchemas, - ObjectSchema, - ObjectUtils, - PropertySchemas, -} from "./types"; - -interface ObjectPropertyWithRawKey { - rawKey: string; - parsedKey: string; - valueSchema: Schema; -} - -export function object>( - schemas: T -): inferObjectSchemaFromPropertySchemas { - const baseSchema: BaseObjectSchema< - inferRawObjectFromPropertySchemas, - inferParsedObjectFromPropertySchemas - > = { - _getRawProperties: () => - Object.entries(schemas).map(([parsedKey, propertySchema]) => - isProperty(propertySchema) ? propertySchema.rawKey : parsedKey - ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], - _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], - - parse: (raw, opts) => { - const rawKeyToProperty: Record = {}; - const requiredKeys: string[] = []; - - for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { - const rawKey = isProperty(schemaOrObjectProperty) ? schemaOrObjectProperty.rawKey : parsedKey; - const valueSchema: Schema = isProperty(schemaOrObjectProperty) - ? schemaOrObjectProperty.valueSchema - : schemaOrObjectProperty; - - const property: ObjectPropertyWithRawKey = { - rawKey, - parsedKey: parsedKey as string, - valueSchema, - }; - - rawKeyToProperty[rawKey] = property; - - if (isSchemaRequired(valueSchema)) { - requiredKeys.push(rawKey); - } - } - - return validateAndTransformObject({ - value: raw, - requiredKeys, - getProperty: (rawKey) => { - const property = rawKeyToProperty[rawKey]; - if (property == null) { - return undefined; - } - return { - transformedKey: property.parsedKey, - transform: (propertyValue) => - property.valueSchema.parse(propertyValue, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), rawKey], - }), - }; - }, - unrecognizedObjectKeys: opts?.unrecognizedObjectKeys, - skipValidation: opts?.skipValidation, - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - omitUndefined: opts?.omitUndefined, - }); - }, - - json: (parsed, opts) => { - const requiredKeys: string[] = []; - - for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { - const valueSchema: Schema = isProperty(schemaOrObjectProperty) - ? schemaOrObjectProperty.valueSchema - : schemaOrObjectProperty; - - if (isSchemaRequired(valueSchema)) { - requiredKeys.push(parsedKey as string); - } - } - - return validateAndTransformObject({ - value: parsed, - requiredKeys, - getProperty: ( - parsedKey - ): { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined => { - const property = schemas[parsedKey as keyof T]; - - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - if (property == null) { - return undefined; - } - - if (isProperty(property)) { - return { - transformedKey: property.rawKey, - transform: (propertyValue) => - property.valueSchema.json(propertyValue, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedKey], - }), - }; - } else { - return { - transformedKey: parsedKey, - transform: (propertyValue) => - property.json(propertyValue, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedKey], - }), - }; - } - }, - unrecognizedObjectKeys: opts?.unrecognizedObjectKeys, - skipValidation: opts?.skipValidation, - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - omitUndefined: opts?.omitUndefined, - }); - }, - - getType: () => SchemaType.OBJECT, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - ...getObjectLikeUtils(baseSchema), - ...getObjectUtils(baseSchema), - }; -} - -function validateAndTransformObject({ - value, - requiredKeys, - getProperty, - unrecognizedObjectKeys = "fail", - skipValidation = false, - breadcrumbsPrefix = [], -}: { - value: unknown; - requiredKeys: string[]; - getProperty: ( - preTransformedKey: string - ) => { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined; - unrecognizedObjectKeys: "fail" | "passthrough" | "strip" | undefined; - skipValidation: boolean | undefined; - breadcrumbsPrefix: string[] | undefined; - omitUndefined: boolean | undefined; -}): MaybeValid { - if (!isPlainObject(value)) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "object"), - }, - ], - }; - } - - const missingRequiredKeys = new Set(requiredKeys); - const errors: ValidationError[] = []; - const transformed: Record = {}; - - for (const [preTransformedKey, preTransformedItemValue] of Object.entries(value)) { - const property = getProperty(preTransformedKey); - - if (property != null) { - missingRequiredKeys.delete(preTransformedKey); - - const value = property.transform(preTransformedItemValue); - if (value.ok) { - transformed[property.transformedKey] = value.value; - } else { - transformed[preTransformedKey] = preTransformedItemValue; - errors.push(...value.errors); - } - } else { - switch (unrecognizedObjectKeys) { - case "fail": - errors.push({ - path: [...breadcrumbsPrefix, preTransformedKey], - message: `Unexpected key "${preTransformedKey}"`, - }); - break; - case "strip": - break; - case "passthrough": - transformed[preTransformedKey] = preTransformedItemValue; - break; - } - } - } - - errors.push( - ...requiredKeys - .filter((key) => missingRequiredKeys.has(key)) - .map((key) => ({ - path: breadcrumbsPrefix, - message: `Missing required key "${key}"`, - })) - ); - - if (errors.length === 0 || skipValidation) { - return { - ok: true, - value: transformed as Transformed, - }; - } else { - return { - ok: false, - errors, - }; - } -} - -export function getObjectUtils(schema: BaseObjectSchema): ObjectUtils { - return { - extend: (extension: ObjectSchema) => { - const baseSchema: BaseObjectSchema = { - _getParsedProperties: () => [...schema._getParsedProperties(), ...extension._getParsedProperties()], - _getRawProperties: () => [...schema._getRawProperties(), ...extension._getRawProperties()], - parse: (raw, opts) => { - return validateAndTransformExtendedObject({ - extensionKeys: extension._getRawProperties(), - value: raw, - transformBase: (rawBase) => schema.parse(rawBase, opts), - transformExtension: (rawExtension) => extension.parse(rawExtension, opts), - }); - }, - json: (parsed, opts) => { - return validateAndTransformExtendedObject({ - extensionKeys: extension._getParsedProperties(), - value: parsed, - transformBase: (parsedBase) => schema.json(parsedBase, opts), - transformExtension: (parsedExtension) => extension.json(parsedExtension, opts), - }); - }, - getType: () => SchemaType.OBJECT, - }; - - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - ...getObjectLikeUtils(baseSchema), - ...getObjectUtils(baseSchema), - }; - }, - passthrough: () => { - const baseSchema: BaseObjectSchema = - { - _getParsedProperties: () => schema._getParsedProperties(), - _getRawProperties: () => schema._getRawProperties(), - parse: (raw, opts) => { - const transformed = schema.parse(raw, { ...opts, unrecognizedObjectKeys: "passthrough" }); - if (!transformed.ok) { - return transformed; - } - return { - ok: true, - value: { - ...(raw as any), - ...transformed.value, - }, - }; - }, - json: (parsed, opts) => { - const transformed = schema.json(parsed, { ...opts, unrecognizedObjectKeys: "passthrough" }); - if (!transformed.ok) { - return transformed; - } - return { - ok: true, - value: { - ...(parsed as any), - ...transformed.value, - }, - }; - }, - getType: () => SchemaType.OBJECT, - }; - - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - ...getObjectLikeUtils(baseSchema), - ...getObjectUtils(baseSchema), - }; - }, - }; -} - -function validateAndTransformExtendedObject({ - extensionKeys, - value, - transformBase, - transformExtension, -}: { - extensionKeys: (keyof PreTransformedExtension)[]; - value: unknown; - transformBase: (value: unknown) => MaybeValid; - transformExtension: (value: unknown) => MaybeValid; -}): MaybeValid { - const extensionPropertiesSet = new Set(extensionKeys); - const [extensionProperties, baseProperties] = partition(keys(value), (key) => - extensionPropertiesSet.has(key as keyof PreTransformedExtension) - ); - - const transformedBase = transformBase(filterObject(value, baseProperties)); - const transformedExtension = transformExtension(filterObject(value, extensionProperties)); - - if (transformedBase.ok && transformedExtension.ok) { - return { - ok: true, - value: { - ...transformedBase.value, - ...transformedExtension.value, - }, - }; - } else { - return { - ok: false, - errors: [ - ...(transformedBase.ok ? [] : transformedBase.errors), - ...(transformedExtension.ok ? [] : transformedExtension.errors), - ], - }; - } -} - -function isSchemaRequired(schema: Schema): boolean { - return !isSchemaOptional(schema); -} - -function isSchemaOptional(schema: Schema): boolean { - switch (schema.getType()) { - case SchemaType.ANY: - case SchemaType.UNKNOWN: - case SchemaType.OPTIONAL: - return true; - default: - return false; - } -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts deleted file mode 100644 index a0951f48efc..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { object } from "./object"; -import { inferParsedPropertySchema, inferRawObjectFromPropertySchemas, ObjectSchema, PropertySchemas } from "./types"; - -export function objectWithoutOptionalProperties>( - schemas: T -): inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas { - return object(schemas) as unknown as inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas; -} - -export type inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas> = - ObjectSchema< - inferRawObjectFromPropertySchemas, - inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas - >; - -export type inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas> = { - [K in keyof T]: inferParsedPropertySchema; -}; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/object/property.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/object/property.ts deleted file mode 100644 index d245c4b193a..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/object/property.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Schema } from "../../Schema"; - -export function property( - rawKey: RawKey, - valueSchema: Schema -): Property { - return { - rawKey, - valueSchema, - isProperty: true, - }; -} - -export interface Property { - rawKey: RawKey; - valueSchema: Schema; - isProperty: true; -} - -export function isProperty>(maybeProperty: unknown): maybeProperty is O { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - return (maybeProperty as O).isProperty; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/object/types.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/object/types.ts deleted file mode 100644 index 9f87cbb787b..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/object/types.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { BaseSchema, inferParsed, inferRaw, Schema } from "../../Schema"; -import { addQuestionMarksToNullableProperties } from "../../utils/addQuestionMarksToNullableProperties"; -import { ObjectLikeUtils } from "../object-like"; -import { SchemaUtils } from "../schema-utils"; -import { Property } from "./property"; - -export type ObjectSchema = BaseObjectSchema & - ObjectLikeUtils & - ObjectUtils & - SchemaUtils; - -export interface BaseObjectSchema extends BaseSchema { - _getRawProperties: () => (keyof Raw)[]; - _getParsedProperties: () => (keyof Parsed)[]; -} - -export interface ObjectUtils { - extend: ( - schemas: ObjectSchema - ) => ObjectSchema; - passthrough: () => ObjectSchema; -} - -export type inferRawObject> = O extends ObjectSchema ? Raw : never; - -export type inferParsedObject> = O extends ObjectSchema - ? Parsed - : never; - -export type inferObjectSchemaFromPropertySchemas> = ObjectSchema< - inferRawObjectFromPropertySchemas, - inferParsedObjectFromPropertySchemas ->; - -export type inferRawObjectFromPropertySchemas> = - addQuestionMarksToNullableProperties<{ - [ParsedKey in keyof T as inferRawKey]: inferRawPropertySchema; - }>; - -export type inferParsedObjectFromPropertySchemas> = - addQuestionMarksToNullableProperties<{ - [K in keyof T]: inferParsedPropertySchema; - }>; - -export type PropertySchemas = Record< - ParsedKeys, - Property | Schema ->; - -export type inferRawPropertySchema

| Schema> = P extends Property< - any, - infer Raw, - any -> - ? Raw - : P extends Schema - ? inferRaw

- : never; - -export type inferParsedPropertySchema

| Schema> = P extends Property< - any, - any, - infer Parsed -> - ? Parsed - : P extends Schema - ? inferParsed

- : never; - -export type inferRawKey< - ParsedKey extends string | number | symbol, - P extends Property | Schema -> = P extends Property ? Raw : ParsedKey; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/any.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/any.ts deleted file mode 100644 index fcaeb04255a..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/any.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; - -export const any = createIdentitySchemaCreator(SchemaType.ANY, (value) => ({ ok: true, value })); diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/boolean.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/boolean.ts deleted file mode 100644 index fad60562120..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/boolean.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export const boolean = createIdentitySchemaCreator( - SchemaType.BOOLEAN, - (value, { breadcrumbsPrefix = [] } = {}) => { - if (typeof value === "boolean") { - return { - ok: true, - value, - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "boolean"), - }, - ], - }; - } - } -); diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/index.ts deleted file mode 100644 index 788f9416bfe..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { any } from "./any"; -export { boolean } from "./boolean"; -export { number } from "./number"; -export { string } from "./string"; -export { unknown } from "./unknown"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/number.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/number.ts deleted file mode 100644 index c2689456936..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/number.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export const number = createIdentitySchemaCreator( - SchemaType.NUMBER, - (value, { breadcrumbsPrefix = [] } = {}) => { - if (typeof value === "number") { - return { - ok: true, - value, - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "number"), - }, - ], - }; - } - } -); diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/string.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/string.ts deleted file mode 100644 index 949f1f2a630..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/string.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; - -export const string = createIdentitySchemaCreator( - SchemaType.STRING, - (value, { breadcrumbsPrefix = [] } = {}) => { - if (typeof value === "string") { - return { - ok: true, - value, - }; - } else { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "string"), - }, - ], - }; - } - } -); diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/unknown.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/unknown.ts deleted file mode 100644 index 4d5249571f5..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/primitives/unknown.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { SchemaType } from "../../Schema"; -import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; - -export const unknown = createIdentitySchemaCreator(SchemaType.UNKNOWN, (value) => ({ ok: true, value })); diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/record/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/record/index.ts deleted file mode 100644 index 82e25c5c2af..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/record/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { record } from "./record"; -export type { BaseRecordSchema, RecordSchema } from "./types"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/record/record.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/record/record.ts deleted file mode 100644 index 6683ac3609f..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/record/record.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; -import { entries } from "../../utils/entries"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { isPlainObject } from "../../utils/isPlainObject"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { getSchemaUtils } from "../schema-utils"; -import { BaseRecordSchema, RecordSchema } from "./types"; - -export function record( - keySchema: Schema, - valueSchema: Schema -): RecordSchema { - const baseSchema: BaseRecordSchema = { - parse: (raw, opts) => { - return validateAndTransformRecord({ - value: raw, - isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, - transformKey: (key) => - keySchema.parse(key, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key} (key)`], - }), - transformValue: (value, key) => - valueSchema.parse(value, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key}`], - }), - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - }); - }, - json: (parsed, opts) => { - return validateAndTransformRecord({ - value: parsed, - isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, - transformKey: (key) => - keySchema.json(key, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key} (key)`], - }), - transformValue: (value, key) => - valueSchema.json(value, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key}`], - }), - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - }); - }, - getType: () => SchemaType.RECORD, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} - -function validateAndTransformRecord({ - value, - isKeyNumeric, - transformKey, - transformValue, - breadcrumbsPrefix = [], -}: { - value: unknown; - isKeyNumeric: boolean; - transformKey: (key: string | number) => MaybeValid; - transformValue: (value: unknown, key: string | number) => MaybeValid; - breadcrumbsPrefix: string[] | undefined; -}): MaybeValid> { - if (!isPlainObject(value)) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "object"), - }, - ], - }; - } - - return entries(value).reduce>>( - (accPromise, [stringKey, value]) => { - // skip nullish keys - if (value == null) { - return accPromise; - } - - const acc = accPromise; - - let key: string | number = stringKey; - if (isKeyNumeric) { - const numberKey = stringKey.length > 0 ? Number(stringKey) : NaN; - if (!isNaN(numberKey)) { - key = numberKey; - } - } - const transformedKey = transformKey(key); - - const transformedValue = transformValue(value, key); - - if (acc.ok && transformedKey.ok && transformedValue.ok) { - return { - ok: true, - value: { - ...acc.value, - [transformedKey.value]: transformedValue.value, - }, - }; - } - - const errors: ValidationError[] = []; - if (!acc.ok) { - errors.push(...acc.errors); - } - if (!transformedKey.ok) { - errors.push(...transformedKey.errors); - } - if (!transformedValue.ok) { - errors.push(...transformedValue.errors); - } - - return { - ok: false, - errors, - }; - }, - { ok: true, value: {} as Record } - ); -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/record/types.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/record/types.ts deleted file mode 100644 index eb82cc7f65c..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/record/types.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BaseSchema } from "../../Schema"; -import { SchemaUtils } from "../schema-utils"; - -export type RecordSchema< - RawKey extends string | number, - RawValue, - ParsedKey extends string | number, - ParsedValue -> = BaseRecordSchema & - SchemaUtils, Record>; - -export type BaseRecordSchema< - RawKey extends string | number, - RawValue, - ParsedKey extends string | number, - ParsedValue -> = BaseSchema, Record>; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/JsonError.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/JsonError.ts deleted file mode 100644 index 2b89ca0e7ad..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/JsonError.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ValidationError } from "../../Schema"; -import { stringifyValidationError } from "./stringifyValidationErrors"; - -export class JsonError extends Error { - constructor(public readonly errors: ValidationError[]) { - super(errors.map(stringifyValidationError).join("; ")); - Object.setPrototypeOf(this, JsonError.prototype); - } -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/ParseError.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/ParseError.ts deleted file mode 100644 index d056eb45cf7..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/ParseError.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ValidationError } from "../../Schema"; -import { stringifyValidationError } from "./stringifyValidationErrors"; - -export class ParseError extends Error { - constructor(public readonly errors: ValidationError[]) { - super(errors.map(stringifyValidationError).join("; ")); - Object.setPrototypeOf(this, ParseError.prototype); - } -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/getSchemaUtils.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/getSchemaUtils.ts deleted file mode 100644 index 79ecad92132..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/getSchemaUtils.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { BaseSchema, Schema, SchemaOptions, SchemaType } from "../../Schema"; -import { JsonError } from "./JsonError"; -import { ParseError } from "./ParseError"; - -export interface SchemaUtils { - optional: () => Schema; - transform: (transformer: SchemaTransformer) => Schema; - parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed; - jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw; -} - -export interface SchemaTransformer { - transform: (parsed: Parsed) => Transformed; - untransform: (transformed: any) => Parsed; -} - -export function getSchemaUtils(schema: BaseSchema): SchemaUtils { - return { - optional: () => optional(schema), - transform: (transformer) => transform(schema, transformer), - parseOrThrow: (raw, opts) => { - const parsed = schema.parse(raw, opts); - if (parsed.ok) { - return parsed.value; - } - throw new ParseError(parsed.errors); - }, - jsonOrThrow: (parsed, opts) => { - const raw = schema.json(parsed, opts); - if (raw.ok) { - return raw.value; - } - throw new JsonError(raw.errors); - }, - }; -} - -/** - * schema utils are defined in one file to resolve issues with circular imports - */ - -export function optional( - schema: BaseSchema -): Schema { - const baseSchema: BaseSchema = { - parse: (raw, opts) => { - if (raw == null) { - return { - ok: true, - value: undefined, - }; - } - return schema.parse(raw, opts); - }, - json: (parsed, opts) => { - if (opts?.omitUndefined && parsed === undefined) { - return { - ok: true, - value: undefined, - }; - } - if (parsed == null) { - return { - ok: true, - value: null, - }; - } - return schema.json(parsed, opts); - }, - getType: () => SchemaType.OPTIONAL, - }; - - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - }; -} - -export function transform( - schema: BaseSchema, - transformer: SchemaTransformer -): Schema { - const baseSchema: BaseSchema = { - parse: (raw, opts) => { - const parsed = schema.parse(raw, opts); - if (!parsed.ok) { - return parsed; - } - return { - ok: true, - value: transformer.transform(parsed.value), - }; - }, - json: (transformed, opts) => { - const parsed = transformer.untransform(transformed); - return schema.json(parsed, opts); - }, - getType: () => schema.getType(), - }; - - return { - ...baseSchema, - ...getSchemaUtils(baseSchema), - }; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/index.ts deleted file mode 100644 index aa04e051dfa..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { getSchemaUtils, optional, transform } from "./getSchemaUtils"; -export type { SchemaUtils } from "./getSchemaUtils"; -export { JsonError } from "./JsonError"; -export { ParseError } from "./ParseError"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/stringifyValidationErrors.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/stringifyValidationErrors.ts deleted file mode 100644 index 4160f0a2617..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/schema-utils/stringifyValidationErrors.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ValidationError } from "../../Schema"; - -export function stringifyValidationError(error: ValidationError): string { - if (error.path.length === 0) { - return error.message; - } - return `${error.path.join(" -> ")}: ${error.message}`; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/set/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/set/index.ts deleted file mode 100644 index f3310e8bdad..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/set/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { set } from "./set"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/set/set.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/set/set.ts deleted file mode 100644 index e9e6bb7e539..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/set/set.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { BaseSchema, Schema, SchemaType } from "../../Schema"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { list } from "../list"; -import { getSchemaUtils } from "../schema-utils"; - -export function set(schema: Schema): Schema> { - const listSchema = list(schema); - const baseSchema: BaseSchema> = { - parse: (raw, opts) => { - const parsedList = listSchema.parse(raw, opts); - if (parsedList.ok) { - return { - ok: true, - value: new Set(parsedList.value), - }; - } else { - return parsedList; - } - }, - json: (parsed, opts) => { - if (!(parsed instanceof Set)) { - return { - ok: false, - errors: [ - { - path: opts?.breadcrumbsPrefix ?? [], - message: getErrorMessageForIncorrectType(parsed, "Set"), - }, - ], - }; - } - const jsonList = listSchema.json([...parsed], opts); - return jsonList; - }, - getType: () => SchemaType.SET, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/undiscriminated-union/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/undiscriminated-union/index.ts deleted file mode 100644 index 75b71cb3565..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/undiscriminated-union/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type { - inferParsedUnidiscriminatedUnionSchema, - inferRawUnidiscriminatedUnionSchema, - UndiscriminatedUnionSchema, -} from "./types"; -export { undiscriminatedUnion } from "./undiscriminatedUnion"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/undiscriminated-union/types.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/undiscriminated-union/types.ts deleted file mode 100644 index 43e7108a060..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/undiscriminated-union/types.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { inferParsed, inferRaw, Schema } from "../../Schema"; - -export type UndiscriminatedUnionSchema = Schema< - inferRawUnidiscriminatedUnionSchema, - inferParsedUnidiscriminatedUnionSchema ->; - -export type inferRawUnidiscriminatedUnionSchema = inferRaw; - -export type inferParsedUnidiscriminatedUnionSchema = inferParsed; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts deleted file mode 100644 index 21ed3df0f40..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType, ValidationError } from "../../Schema"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { getSchemaUtils } from "../schema-utils"; -import { inferParsedUnidiscriminatedUnionSchema, inferRawUnidiscriminatedUnionSchema } from "./types"; - -export function undiscriminatedUnion, ...Schema[]]>( - schemas: Schemas -): Schema, inferParsedUnidiscriminatedUnionSchema> { - const baseSchema: BaseSchema< - inferRawUnidiscriminatedUnionSchema, - inferParsedUnidiscriminatedUnionSchema - > = { - parse: (raw, opts) => { - return validateAndTransformUndiscriminatedUnion>( - (schema, opts) => schema.parse(raw, opts), - schemas, - opts - ); - }, - json: (parsed, opts) => { - return validateAndTransformUndiscriminatedUnion>( - (schema, opts) => schema.json(parsed, opts), - schemas, - opts - ); - }, - getType: () => SchemaType.UNDISCRIMINATED_UNION, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} - -function validateAndTransformUndiscriminatedUnion( - transform: (schema: Schema, opts: SchemaOptions) => MaybeValid, - schemas: Schema[], - opts: SchemaOptions | undefined -): MaybeValid { - const errors: ValidationError[] = []; - for (const [index, schema] of schemas.entries()) { - const transformed = transform(schema, { ...opts, skipValidation: false }); - if (transformed.ok) { - return transformed; - } else { - for (const error of transformed.errors) { - errors.push({ - path: error.path, - message: `[Variant ${index}] ${error.message}`, - }); - } - } - } - - return { - ok: false, - errors, - }; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/union/discriminant.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/union/discriminant.ts deleted file mode 100644 index 55065bc8946..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/union/discriminant.ts +++ /dev/null @@ -1,14 +0,0 @@ -export function discriminant( - parsedDiscriminant: ParsedDiscriminant, - rawDiscriminant: RawDiscriminant -): Discriminant { - return { - parsedDiscriminant, - rawDiscriminant, - }; -} - -export interface Discriminant { - parsedDiscriminant: ParsedDiscriminant; - rawDiscriminant: RawDiscriminant; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/union/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/union/index.ts deleted file mode 100644 index 85fc008a2d8..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/union/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export { discriminant } from "./discriminant"; -export type { Discriminant } from "./discriminant"; -export type { - inferParsedDiscriminant, - inferParsedUnion, - inferRawDiscriminant, - inferRawUnion, - UnionSubtypes, -} from "./types"; -export { union } from "./union"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/union/types.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/union/types.ts deleted file mode 100644 index 6f82c868b2d..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/union/types.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { inferParsedObject, inferRawObject, ObjectSchema } from "../object"; -import { Discriminant } from "./discriminant"; - -export type UnionSubtypes = { - [K in DiscriminantValues]: ObjectSchema; -}; - -export type inferRawUnion, U extends UnionSubtypes> = { - [K in keyof U]: Record, K> & inferRawObject; -}[keyof U]; - -export type inferParsedUnion, U extends UnionSubtypes> = { - [K in keyof U]: Record, K> & inferParsedObject; -}[keyof U]; - -export type inferRawDiscriminant> = D extends string - ? D - : D extends Discriminant - ? Raw - : never; - -export type inferParsedDiscriminant> = D extends string - ? D - : D extends Discriminant - ? Parsed - : never; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/builders/union/union.ts b/seed/ts-sdk/inline-types/src/core/schemas/builders/union/union.ts deleted file mode 100644 index ab61475a572..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/builders/union/union.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { BaseSchema, MaybeValid, SchemaType } from "../../Schema"; -import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; -import { isPlainObject } from "../../utils/isPlainObject"; -import { keys } from "../../utils/keys"; -import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; -import { enum_ } from "../enum"; -import { ObjectSchema } from "../object"; -import { getObjectLikeUtils, ObjectLikeSchema } from "../object-like"; -import { getSchemaUtils } from "../schema-utils"; -import { Discriminant } from "./discriminant"; -import { inferParsedDiscriminant, inferParsedUnion, inferRawDiscriminant, inferRawUnion, UnionSubtypes } from "./types"; - -export function union, U extends UnionSubtypes>( - discriminant: D, - union: U -): ObjectLikeSchema, inferParsedUnion> { - const rawDiscriminant = - typeof discriminant === "string" ? discriminant : (discriminant.rawDiscriminant as inferRawDiscriminant); - const parsedDiscriminant = - typeof discriminant === "string" - ? discriminant - : (discriminant.parsedDiscriminant as inferParsedDiscriminant); - - const discriminantValueSchema = enum_(keys(union) as string[]); - - const baseSchema: BaseSchema, inferParsedUnion> = { - parse: (raw, opts) => { - return transformAndValidateUnion({ - value: raw, - discriminant: rawDiscriminant, - transformedDiscriminant: parsedDiscriminant, - transformDiscriminantValue: (discriminantValue) => - discriminantValueSchema.parse(discriminantValue, { - allowUnrecognizedEnumValues: opts?.allowUnrecognizedUnionMembers, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), rawDiscriminant], - }), - getAdditionalPropertiesSchema: (discriminantValue) => union[discriminantValue], - allowUnrecognizedUnionMembers: opts?.allowUnrecognizedUnionMembers, - transformAdditionalProperties: (additionalProperties, additionalPropertiesSchema) => - additionalPropertiesSchema.parse(additionalProperties, opts), - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - }); - }, - json: (parsed, opts) => { - return transformAndValidateUnion({ - value: parsed, - discriminant: parsedDiscriminant, - transformedDiscriminant: rawDiscriminant, - transformDiscriminantValue: (discriminantValue) => - discriminantValueSchema.json(discriminantValue, { - allowUnrecognizedEnumValues: opts?.allowUnrecognizedUnionMembers, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedDiscriminant], - }), - getAdditionalPropertiesSchema: (discriminantValue) => union[discriminantValue], - allowUnrecognizedUnionMembers: opts?.allowUnrecognizedUnionMembers, - transformAdditionalProperties: (additionalProperties, additionalPropertiesSchema) => - additionalPropertiesSchema.json(additionalProperties, opts), - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - }); - }, - getType: () => SchemaType.UNION, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - ...getObjectLikeUtils(baseSchema), - }; -} - -function transformAndValidateUnion< - TransformedDiscriminant extends string, - TransformedDiscriminantValue extends string, - TransformedAdditionalProperties ->({ - value, - discriminant, - transformedDiscriminant, - transformDiscriminantValue, - getAdditionalPropertiesSchema, - allowUnrecognizedUnionMembers = false, - transformAdditionalProperties, - breadcrumbsPrefix = [], -}: { - value: unknown; - discriminant: string; - transformedDiscriminant: TransformedDiscriminant; - transformDiscriminantValue: (discriminantValue: unknown) => MaybeValid; - getAdditionalPropertiesSchema: (discriminantValue: string) => ObjectSchema | undefined; - allowUnrecognizedUnionMembers: boolean | undefined; - transformAdditionalProperties: ( - additionalProperties: unknown, - additionalPropertiesSchema: ObjectSchema - ) => MaybeValid; - breadcrumbsPrefix: string[] | undefined; -}): MaybeValid & TransformedAdditionalProperties> { - if (!isPlainObject(value)) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: getErrorMessageForIncorrectType(value, "object"), - }, - ], - }; - } - - const { [discriminant]: discriminantValue, ...additionalProperties } = value; - - if (discriminantValue == null) { - return { - ok: false, - errors: [ - { - path: breadcrumbsPrefix, - message: `Missing discriminant ("${discriminant}")`, - }, - ], - }; - } - - const transformedDiscriminantValue = transformDiscriminantValue(discriminantValue); - if (!transformedDiscriminantValue.ok) { - return { - ok: false, - errors: transformedDiscriminantValue.errors, - }; - } - - const additionalPropertiesSchema = getAdditionalPropertiesSchema(transformedDiscriminantValue.value); - - if (additionalPropertiesSchema == null) { - if (allowUnrecognizedUnionMembers) { - return { - ok: true, - value: { - [transformedDiscriminant]: transformedDiscriminantValue.value, - ...additionalProperties, - } as Record & TransformedAdditionalProperties, - }; - } else { - return { - ok: false, - errors: [ - { - path: [...breadcrumbsPrefix, discriminant], - message: "Unexpected discriminant value", - }, - ], - }; - } - } - - const transformedAdditionalProperties = transformAdditionalProperties( - additionalProperties, - additionalPropertiesSchema - ); - if (!transformedAdditionalProperties.ok) { - return transformedAdditionalProperties; - } - - return { - ok: true, - value: { - [transformedDiscriminant]: discriminantValue, - ...transformedAdditionalProperties.value, - } as Record & TransformedAdditionalProperties, - }; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/index.ts b/seed/ts-sdk/inline-types/src/core/schemas/index.ts deleted file mode 100644 index 5429d8b43eb..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./builders"; -export type { inferParsed, inferRaw, Schema, SchemaOptions } from "./Schema"; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/utils/MaybePromise.ts b/seed/ts-sdk/inline-types/src/core/schemas/utils/MaybePromise.ts deleted file mode 100644 index 9cd354b3418..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/utils/MaybePromise.ts +++ /dev/null @@ -1 +0,0 @@ -export type MaybePromise = T | Promise; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/utils/addQuestionMarksToNullableProperties.ts b/seed/ts-sdk/inline-types/src/core/schemas/utils/addQuestionMarksToNullableProperties.ts deleted file mode 100644 index 4111d703cd0..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/utils/addQuestionMarksToNullableProperties.ts +++ /dev/null @@ -1,15 +0,0 @@ -export type addQuestionMarksToNullableProperties = { - [K in OptionalKeys]?: T[K]; -} & Pick>; - -export type OptionalKeys = { - [K in keyof T]-?: undefined extends T[K] - ? K - : null extends T[K] - ? K - : 1 extends (any extends T[K] ? 0 : 1) - ? never - : K; -}[keyof T]; - -export type RequiredKeys = Exclude>; diff --git a/seed/ts-sdk/inline-types/src/core/schemas/utils/createIdentitySchemaCreator.ts b/seed/ts-sdk/inline-types/src/core/schemas/utils/createIdentitySchemaCreator.ts deleted file mode 100644 index de107cf5ee1..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/utils/createIdentitySchemaCreator.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { getSchemaUtils } from "../builders/schema-utils"; -import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType } from "../Schema"; -import { maybeSkipValidation } from "./maybeSkipValidation"; - -export function createIdentitySchemaCreator( - schemaType: SchemaType, - validate: (value: unknown, opts?: SchemaOptions) => MaybeValid -): () => Schema { - return () => { - const baseSchema: BaseSchema = { - parse: validate, - json: validate, - getType: () => schemaType, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; - }; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/utils/entries.ts b/seed/ts-sdk/inline-types/src/core/schemas/utils/entries.ts deleted file mode 100644 index e122952137d..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/utils/entries.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function entries(object: T): [keyof T, T[keyof T]][] { - return Object.entries(object) as [keyof T, T[keyof T]][]; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/utils/filterObject.ts b/seed/ts-sdk/inline-types/src/core/schemas/utils/filterObject.ts deleted file mode 100644 index 2c25a3455bc..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/utils/filterObject.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function filterObject(obj: T, keysToInclude: K[]): Pick { - const keysToIncludeSet = new Set(keysToInclude); - return Object.entries(obj).reduce((acc, [key, value]) => { - if (keysToIncludeSet.has(key as K)) { - acc[key as K] = value; - } - return acc; - // eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter - }, {} as Pick); -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/utils/getErrorMessageForIncorrectType.ts b/seed/ts-sdk/inline-types/src/core/schemas/utils/getErrorMessageForIncorrectType.ts deleted file mode 100644 index 1a5c31027ce..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/utils/getErrorMessageForIncorrectType.ts +++ /dev/null @@ -1,25 +0,0 @@ -export function getErrorMessageForIncorrectType(value: unknown, expectedType: string): string { - return `Expected ${expectedType}. Received ${getTypeAsString(value)}.`; -} - -function getTypeAsString(value: unknown): string { - if (Array.isArray(value)) { - return "list"; - } - if (value === null) { - return "null"; - } - if (value instanceof BigInt) { - return "BigInt"; - } - switch (typeof value) { - case "string": - return `"${value}"`; - case "bigint": - case "number": - case "boolean": - case "undefined": - return `${value}`; - } - return typeof value; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/utils/isPlainObject.ts b/seed/ts-sdk/inline-types/src/core/schemas/utils/isPlainObject.ts deleted file mode 100644 index db82a722c35..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/utils/isPlainObject.ts +++ /dev/null @@ -1,17 +0,0 @@ -// borrowed from https://github.com/lodash/lodash/blob/master/isPlainObject.js -export function isPlainObject(value: unknown): value is Record { - if (typeof value !== "object" || value === null) { - return false; - } - - if (Object.getPrototypeOf(value) === null) { - return true; - } - - let proto = value; - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto); - } - - return Object.getPrototypeOf(value) === proto; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/utils/keys.ts b/seed/ts-sdk/inline-types/src/core/schemas/utils/keys.ts deleted file mode 100644 index 01867098287..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/utils/keys.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function keys(object: T): (keyof T)[] { - return Object.keys(object) as (keyof T)[]; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/utils/maybeSkipValidation.ts b/seed/ts-sdk/inline-types/src/core/schemas/utils/maybeSkipValidation.ts deleted file mode 100644 index 86c07abf2b4..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/utils/maybeSkipValidation.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { BaseSchema, MaybeValid, SchemaOptions } from "../Schema"; - -export function maybeSkipValidation, Raw, Parsed>(schema: S): S { - return { - ...schema, - json: transformAndMaybeSkipValidation(schema.json), - parse: transformAndMaybeSkipValidation(schema.parse), - }; -} - -function transformAndMaybeSkipValidation( - transform: (value: unknown, opts?: SchemaOptions) => MaybeValid -): (value: unknown, opts?: SchemaOptions) => MaybeValid { - return (value, opts): MaybeValid => { - const transformed = transform(value, opts); - const { skipValidation = false } = opts ?? {}; - if (!transformed.ok && skipValidation) { - // eslint-disable-next-line no-console - console.warn( - [ - "Failed to validate.", - ...transformed.errors.map( - (error) => - " - " + - (error.path.length > 0 ? `${error.path.join(".")}: ${error.message}` : error.message) - ), - ].join("\n") - ); - - return { - ok: true, - value: value as T, - }; - } else { - return transformed; - } - }; -} diff --git a/seed/ts-sdk/inline-types/src/core/schemas/utils/partition.ts b/seed/ts-sdk/inline-types/src/core/schemas/utils/partition.ts deleted file mode 100644 index f58d6f3d35f..00000000000 --- a/seed/ts-sdk/inline-types/src/core/schemas/utils/partition.ts +++ /dev/null @@ -1,12 +0,0 @@ -export function partition(items: readonly T[], predicate: (item: T) => boolean): [T[], T[]] { - const trueItems: T[] = [], - falseItems: T[] = []; - for (const item of items) { - if (predicate(item)) { - trueItems.push(item); - } else { - falseItems.push(item); - } - } - return [trueItems, falseItems]; -} diff --git a/seed/ts-sdk/inline-types/src/serialization/client/index.ts b/seed/ts-sdk/inline-types/src/serialization/client/index.ts deleted file mode 100644 index 415726b7fea..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/seed/ts-sdk/inline-types/src/serialization/client/requests/PostRootRequest.ts b/seed/ts-sdk/inline-types/src/serialization/client/requests/PostRootRequest.ts deleted file mode 100644 index 08cd8c34175..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/client/requests/PostRootRequest.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../index"; -import * as SeedObject from "../../../api/index"; -import * as core from "../../../core"; -import { InlineType1 } from "../../types/InlineType1"; - -export const PostRootRequest: core.serialization.Schema = - core.serialization.object({ - bar: InlineType1, - foo: core.serialization.string(), - }); - -export declare namespace PostRootRequest { - interface Raw { - bar: InlineType1.Raw; - foo: string; - } -} diff --git a/seed/ts-sdk/inline-types/src/serialization/client/requests/index.ts b/seed/ts-sdk/inline-types/src/serialization/client/requests/index.ts deleted file mode 100644 index 497781074f3..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { PostRootRequest } from "./PostRootRequest"; diff --git a/seed/ts-sdk/inline-types/src/serialization/types/InlineEnum.ts b/seed/ts-sdk/inline-types/src/serialization/types/InlineEnum.ts deleted file mode 100644 index ee1e24ef1f6..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/types/InlineEnum.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; - -export const InlineEnum: core.serialization.Schema = - core.serialization.enum_(["SUNNY", "CLOUDY", "RAINING", "SNOWING"]); - -export declare namespace InlineEnum { - type Raw = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; -} diff --git a/seed/ts-sdk/inline-types/src/serialization/types/InlineType1.ts b/seed/ts-sdk/inline-types/src/serialization/types/InlineType1.ts deleted file mode 100644 index 500f97d9af6..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/types/InlineType1.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; -import { NestedInlineType1 } from "./NestedInlineType1"; - -export const InlineType1: core.serialization.ObjectSchema = - core.serialization.object({ - foo: core.serialization.string(), - bar: NestedInlineType1, - }); - -export declare namespace InlineType1 { - interface Raw { - foo: string; - bar: NestedInlineType1.Raw; - } -} diff --git a/seed/ts-sdk/inline-types/src/serialization/types/InlineType2.ts b/seed/ts-sdk/inline-types/src/serialization/types/InlineType2.ts deleted file mode 100644 index a2590844567..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/types/InlineType2.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; - -export const InlineType2: core.serialization.ObjectSchema = - core.serialization.object({ - baz: core.serialization.string(), - }); - -export declare namespace InlineType2 { - interface Raw { - baz: string; - } -} diff --git a/seed/ts-sdk/inline-types/src/serialization/types/InlinedDiscriminatedUnion1.ts b/seed/ts-sdk/inline-types/src/serialization/types/InlinedDiscriminatedUnion1.ts deleted file mode 100644 index 21931514662..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/types/InlinedDiscriminatedUnion1.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; -import { InlineType1 } from "./InlineType1"; -import { InlineType2 } from "./InlineType2"; - -export const InlinedDiscriminatedUnion1: core.serialization.Schema< - serializers.InlinedDiscriminatedUnion1.Raw, - SeedObject.InlinedDiscriminatedUnion1 -> = core.serialization - .union("type", { - type1: InlineType1, - type2: InlineType2, - }) - .transform({ - transform: (value) => value, - untransform: (value) => value, - }); - -export declare namespace InlinedDiscriminatedUnion1 { - type Raw = InlinedDiscriminatedUnion1.Type1 | InlinedDiscriminatedUnion1.Type2; - - interface Type1 extends InlineType1.Raw { - type: "type1"; - } - - interface Type2 extends InlineType2.Raw { - type: "type2"; - } -} diff --git a/seed/ts-sdk/inline-types/src/serialization/types/InlinedUndiscriminatedUnion1.ts b/seed/ts-sdk/inline-types/src/serialization/types/InlinedUndiscriminatedUnion1.ts deleted file mode 100644 index 828580e64df..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/types/InlinedUndiscriminatedUnion1.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; -import { InlineType1 } from "./InlineType1"; -import { InlineType2 } from "./InlineType2"; - -export const InlinedUndiscriminatedUnion1: core.serialization.Schema< - serializers.InlinedUndiscriminatedUnion1.Raw, - SeedObject.InlinedUndiscriminatedUnion1 -> = core.serialization.undiscriminatedUnion([InlineType1, InlineType2]); - -export declare namespace InlinedUndiscriminatedUnion1 { - type Raw = InlineType1.Raw | InlineType2.Raw; -} diff --git a/seed/ts-sdk/inline-types/src/serialization/types/NestedInlineType1.ts b/seed/ts-sdk/inline-types/src/serialization/types/NestedInlineType1.ts deleted file mode 100644 index 8378c0a51ae..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/types/NestedInlineType1.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; -import { InlineEnum } from "./InlineEnum"; - -export const NestedInlineType1: core.serialization.ObjectSchema< - serializers.NestedInlineType1.Raw, - SeedObject.NestedInlineType1 -> = core.serialization.object({ - foo: core.serialization.string(), - bar: core.serialization.string(), - myEnum: InlineEnum, -}); - -export declare namespace NestedInlineType1 { - interface Raw { - foo: string; - bar: string; - myEnum: InlineEnum.Raw; - } -} diff --git a/seed/ts-sdk/inline-types/src/serialization/types/RootType1.ts b/seed/ts-sdk/inline-types/src/serialization/types/RootType1.ts deleted file mode 100644 index cb7851b7e78..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/types/RootType1.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as SeedObject from "../../api/index"; -import * as core from "../../core"; -import { InlineType1 } from "./InlineType1"; - -export const RootType1: core.serialization.ObjectSchema = - core.serialization.object({ - foo: core.serialization.string(), - bar: InlineType1, - }); - -export declare namespace RootType1 { - interface Raw { - foo: string; - bar: InlineType1.Raw; - } -} diff --git a/seed/ts-sdk/inline-types/src/serialization/types/index.ts b/seed/ts-sdk/inline-types/src/serialization/types/index.ts deleted file mode 100644 index bb183ec944a..00000000000 --- a/seed/ts-sdk/inline-types/src/serialization/types/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from "./RootType1"; -export * from "./InlineType1"; -export * from "./InlineType2"; -export * from "./NestedInlineType1"; -export * from "./InlinedDiscriminatedUnion1"; -export * from "./InlinedUndiscriminatedUnion1"; -export * from "./InlineEnum"; diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/bigint/bigint.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/bigint/bigint.test.ts deleted file mode 100644 index cf9935a749a..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/bigint/bigint.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { bigint } from "../../../../src/core/schemas/builders/bigint"; -import { itSchema } from "../utils/itSchema"; -import { itValidateJson, itValidateParse } from "../utils/itValidate"; - -describe("bigint", () => { - itSchema("converts between raw string and parsed bigint", bigint(), { - raw: "123456789012345678901234567890123456789012345678901234567890", - parsed: BigInt("123456789012345678901234567890123456789012345678901234567890"), - }); - - itValidateParse("non-string", bigint(), 42, [ - { - message: "Expected string. Received 42.", - path: [], - }, - ]); - - itValidateJson("non-bigint", bigint(), "hello", [ - { - message: 'Expected bigint. Received "hello".', - path: [], - }, - ]); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/date/date.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/date/date.test.ts deleted file mode 100644 index 2790268a09c..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/date/date.test.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { date } from "../../../../src/core/schemas/builders/date"; -import { itSchema } from "../utils/itSchema"; -import { itValidateJson, itValidateParse } from "../utils/itValidate"; - -describe("date", () => { - itSchema("converts between raw ISO string and parsed Date", date(), { - raw: "2022-09-29T05:41:21.939Z", - parsed: new Date("2022-09-29T05:41:21.939Z"), - }); - - itValidateParse("non-string", date(), 42, [ - { - message: "Expected string. Received 42.", - path: [], - }, - ]); - - itValidateParse("non-ISO", date(), "hello world", [ - { - message: 'Expected ISO 8601 date string. Received "hello world".', - path: [], - }, - ]); - - itValidateJson("non-Date", date(), "hello", [ - { - message: 'Expected Date object. Received "hello".', - path: [], - }, - ]); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/enum/enum.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/enum/enum.test.ts deleted file mode 100644 index ab0df0285cd..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/enum/enum.test.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { enum_ } from "../../../../src/core/schemas/builders/enum"; -import { itSchemaIdentity } from "../utils/itSchema"; -import { itValidate } from "../utils/itValidate"; - -describe("enum", () => { - itSchemaIdentity(enum_(["A", "B", "C"]), "A"); - - itSchemaIdentity(enum_(["A", "B", "C"]), "D" as any, { - opts: { allowUnrecognizedEnumValues: true }, - }); - - itValidate("invalid enum", enum_(["A", "B", "C"]), "D", [ - { - message: 'Expected enum. Received "D".', - path: [], - }, - ]); - - itValidate( - "non-string", - enum_(["A", "B", "C"]), - [], - [ - { - message: "Expected string. Received list.", - path: [], - }, - ] - ); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/lazy.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/lazy.test.ts deleted file mode 100644 index 6906bf4cf91..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/lazy.test.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Schema } from "../../../../src/core/schemas/Schema"; -import { lazy, list, object, string } from "../../../../src/core/schemas/builders"; -import { itSchemaIdentity } from "../utils/itSchema"; - -describe("lazy", () => { - it("doesn't run immediately", () => { - let wasRun = false; - lazy(() => { - wasRun = true; - return string(); - }); - expect(wasRun).toBe(false); - }); - - it("only runs first time", async () => { - let count = 0; - const schema = lazy(() => { - count++; - return string(); - }); - await schema.parse("hello"); - await schema.json("world"); - expect(count).toBe(1); - }); - - itSchemaIdentity( - lazy(() => object({})), - { foo: "hello" }, - { - title: "passes opts through", - opts: { unrecognizedObjectKeys: "passthrough" }, - } - ); - - itSchemaIdentity( - lazy(() => object({ foo: string() })), - { foo: "hello" } - ); - - // eslint-disable-next-line jest/expect-expect - it("self-referencial schema doesn't compile", () => { - () => { - // @ts-expect-error - const a = lazy(() => object({ foo: a })); - }; - }); - - // eslint-disable-next-line jest/expect-expect - it("self-referencial compiles with explicit type", () => { - () => { - interface TreeNode { - children: TreeNode[]; - } - const TreeNode: Schema = lazy(() => object({ children: list(TreeNode) })); - }; - }); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/lazyObject.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/lazyObject.test.ts deleted file mode 100644 index 8813cc9fbb4..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/lazyObject.test.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { lazyObject, number, object, string } from "../../../../src/core/schemas/builders"; -import { itSchemaIdentity } from "../utils/itSchema"; - -describe("lazy", () => { - itSchemaIdentity( - lazyObject(() => object({ foo: string() })), - { foo: "hello" } - ); - - itSchemaIdentity( - lazyObject(() => object({ foo: string() })).extend(object({ bar: number() })), - { - foo: "hello", - bar: 42, - }, - { title: "returned schema has object utils" } - ); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/recursive/a.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/recursive/a.ts deleted file mode 100644 index 8b7d5e40cfa..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/recursive/a.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { object } from "../../../../../src/core/schemas/builders/object"; -import { schemaB } from "./b"; - -// @ts-expect-error -export const schemaA = object({ - b: schemaB, -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/recursive/b.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/recursive/b.ts deleted file mode 100644 index fb219d54c8e..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/lazy/recursive/b.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { object } from "../../../../../src/core/schemas/builders/object"; -import { optional } from "../../../../../src/core/schemas/builders/schema-utils"; -import { schemaA } from "./a"; - -// @ts-expect-error -export const schemaB = object({ - a: optional(schemaA), -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/list/list.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/list/list.test.ts deleted file mode 100644 index 424ed642db2..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/list/list.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { list, object, property, string } from "../../../../src/core/schemas/builders"; -import { itSchema, itSchemaIdentity } from "../utils/itSchema"; -import { itValidate } from "../utils/itValidate"; - -describe("list", () => { - itSchemaIdentity(list(string()), ["hello", "world"], { - title: "functions as identity when item type is primitive", - }); - - itSchema( - "converts objects correctly", - list( - object({ - helloWorld: property("hello_world", string()), - }) - ), - { - raw: [{ hello_world: "123" }], - parsed: [{ helloWorld: "123" }], - } - ); - - itValidate("not a list", list(string()), 42, [ - { - path: [], - message: "Expected list. Received 42.", - }, - ]); - - itValidate( - "invalid item type", - list(string()), - [42], - [ - { - path: ["[0]"], - message: "Expected string. Received 42.", - }, - ] - ); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/literals/stringLiteral.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/literals/stringLiteral.test.ts deleted file mode 100644 index fa6c88873c6..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/literals/stringLiteral.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { stringLiteral } from "../../../../src/core/schemas/builders"; -import { itSchemaIdentity } from "../utils/itSchema"; -import { itValidate } from "../utils/itValidate"; - -describe("stringLiteral", () => { - itSchemaIdentity(stringLiteral("A"), "A"); - - itValidate("incorrect string", stringLiteral("A"), "B", [ - { - path: [], - message: 'Expected "A". Received "B".', - }, - ]); - - itValidate("non-string", stringLiteral("A"), 42, [ - { - path: [], - message: 'Expected "A". Received 42.', - }, - ]); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/object-like/withParsedProperties.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/object-like/withParsedProperties.test.ts deleted file mode 100644 index 9f5dd0ed39b..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/object-like/withParsedProperties.test.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { object, property, string, stringLiteral } from "../../../../src/core/schemas/builders"; - -describe("withParsedProperties", () => { - it("Added properties included on parsed object", async () => { - const schema = object({ - foo: property("raw_foo", string()), - bar: stringLiteral("bar"), - }).withParsedProperties({ - printFoo: (parsed) => () => parsed.foo, - printHelloWorld: () => () => "Hello world", - helloWorld: "Hello world", - }); - - const parsed = await schema.parse({ raw_foo: "value of foo", bar: "bar" }); - if (!parsed.ok) { - throw new Error("Failed to parse"); - } - expect(parsed.value.printFoo()).toBe("value of foo"); - expect(parsed.value.printHelloWorld()).toBe("Hello world"); - expect(parsed.value.helloWorld).toBe("Hello world"); - }); - - it("Added property is removed on raw object", async () => { - const schema = object({ - foo: property("raw_foo", string()), - bar: stringLiteral("bar"), - }).withParsedProperties({ - printFoo: (parsed) => () => parsed.foo, - }); - - const original = { raw_foo: "value of foo", bar: "bar" } as const; - const parsed = await schema.parse(original); - if (!parsed.ok) { - throw new Error("Failed to parse()"); - } - - const raw = await schema.json(parsed.value); - - if (!raw.ok) { - throw new Error("Failed to json()"); - } - - expect(raw.value).toEqual(original); - }); - - describe("compile", () => { - // eslint-disable-next-line jest/expect-expect - it("doesn't compile with non-object schema", () => { - () => - object({ - foo: string(), - }) - // @ts-expect-error - .withParsedProperties(42); - }); - }); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/object/extend.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/object/extend.test.ts deleted file mode 100644 index 54fc8c4ebf8..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/object/extend.test.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { boolean, object, property, string, stringLiteral } from "../../../../src/core/schemas/builders"; -import { itSchema, itSchemaIdentity } from "../utils/itSchema"; - -describe("extend", () => { - itSchemaIdentity( - object({ - foo: string(), - }).extend( - object({ - bar: stringLiteral("bar"), - }) - ), - { - foo: "", - bar: "bar", - } as const, - { - title: "extended properties are included in schema", - } - ); - - itSchemaIdentity( - object({ - foo: string(), - }) - .extend( - object({ - bar: stringLiteral("bar"), - }) - ) - .extend( - object({ - baz: boolean(), - }) - ), - { - foo: "", - bar: "bar", - baz: true, - } as const, - { - title: "extensions can be extended", - } - ); - - itSchema( - "converts nested object", - object({ - item: object({ - helloWorld: property("hello_world", string()), - }), - }).extend( - object({ - goodbye: property("goodbye_raw", string()), - }) - ), - { - raw: { item: { hello_world: "yo" }, goodbye_raw: "peace" }, - parsed: { item: { helloWorld: "yo" }, goodbye: "peace" }, - } - ); - - itSchema( - "extensions work with raw/parsed property name conversions", - object({ - item: property("item_raw", string()), - }).extend( - object({ - goodbye: property("goodbye_raw", string()), - }) - ), - { - raw: { item_raw: "hi", goodbye_raw: "peace" }, - parsed: { item: "hi", goodbye: "peace" }, - } - ); - - describe("compile", () => { - // eslint-disable-next-line jest/expect-expect - it("doesn't compile with non-object schema", () => { - () => - object({ - foo: string(), - }) - // @ts-expect-error - .extend([]); - }); - }); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/object/object.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/object/object.test.ts deleted file mode 100644 index 0acf0e240f6..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/object/object.test.ts +++ /dev/null @@ -1,255 +0,0 @@ -import { any, number, object, property, string, stringLiteral, unknown } from "../../../../src/core/schemas/builders"; -import { itJson, itParse, itSchema, itSchemaIdentity } from "../utils/itSchema"; -import { itValidate } from "../utils/itValidate"; - -describe("object", () => { - itSchemaIdentity( - object({ - foo: string(), - bar: stringLiteral("bar"), - }), - { - foo: "", - bar: "bar", - }, - { - title: "functions as identity when values are primitives and property() isn't used", - } - ); - - itSchema( - "uses raw key from property()", - object({ - foo: property("raw_foo", string()), - bar: stringLiteral("bar"), - }), - { - raw: { raw_foo: "foo", bar: "bar" }, - parsed: { foo: "foo", bar: "bar" }, - } - ); - - itSchema( - "keys with unknown type can be omitted", - object({ - foo: unknown(), - }), - { - raw: {}, - parsed: {}, - } - ); - - itSchema( - "keys with any type can be omitted", - object({ - foo: any(), - }), - { - raw: {}, - parsed: {}, - } - ); - - describe("unrecognizedObjectKeys", () => { - describe("parse", () => { - itParse( - 'includes unknown values when unrecognizedObjectKeys === "passthrough"', - object({ - foo: property("raw_foo", string()), - bar: stringLiteral("bar"), - }), - { - raw: { - raw_foo: "foo", - bar: "bar", - // @ts-expect-error - baz: "yoyo", - }, - parsed: { - foo: "foo", - bar: "bar", - // @ts-expect-error - baz: "yoyo", - }, - opts: { - unrecognizedObjectKeys: "passthrough", - }, - } - ); - - itParse( - 'strips unknown values when unrecognizedObjectKeys === "strip"', - object({ - foo: property("raw_foo", string()), - bar: stringLiteral("bar"), - }), - { - raw: { - raw_foo: "foo", - bar: "bar", - // @ts-expect-error - baz: "yoyo", - }, - parsed: { - foo: "foo", - bar: "bar", - }, - opts: { - unrecognizedObjectKeys: "strip", - }, - } - ); - }); - - describe("json", () => { - itJson( - 'includes unknown values when unrecognizedObjectKeys === "passthrough"', - object({ - foo: property("raw_foo", string()), - bar: stringLiteral("bar"), - }), - { - raw: { - raw_foo: "foo", - bar: "bar", - // @ts-expect-error - baz: "yoyo", - }, - parsed: { - foo: "foo", - bar: "bar", - // @ts-expect-error - baz: "yoyo", - }, - opts: { - unrecognizedObjectKeys: "passthrough", - }, - } - ); - - itJson( - 'strips unknown values when unrecognizedObjectKeys === "strip"', - object({ - foo: property("raw_foo", string()), - bar: stringLiteral("bar"), - }), - { - raw: { - raw_foo: "foo", - bar: "bar", - }, - parsed: { - foo: "foo", - bar: "bar", - // @ts-expect-error - baz: "yoyo", - }, - opts: { - unrecognizedObjectKeys: "strip", - }, - } - ); - }); - }); - - describe("nullish properties", () => { - itSchema("missing properties are not added", object({ foo: property("raw_foo", string().optional()) }), { - raw: {}, - parsed: {}, - }); - - itSchema("undefined properties are not dropped", object({ foo: property("raw_foo", string().optional()) }), { - raw: { raw_foo: null }, - parsed: { foo: undefined }, - }); - - itSchema("null properties are not dropped", object({ foo: property("raw_foo", string().optional()) }), { - raw: { raw_foo: null }, - parsed: { foo: undefined }, - }); - - describe("extensions", () => { - itSchema( - "undefined properties are not dropped", - object({}).extend(object({ foo: property("raw_foo", string().optional()) })), - { - raw: { raw_foo: null }, - parsed: { foo: undefined }, - } - ); - - describe("parse()", () => { - itParse( - "null properties are not dropped", - object({}).extend(object({ foo: property("raw_foo", string().optional()) })), - { - raw: { raw_foo: null }, - parsed: { foo: undefined }, - } - ); - }); - }); - }); - - itValidate( - "missing property", - object({ - foo: string(), - bar: stringLiteral("bar"), - }), - { foo: "hello" }, - [ - { - path: [], - message: 'Missing required key "bar"', - }, - ] - ); - - itValidate( - "extra property", - object({ - foo: string(), - bar: stringLiteral("bar"), - }), - { foo: "hello", bar: "bar", baz: 42 }, - [ - { - path: ["baz"], - message: 'Unexpected key "baz"', - }, - ] - ); - - itValidate( - "not an object", - object({ - foo: string(), - bar: stringLiteral("bar"), - }), - [], - [ - { - path: [], - message: "Expected object. Received list.", - }, - ] - ); - - itValidate( - "nested validation error", - object({ - foo: object({ - bar: number(), - }), - }), - { foo: { bar: "hello" } }, - [ - { - path: ["foo", "bar"], - message: 'Expected number. Received "hello".', - }, - ] - ); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/object/objectWithoutOptionalProperties.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/object/objectWithoutOptionalProperties.test.ts deleted file mode 100644 index d87a65febfd..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/object/objectWithoutOptionalProperties.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { objectWithoutOptionalProperties, string, stringLiteral } from "../../../../src/core/schemas/builders"; -import { itSchema } from "../utils/itSchema"; - -describe("objectWithoutOptionalProperties", () => { - itSchema( - "all properties are required", - objectWithoutOptionalProperties({ - foo: string(), - bar: stringLiteral("bar").optional(), - }), - { - raw: { - foo: "hello", - }, - // @ts-expect-error - parsed: { - foo: "hello", - }, - } - ); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/object/passthrough.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/object/passthrough.test.ts deleted file mode 100644 index 28ce3b1fea0..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/object/passthrough.test.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { object, string, stringLiteral } from "../../../../src/core/schemas/builders"; -import { itJson, itParse, itSchema } from "../utils/itSchema"; -import { itValidate } from "../utils/itValidate"; - -describe("passthrough", () => { - const baseSchema = object({ - foo: string(), - bar: stringLiteral("bar"), - }); - - describe("parse", () => { - itParse("includes unknown values", baseSchema.passthrough(), { - raw: { - foo: "hello", - bar: "bar", - baz: "extra", - }, - parsed: { - foo: "hello", - bar: "bar", - baz: "extra", - }, - }); - - itValidate( - "preserves schema validation", - baseSchema.passthrough(), - { - foo: 123, - bar: "bar", - baz: "extra", - }, - [ - { - path: ["foo"], - message: "Expected string. Received 123.", - }, - ] - ); - }); - - describe("json", () => { - itJson("includes unknown values", baseSchema.passthrough(), { - raw: { - foo: "hello", - bar: "bar", - - baz: "extra", - }, - parsed: { - foo: "hello", - bar: "bar", - - baz: "extra", - }, - }); - - itValidate( - "preserves schema validation", - baseSchema.passthrough(), - { - foo: "hello", - bar: "wrong", - baz: "extra", - }, - [ - { - path: ["bar"], - message: 'Expected "bar". Received "wrong".', - }, - ] - ); - }); - - itSchema("preserves schema validation in both directions", baseSchema.passthrough(), { - raw: { - foo: "hello", - bar: "bar", - extra: 42, - }, - parsed: { - foo: "hello", - bar: "bar", - extra: 42, - }, - }); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/any.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/any.test.ts deleted file mode 100644 index 1adbbe2a838..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/any.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { any } from "../../../../src/core/schemas/builders"; -import { itSchemaIdentity } from "../utils/itSchema"; - -describe("any", () => { - itSchemaIdentity(any(), true); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/boolean.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/boolean.test.ts deleted file mode 100644 index 897a8295dca..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/boolean.test.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { boolean } from "../../../../src/core/schemas/builders"; -import { itSchemaIdentity } from "../utils/itSchema"; -import { itValidate } from "../utils/itValidate"; - -describe("boolean", () => { - itSchemaIdentity(boolean(), true); - - itValidate("non-boolean", boolean(), {}, [ - { - path: [], - message: "Expected boolean. Received object.", - }, - ]); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/number.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/number.test.ts deleted file mode 100644 index 2d01415a60b..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/number.test.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { number } from "../../../../src/core/schemas/builders"; -import { itSchemaIdentity } from "../utils/itSchema"; -import { itValidate } from "../utils/itValidate"; - -describe("number", () => { - itSchemaIdentity(number(), 42); - - itValidate("non-number", number(), "hello", [ - { - path: [], - message: 'Expected number. Received "hello".', - }, - ]); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/string.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/string.test.ts deleted file mode 100644 index 57b2368784a..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/string.test.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { string } from "../../../../src/core/schemas/builders"; -import { itSchemaIdentity } from "../utils/itSchema"; -import { itValidate } from "../utils/itValidate"; - -describe("string", () => { - itSchemaIdentity(string(), "hello"); - - itValidate("non-string", string(), 42, [ - { - path: [], - message: "Expected string. Received 42.", - }, - ]); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/unknown.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/unknown.test.ts deleted file mode 100644 index 4d17a7dbd00..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/primitives/unknown.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { unknown } from "../../../../src/core/schemas/builders"; -import { itSchemaIdentity } from "../utils/itSchema"; - -describe("unknown", () => { - itSchemaIdentity(unknown(), true); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/record/record.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/record/record.test.ts deleted file mode 100644 index 7e4ba39cc55..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/record/record.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { number, record, string } from "../../../../src/core/schemas/builders"; -import { itSchemaIdentity } from "../utils/itSchema"; -import { itValidate } from "../utils/itValidate"; - -describe("record", () => { - itSchemaIdentity(record(string(), string()), { hello: "world" }); - itSchemaIdentity(record(number(), string()), { 42: "world" }); - - itValidate( - "non-record", - record(number(), string()), - [], - [ - { - path: [], - message: "Expected object. Received list.", - }, - ] - ); - - itValidate("invalid key type", record(number(), string()), { hello: "world" }, [ - { - path: ["hello (key)"], - message: 'Expected number. Received "hello".', - }, - ]); - - itValidate("invalid value type", record(string(), number()), { hello: "world" }, [ - { - path: ["hello"], - message: 'Expected number. Received "world".', - }, - ]); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/schema-utils/getSchemaUtils.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/schema-utils/getSchemaUtils.test.ts deleted file mode 100644 index da10086bc1d..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/schema-utils/getSchemaUtils.test.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { object, string } from "../../../../src/core/schemas/builders"; -import { itSchema } from "../utils/itSchema"; - -describe("getSchemaUtils", () => { - describe("optional()", () => { - itSchema("optional fields allow original schema", string().optional(), { - raw: "hello", - parsed: "hello", - }); - - itSchema("optional fields are not required", string().optional(), { - raw: null, - parsed: undefined, - }); - }); - - describe("transform()", () => { - itSchema( - "transorm and untransform run correctly", - string().transform({ - transform: (x) => x + "X", - untransform: (x) => (x as string).slice(0, -1), - }), - { - raw: "hello", - parsed: "helloX", - } - ); - }); - - describe("parseOrThrow()", () => { - it("parses valid value", async () => { - const value = string().parseOrThrow("hello"); - expect(value).toBe("hello"); - }); - - it("throws on invalid value", async () => { - const value = () => object({ a: string(), b: string() }).parseOrThrow({ a: 24 }); - expect(value).toThrowError(new Error('a: Expected string. Received 24.; Missing required key "b"')); - }); - }); - - describe("jsonOrThrow()", () => { - it("serializes valid value", async () => { - const value = string().jsonOrThrow("hello"); - expect(value).toBe("hello"); - }); - - it("throws on invalid value", async () => { - const value = () => object({ a: string(), b: string() }).jsonOrThrow({ a: 24 }); - expect(value).toThrowError(new Error('a: Expected string. Received 24.; Missing required key "b"')); - }); - }); - - describe("omitUndefined", () => { - it("serializes undefined as null", async () => { - const value = object({ - a: string().optional(), - b: string().optional(), - }).jsonOrThrow({ - a: "hello", - b: undefined, - }); - expect(value).toEqual({ a: "hello", b: null }); - }); - - it("omits undefined values", async () => { - const value = object({ - a: string().optional(), - b: string().optional(), - }).jsonOrThrow( - { - a: "hello", - b: undefined, - }, - { - omitUndefined: true, - } - ); - expect(value).toEqual({ a: "hello" }); - }); - }); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/schema.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/schema.test.ts deleted file mode 100644 index 94089a9a91b..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/schema.test.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { - boolean, - discriminant, - list, - number, - object, - string, - stringLiteral, - union, -} from "../../../src/core/schemas/builders"; -import { booleanLiteral } from "../../../src/core/schemas/builders/literals/booleanLiteral"; -import { property } from "../../../src/core/schemas/builders/object/property"; -import { itSchema } from "./utils/itSchema"; - -describe("Schema", () => { - itSchema( - "large nested object", - object({ - a: string(), - b: stringLiteral("b value"), - c: property( - "raw_c", - list( - object({ - animal: union(discriminant("type", "_type"), { - dog: object({ value: boolean() }), - cat: object({ value: property("raw_cat", number()) }), - }), - }) - ) - ), - d: property("raw_d", boolean()), - e: booleanLiteral(true), - }), - { - raw: { - a: "hello", - b: "b value", - raw_c: [ - { - animal: { - _type: "dog", - value: true, - }, - }, - { - animal: { - _type: "cat", - raw_cat: 42, - }, - }, - ], - raw_d: false, - e: true, - }, - parsed: { - a: "hello", - b: "b value", - c: [ - { - animal: { - type: "dog", - value: true, - }, - }, - { - animal: { - type: "cat", - value: 42, - }, - }, - ], - d: false, - e: true, - }, - } - ); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/set/set.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/set/set.test.ts deleted file mode 100644 index e17f908c80e..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/set/set.test.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { set, string } from "../../../../src/core/schemas/builders"; -import { itSchema } from "../utils/itSchema"; -import { itValidateJson, itValidateParse } from "../utils/itValidate"; - -describe("set", () => { - itSchema("converts between raw list and parsed Set", set(string()), { - raw: ["A", "B"], - parsed: new Set(["A", "B"]), - }); - - itValidateParse("not a list", set(string()), 42, [ - { - path: [], - message: "Expected list. Received 42.", - }, - ]); - - itValidateJson( - "not a Set", - set(string()), - [], - [ - { - path: [], - message: "Expected Set. Received list.", - }, - ] - ); - - itValidateParse( - "invalid item type", - set(string()), - [42], - [ - { - path: ["[0]"], - message: "Expected string. Received 42.", - }, - ] - ); - - itValidateJson("invalid item type", set(string()), new Set([42]), [ - { - path: ["[0]"], - message: "Expected string. Received 42.", - }, - ]); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/skipValidation.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/skipValidation.test.ts deleted file mode 100644 index 5dc88096a9f..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/skipValidation.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* eslint-disable no-console */ - -import { boolean, number, object, property, string, undiscriminatedUnion } from "../../../src/core/schemas/builders"; - -describe("skipValidation", () => { - it("allows data that doesn't conform to the schema", async () => { - const warningLogs: string[] = []; - const originalConsoleWarn = console.warn; - console.warn = (...args) => warningLogs.push(args.join(" ")); - - const schema = object({ - camelCase: property("snake_case", string()), - numberProperty: number(), - requiredProperty: boolean(), - anyPrimitive: undiscriminatedUnion([string(), number(), boolean()]), - }); - - const parsed = await schema.parse( - { - snake_case: "hello", - numberProperty: "oops", - anyPrimitive: true, - }, - { - skipValidation: true, - } - ); - - expect(parsed).toEqual({ - ok: true, - value: { - camelCase: "hello", - numberProperty: "oops", - anyPrimitive: true, - }, - }); - - expect(warningLogs).toEqual([ - `Failed to validate. - - numberProperty: Expected number. Received "oops".`, - ]); - - console.warn = originalConsoleWarn; - }); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/undiscriminated-union/undiscriminatedUnion.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/undiscriminated-union/undiscriminatedUnion.test.ts deleted file mode 100644 index 0e66433371c..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/undiscriminated-union/undiscriminatedUnion.test.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { number, object, property, string, undiscriminatedUnion } from "../../../../src/core/schemas/builders"; -import { itSchema, itSchemaIdentity } from "../utils/itSchema"; - -describe("undiscriminatedUnion", () => { - itSchemaIdentity(undiscriminatedUnion([string(), number()]), "hello world"); - - itSchemaIdentity(undiscriminatedUnion([object({ hello: string() }), object({ goodbye: string() })]), { - goodbye: "foo", - }); - - itSchema( - "Correctly transforms", - undiscriminatedUnion([object({ hello: string() }), object({ helloWorld: property("hello_world", string()) })]), - { - raw: { hello_world: "foo " }, - parsed: { helloWorld: "foo " }, - } - ); - - it("Returns errors for all variants", async () => { - const result = await undiscriminatedUnion([string(), number()]).parse(true); - if (result.ok) { - throw new Error("Unexpectedly passed validation"); - } - expect(result.errors).toEqual([ - { - message: "[Variant 0] Expected string. Received true.", - path: [], - }, - { - message: "[Variant 1] Expected number. Received true.", - path: [], - }, - ]); - }); - - describe("compile", () => { - // eslint-disable-next-line jest/expect-expect - it("doesn't compile with zero members", () => { - // @ts-expect-error - () => undiscriminatedUnion([]); - }); - }); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/union/union.test.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/union/union.test.ts deleted file mode 100644 index 790184603ac..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/union/union.test.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { boolean, discriminant, number, object, string, union } from "../../../../src/core/schemas/builders"; -import { itSchema, itSchemaIdentity } from "../utils/itSchema"; -import { itValidate } from "../utils/itValidate"; - -describe("union", () => { - itSchemaIdentity( - union("type", { - lion: object({ - meows: boolean(), - }), - giraffe: object({ - heightInInches: number(), - }), - }), - { type: "lion", meows: true }, - { title: "doesn't transform discriminant when it's a string" } - ); - - itSchema( - "transforms discriminant when it's a discriminant()", - union(discriminant("type", "_type"), { - lion: object({ meows: boolean() }), - giraffe: object({ heightInInches: number() }), - }), - { - raw: { _type: "lion", meows: true }, - parsed: { type: "lion", meows: true }, - } - ); - - describe("allowUnrecognizedUnionMembers", () => { - itSchema( - "transforms discriminant & passes through values when discriminant value is unrecognized", - union(discriminant("type", "_type"), { - lion: object({ meows: boolean() }), - giraffe: object({ heightInInches: number() }), - }), - { - // @ts-expect-error - raw: { _type: "moose", isAMoose: true }, - // @ts-expect-error - parsed: { type: "moose", isAMoose: true }, - opts: { - allowUnrecognizedUnionMembers: true, - }, - } - ); - }); - - describe("withParsedProperties", () => { - it("Added property is included on parsed object", async () => { - const schema = union("type", { - lion: object({}), - tiger: object({ value: string() }), - }).withParsedProperties({ - printType: (parsed) => () => parsed.type, - }); - - const parsed = await schema.parse({ type: "lion" }); - if (!parsed.ok) { - throw new Error("Failed to parse"); - } - expect(parsed.value.printType()).toBe("lion"); - }); - }); - - itValidate( - "non-object", - union("type", { - lion: object({}), - tiger: object({ value: string() }), - }), - [], - [ - { - path: [], - message: "Expected object. Received list.", - }, - ] - ); - - itValidate( - "missing discriminant", - union("type", { - lion: object({}), - tiger: object({ value: string() }), - }), - {}, - [ - { - path: [], - message: 'Missing discriminant ("type")', - }, - ] - ); - - itValidate( - "unrecognized discriminant value", - union("type", { - lion: object({}), - tiger: object({ value: string() }), - }), - { - type: "bear", - }, - [ - { - path: ["type"], - message: 'Expected enum. Received "bear".', - }, - ] - ); -}); diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/utils/itSchema.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/utils/itSchema.ts deleted file mode 100644 index 67b6c928175..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/utils/itSchema.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* eslint-disable jest/no-export */ -import { Schema, SchemaOptions } from "../../../../src/core/schemas/Schema"; - -export function itSchemaIdentity( - schema: Schema, - value: T, - { title = "functions as identity", opts }: { title?: string; opts?: SchemaOptions } = {} -): void { - itSchema(title, schema, { raw: value, parsed: value, opts }); -} - -export function itSchema( - title: string, - schema: Schema, - { - raw, - parsed, - opts, - only = false, - }: { - raw: Raw; - parsed: Parsed; - opts?: SchemaOptions; - only?: boolean; - } -): void { - // eslint-disable-next-line jest/valid-title - (only ? describe.only : describe)(title, () => { - itParse("parse()", schema, { raw, parsed, opts }); - itJson("json()", schema, { raw, parsed, opts }); - }); -} - -export function itParse( - title: string, - schema: Schema, - { - raw, - parsed, - opts, - }: { - raw: Raw; - parsed: Parsed; - opts?: SchemaOptions; - } -): void { - // eslint-disable-next-line jest/valid-title - it(title, () => { - const maybeValid = schema.parse(raw, opts); - if (!maybeValid.ok) { - throw new Error("Failed to parse() " + JSON.stringify(maybeValid.errors, undefined, 4)); - } - expect(maybeValid.value).toStrictEqual(parsed); - }); -} - -export function itJson( - title: string, - schema: Schema, - { - raw, - parsed, - opts, - }: { - raw: Raw; - parsed: Parsed; - opts?: SchemaOptions; - } -): void { - // eslint-disable-next-line jest/valid-title - it(title, () => { - const maybeValid = schema.json(parsed, opts); - if (!maybeValid.ok) { - throw new Error("Failed to json() " + JSON.stringify(maybeValid.errors, undefined, 4)); - } - expect(maybeValid.value).toStrictEqual(raw); - }); -} diff --git a/seed/ts-sdk/inline-types/tests/unit/zurg/utils/itValidate.ts b/seed/ts-sdk/inline-types/tests/unit/zurg/utils/itValidate.ts deleted file mode 100644 index 75b2c08b036..00000000000 --- a/seed/ts-sdk/inline-types/tests/unit/zurg/utils/itValidate.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* eslint-disable jest/no-export */ -import { Schema, SchemaOptions, ValidationError } from "../../../../src/core/schemas/Schema"; - -export function itValidate( - title: string, - schema: Schema, - input: unknown, - errors: ValidationError[], - opts?: SchemaOptions -): void { - // eslint-disable-next-line jest/valid-title - describe("parse()", () => { - itValidateParse(title, schema, input, errors, opts); - }); - describe("json()", () => { - itValidateJson(title, schema, input, errors, opts); - }); -} - -export function itValidateParse( - title: string, - schema: Schema, - raw: unknown, - errors: ValidationError[], - opts?: SchemaOptions -): void { - describe("parse", () => { - // eslint-disable-next-line jest/valid-title - it(title, async () => { - const maybeValid = await schema.parse(raw, opts); - if (maybeValid.ok) { - throw new Error("Value passed validation"); - } - expect(maybeValid.errors).toStrictEqual(errors); - }); - }); -} - -export function itValidateJson( - title: string, - schema: Schema, - parsed: unknown, - errors: ValidationError[], - opts?: SchemaOptions -): void { - describe("json", () => { - // eslint-disable-next-line jest/valid-title - it(title, async () => { - const maybeValid = await schema.json(parsed, opts); - if (maybeValid.ok) { - throw new Error("Value passed validation"); - } - expect(maybeValid.errors).toStrictEqual(errors); - }); - }); -} diff --git a/seed/ts-sdk/literal/src/Client.ts b/seed/ts-sdk/literal/src/Client.ts index beae0adc7a1..fab963ef52a 100644 --- a/seed/ts-sdk/literal/src/Client.ts +++ b/seed/ts-sdk/literal/src/Client.ts @@ -35,34 +35,30 @@ export declare namespace SeedLiteralClient { } export class SeedLiteralClient { - constructor(protected readonly _options: SeedLiteralClient.Options) {} - protected _headers: Headers | undefined; + protected _inlined: Inlined | undefined; + protected _path: Path | undefined; + protected _query: Query | undefined; + protected _reference: Reference | undefined; + + constructor(protected readonly _options: SeedLiteralClient.Options) {} public get headers(): Headers { return (this._headers ??= new Headers(this._options)); } - protected _inlined: Inlined | undefined; - public get inlined(): Inlined { return (this._inlined ??= new Inlined(this._options)); } - protected _path: Path | undefined; - public get path(): Path { return (this._path ??= new Path(this._options)); } - protected _query: Query | undefined; - public get query(): Query { return (this._query ??= new Query(this._options)); } - protected _reference: Reference | undefined; - public get reference(): Reference { return (this._reference ??= new Reference(this._options)); } diff --git a/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts b/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts index 905b9f9a158..87bf9228957 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedMixedCaseClient { } export class SeedMixedCaseClient { - constructor(protected readonly _options: SeedMixedCaseClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedMixedCaseClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/Resource.ts b/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/Resource.ts index a57573e4223..07cc54e8be3 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/Resource.ts +++ b/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/Resource.ts @@ -18,12 +18,12 @@ import * as SeedMixedCase from "../../../index"; */ export type Resource = SeedMixedCase.Resource.User | SeedMixedCase.Resource.Organization; -export declare namespace Resource { - interface User extends SeedMixedCase.User, _Base { +export namespace Resource { + export interface User extends SeedMixedCase.User, _Base { resourceType: "user"; } - interface Organization extends SeedMixedCase.Organization, _Base { + export interface Organization extends SeedMixedCase.Organization, _Base { resourceType: "Organization"; } diff --git a/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/ResourceStatus.ts b/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/ResourceStatus.ts index 62f07d2f99a..7205d324fcc 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/ResourceStatus.ts +++ b/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/ResourceStatus.ts @@ -3,7 +3,6 @@ */ export type ResourceStatus = "ACTIVE" | "INACTIVE"; - export const ResourceStatus = { Active: "ACTIVE", Inactive: "INACTIVE", diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts b/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts index 905b9f9a158..87bf9228957 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedMixedCaseClient { } export class SeedMixedCaseClient { - constructor(protected readonly _options: SeedMixedCaseClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedMixedCaseClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/Resource.ts b/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/Resource.ts index b8366ea37d7..ef2a74911b0 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/Resource.ts +++ b/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/Resource.ts @@ -18,12 +18,12 @@ import * as SeedMixedCase from "../../../index"; */ export type Resource = SeedMixedCase.Resource.User | SeedMixedCase.Resource.Organization; -export declare namespace Resource { - interface User extends SeedMixedCase.User, _Base { +export namespace Resource { + export interface User extends SeedMixedCase.User, _Base { resourceType: "user"; } - interface Organization extends SeedMixedCase.Organization, _Base { + export interface Organization extends SeedMixedCase.Organization, _Base { resourceType: "Organization"; } diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/ResourceStatus.ts b/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/ResourceStatus.ts index 62f07d2f99a..7205d324fcc 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/ResourceStatus.ts +++ b/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/ResourceStatus.ts @@ -3,7 +3,6 @@ */ export type ResourceStatus = "ACTIVE" | "INACTIVE"; - export const ResourceStatus = { Active: "ACTIVE", Inactive: "INACTIVE", diff --git a/seed/ts-sdk/mixed-file-directory/src/Client.ts b/seed/ts-sdk/mixed-file-directory/src/Client.ts index aae52f6ad82..61326d94564 100644 --- a/seed/ts-sdk/mixed-file-directory/src/Client.ts +++ b/seed/ts-sdk/mixed-file-directory/src/Client.ts @@ -24,16 +24,15 @@ export declare namespace SeedMixedFileDirectoryClient { } export class SeedMixedFileDirectoryClient { - constructor(protected readonly _options: SeedMixedFileDirectoryClient.Options) {} - protected _organization: Organization | undefined; + protected _user: User | undefined; + + constructor(protected readonly _options: SeedMixedFileDirectoryClient.Options) {} public get organization(): Organization { return (this._organization ??= new Organization(this._options)); } - protected _user: User | undefined; - public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/mixed-file-directory/src/api/resources/user/client/Client.ts b/seed/ts-sdk/mixed-file-directory/src/api/resources/user/client/Client.ts index 6fb59a7705f..604de03ddde 100644 --- a/seed/ts-sdk/mixed-file-directory/src/api/resources/user/client/Client.ts +++ b/seed/ts-sdk/mixed-file-directory/src/api/resources/user/client/Client.ts @@ -27,8 +27,14 @@ export declare namespace User { } export class User { + protected _events: Events | undefined; + constructor(protected readonly _options: User.Options) {} + public get events(): Events { + return (this._events ??= new Events(this._options)); + } + /** * List all users. * @@ -99,10 +105,4 @@ export class User { }); } } - - protected _events: Events | undefined; - - public get events(): Events { - return (this._events ??= new Events(this._options)); - } } diff --git a/seed/ts-sdk/mixed-file-directory/src/api/resources/user/resources/events/client/Client.ts b/seed/ts-sdk/mixed-file-directory/src/api/resources/user/resources/events/client/Client.ts index 2db1db50034..5584e1af374 100644 --- a/seed/ts-sdk/mixed-file-directory/src/api/resources/user/resources/events/client/Client.ts +++ b/seed/ts-sdk/mixed-file-directory/src/api/resources/user/resources/events/client/Client.ts @@ -27,8 +27,14 @@ export declare namespace Events { } export class Events { + protected _metadata: Metadata | undefined; + constructor(protected readonly _options: Events.Options) {} + public get metadata(): Metadata { + return (this._metadata ??= new Metadata(this._options)); + } + /** * List all user events. * @@ -101,10 +107,4 @@ export class Events { }); } } - - protected _metadata: Metadata | undefined; - - public get metadata(): Metadata { - return (this._metadata ??= new Metadata(this._options)); - } } diff --git a/seed/ts-sdk/multi-line-docs/src/Client.ts b/seed/ts-sdk/multi-line-docs/src/Client.ts index 171ad8f9792..d13fa629e36 100644 --- a/seed/ts-sdk/multi-line-docs/src/Client.ts +++ b/seed/ts-sdk/multi-line-docs/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedMultiLineDocsClient { } export class SeedMultiLineDocsClient { - constructor(protected readonly _options: SeedMultiLineDocsClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedMultiLineDocsClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/multi-line-docs/src/api/types/Operand.ts b/seed/ts-sdk/multi-line-docs/src/api/types/Operand.ts index c7565c6f971..aaf4cd3090c 100644 --- a/seed/ts-sdk/multi-line-docs/src/api/types/Operand.ts +++ b/seed/ts-sdk/multi-line-docs/src/api/types/Operand.ts @@ -19,7 +19,6 @@ export type Operand = * The name and value should be similar * are similar for less than. */ | "less_than"; - export const Operand = { GreaterThan: ">", EqualTo: "=", diff --git a/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts b/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts index 66409931816..554992f3f04 100644 --- a/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts +++ b/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts @@ -29,16 +29,15 @@ export declare namespace SeedMultiUrlEnvironmentNoDefaultClient { } export class SeedMultiUrlEnvironmentNoDefaultClient { - constructor(protected readonly _options: SeedMultiUrlEnvironmentNoDefaultClient.Options) {} - protected _ec2: Ec2 | undefined; + protected _s3: S3 | undefined; + + constructor(protected readonly _options: SeedMultiUrlEnvironmentNoDefaultClient.Options) {} public get ec2(): Ec2 { return (this._ec2 ??= new Ec2(this._options)); } - protected _s3: S3 | undefined; - public get s3(): S3 { return (this._s3 ??= new S3(this._options)); } diff --git a/seed/ts-sdk/multi-url-environment/src/Client.ts b/seed/ts-sdk/multi-url-environment/src/Client.ts index 76916a7df87..a10684d594c 100644 --- a/seed/ts-sdk/multi-url-environment/src/Client.ts +++ b/seed/ts-sdk/multi-url-environment/src/Client.ts @@ -28,16 +28,15 @@ export declare namespace SeedMultiUrlEnvironmentClient { } export class SeedMultiUrlEnvironmentClient { - constructor(protected readonly _options: SeedMultiUrlEnvironmentClient.Options) {} - protected _ec2: Ec2 | undefined; + protected _s3: S3 | undefined; + + constructor(protected readonly _options: SeedMultiUrlEnvironmentClient.Options) {} public get ec2(): Ec2 { return (this._ec2 ??= new Ec2(this._options)); } - protected _s3: S3 | undefined; - public get s3(): S3 { return (this._s3 ??= new S3(this._options)); } diff --git a/seed/ts-sdk/no-environment/src/Client.ts b/seed/ts-sdk/no-environment/src/Client.ts index e1f27033c35..c593b72d1ef 100644 --- a/seed/ts-sdk/no-environment/src/Client.ts +++ b/seed/ts-sdk/no-environment/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedNoEnvironmentClient { } export class SeedNoEnvironmentClient { - constructor(protected readonly _options: SeedNoEnvironmentClient.Options) {} - protected _dummy: Dummy | undefined; + constructor(protected readonly _options: SeedNoEnvironmentClient.Options) {} + public get dummy(): Dummy { return (this._dummy ??= new Dummy(this._options)); } diff --git a/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts index 8b03b81efbc..150ebb19d83 100644 --- a/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts @@ -26,6 +26,7 @@ export declare namespace SeedOauthClientCredentialsDefaultClient { export class SeedOauthClientCredentialsDefaultClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; constructor(protected readonly _options: SeedOauthClientCredentialsDefaultClient.Options) { this._oauthTokenProvider = new core.OAuthTokenProvider({ @@ -37,8 +38,6 @@ export class SeedOauthClientCredentialsDefaultClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, diff --git a/seed/ts-sdk/oauth-client-credentials-environment-variables/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-environment-variables/src/Client.ts index b859a31d2f8..49e0e32f0c2 100644 --- a/seed/ts-sdk/oauth-client-credentials-environment-variables/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-environment-variables/src/Client.ts @@ -26,6 +26,7 @@ export declare namespace SeedOauthClientCredentialsEnvironmentVariablesClient { export class SeedOauthClientCredentialsEnvironmentVariablesClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; constructor(protected readonly _options: SeedOauthClientCredentialsEnvironmentVariablesClient.Options) { const clientId = this._options.clientId ?? process.env["CLIENT_ID"]; @@ -51,8 +52,6 @@ export class SeedOauthClientCredentialsEnvironmentVariablesClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts index a370684e3cb..29a66bd2e37 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts @@ -26,6 +26,7 @@ export declare namespace SeedOauthClientCredentialsClient { export class SeedOauthClientCredentialsClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; constructor(protected readonly _options: SeedOauthClientCredentialsClient.Options) { this._oauthTokenProvider = new core.OAuthTokenProvider({ @@ -37,8 +38,6 @@ export class SeedOauthClientCredentialsClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/api/resources/auth/client/getToken.ts b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/api/resources/auth/client/getToken.ts index 87de2a82bc7..18e683969be 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/api/resources/auth/client/getToken.ts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/api/resources/auth/client/getToken.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedOauthClientCredentials.auth.getToken.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { statusCode: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts index a370684e3cb..29a66bd2e37 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts @@ -26,6 +26,7 @@ export declare namespace SeedOauthClientCredentialsClient { export class SeedOauthClientCredentialsClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; constructor(protected readonly _options: SeedOauthClientCredentialsClient.Options) { this._oauthTokenProvider = new core.OAuthTokenProvider({ @@ -37,8 +38,6 @@ export class SeedOauthClientCredentialsClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, diff --git a/seed/ts-sdk/oauth-client-credentials/src/Client.ts b/seed/ts-sdk/oauth-client-credentials/src/Client.ts index a370684e3cb..29a66bd2e37 100644 --- a/seed/ts-sdk/oauth-client-credentials/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials/src/Client.ts @@ -26,6 +26,7 @@ export declare namespace SeedOauthClientCredentialsClient { export class SeedOauthClientCredentialsClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; constructor(protected readonly _options: SeedOauthClientCredentialsClient.Options) { this._oauthTokenProvider = new core.OAuthTokenProvider({ @@ -37,8 +38,6 @@ export class SeedOauthClientCredentialsClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, diff --git a/seed/ts-sdk/objects-with-imports/src/api/resources/file/types/FileInfo.ts b/seed/ts-sdk/objects-with-imports/src/api/resources/file/types/FileInfo.ts index 26407d4b8aa..f2bc29c15db 100644 --- a/seed/ts-sdk/objects-with-imports/src/api/resources/file/types/FileInfo.ts +++ b/seed/ts-sdk/objects-with-imports/src/api/resources/file/types/FileInfo.ts @@ -16,7 +16,6 @@ export type FileInfo = /** * A directory (e.g. foo/). */ | "DIRECTORY"; - export const FileInfo = { Regular: "REGULAR", Directory: "DIRECTORY", diff --git a/seed/ts-sdk/optional/src/Client.ts b/seed/ts-sdk/optional/src/Client.ts index 96468097b54..fad5fd8d0ea 100644 --- a/seed/ts-sdk/optional/src/Client.ts +++ b/seed/ts-sdk/optional/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedObjectsWithImportsClient { } export class SeedObjectsWithImportsClient { - constructor(protected readonly _options: SeedObjectsWithImportsClient.Options) {} - protected _optional: Optional | undefined; + constructor(protected readonly _options: SeedObjectsWithImportsClient.Options) {} + public get optional(): Optional { return (this._optional ??= new Optional(this._options)); } diff --git a/seed/ts-sdk/package-yml/src/Client.ts b/seed/ts-sdk/package-yml/src/Client.ts index 88c0d2f16c0..74c0d236c13 100644 --- a/seed/ts-sdk/package-yml/src/Client.ts +++ b/seed/ts-sdk/package-yml/src/Client.ts @@ -28,8 +28,14 @@ export declare namespace SeedPackageYmlClient { } export class SeedPackageYmlClient { + protected _service: Service | undefined; + constructor(protected readonly _options: SeedPackageYmlClient.Options) {} + public get service(): Service { + return (this._service ??= new Service(this._options)); + } + /** * @param {SeedPackageYml.EchoRequest} request * @param {SeedPackageYmlClient.RequestOptions} requestOptions - Request-specific configuration. @@ -96,10 +102,4 @@ export class SeedPackageYmlClient { }); } } - - protected _service: Service | undefined; - - public get service(): Service { - return (this._service ??= new Service(this._options)); - } } diff --git a/seed/ts-sdk/pagination/src/Client.ts b/seed/ts-sdk/pagination/src/Client.ts index 327e761ba5b..b7b8d4a8d58 100644 --- a/seed/ts-sdk/pagination/src/Client.ts +++ b/seed/ts-sdk/pagination/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedPaginationClient { } export class SeedPaginationClient { - constructor(protected readonly _options: SeedPaginationClient.Options) {} - protected _users: Users | undefined; + constructor(protected readonly _options: SeedPaginationClient.Options) {} + public get users(): Users { return (this._users ??= new Users(this._options)); } diff --git a/seed/ts-sdk/pagination/src/api/resources/users/types/Order.ts b/seed/ts-sdk/pagination/src/api/resources/users/types/Order.ts index e5763cabff4..a6405828876 100644 --- a/seed/ts-sdk/pagination/src/api/resources/users/types/Order.ts +++ b/seed/ts-sdk/pagination/src/api/resources/users/types/Order.ts @@ -3,7 +3,6 @@ */ export type Order = "asc" | "desc"; - export const Order = { Asc: "asc", Desc: "desc", diff --git a/seed/ts-sdk/path-parameters/src/Client.ts b/seed/ts-sdk/path-parameters/src/Client.ts index 4d69aeee0a4..37998672270 100644 --- a/seed/ts-sdk/path-parameters/src/Client.ts +++ b/seed/ts-sdk/path-parameters/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedPathParametersClient { } export class SeedPathParametersClient { - constructor(protected readonly _options: SeedPathParametersClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedPathParametersClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/plain-text/src/Client.ts b/seed/ts-sdk/plain-text/src/Client.ts index 5328ade7f16..b53a41c2ae8 100644 --- a/seed/ts-sdk/plain-text/src/Client.ts +++ b/seed/ts-sdk/plain-text/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedPlainTextClient { } export class SeedPlainTextClient { - constructor(protected readonly _options: SeedPlainTextClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedPlainTextClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts b/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts index 52b8a1e8b7a..3ae49d51366 100644 --- a/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedQueryParametersClient { } export class SeedQueryParametersClient { - constructor(protected readonly _options: SeedQueryParametersClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedQueryParametersClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/query-parameters/no-serde-layer-query/src/Client.ts b/seed/ts-sdk/query-parameters/no-serde-layer-query/src/Client.ts index 52b8a1e8b7a..3ae49d51366 100644 --- a/seed/ts-sdk/query-parameters/no-serde-layer-query/src/Client.ts +++ b/seed/ts-sdk/query-parameters/no-serde-layer-query/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedQueryParametersClient { } export class SeedQueryParametersClient { - constructor(protected readonly _options: SeedQueryParametersClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedQueryParametersClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/reserved-keywords/src/Client.ts b/seed/ts-sdk/reserved-keywords/src/Client.ts index 863822b6564..25bb8d7f51e 100644 --- a/seed/ts-sdk/reserved-keywords/src/Client.ts +++ b/seed/ts-sdk/reserved-keywords/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedNurseryApiClient { } export class SeedNurseryApiClient { - constructor(protected readonly _options: SeedNurseryApiClient.Options) {} - protected _package: Package | undefined; + constructor(protected readonly _options: SeedNurseryApiClient.Options) {} + public get package(): Package { return (this._package ??= new Package(this._options)); } diff --git a/seed/ts-sdk/response-property/src/Client.ts b/seed/ts-sdk/response-property/src/Client.ts index d6a900c49d9..95e831fc6e3 100644 --- a/seed/ts-sdk/response-property/src/Client.ts +++ b/seed/ts-sdk/response-property/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedResponsePropertyClient { } export class SeedResponsePropertyClient { - constructor(protected readonly _options: SeedResponsePropertyClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedResponsePropertyClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/seed.yml b/seed/ts-sdk/seed.yml index 0a8984f8e5b..81f9d58eb26 100644 --- a/seed/ts-sdk/seed.yml +++ b/seed/ts-sdk/seed.yml @@ -206,6 +206,15 @@ fixtures: - customConfig: retainOriginalCasing: true outputFolder: retain-original-casing + ts-inline-types: + - customConfig: + noSerdeLayer: true + enableInlineTypes: true + outputFolder: inline + - customConfig: + noSerdeLayer: true + enableInlineTypes: false + outputFolder: no-inline scripts: - docker: fernapi/ts-seed commands: diff --git a/seed/ts-sdk/server-sent-event-examples/src/Client.ts b/seed/ts-sdk/server-sent-event-examples/src/Client.ts index 262e3ccf1e2..77e6ab92912 100644 --- a/seed/ts-sdk/server-sent-event-examples/src/Client.ts +++ b/seed/ts-sdk/server-sent-event-examples/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedServerSentEventsClient { } export class SeedServerSentEventsClient { - constructor(protected readonly _options: SeedServerSentEventsClient.Options) {} - protected _completions: Completions | undefined; + constructor(protected readonly _options: SeedServerSentEventsClient.Options) {} + public get completions(): Completions { return (this._completions ??= new Completions(this._options)); } diff --git a/seed/ts-sdk/server-sent-events/src/Client.ts b/seed/ts-sdk/server-sent-events/src/Client.ts index 262e3ccf1e2..77e6ab92912 100644 --- a/seed/ts-sdk/server-sent-events/src/Client.ts +++ b/seed/ts-sdk/server-sent-events/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedServerSentEventsClient { } export class SeedServerSentEventsClient { - constructor(protected readonly _options: SeedServerSentEventsClient.Options) {} - protected _completions: Completions | undefined; + constructor(protected readonly _options: SeedServerSentEventsClient.Options) {} + public get completions(): Completions { return (this._completions ??= new Completions(this._options)); } diff --git a/seed/ts-sdk/single-url-environment-default/src/Client.ts b/seed/ts-sdk/single-url-environment-default/src/Client.ts index 33641f5a0b8..6602dbe2d42 100644 --- a/seed/ts-sdk/single-url-environment-default/src/Client.ts +++ b/seed/ts-sdk/single-url-environment-default/src/Client.ts @@ -25,10 +25,10 @@ export declare namespace SeedSingleUrlEnvironmentDefaultClient { } export class SeedSingleUrlEnvironmentDefaultClient { - constructor(protected readonly _options: SeedSingleUrlEnvironmentDefaultClient.Options) {} - protected _dummy: Dummy | undefined; + constructor(protected readonly _options: SeedSingleUrlEnvironmentDefaultClient.Options) {} + public get dummy(): Dummy { return (this._dummy ??= new Dummy(this._options)); } diff --git a/seed/ts-sdk/single-url-environment-no-default/src/Client.ts b/seed/ts-sdk/single-url-environment-no-default/src/Client.ts index 5660b88fec7..ed1e9884382 100644 --- a/seed/ts-sdk/single-url-environment-no-default/src/Client.ts +++ b/seed/ts-sdk/single-url-environment-no-default/src/Client.ts @@ -25,10 +25,10 @@ export declare namespace SeedSingleUrlEnvironmentNoDefaultClient { } export class SeedSingleUrlEnvironmentNoDefaultClient { - constructor(protected readonly _options: SeedSingleUrlEnvironmentNoDefaultClient.Options) {} - protected _dummy: Dummy | undefined; + constructor(protected readonly _options: SeedSingleUrlEnvironmentNoDefaultClient.Options) {} + public get dummy(): Dummy { return (this._dummy ??= new Dummy(this._options)); } diff --git a/seed/ts-sdk/streaming/allow-custom-fetcher/src/Client.ts b/seed/ts-sdk/streaming/allow-custom-fetcher/src/Client.ts index b8a3d466961..6e031d82774 100644 --- a/seed/ts-sdk/streaming/allow-custom-fetcher/src/Client.ts +++ b/seed/ts-sdk/streaming/allow-custom-fetcher/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedStreamingClient { } export class SeedStreamingClient { - constructor(protected readonly _options: SeedStreamingClient.Options) {} - protected _dummy: Dummy | undefined; + constructor(protected readonly _options: SeedStreamingClient.Options) {} + public get dummy(): Dummy { return (this._dummy ??= new Dummy(this._options)); } diff --git a/seed/ts-sdk/streaming/no-custom-config/src/Client.ts b/seed/ts-sdk/streaming/no-custom-config/src/Client.ts index a968a322c37..4a12bf2c1a6 100644 --- a/seed/ts-sdk/streaming/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/streaming/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedStreamingClient { } export class SeedStreamingClient { - constructor(protected readonly _options: SeedStreamingClient.Options) {} - protected _dummy: Dummy | undefined; + constructor(protected readonly _options: SeedStreamingClient.Options) {} + public get dummy(): Dummy { return (this._dummy ??= new Dummy(this._options)); } diff --git a/seed/ts-sdk/trace/exhaustive/src/Client.ts b/seed/ts-sdk/trace/exhaustive/src/Client.ts index 29bb5b0d035..845a9793bbd 100644 --- a/seed/ts-sdk/trace/exhaustive/src/Client.ts +++ b/seed/ts-sdk/trace/exhaustive/src/Client.ts @@ -36,52 +36,45 @@ export declare namespace SeedTraceClient { } export class SeedTraceClient { - constructor(protected readonly _options: SeedTraceClient.Options = {}) {} - protected _v2: V2 | undefined; + protected _admin: Admin | undefined; + protected _homepage: Homepage | undefined; + protected _migration: Migration | undefined; + protected _playlist: Playlist | undefined; + protected _problem: Problem | undefined; + protected _submission: Submission | undefined; + protected _sysprop: Sysprop | undefined; + + constructor(protected readonly _options: SeedTraceClient.Options = {}) {} public get v2(): V2 { return (this._v2 ??= new V2(this._options)); } - protected _admin: Admin | undefined; - public get admin(): Admin { return (this._admin ??= new Admin(this._options)); } - protected _homepage: Homepage | undefined; - public get homepage(): Homepage { return (this._homepage ??= new Homepage(this._options)); } - protected _migration: Migration | undefined; - public get migration(): Migration { return (this._migration ??= new Migration(this._options)); } - protected _playlist: Playlist | undefined; - public get playlist(): Playlist { return (this._playlist ??= new Playlist(this._options)); } - protected _problem: Problem | undefined; - public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } - protected _submission: Submission | undefined; - public get submission(): Submission { return (this._submission ??= new Submission(this._options)); } - protected _sysprop: Sysprop | undefined; - public get sysprop(): Sysprop { return (this._sysprop ??= new Sysprop(this._options)); } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/sendTestSubmissionUpdate.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/sendTestSubmissionUpdate.ts index 147f91056b3..74fcdd73ffd 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/sendTestSubmissionUpdate.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/sendTestSubmissionUpdate.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.sendTestSubmissionUpdate.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/sendWorkspaceSubmissionUpdate.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/sendWorkspaceSubmissionUpdate.ts index a72a13be0f9..09002e8971e 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/sendWorkspaceSubmissionUpdate.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/sendWorkspaceSubmissionUpdate.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.sendWorkspaceSubmissionUpdate.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedTestCase.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedTestCase.ts index dc1b9a34d0e..ecb9e93ccc7 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedTestCase.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedTestCase.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.storeTracedTestCase.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedTestCaseV2.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedTestCaseV2.ts index 407dca30411..0514c9285ce 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedTestCaseV2.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedTestCaseV2.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.storeTracedTestCaseV2.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedWorkspace.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedWorkspace.ts index 9b6e0065622..12239852f23 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedWorkspace.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedWorkspace.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.storeTracedWorkspace.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedWorkspaceV2.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedWorkspaceV2.ts index 1befb67856c..5e627ce0925 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedWorkspaceV2.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/storeTracedWorkspaceV2.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.storeTracedWorkspaceV2.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/updateTestSubmissionStatus.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/updateTestSubmissionStatus.ts index 77a5be41c8c..8a9aaa21074 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/updateTestSubmissionStatus.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/updateTestSubmissionStatus.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.updateTestSubmissionStatus.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/updateWorkspaceSubmissionStatus.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/updateWorkspaceSubmissionStatus.ts index 1276c140fe1..8518a8a1cbe 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/updateWorkspaceSubmissionStatus.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/client/updateWorkspaceSubmissionStatus.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.updateWorkspaceSubmissionStatus.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/types/Test.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/types/Test.ts index b5559a23e83..0325ec2664f 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/types/Test.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/admin/types/Test.ts @@ -6,18 +6,18 @@ import * as SeedTrace from "../../../index"; export type Test = SeedTrace.Test.And | SeedTrace.Test.Or | SeedTrace.Test._Unknown; -export declare namespace Test { - interface And extends _Utils { +export namespace Test { + export interface And extends _Utils { type: "and"; value: boolean; } - interface Or extends _Utils { + export interface Or extends _Utils { type: "or"; value: boolean; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/DebugVariableValue.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/DebugVariableValue.ts index 5f8f7f8619d..bc9d1536b25 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/DebugVariableValue.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/DebugVariableValue.ts @@ -20,66 +20,66 @@ export type DebugVariableValue = | SeedTrace.DebugVariableValue.GenericValue | SeedTrace.DebugVariableValue._Unknown; -export declare namespace DebugVariableValue { - interface IntegerValue extends _Utils { +export namespace DebugVariableValue { + export interface IntegerValue extends _Utils { type: "integerValue"; value: number; } - interface BooleanValue extends _Utils { + export interface BooleanValue extends _Utils { type: "booleanValue"; value: boolean; } - interface DoubleValue extends _Utils { + export interface DoubleValue extends _Utils { type: "doubleValue"; value: number; } - interface StringValue extends _Utils { + export interface StringValue extends _Utils { type: "stringValue"; value: string; } - interface CharValue extends _Utils { + export interface CharValue extends _Utils { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.DebugMapValue, _Utils { + export interface MapValue extends SeedTrace.DebugMapValue, _Utils { type: "mapValue"; } - interface ListValue extends _Utils { + export interface ListValue extends _Utils { type: "listValue"; value: SeedTrace.DebugVariableValue[]; } - interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue, _Utils { + export interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue, _Utils { type: "binaryTreeNodeValue"; } - interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue, _Utils { + export interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue, _Utils { type: "singlyLinkedListNodeValue"; } - interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue, _Utils { + export interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue, _Utils { type: "doublyLinkedListNodeValue"; } - interface UndefinedValue extends _Utils { + export interface UndefinedValue extends _Utils { type: "undefinedValue"; } - interface NullValue extends _Utils { + export interface NullValue extends _Utils { type: "nullValue"; } - interface GenericValue extends SeedTrace.GenericValue, _Utils { + export interface GenericValue extends SeedTrace.GenericValue, _Utils { type: "genericValue"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/Language.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/Language.ts index d8f7b5fa4fc..ad34597dd47 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/Language.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/Language.ts @@ -3,7 +3,6 @@ */ export type Language = "JAVA" | "JAVASCRIPT" | "PYTHON"; - export const Language = { Java: "JAVA", Javascript: "JAVASCRIPT", @@ -22,7 +21,7 @@ export const Language = { }, } as const; -export declare namespace Language { +export namespace Language { interface Visitor { java: () => R; javascript: () => R; diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/VariableType.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/VariableType.ts index 4ca831494bc..fa20b994d5d 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/VariableType.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/VariableType.ts @@ -17,48 +17,48 @@ export type VariableType = | SeedTrace.VariableType.DoublyLinkedListType | SeedTrace.VariableType._Unknown; -export declare namespace VariableType { - interface IntegerType extends _Utils { +export namespace VariableType { + export interface IntegerType extends _Utils { type: "integerType"; } - interface DoubleType extends _Utils { + export interface DoubleType extends _Utils { type: "doubleType"; } - interface BooleanType extends _Utils { + export interface BooleanType extends _Utils { type: "booleanType"; } - interface StringType extends _Utils { + export interface StringType extends _Utils { type: "stringType"; } - interface CharType extends _Utils { + export interface CharType extends _Utils { type: "charType"; } - interface ListType extends SeedTrace.ListType, _Utils { + export interface ListType extends SeedTrace.ListType, _Utils { type: "listType"; } - interface MapType extends SeedTrace.MapType, _Utils { + export interface MapType extends SeedTrace.MapType, _Utils { type: "mapType"; } - interface BinaryTreeType extends _Utils { + export interface BinaryTreeType extends _Utils { type: "binaryTreeType"; } - interface SinglyLinkedListType extends _Utils { + export interface SinglyLinkedListType extends _Utils { type: "singlyLinkedListType"; } - interface DoublyLinkedListType extends _Utils { + export interface DoublyLinkedListType extends _Utils { type: "doublyLinkedListType"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/VariableValue.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/VariableValue.ts index 136c4e89006..a54f0bfcdd8 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/VariableValue.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/VariableValue.ts @@ -18,58 +18,58 @@ export type VariableValue = | SeedTrace.VariableValue.NullValue | SeedTrace.VariableValue._Unknown; -export declare namespace VariableValue { - interface IntegerValue extends _Utils { +export namespace VariableValue { + export interface IntegerValue extends _Utils { type: "integerValue"; value: number; } - interface BooleanValue extends _Utils { + export interface BooleanValue extends _Utils { type: "booleanValue"; value: boolean; } - interface DoubleValue extends _Utils { + export interface DoubleValue extends _Utils { type: "doubleValue"; value: number; } - interface StringValue extends _Utils { + export interface StringValue extends _Utils { type: "stringValue"; value: string; } - interface CharValue extends _Utils { + export interface CharValue extends _Utils { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.MapValue, _Utils { + export interface MapValue extends SeedTrace.MapValue, _Utils { type: "mapValue"; } - interface ListValue extends _Utils { + export interface ListValue extends _Utils { type: "listValue"; value: SeedTrace.VariableValue[]; } - interface BinaryTreeValue extends SeedTrace.BinaryTreeValue, _Utils { + export interface BinaryTreeValue extends SeedTrace.BinaryTreeValue, _Utils { type: "binaryTreeValue"; } - interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue, _Utils { + export interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue, _Utils { type: "singlyLinkedListValue"; } - interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue, _Utils { + export interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue, _Utils { type: "doublyLinkedListValue"; } - interface NullValue extends _Utils { + export interface NullValue extends _Utils { type: "nullValue"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/homepage/client/getHomepageProblems.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/homepage/client/getHomepageProblems.ts index 54558828d49..72f03c157c7 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/homepage/client/getHomepageProblems.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/homepage/client/getHomepageProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.homepage.getHomepageProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/homepage/client/setHomepageProblems.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/homepage/client/setHomepageProblems.ts index 387999e36d9..479b34e0422 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/homepage/client/setHomepageProblems.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/homepage/client/setHomepageProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.homepage.setHomepageProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/client/getAttemptedMigrations.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/client/getAttemptedMigrations.ts index 31a52110e81..dc5e5732e4f 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/client/getAttemptedMigrations.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/client/getAttemptedMigrations.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.migration.getAttemptedMigrations.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/types/MigrationStatus.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/types/MigrationStatus.ts index 33b907f3dd3..b04a7740e22 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/types/MigrationStatus.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/types/MigrationStatus.ts @@ -10,7 +10,6 @@ export type MigrationStatus = * The migration is failed */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", @@ -29,7 +28,7 @@ export const MigrationStatus = { }, } as const; -export declare namespace MigrationStatus { +export namespace MigrationStatus { interface Visitor { running: () => R; failed: () => R; diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/createPlaylist.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/createPlaylist.ts index eb33077821a..bfc60c5deb5 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/createPlaylist.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/createPlaylist.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.playlist.createPlaylist.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/deletePlaylist.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/deletePlaylist.ts index 4248589f6cd..f3d7342f2aa 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/deletePlaylist.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/deletePlaylist.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.playlist.deletePlaylist.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/getPlaylist.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/getPlaylist.ts index 6304ef2cfd8..4a653c3c304 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/getPlaylist.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/getPlaylist.ts @@ -10,17 +10,17 @@ export type Error = | SeedTrace.playlist.getPlaylist.Error.UnauthorizedError | SeedTrace.playlist.getPlaylist.Error._Unknown; -export declare namespace Error { - interface PlaylistIdNotFoundError extends _Utils { +export namespace Error { + export interface PlaylistIdNotFoundError extends _Utils { errorName: "PlaylistIdNotFoundError"; content: SeedTrace.PlaylistIdNotFoundErrorBody; } - interface UnauthorizedError extends _Utils { + export interface UnauthorizedError extends _Utils { errorName: "UnauthorizedError"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/getPlaylists.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/getPlaylists.ts index 438b873124e..b34ce8e559e 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/getPlaylists.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/getPlaylists.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.playlist.getPlaylists.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/updatePlaylist.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/updatePlaylist.ts index 0cdde0c5a5e..fe014029dea 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/updatePlaylist.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/client/updatePlaylist.ts @@ -9,13 +9,13 @@ export type Error = | SeedTrace.playlist.updatePlaylist.Error.PlaylistIdNotFoundError | SeedTrace.playlist.updatePlaylist.Error._Unknown; -export declare namespace Error { - interface PlaylistIdNotFoundError extends _Utils { +export namespace Error { + export interface PlaylistIdNotFoundError extends _Utils { errorName: "PlaylistIdNotFoundError"; content: SeedTrace.PlaylistIdNotFoundErrorBody; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts index 4ea69cefc3e..6474e557430 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts @@ -8,13 +8,13 @@ export type PlaylistIdNotFoundErrorBody = | SeedTrace.PlaylistIdNotFoundErrorBody.PlaylistId | SeedTrace.PlaylistIdNotFoundErrorBody._Unknown; -export declare namespace PlaylistIdNotFoundErrorBody { - interface PlaylistId extends _Utils { +export namespace PlaylistIdNotFoundErrorBody { + export interface PlaylistId extends _Utils { type: "playlistId"; value: SeedTrace.PlaylistId; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/ReservedKeywordEnum.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/ReservedKeywordEnum.ts index 4c75fc5b90c..e6150f76233 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/ReservedKeywordEnum.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/ReservedKeywordEnum.ts @@ -3,7 +3,6 @@ */ export type ReservedKeywordEnum = "is" | "as"; - export const ReservedKeywordEnum = { Is: "is", As: "as", @@ -19,7 +18,7 @@ export const ReservedKeywordEnum = { }, } as const; -export declare namespace ReservedKeywordEnum { +export namespace ReservedKeywordEnum { interface Visitor { is: () => R; as: () => R; diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/createProblem.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/createProblem.ts index a18d3e0bbbb..0133491ea5d 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/createProblem.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/createProblem.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.problem.createProblem.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/deleteProblem.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/deleteProblem.ts index e4f657caaea..a9f4f4f13d3 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/deleteProblem.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/deleteProblem.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.problem.deleteProblem.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/getDefaultStarterFiles.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/getDefaultStarterFiles.ts index f366512490f..e999b4e2772 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/getDefaultStarterFiles.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/getDefaultStarterFiles.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.problem.getDefaultStarterFiles.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/updateProblem.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/updateProblem.ts index 2ea9c54f4db..76ae2de4881 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/updateProblem.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/client/updateProblem.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.problem.updateProblem.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/CreateProblemError.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/CreateProblemError.ts index f3f5ed8979b..c97f587c9ee 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/CreateProblemError.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/CreateProblemError.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type CreateProblemError = SeedTrace.CreateProblemError.Generic | SeedTrace.CreateProblemError._Unknown; -export declare namespace CreateProblemError { - interface Generic extends SeedTrace.GenericCreateProblemError, _Utils { +export namespace CreateProblemError { + export interface Generic extends SeedTrace.GenericCreateProblemError, _Utils { errorType: "generic"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { errorType: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/CreateProblemResponse.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/CreateProblemResponse.ts index f1dcecb7fe0..c70160160a0 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/CreateProblemResponse.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/CreateProblemResponse.ts @@ -9,18 +9,18 @@ export type CreateProblemResponse = | SeedTrace.CreateProblemResponse.Error_ | SeedTrace.CreateProblemResponse._Unknown; -export declare namespace CreateProblemResponse { - interface Success extends _Utils { +export namespace CreateProblemResponse { + export interface Success extends _Utils { type: "success"; value: SeedTrace.ProblemId; } - interface Error_ extends _Utils { + export interface Error_ extends _Utils { type: "error"; value: SeedTrace.CreateProblemError; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/ProblemDescriptionBoard.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/ProblemDescriptionBoard.ts index f281fecf257..dc3759888a0 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/ProblemDescriptionBoard.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/problem/types/ProblemDescriptionBoard.ts @@ -10,23 +10,23 @@ export type ProblemDescriptionBoard = | SeedTrace.ProblemDescriptionBoard.TestCaseId | SeedTrace.ProblemDescriptionBoard._Unknown; -export declare namespace ProblemDescriptionBoard { - interface Html extends _Utils { +export namespace ProblemDescriptionBoard { + export interface Html extends _Utils { type: "html"; value: string; } - interface Variable extends _Utils { + export interface Variable extends _Utils { type: "variable"; value: SeedTrace.VariableValue; } - interface TestCaseId extends _Utils { + export interface TestCaseId extends _Utils { type: "testCaseId"; value: string; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/createExecutionSession.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/createExecutionSession.ts index 808e0574499..9a18654f084 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/createExecutionSession.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/createExecutionSession.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.submission.createExecutionSession.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/getExecutionSession.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/getExecutionSession.ts index 5c6fd2fe7d0..0f0d43628f1 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/getExecutionSession.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/getExecutionSession.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.submission.getExecutionSession.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/getExecutionSessionsState.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/getExecutionSessionsState.ts index 0cf9d3dd55e..de6ded364d4 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/getExecutionSessionsState.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/getExecutionSessionsState.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.submission.getExecutionSessionsState.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/stopExecutionSession.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/stopExecutionSession.ts index 3de0edaa585..a566b72c0d1 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/stopExecutionSession.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/client/stopExecutionSession.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.submission.stopExecutionSession.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ActualResult.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ActualResult.ts index 852dacd2f26..7324a742d2e 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ActualResult.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ActualResult.ts @@ -10,22 +10,22 @@ export type ActualResult = | SeedTrace.ActualResult.ExceptionV2 | SeedTrace.ActualResult._Unknown; -export declare namespace ActualResult { - interface Value extends _Utils { +export namespace ActualResult { + export interface Value extends _Utils { type: "value"; value: SeedTrace.VariableValue; } - interface Exception extends SeedTrace.ExceptionInfo, _Utils { + export interface Exception extends SeedTrace.ExceptionInfo, _Utils { type: "exception"; } - interface ExceptionV2 extends _Utils { + export interface ExceptionV2 extends _Utils { type: "exceptionV2"; value: SeedTrace.ExceptionV2; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/CodeExecutionUpdate.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/CodeExecutionUpdate.ts index 1f945018800..9e418a7cf48 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/CodeExecutionUpdate.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/CodeExecutionUpdate.ts @@ -40,52 +40,52 @@ export type CodeExecutionUpdate = | SeedTrace.CodeExecutionUpdate.Finished | SeedTrace.CodeExecutionUpdate._Unknown; -export declare namespace CodeExecutionUpdate { - interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse, _Utils { +export namespace CodeExecutionUpdate { + export interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse, _Utils { type: "buildingExecutor"; } - interface Running extends SeedTrace.RunningResponse, _Utils { + export interface Running extends SeedTrace.RunningResponse, _Utils { type: "running"; } - interface Errored extends SeedTrace.ErroredResponse, _Utils { + export interface Errored extends SeedTrace.ErroredResponse, _Utils { type: "errored"; } - interface Stopped extends SeedTrace.StoppedResponse, _Utils { + export interface Stopped extends SeedTrace.StoppedResponse, _Utils { type: "stopped"; } - interface Graded extends SeedTrace.GradedResponse, _Utils { + export interface Graded extends SeedTrace.GradedResponse, _Utils { type: "graded"; } - interface GradedV2 extends SeedTrace.GradedResponseV2, _Utils { + export interface GradedV2 extends SeedTrace.GradedResponseV2, _Utils { type: "gradedV2"; } - interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse, _Utils { + export interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse, _Utils { type: "workspaceRan"; } - interface Recording extends SeedTrace.RecordingResponseNotification, _Utils { + export interface Recording extends SeedTrace.RecordingResponseNotification, _Utils { type: "recording"; } - interface Recorded extends SeedTrace.RecordedResponseNotification, _Utils { + export interface Recorded extends SeedTrace.RecordedResponseNotification, _Utils { type: "recorded"; } - interface InvalidRequest extends SeedTrace.InvalidRequestResponse, _Utils { + export interface InvalidRequest extends SeedTrace.InvalidRequestResponse, _Utils { type: "invalidRequest"; } - interface Finished extends SeedTrace.FinishedResponse, _Utils { + export interface Finished extends SeedTrace.FinishedResponse, _Utils { type: "finished"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ErrorInfo.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ErrorInfo.ts index 189862011e6..bfe5bd5e2ed 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ErrorInfo.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ErrorInfo.ts @@ -16,20 +16,20 @@ export type ErrorInfo = | SeedTrace.ErrorInfo.InternalError | SeedTrace.ErrorInfo._Unknown; -export declare namespace ErrorInfo { - interface CompileError extends SeedTrace.CompileError, _Utils { +export namespace ErrorInfo { + export interface CompileError extends SeedTrace.CompileError, _Utils { type: "compileError"; } - interface RuntimeError extends SeedTrace.RuntimeError, _Utils { + export interface RuntimeError extends SeedTrace.RuntimeError, _Utils { type: "runtimeError"; } - interface InternalError extends SeedTrace.InternalError, _Utils { + export interface InternalError extends SeedTrace.InternalError, _Utils { type: "internalError"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExceptionV2.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExceptionV2.ts index ffce92cb128..6fb68797407 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExceptionV2.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExceptionV2.ts @@ -9,16 +9,16 @@ export type ExceptionV2 = | SeedTrace.ExceptionV2.Timeout | SeedTrace.ExceptionV2._Unknown; -export declare namespace ExceptionV2 { - interface Generic extends SeedTrace.ExceptionInfo, _Utils { +export namespace ExceptionV2 { + export interface Generic extends SeedTrace.ExceptionInfo, _Utils { type: "generic"; } - interface Timeout extends _Utils { + export interface Timeout extends _Utils { type: "timeout"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExecutionSessionStatus.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExecutionSessionStatus.ts index ac12d367212..f9ceddf1e8e 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExecutionSessionStatus.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExecutionSessionStatus.ts @@ -9,7 +9,6 @@ export type ExecutionSessionStatus = | "RUNNING_CONTAINER" | "LIVE_CONTAINER" | "FAILED_TO_LAUNCH"; - export const ExecutionSessionStatus = { CreatingContainer: "CREATING_CONTAINER", ProvisioningContainer: "PROVISIONING_CONTAINER", @@ -37,7 +36,7 @@ export const ExecutionSessionStatus = { }, } as const; -export declare namespace ExecutionSessionStatus { +export namespace ExecutionSessionStatus { interface Visitor { creatingContainer: () => R; provisioningContainer: () => R; diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/InvalidRequestCause.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/InvalidRequestCause.ts index 3b09e71fbd6..aff23851cc6 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/InvalidRequestCause.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/InvalidRequestCause.ts @@ -14,20 +14,20 @@ export type InvalidRequestCause = | SeedTrace.InvalidRequestCause.UnexpectedLanguage | SeedTrace.InvalidRequestCause._Unknown; -export declare namespace InvalidRequestCause { - interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound, _Utils { +export namespace InvalidRequestCause { + export interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound, _Utils { type: "submissionIdNotFound"; } - interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported, _Utils { + export interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported, _Utils { type: "customTestCasesUnsupported"; } - interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError, _Utils { + export interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError, _Utils { type: "unexpectedLanguage"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/RunningSubmissionState.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/RunningSubmissionState.ts index c66c82a3d7c..52ead490ced 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/RunningSubmissionState.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/RunningSubmissionState.ts @@ -8,7 +8,6 @@ export type RunningSubmissionState = | "WRITING_SUBMISSION_TO_FILE" | "COMPILING_SUBMISSION" | "RUNNING_SUBMISSION"; - export const RunningSubmissionState = { QueueingSubmission: "QUEUEING_SUBMISSION", KillingHistoricalSubmissions: "KILLING_HISTORICAL_SUBMISSIONS", @@ -33,7 +32,7 @@ export const RunningSubmissionState = { }, } as const; -export declare namespace RunningSubmissionState { +export namespace RunningSubmissionState { interface Visitor { queueingSubmission: () => R; killingHistoricalSubmissions: () => R; diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionRequest.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionRequest.ts index bb0c7edacc8..63518d03675 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionRequest.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionRequest.ts @@ -12,28 +12,28 @@ export type SubmissionRequest = | SeedTrace.SubmissionRequest.Stop | SeedTrace.SubmissionRequest._Unknown; -export declare namespace SubmissionRequest { - interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest, _Utils { +export namespace SubmissionRequest { + export interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest, _Utils { type: "initializeProblemRequest"; } - interface InitializeWorkspaceRequest extends _Utils { + export interface InitializeWorkspaceRequest extends _Utils { type: "initializeWorkspaceRequest"; } - interface SubmitV2 extends SeedTrace.SubmitRequestV2, _Utils { + export interface SubmitV2 extends SeedTrace.SubmitRequestV2, _Utils { type: "submitV2"; } - interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest, _Utils { + export interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest, _Utils { type: "workspaceSubmit"; } - interface Stop extends SeedTrace.StopRequest, _Utils { + export interface Stop extends SeedTrace.StopRequest, _Utils { type: "stop"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionResponse.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionResponse.ts index 498e739f65e..b24fc4f53c2 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionResponse.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionResponse.ts @@ -13,34 +13,34 @@ export type SubmissionResponse = | SeedTrace.SubmissionResponse.Terminated | SeedTrace.SubmissionResponse._Unknown; -export declare namespace SubmissionResponse { - interface ServerInitialized extends _Utils { +export namespace SubmissionResponse { + export interface ServerInitialized extends _Utils { type: "serverInitialized"; } - interface ProblemInitialized extends _Utils { + export interface ProblemInitialized extends _Utils { type: "problemInitialized"; value: SeedTrace.ProblemId; } - interface WorkspaceInitialized extends _Utils { + export interface WorkspaceInitialized extends _Utils { type: "workspaceInitialized"; } - interface ServerErrored extends SeedTrace.ExceptionInfo, _Utils { + export interface ServerErrored extends SeedTrace.ExceptionInfo, _Utils { type: "serverErrored"; } - interface CodeExecutionUpdate extends _Utils { + export interface CodeExecutionUpdate extends _Utils { type: "codeExecutionUpdate"; value: SeedTrace.CodeExecutionUpdate; } - interface Terminated extends SeedTrace.TerminatedResponse, _Utils { + export interface Terminated extends SeedTrace.TerminatedResponse, _Utils { type: "terminated"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionStatusForTestCase.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionStatusForTestCase.ts index 0168c0717c6..a329cbe4576 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionStatusForTestCase.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionStatusForTestCase.ts @@ -10,21 +10,21 @@ export type SubmissionStatusForTestCase = | SeedTrace.SubmissionStatusForTestCase.Traced | SeedTrace.SubmissionStatusForTestCase._Unknown; -export declare namespace SubmissionStatusForTestCase { - interface Graded extends SeedTrace.TestCaseResultWithStdout, _Utils { +export namespace SubmissionStatusForTestCase { + export interface Graded extends SeedTrace.TestCaseResultWithStdout, _Utils { type: "graded"; } - interface GradedV2 extends _Utils { + export interface GradedV2 extends _Utils { type: "gradedV2"; value: SeedTrace.TestCaseGrade; } - interface Traced extends SeedTrace.TracedTestCase, _Utils { + export interface Traced extends SeedTrace.TracedTestCase, _Utils { type: "traced"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionStatusV2.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionStatusV2.ts index 294f170f0fb..8c0f2f69f0c 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionStatusV2.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionStatusV2.ts @@ -9,16 +9,16 @@ export type SubmissionStatusV2 = | SeedTrace.SubmissionStatusV2.Workspace | SeedTrace.SubmissionStatusV2._Unknown; -export declare namespace SubmissionStatusV2 { - interface Test extends SeedTrace.TestSubmissionStatusV2, _Utils { +export namespace SubmissionStatusV2 { + export interface Test extends SeedTrace.TestSubmissionStatusV2, _Utils { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2, _Utils { + export interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2, _Utils { type: "workspace"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeEnum.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeEnum.ts index 1fde8fc6512..616c71202cc 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeEnum.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeEnum.ts @@ -6,7 +6,6 @@ * Keep in sync with SubmissionType. */ export type SubmissionTypeEnum = "TEST"; - export const SubmissionTypeEnum = { Test: "TEST", _visit: (value: SubmissionTypeEnum, visitor: SubmissionTypeEnum.Visitor) => { @@ -19,7 +18,7 @@ export const SubmissionTypeEnum = { }, } as const; -export declare namespace SubmissionTypeEnum { +export namespace SubmissionTypeEnum { interface Visitor { test: () => R; _other: () => R; diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeState.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeState.ts index f3a3dee8ac6..26f2c6a7149 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeState.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeState.ts @@ -9,16 +9,16 @@ export type SubmissionTypeState = | SeedTrace.SubmissionTypeState.Workspace | SeedTrace.SubmissionTypeState._Unknown; -export declare namespace SubmissionTypeState { - interface Test extends SeedTrace.TestSubmissionState, _Utils { +export namespace SubmissionTypeState { + export interface Test extends SeedTrace.TestSubmissionState, _Utils { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionState, _Utils { + export interface Workspace extends SeedTrace.WorkspaceSubmissionState, _Utils { type: "workspace"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestCaseGrade.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestCaseGrade.ts index bde863deac5..3ef51aa1171 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestCaseGrade.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestCaseGrade.ts @@ -9,16 +9,16 @@ export type TestCaseGrade = | SeedTrace.TestCaseGrade.NonHidden | SeedTrace.TestCaseGrade._Unknown; -export declare namespace TestCaseGrade { - interface Hidden extends SeedTrace.TestCaseHiddenGrade, _Utils { +export namespace TestCaseGrade { + export interface Hidden extends SeedTrace.TestCaseHiddenGrade, _Utils { type: "hidden"; } - interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade, _Utils { + export interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade, _Utils { type: "nonHidden"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestSubmissionStatus.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestSubmissionStatus.ts index d6ca9ee22d0..abdd22562e0 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestSubmissionStatus.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestSubmissionStatus.ts @@ -11,27 +11,27 @@ export type TestSubmissionStatus = | SeedTrace.TestSubmissionStatus.TestCaseIdToState | SeedTrace.TestSubmissionStatus._Unknown; -export declare namespace TestSubmissionStatus { - interface Stopped extends _Utils { +export namespace TestSubmissionStatus { + export interface Stopped extends _Utils { type: "stopped"; } - interface Errored extends _Utils { + export interface Errored extends _Utils { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running extends _Utils { + export interface Running extends _Utils { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface TestCaseIdToState extends _Utils { + export interface TestCaseIdToState extends _Utils { type: "testCaseIdToState"; value: Record; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts index 0f1b2e43413..c21c27f1fbd 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts @@ -13,34 +13,34 @@ export type TestSubmissionUpdateInfo = | SeedTrace.TestSubmissionUpdateInfo.Finished | SeedTrace.TestSubmissionUpdateInfo._Unknown; -export declare namespace TestSubmissionUpdateInfo { - interface Running extends _Utils { +export namespace TestSubmissionUpdateInfo { + export interface Running extends _Utils { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Stopped extends _Utils { + export interface Stopped extends _Utils { type: "stopped"; } - interface Errored extends _Utils { + export interface Errored extends _Utils { type: "errored"; value: SeedTrace.ErrorInfo; } - interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate, _Utils { + export interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate, _Utils { type: "gradedTestCase"; } - interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate, _Utils { + export interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate, _Utils { type: "recordedTestCase"; } - interface Finished extends _Utils { + export interface Finished extends _Utils { type: "finished"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts index 2789ee784a4..6b5763a630e 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts @@ -12,30 +12,30 @@ export type WorkspaceSubmissionStatus = | SeedTrace.WorkspaceSubmissionStatus.Traced | SeedTrace.WorkspaceSubmissionStatus._Unknown; -export declare namespace WorkspaceSubmissionStatus { - interface Stopped extends _Utils { +export namespace WorkspaceSubmissionStatus { + export interface Stopped extends _Utils { type: "stopped"; } - interface Errored extends _Utils { + export interface Errored extends _Utils { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running extends _Utils { + export interface Running extends _Utils { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails, _Utils { + export interface Ran extends SeedTrace.WorkspaceRunDetails, _Utils { type: "ran"; } - interface Traced extends SeedTrace.WorkspaceRunDetails, _Utils { + export interface Traced extends SeedTrace.WorkspaceRunDetails, _Utils { type: "traced"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts index 5cb7bbf55ef..44d040d3b79 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts @@ -14,38 +14,38 @@ export type WorkspaceSubmissionUpdateInfo = | SeedTrace.WorkspaceSubmissionUpdateInfo.Finished | SeedTrace.WorkspaceSubmissionUpdateInfo._Unknown; -export declare namespace WorkspaceSubmissionUpdateInfo { - interface Running extends _Utils { +export namespace WorkspaceSubmissionUpdateInfo { + export interface Running extends _Utils { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails, _Utils { + export interface Ran extends SeedTrace.WorkspaceRunDetails, _Utils { type: "ran"; } - interface Stopped extends _Utils { + export interface Stopped extends _Utils { type: "stopped"; } - interface Traced extends _Utils { + export interface Traced extends _Utils { type: "traced"; } - interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate, _Utils { + export interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate, _Utils { type: "tracedV2"; } - interface Errored extends _Utils { + export interface Errored extends _Utils { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Finished extends _Utils { + export interface Finished extends _Utils { type: "finished"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/sysprop/client/getNumWarmInstances.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/sysprop/client/getNumWarmInstances.ts index 2fbe6fe6340..a092e8cbc9d 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/sysprop/client/getNumWarmInstances.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/sysprop/client/getNumWarmInstances.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.sysprop.getNumWarmInstances.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/sysprop/client/setNumWarmInstances.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/sysprop/client/setNumWarmInstances.ts index c05b711ce4b..e76687c82e5 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/sysprop/client/setNumWarmInstances.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/sysprop/client/setNumWarmInstances.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.sysprop.setNumWarmInstances.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/Client.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/Client.ts index d12b3ac96e0..cdef4245681 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/Client.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/Client.ts @@ -31,8 +31,19 @@ export declare namespace V2 { } export class V2 { + protected _problem: Problem | undefined; + protected _v3: V3 | undefined; + constructor(protected readonly _options: V2.Options = {}) {} + public get problem(): Problem { + return (this._problem ??= new Problem(this._options)); + } + + public get v3(): V3 { + return (this._v3 ??= new V3(this._options)); + } + /** * @param {V2.RequestOptions} requestOptions - Request-specific configuration. * @@ -77,18 +88,6 @@ export class V2 { }; } - protected _problem: Problem | undefined; - - public get problem(): Problem { - return (this._problem ??= new Problem(this._options)); - } - - protected _v3: V3 | undefined; - - public get v3(): V3 { - return (this._v3 ??= new V3(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/test.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/test.ts index 5489d587dcc..15afe8ecb4a 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/test.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/test.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.v2.test.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getLatestProblem.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getLatestProblem.ts index bcd228e8d79..e1160446754 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getLatestProblem.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getLatestProblem.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = SeedTrace.v2.problem.getLatestProblem.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getLightweightProblems.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getLightweightProblems.ts index 18e3b2fe8b3..f7fd0419cca 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getLightweightProblems.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getLightweightProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = SeedTrace.v2.problem.getLightweightProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getProblemVersion.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getProblemVersion.ts index 664ea0fb4cd..bb947517665 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getProblemVersion.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getProblemVersion.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = SeedTrace.v2.problem.getProblemVersion.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getProblems.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getProblems.ts index 01c8049b685..1e9745e7690 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getProblems.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/client/getProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = SeedTrace.v2.problem.getProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts index b87837a11e5..ef6278afde5 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts @@ -9,16 +9,16 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.AssertCorrectnessCheck.Custom | SeedTrace.v2.AssertCorrectnessCheck._Unknown; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck, _Utils { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck, _Utils { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult, _Utils { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult, _Utils { type: "custom"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/CustomFiles.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/CustomFiles.ts index 80a50f027ee..cb96ac45c38 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/CustomFiles.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/CustomFiles.ts @@ -9,17 +9,17 @@ export type CustomFiles = | SeedTrace.v2.CustomFiles.Custom | SeedTrace.v2.CustomFiles._Unknown; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.BasicCustomFiles, _Utils { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.BasicCustomFiles, _Utils { type: "basic"; } - interface Custom extends _Utils { + export interface Custom extends _Utils { type: "custom"; value: Record; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/FunctionSignature.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/FunctionSignature.ts index 339d8caeb32..7064e1c93e6 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/FunctionSignature.ts @@ -12,20 +12,20 @@ export type FunctionSignature = | SeedTrace.v2.FunctionSignature.VoidThatTakesActualResult | SeedTrace.v2.FunctionSignature._Unknown; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.VoidFunctionSignature, _Utils { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.VoidFunctionSignature, _Utils { type: "void"; } - interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature, _Utils { + export interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature, _Utils { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult, _Utils { + export interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult, _Utils { type: "voidThatTakesActualResult"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts index 1c960602ef0..a8648c0edbe 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts @@ -9,16 +9,16 @@ export type TestCaseFunction = | SeedTrace.v2.TestCaseFunction.Custom | SeedTrace.v2.TestCaseFunction._Unknown; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation, _Utils { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation, _Utils { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinition, _Utils { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinition, _Utils { type: "custom"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index 100a8e4bc92..0389ab4435f 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -9,18 +9,18 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.TestCaseImplementationDescriptionBoard.ParamId | SeedTrace.v2.TestCaseImplementationDescriptionBoard._Unknown; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html extends _Utils { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html extends _Utils { type: "html"; value: string; } - interface ParamId extends _Utils { + export interface ParamId extends _Utils { type: "paramId"; value: SeedTrace.v2.ParameterId; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts index d1feb62f857..99a1c30cb7f 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts @@ -9,17 +9,17 @@ export type TestCaseImplementationReference = | SeedTrace.v2.TestCaseImplementationReference.Implementation | SeedTrace.v2.TestCaseImplementationReference._Unknown; -export declare namespace TestCaseImplementationReference { - interface TemplateId extends _Utils { +export namespace TestCaseImplementationReference { + export interface TemplateId extends _Utils { type: "templateId"; value: SeedTrace.v2.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.TestCaseImplementation, _Utils { + export interface Implementation extends SeedTrace.v2.TestCaseImplementation, _Utils { type: "implementation"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/client/Client.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/client/Client.ts index faa07d6c9d0..4aa14f494e7 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/client/Client.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/client/Client.ts @@ -29,10 +29,10 @@ export declare namespace V3 { } export class V3 { - constructor(protected readonly _options: V3.Options = {}) {} - protected _problem: Problem | undefined; + constructor(protected readonly _options: V3.Options = {}) {} + public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getLatestProblem.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getLatestProblem.ts index ec2892469b6..0e5953ecb81 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getLatestProblem.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getLatestProblem.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../../../core"; export type Error = SeedTrace.v2.v3.problem.getLatestProblem.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getLightweightProblems.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getLightweightProblems.ts index ff69d578898..6a6f577b7f7 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getLightweightProblems.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getLightweightProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../../../core"; export type Error = SeedTrace.v2.v3.problem.getLightweightProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getProblemVersion.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getProblemVersion.ts index e6e69d0f876..4db0092c4fc 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getProblemVersion.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getProblemVersion.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../../../core"; export type Error = SeedTrace.v2.v3.problem.getProblemVersion.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getProblems.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getProblems.ts index 4345097e352..0c76996aa04 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getProblems.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/client/getProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../../../core"; export type Error = SeedTrace.v2.v3.problem.getProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown extends _Utils { +export namespace Error { + export interface _Unknown extends _Utils { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts index 0285cec1783..b3f40f97cc8 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts @@ -9,16 +9,16 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.v3.AssertCorrectnessCheck.Custom | SeedTrace.v2.v3.AssertCorrectnessCheck._Unknown; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck, _Utils { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck, _Utils { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult, _Utils { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult, _Utils { type: "custom"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts index f637f5718d1..9db9cb178c3 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts @@ -9,17 +9,17 @@ export type CustomFiles = | SeedTrace.v2.v3.CustomFiles.Custom | SeedTrace.v2.v3.CustomFiles._Unknown; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.v3.BasicCustomFiles, _Utils { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.v3.BasicCustomFiles, _Utils { type: "basic"; } - interface Custom extends _Utils { + export interface Custom extends _Utils { type: "custom"; value: Record; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts index 12346615b0a..f3ac103b0a8 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts @@ -12,20 +12,22 @@ export type FunctionSignature = | SeedTrace.v2.v3.FunctionSignature.VoidThatTakesActualResult | SeedTrace.v2.v3.FunctionSignature._Unknown; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.v3.VoidFunctionSignature, _Utils { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.v3.VoidFunctionSignature, _Utils { type: "void"; } - interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature, _Utils { + export interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature, _Utils { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult, _Utils { + export interface VoidThatTakesActualResult + extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult, + _Utils { type: "voidThatTakesActualResult"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts index 2f5dbe5686b..c36515bbcd4 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts @@ -9,16 +9,16 @@ export type TestCaseFunction = | SeedTrace.v2.v3.TestCaseFunction.Custom | SeedTrace.v2.v3.TestCaseFunction._Unknown; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation, _Utils { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation, _Utils { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition, _Utils { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition, _Utils { type: "custom"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index 7303457c0ea..201d8ba610d 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -9,18 +9,18 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.ParamId | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard._Unknown; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html extends _Utils { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html extends _Utils { type: "html"; value: string; } - interface ParamId extends _Utils { + export interface ParamId extends _Utils { type: "paramId"; value: SeedTrace.v2.v3.ParameterId; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts index 4f4a6331ca8..33428f2197e 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts @@ -9,17 +9,17 @@ export type TestCaseImplementationReference = | SeedTrace.v2.v3.TestCaseImplementationReference.Implementation | SeedTrace.v2.v3.TestCaseImplementationReference._Unknown; -export declare namespace TestCaseImplementationReference { - interface TemplateId extends _Utils { +export namespace TestCaseImplementationReference { + export interface TemplateId extends _Utils { type: "templateId"; value: SeedTrace.v2.v3.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation, _Utils { + export interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation, _Utils { type: "implementation"; } - interface _Unknown extends _Utils { + export interface _Unknown extends _Utils { type: void; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/Client.ts b/seed/ts-sdk/trace/no-custom-config/src/Client.ts index 29bb5b0d035..845a9793bbd 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/Client.ts @@ -36,52 +36,45 @@ export declare namespace SeedTraceClient { } export class SeedTraceClient { - constructor(protected readonly _options: SeedTraceClient.Options = {}) {} - protected _v2: V2 | undefined; + protected _admin: Admin | undefined; + protected _homepage: Homepage | undefined; + protected _migration: Migration | undefined; + protected _playlist: Playlist | undefined; + protected _problem: Problem | undefined; + protected _submission: Submission | undefined; + protected _sysprop: Sysprop | undefined; + + constructor(protected readonly _options: SeedTraceClient.Options = {}) {} public get v2(): V2 { return (this._v2 ??= new V2(this._options)); } - protected _admin: Admin | undefined; - public get admin(): Admin { return (this._admin ??= new Admin(this._options)); } - protected _homepage: Homepage | undefined; - public get homepage(): Homepage { return (this._homepage ??= new Homepage(this._options)); } - protected _migration: Migration | undefined; - public get migration(): Migration { return (this._migration ??= new Migration(this._options)); } - protected _playlist: Playlist | undefined; - public get playlist(): Playlist { return (this._playlist ??= new Playlist(this._options)); } - protected _problem: Problem | undefined; - public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } - protected _submission: Submission | undefined; - public get submission(): Submission { return (this._submission ??= new Submission(this._options)); } - protected _sysprop: Sysprop | undefined; - public get sysprop(): Sysprop { return (this._sysprop ??= new Sysprop(this._options)); } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/admin/types/Test.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/admin/types/Test.ts index 70dd2b7fc56..ae63f5ef12d 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/admin/types/Test.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/admin/types/Test.ts @@ -6,13 +6,13 @@ import * as SeedTrace from "../../../index"; export type Test = SeedTrace.Test.And | SeedTrace.Test.Or; -export declare namespace Test { - interface And { +export namespace Test { + export interface And { type: "and"; value: boolean; } - interface Or { + export interface Or { type: "or"; value: boolean; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/DebugVariableValue.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/DebugVariableValue.ts index 7c3eaed6311..ac7f88480fc 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/DebugVariableValue.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/DebugVariableValue.ts @@ -19,62 +19,62 @@ export type DebugVariableValue = | SeedTrace.DebugVariableValue.NullValue | SeedTrace.DebugVariableValue.GenericValue; -export declare namespace DebugVariableValue { - interface IntegerValue { +export namespace DebugVariableValue { + export interface IntegerValue { type: "integerValue"; value: number; } - interface BooleanValue { + export interface BooleanValue { type: "booleanValue"; value: boolean; } - interface DoubleValue { + export interface DoubleValue { type: "doubleValue"; value: number; } - interface StringValue { + export interface StringValue { type: "stringValue"; value: string; } - interface CharValue { + export interface CharValue { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.DebugMapValue { + export interface MapValue extends SeedTrace.DebugMapValue { type: "mapValue"; } - interface ListValue { + export interface ListValue { type: "listValue"; value: SeedTrace.DebugVariableValue[]; } - interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue { + export interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue { type: "binaryTreeNodeValue"; } - interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue { + export interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue { type: "singlyLinkedListNodeValue"; } - interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue { + export interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue { type: "doublyLinkedListNodeValue"; } - interface UndefinedValue { + export interface UndefinedValue { type: "undefinedValue"; } - interface NullValue { + export interface NullValue { type: "nullValue"; } - interface GenericValue extends SeedTrace.GenericValue { + export interface GenericValue extends SeedTrace.GenericValue { type: "genericValue"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/Language.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/Language.ts index 0cc47c2d31f..7f1719a43ea 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/Language.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/Language.ts @@ -3,7 +3,6 @@ */ export type Language = "JAVA" | "JAVASCRIPT" | "PYTHON"; - export const Language = { Java: "JAVA", Javascript: "JAVASCRIPT", diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/VariableType.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/VariableType.ts index 3725c71223d..d38a364dfe5 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/VariableType.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/VariableType.ts @@ -16,44 +16,44 @@ export type VariableType = | SeedTrace.VariableType.SinglyLinkedListType | SeedTrace.VariableType.DoublyLinkedListType; -export declare namespace VariableType { - interface IntegerType { +export namespace VariableType { + export interface IntegerType { type: "integerType"; } - interface DoubleType { + export interface DoubleType { type: "doubleType"; } - interface BooleanType { + export interface BooleanType { type: "booleanType"; } - interface StringType { + export interface StringType { type: "stringType"; } - interface CharType { + export interface CharType { type: "charType"; } - interface ListType extends SeedTrace.ListType { + export interface ListType extends SeedTrace.ListType { type: "listType"; } - interface MapType extends SeedTrace.MapType { + export interface MapType extends SeedTrace.MapType { type: "mapType"; } - interface BinaryTreeType { + export interface BinaryTreeType { type: "binaryTreeType"; } - interface SinglyLinkedListType { + export interface SinglyLinkedListType { type: "singlyLinkedListType"; } - interface DoublyLinkedListType { + export interface DoublyLinkedListType { type: "doublyLinkedListType"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/VariableValue.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/VariableValue.ts index d73c90ca9d7..94240a2c2b4 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/VariableValue.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/VariableValue.ts @@ -17,54 +17,54 @@ export type VariableValue = | SeedTrace.VariableValue.DoublyLinkedListValue | SeedTrace.VariableValue.NullValue; -export declare namespace VariableValue { - interface IntegerValue { +export namespace VariableValue { + export interface IntegerValue { type: "integerValue"; value: number; } - interface BooleanValue { + export interface BooleanValue { type: "booleanValue"; value: boolean; } - interface DoubleValue { + export interface DoubleValue { type: "doubleValue"; value: number; } - interface StringValue { + export interface StringValue { type: "stringValue"; value: string; } - interface CharValue { + export interface CharValue { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.MapValue { + export interface MapValue extends SeedTrace.MapValue { type: "mapValue"; } - interface ListValue { + export interface ListValue { type: "listValue"; value: SeedTrace.VariableValue[]; } - interface BinaryTreeValue extends SeedTrace.BinaryTreeValue { + export interface BinaryTreeValue extends SeedTrace.BinaryTreeValue { type: "binaryTreeValue"; } - interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue { + export interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue { type: "singlyLinkedListValue"; } - interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue { + export interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue { type: "doublyLinkedListValue"; } - interface NullValue { + export interface NullValue { type: "nullValue"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/migration/types/MigrationStatus.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/migration/types/MigrationStatus.ts index 0a6bc6f9b03..a38078ae2c0 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/migration/types/MigrationStatus.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/migration/types/MigrationStatus.ts @@ -10,7 +10,6 @@ export type MigrationStatus = * The migration is failed */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts index 577034ea128..83901a81226 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts @@ -6,8 +6,8 @@ import * as SeedTrace from "../../../index"; export type PlaylistIdNotFoundErrorBody = SeedTrace.PlaylistIdNotFoundErrorBody.PlaylistId; -export declare namespace PlaylistIdNotFoundErrorBody { - interface PlaylistId { +export namespace PlaylistIdNotFoundErrorBody { + export interface PlaylistId { type: "playlistId"; value: SeedTrace.PlaylistId; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/ReservedKeywordEnum.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/ReservedKeywordEnum.ts index 8ccd3d4c13e..a77a48fd64a 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/ReservedKeywordEnum.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/ReservedKeywordEnum.ts @@ -3,7 +3,6 @@ */ export type ReservedKeywordEnum = "is" | "as"; - export const ReservedKeywordEnum = { Is: "is", As: "as", diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/CreateProblemError.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/CreateProblemError.ts index 3543a716884..b49568ddd08 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/CreateProblemError.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/CreateProblemError.ts @@ -6,8 +6,8 @@ import * as SeedTrace from "../../../index"; export type CreateProblemError = SeedTrace.CreateProblemError.Generic; -export declare namespace CreateProblemError { - interface Generic extends SeedTrace.GenericCreateProblemError { +export namespace CreateProblemError { + export interface Generic extends SeedTrace.GenericCreateProblemError { errorType: "generic"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/CreateProblemResponse.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/CreateProblemResponse.ts index 80f89cfcb84..0e4095cac69 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/CreateProblemResponse.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/CreateProblemResponse.ts @@ -6,13 +6,13 @@ import * as SeedTrace from "../../../index"; export type CreateProblemResponse = SeedTrace.CreateProblemResponse.Success | SeedTrace.CreateProblemResponse.Error_; -export declare namespace CreateProblemResponse { - interface Success { +export namespace CreateProblemResponse { + export interface Success { type: "success"; value: SeedTrace.ProblemId; } - interface Error_ { + export interface Error_ { type: "error"; value: SeedTrace.CreateProblemError; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/ProblemDescriptionBoard.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/ProblemDescriptionBoard.ts index ae5a369c3e7..efcc213fcbb 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/ProblemDescriptionBoard.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/problem/types/ProblemDescriptionBoard.ts @@ -9,18 +9,18 @@ export type ProblemDescriptionBoard = | SeedTrace.ProblemDescriptionBoard.Variable | SeedTrace.ProblemDescriptionBoard.TestCaseId; -export declare namespace ProblemDescriptionBoard { - interface Html { +export namespace ProblemDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface Variable { + export interface Variable { type: "variable"; value: SeedTrace.VariableValue; } - interface TestCaseId { + export interface TestCaseId { type: "testCaseId"; value: string; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ActualResult.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ActualResult.ts index 6986afad702..b78eb0c13b9 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ActualResult.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ActualResult.ts @@ -9,17 +9,17 @@ export type ActualResult = | SeedTrace.ActualResult.Exception | SeedTrace.ActualResult.ExceptionV2; -export declare namespace ActualResult { - interface Value { +export namespace ActualResult { + export interface Value { type: "value"; value: SeedTrace.VariableValue; } - interface Exception extends SeedTrace.ExceptionInfo { + export interface Exception extends SeedTrace.ExceptionInfo { type: "exception"; } - interface ExceptionV2 { + export interface ExceptionV2 { type: "exceptionV2"; value: SeedTrace.ExceptionV2; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/CodeExecutionUpdate.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/CodeExecutionUpdate.ts index 7e17d4aa354..9e41b5a9000 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/CodeExecutionUpdate.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/CodeExecutionUpdate.ts @@ -39,48 +39,48 @@ export type CodeExecutionUpdate = * Sent once a submission is graded and fully recorded. */ | SeedTrace.CodeExecutionUpdate.Finished; -export declare namespace CodeExecutionUpdate { - interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse { +export namespace CodeExecutionUpdate { + export interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse { type: "buildingExecutor"; } - interface Running extends SeedTrace.RunningResponse { + export interface Running extends SeedTrace.RunningResponse { type: "running"; } - interface Errored extends SeedTrace.ErroredResponse { + export interface Errored extends SeedTrace.ErroredResponse { type: "errored"; } - interface Stopped extends SeedTrace.StoppedResponse { + export interface Stopped extends SeedTrace.StoppedResponse { type: "stopped"; } - interface Graded extends SeedTrace.GradedResponse { + export interface Graded extends SeedTrace.GradedResponse { type: "graded"; } - interface GradedV2 extends SeedTrace.GradedResponseV2 { + export interface GradedV2 extends SeedTrace.GradedResponseV2 { type: "gradedV2"; } - interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse { + export interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse { type: "workspaceRan"; } - interface Recording extends SeedTrace.RecordingResponseNotification { + export interface Recording extends SeedTrace.RecordingResponseNotification { type: "recording"; } - interface Recorded extends SeedTrace.RecordedResponseNotification { + export interface Recorded extends SeedTrace.RecordedResponseNotification { type: "recorded"; } - interface InvalidRequest extends SeedTrace.InvalidRequestResponse { + export interface InvalidRequest extends SeedTrace.InvalidRequestResponse { type: "invalidRequest"; } - interface Finished extends SeedTrace.FinishedResponse { + export interface Finished extends SeedTrace.FinishedResponse { type: "finished"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ErrorInfo.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ErrorInfo.ts index ef3283fe81e..ddb886b4c9a 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ErrorInfo.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ErrorInfo.ts @@ -15,16 +15,16 @@ export type ErrorInfo = * */ | SeedTrace.ErrorInfo.InternalError; -export declare namespace ErrorInfo { - interface CompileError extends SeedTrace.CompileError { +export namespace ErrorInfo { + export interface CompileError extends SeedTrace.CompileError { type: "compileError"; } - interface RuntimeError extends SeedTrace.RuntimeError { + export interface RuntimeError extends SeedTrace.RuntimeError { type: "runtimeError"; } - interface InternalError extends SeedTrace.InternalError { + export interface InternalError extends SeedTrace.InternalError { type: "internalError"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExceptionV2.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExceptionV2.ts index 880817d708d..f43362137ad 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExceptionV2.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExceptionV2.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type ExceptionV2 = SeedTrace.ExceptionV2.Generic | SeedTrace.ExceptionV2.Timeout; -export declare namespace ExceptionV2 { - interface Generic extends SeedTrace.ExceptionInfo { +export namespace ExceptionV2 { + export interface Generic extends SeedTrace.ExceptionInfo { type: "generic"; } - interface Timeout { + export interface Timeout { type: "timeout"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExecutionSessionStatus.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExecutionSessionStatus.ts index a14d2035332..3709aaa7a69 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExecutionSessionStatus.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExecutionSessionStatus.ts @@ -9,7 +9,6 @@ export type ExecutionSessionStatus = | "RUNNING_CONTAINER" | "LIVE_CONTAINER" | "FAILED_TO_LAUNCH"; - export const ExecutionSessionStatus = { CreatingContainer: "CREATING_CONTAINER", ProvisioningContainer: "PROVISIONING_CONTAINER", diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/InvalidRequestCause.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/InvalidRequestCause.ts index 3bb60f89b0f..3504cf7eaa3 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/InvalidRequestCause.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/InvalidRequestCause.ts @@ -13,16 +13,16 @@ export type InvalidRequestCause = * The submission request was routed to an incorrect language executor. */ | SeedTrace.InvalidRequestCause.UnexpectedLanguage; -export declare namespace InvalidRequestCause { - interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound { +export namespace InvalidRequestCause { + export interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound { type: "submissionIdNotFound"; } - interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported { + export interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported { type: "customTestCasesUnsupported"; } - interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError { + export interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError { type: "unexpectedLanguage"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/RunningSubmissionState.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/RunningSubmissionState.ts index 5d15c5180a9..38031ccd887 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/RunningSubmissionState.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/RunningSubmissionState.ts @@ -8,7 +8,6 @@ export type RunningSubmissionState = | "WRITING_SUBMISSION_TO_FILE" | "COMPILING_SUBMISSION" | "RUNNING_SUBMISSION"; - export const RunningSubmissionState = { QueueingSubmission: "QUEUEING_SUBMISSION", KillingHistoricalSubmissions: "KILLING_HISTORICAL_SUBMISSIONS", diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionRequest.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionRequest.ts index e63f940c5b8..e4907b98e7c 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionRequest.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionRequest.ts @@ -11,24 +11,24 @@ export type SubmissionRequest = | SeedTrace.SubmissionRequest.WorkspaceSubmit | SeedTrace.SubmissionRequest.Stop; -export declare namespace SubmissionRequest { - interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest { +export namespace SubmissionRequest { + export interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest { type: "initializeProblemRequest"; } - interface InitializeWorkspaceRequest { + export interface InitializeWorkspaceRequest { type: "initializeWorkspaceRequest"; } - interface SubmitV2 extends SeedTrace.SubmitRequestV2 { + export interface SubmitV2 extends SeedTrace.SubmitRequestV2 { type: "submitV2"; } - interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest { + export interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest { type: "workspaceSubmit"; } - interface Stop extends SeedTrace.StopRequest { + export interface Stop extends SeedTrace.StopRequest { type: "stop"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionResponse.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionResponse.ts index d2fb3f8172f..ca463a332a6 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionResponse.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionResponse.ts @@ -12,30 +12,30 @@ export type SubmissionResponse = | SeedTrace.SubmissionResponse.CodeExecutionUpdate | SeedTrace.SubmissionResponse.Terminated; -export declare namespace SubmissionResponse { - interface ServerInitialized { +export namespace SubmissionResponse { + export interface ServerInitialized { type: "serverInitialized"; } - interface ProblemInitialized { + export interface ProblemInitialized { type: "problemInitialized"; value: SeedTrace.ProblemId; } - interface WorkspaceInitialized { + export interface WorkspaceInitialized { type: "workspaceInitialized"; } - interface ServerErrored extends SeedTrace.ExceptionInfo { + export interface ServerErrored extends SeedTrace.ExceptionInfo { type: "serverErrored"; } - interface CodeExecutionUpdate { + export interface CodeExecutionUpdate { type: "codeExecutionUpdate"; value: SeedTrace.CodeExecutionUpdate; } - interface Terminated extends SeedTrace.TerminatedResponse { + export interface Terminated extends SeedTrace.TerminatedResponse { type: "terminated"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionStatusForTestCase.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionStatusForTestCase.ts index 8698643d86b..dd0d6039fee 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionStatusForTestCase.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionStatusForTestCase.ts @@ -9,17 +9,17 @@ export type SubmissionStatusForTestCase = | SeedTrace.SubmissionStatusForTestCase.GradedV2 | SeedTrace.SubmissionStatusForTestCase.Traced; -export declare namespace SubmissionStatusForTestCase { - interface Graded extends SeedTrace.TestCaseResultWithStdout { +export namespace SubmissionStatusForTestCase { + export interface Graded extends SeedTrace.TestCaseResultWithStdout { type: "graded"; } - interface GradedV2 { + export interface GradedV2 { type: "gradedV2"; value: SeedTrace.TestCaseGrade; } - interface Traced extends SeedTrace.TracedTestCase { + export interface Traced extends SeedTrace.TracedTestCase { type: "traced"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionStatusV2.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionStatusV2.ts index 652c732c408..95710f67978 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionStatusV2.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionStatusV2.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type SubmissionStatusV2 = SeedTrace.SubmissionStatusV2.Test | SeedTrace.SubmissionStatusV2.Workspace; -export declare namespace SubmissionStatusV2 { - interface Test extends SeedTrace.TestSubmissionStatusV2 { +export namespace SubmissionStatusV2 { + export interface Test extends SeedTrace.TestSubmissionStatusV2 { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2 { + export interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2 { type: "workspace"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeEnum.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeEnum.ts index bff5583dad7..8414392abfc 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeEnum.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeEnum.ts @@ -6,7 +6,6 @@ * Keep in sync with SubmissionType. */ export type SubmissionTypeEnum = "TEST"; - export const SubmissionTypeEnum = { Test: "TEST", } as const; diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeState.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeState.ts index fa4855ce698..c811ee050db 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeState.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeState.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type SubmissionTypeState = SeedTrace.SubmissionTypeState.Test | SeedTrace.SubmissionTypeState.Workspace; -export declare namespace SubmissionTypeState { - interface Test extends SeedTrace.TestSubmissionState { +export namespace SubmissionTypeState { + export interface Test extends SeedTrace.TestSubmissionState { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionState { + export interface Workspace extends SeedTrace.WorkspaceSubmissionState { type: "workspace"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestCaseGrade.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestCaseGrade.ts index 2f02296e05a..901cf5fc6ec 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestCaseGrade.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestCaseGrade.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type TestCaseGrade = SeedTrace.TestCaseGrade.Hidden | SeedTrace.TestCaseGrade.NonHidden; -export declare namespace TestCaseGrade { - interface Hidden extends SeedTrace.TestCaseHiddenGrade { +export namespace TestCaseGrade { + export interface Hidden extends SeedTrace.TestCaseHiddenGrade { type: "hidden"; } - interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade { + export interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade { type: "nonHidden"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestSubmissionStatus.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestSubmissionStatus.ts index da3e7c63984..04dc0c011e9 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestSubmissionStatus.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestSubmissionStatus.ts @@ -10,22 +10,22 @@ export type TestSubmissionStatus = | SeedTrace.TestSubmissionStatus.Running | SeedTrace.TestSubmissionStatus.TestCaseIdToState; -export declare namespace TestSubmissionStatus { - interface Stopped { +export namespace TestSubmissionStatus { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface TestCaseIdToState { + export interface TestCaseIdToState { type: "testCaseIdToState"; value: Record; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts index 69a146a5067..f04f0e0479c 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts @@ -12,30 +12,30 @@ export type TestSubmissionUpdateInfo = | SeedTrace.TestSubmissionUpdateInfo.RecordedTestCase | SeedTrace.TestSubmissionUpdateInfo.Finished; -export declare namespace TestSubmissionUpdateInfo { - interface Running { +export namespace TestSubmissionUpdateInfo { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Stopped { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate { + export interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate { type: "gradedTestCase"; } - interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate { + export interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate { type: "recordedTestCase"; } - interface Finished { + export interface Finished { type: "finished"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts index 5151126e193..cad2d60cdae 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts @@ -11,26 +11,26 @@ export type WorkspaceSubmissionStatus = | SeedTrace.WorkspaceSubmissionStatus.Ran | SeedTrace.WorkspaceSubmissionStatus.Traced; -export declare namespace WorkspaceSubmissionStatus { - interface Stopped { +export namespace WorkspaceSubmissionStatus { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails { + export interface Ran extends SeedTrace.WorkspaceRunDetails { type: "ran"; } - interface Traced extends SeedTrace.WorkspaceRunDetails { + export interface Traced extends SeedTrace.WorkspaceRunDetails { type: "traced"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts index 78c1249225c..a8b008b38fb 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts @@ -13,34 +13,34 @@ export type WorkspaceSubmissionUpdateInfo = | SeedTrace.WorkspaceSubmissionUpdateInfo.Errored | SeedTrace.WorkspaceSubmissionUpdateInfo.Finished; -export declare namespace WorkspaceSubmissionUpdateInfo { - interface Running { +export namespace WorkspaceSubmissionUpdateInfo { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails { + export interface Ran extends SeedTrace.WorkspaceRunDetails { type: "ran"; } - interface Stopped { + export interface Stopped { type: "stopped"; } - interface Traced { + export interface Traced { type: "traced"; } - interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate { + export interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate { type: "tracedV2"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Finished { + export interface Finished { type: "finished"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/client/Client.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/client/Client.ts index ea7ff879e01..627705ac28b 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/client/Client.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/client/Client.ts @@ -31,8 +31,19 @@ export declare namespace V2 { } export class V2 { + protected _problem: Problem | undefined; + protected _v3: V3 | undefined; + constructor(protected readonly _options: V2.Options = {}) {} + public get problem(): Problem { + return (this._problem ??= new Problem(this._options)); + } + + public get v3(): V3 { + return (this._v3 ??= new V3(this._options)); + } + /** * @param {V2.RequestOptions} requestOptions - Request-specific configuration. * @@ -89,18 +100,6 @@ export class V2 { } } - protected _problem: Problem | undefined; - - public get problem(): Problem { - return (this._problem ??= new Problem(this._options)); - } - - protected _v3: V3 | undefined; - - public get v3(): V3 { - return (this._v3 ??= new V3(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts index 85c6b996461..d2be6b87b97 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts @@ -8,12 +8,12 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.AssertCorrectnessCheck.DeepEquality | SeedTrace.v2.AssertCorrectnessCheck.Custom; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/CustomFiles.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/CustomFiles.ts index b430b089eaf..06ccba9d49d 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/CustomFiles.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/CustomFiles.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../index"; export type CustomFiles = SeedTrace.v2.CustomFiles.Basic | SeedTrace.v2.CustomFiles.Custom; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.BasicCustomFiles { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.BasicCustomFiles { type: "basic"; } - interface Custom { + export interface Custom { type: "custom"; value: Record; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/FunctionSignature.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/FunctionSignature.ts index 251760cd97e..f4adeea0b90 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/FunctionSignature.ts @@ -11,16 +11,16 @@ export type FunctionSignature = * Useful when specifying custom grading for a testcase where actualResult is defined. */ | SeedTrace.v2.FunctionSignature.VoidThatTakesActualResult; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.VoidFunctionSignature { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.VoidFunctionSignature { type: "void"; } - interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature { + export interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult { + export interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult { type: "voidThatTakesActualResult"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts index c70bdafe6bb..cc8ea6e85c2 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../index"; export type TestCaseFunction = SeedTrace.v2.TestCaseFunction.WithActualResult | SeedTrace.v2.TestCaseFunction.Custom; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinition { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinition { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index af60df46b61..3a83452376c 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.TestCaseImplementationDescriptionBoard.Html | SeedTrace.v2.TestCaseImplementationDescriptionBoard.ParamId; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface ParamId { + export interface ParamId { type: "paramId"; value: SeedTrace.v2.ParameterId; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts index 045115835ab..66182e14e9f 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationReference = | SeedTrace.v2.TestCaseImplementationReference.TemplateId | SeedTrace.v2.TestCaseImplementationReference.Implementation; -export declare namespace TestCaseImplementationReference { - interface TemplateId { +export namespace TestCaseImplementationReference { + export interface TemplateId { type: "templateId"; value: SeedTrace.v2.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.TestCaseImplementation { + export interface Implementation extends SeedTrace.v2.TestCaseImplementation { type: "implementation"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/client/Client.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/client/Client.ts index faa07d6c9d0..4aa14f494e7 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/client/Client.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/client/Client.ts @@ -29,10 +29,10 @@ export declare namespace V3 { } export class V3 { - constructor(protected readonly _options: V3.Options = {}) {} - protected _problem: Problem | undefined; + constructor(protected readonly _options: V3.Options = {}) {} + public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts index 79d32643560..2c0e9b49c7c 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts @@ -8,12 +8,12 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.v3.AssertCorrectnessCheck.DeepEquality | SeedTrace.v2.v3.AssertCorrectnessCheck.Custom; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts index 4ac8078742b..c287f6286f3 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../../../index"; export type CustomFiles = SeedTrace.v2.v3.CustomFiles.Basic | SeedTrace.v2.v3.CustomFiles.Custom; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.v3.BasicCustomFiles { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.v3.BasicCustomFiles { type: "basic"; } - interface Custom { + export interface Custom { type: "custom"; value: Record; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts index 548b1d9092b..82243201aba 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts @@ -11,16 +11,16 @@ export type FunctionSignature = * Useful when specifying custom grading for a testcase where actualResult is defined. */ | SeedTrace.v2.v3.FunctionSignature.VoidThatTakesActualResult; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.v3.VoidFunctionSignature { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.v3.VoidFunctionSignature { type: "void"; } - interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature { + export interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult { + export interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult { type: "voidThatTakesActualResult"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts index 2381196a692..031ff15274d 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts @@ -8,12 +8,12 @@ export type TestCaseFunction = | SeedTrace.v2.v3.TestCaseFunction.WithActualResult | SeedTrace.v2.v3.TestCaseFunction.Custom; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index 8d670c214fc..157e99b52ac 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.Html | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.ParamId; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface ParamId { + export interface ParamId { type: "paramId"; value: SeedTrace.v2.v3.ParameterId; } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts index 0fad5ef9988..67af0e57047 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationReference = | SeedTrace.v2.v3.TestCaseImplementationReference.TemplateId | SeedTrace.v2.v3.TestCaseImplementationReference.Implementation; -export declare namespace TestCaseImplementationReference { - interface TemplateId { +export namespace TestCaseImplementationReference { + export interface TemplateId { type: "templateId"; value: SeedTrace.v2.v3.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation { + export interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation { type: "implementation"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/Client.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/Client.ts index 29bb5b0d035..845a9793bbd 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/Client.ts @@ -36,52 +36,45 @@ export declare namespace SeedTraceClient { } export class SeedTraceClient { - constructor(protected readonly _options: SeedTraceClient.Options = {}) {} - protected _v2: V2 | undefined; + protected _admin: Admin | undefined; + protected _homepage: Homepage | undefined; + protected _migration: Migration | undefined; + protected _playlist: Playlist | undefined; + protected _problem: Problem | undefined; + protected _submission: Submission | undefined; + protected _sysprop: Sysprop | undefined; + + constructor(protected readonly _options: SeedTraceClient.Options = {}) {} public get v2(): V2 { return (this._v2 ??= new V2(this._options)); } - protected _admin: Admin | undefined; - public get admin(): Admin { return (this._admin ??= new Admin(this._options)); } - protected _homepage: Homepage | undefined; - public get homepage(): Homepage { return (this._homepage ??= new Homepage(this._options)); } - protected _migration: Migration | undefined; - public get migration(): Migration { return (this._migration ??= new Migration(this._options)); } - protected _playlist: Playlist | undefined; - public get playlist(): Playlist { return (this._playlist ??= new Playlist(this._options)); } - protected _problem: Problem | undefined; - public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } - protected _submission: Submission | undefined; - public get submission(): Submission { return (this._submission ??= new Submission(this._options)); } - protected _sysprop: Sysprop | undefined; - public get sysprop(): Sysprop { return (this._sysprop ??= new Sysprop(this._options)); } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/sendTestSubmissionUpdate.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/sendTestSubmissionUpdate.ts index eec07e30120..b08e04a3524 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/sendTestSubmissionUpdate.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/sendTestSubmissionUpdate.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.sendTestSubmissionUpdate.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/sendWorkspaceSubmissionUpdate.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/sendWorkspaceSubmissionUpdate.ts index b0a56a39870..c2984df097e 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/sendWorkspaceSubmissionUpdate.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/sendWorkspaceSubmissionUpdate.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.sendWorkspaceSubmissionUpdate.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedTestCase.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedTestCase.ts index 19d598e0405..901fc880591 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedTestCase.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedTestCase.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.storeTracedTestCase.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedTestCaseV2.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedTestCaseV2.ts index 0f13ecc153b..3dbefdbb131 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedTestCaseV2.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedTestCaseV2.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.storeTracedTestCaseV2.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedWorkspace.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedWorkspace.ts index a711edee146..c66b90bf64c 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedWorkspace.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedWorkspace.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.storeTracedWorkspace.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedWorkspaceV2.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedWorkspaceV2.ts index 0e0c23976b1..10dc0fe37a4 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedWorkspaceV2.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/storeTracedWorkspaceV2.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.storeTracedWorkspaceV2.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/updateTestSubmissionStatus.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/updateTestSubmissionStatus.ts index 8e83111fdf0..fc534e63a7d 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/updateTestSubmissionStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/updateTestSubmissionStatus.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.updateTestSubmissionStatus.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/updateWorkspaceSubmissionStatus.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/updateWorkspaceSubmissionStatus.ts index 108c80b875d..ede0482f33b 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/updateWorkspaceSubmissionStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/client/updateWorkspaceSubmissionStatus.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.admin.updateWorkspaceSubmissionStatus.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/types/Test.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/types/Test.ts index 70dd2b7fc56..ae63f5ef12d 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/types/Test.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/admin/types/Test.ts @@ -6,13 +6,13 @@ import * as SeedTrace from "../../../index"; export type Test = SeedTrace.Test.And | SeedTrace.Test.Or; -export declare namespace Test { - interface And { +export namespace Test { + export interface And { type: "and"; value: boolean; } - interface Or { + export interface Or { type: "or"; value: boolean; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/DebugVariableValue.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/DebugVariableValue.ts index 7c3eaed6311..ac7f88480fc 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/DebugVariableValue.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/DebugVariableValue.ts @@ -19,62 +19,62 @@ export type DebugVariableValue = | SeedTrace.DebugVariableValue.NullValue | SeedTrace.DebugVariableValue.GenericValue; -export declare namespace DebugVariableValue { - interface IntegerValue { +export namespace DebugVariableValue { + export interface IntegerValue { type: "integerValue"; value: number; } - interface BooleanValue { + export interface BooleanValue { type: "booleanValue"; value: boolean; } - interface DoubleValue { + export interface DoubleValue { type: "doubleValue"; value: number; } - interface StringValue { + export interface StringValue { type: "stringValue"; value: string; } - interface CharValue { + export interface CharValue { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.DebugMapValue { + export interface MapValue extends SeedTrace.DebugMapValue { type: "mapValue"; } - interface ListValue { + export interface ListValue { type: "listValue"; value: SeedTrace.DebugVariableValue[]; } - interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue { + export interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue { type: "binaryTreeNodeValue"; } - interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue { + export interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue { type: "singlyLinkedListNodeValue"; } - interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue { + export interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue { type: "doublyLinkedListNodeValue"; } - interface UndefinedValue { + export interface UndefinedValue { type: "undefinedValue"; } - interface NullValue { + export interface NullValue { type: "nullValue"; } - interface GenericValue extends SeedTrace.GenericValue { + export interface GenericValue extends SeedTrace.GenericValue { type: "genericValue"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/Language.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/Language.ts index 0cc47c2d31f..7f1719a43ea 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/Language.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/Language.ts @@ -3,7 +3,6 @@ */ export type Language = "JAVA" | "JAVASCRIPT" | "PYTHON"; - export const Language = { Java: "JAVA", Javascript: "JAVASCRIPT", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/VariableType.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/VariableType.ts index 3725c71223d..d38a364dfe5 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/VariableType.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/VariableType.ts @@ -16,44 +16,44 @@ export type VariableType = | SeedTrace.VariableType.SinglyLinkedListType | SeedTrace.VariableType.DoublyLinkedListType; -export declare namespace VariableType { - interface IntegerType { +export namespace VariableType { + export interface IntegerType { type: "integerType"; } - interface DoubleType { + export interface DoubleType { type: "doubleType"; } - interface BooleanType { + export interface BooleanType { type: "booleanType"; } - interface StringType { + export interface StringType { type: "stringType"; } - interface CharType { + export interface CharType { type: "charType"; } - interface ListType extends SeedTrace.ListType { + export interface ListType extends SeedTrace.ListType { type: "listType"; } - interface MapType extends SeedTrace.MapType { + export interface MapType extends SeedTrace.MapType { type: "mapType"; } - interface BinaryTreeType { + export interface BinaryTreeType { type: "binaryTreeType"; } - interface SinglyLinkedListType { + export interface SinglyLinkedListType { type: "singlyLinkedListType"; } - interface DoublyLinkedListType { + export interface DoublyLinkedListType { type: "doublyLinkedListType"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/VariableValue.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/VariableValue.ts index d73c90ca9d7..94240a2c2b4 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/VariableValue.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/VariableValue.ts @@ -17,54 +17,54 @@ export type VariableValue = | SeedTrace.VariableValue.DoublyLinkedListValue | SeedTrace.VariableValue.NullValue; -export declare namespace VariableValue { - interface IntegerValue { +export namespace VariableValue { + export interface IntegerValue { type: "integerValue"; value: number; } - interface BooleanValue { + export interface BooleanValue { type: "booleanValue"; value: boolean; } - interface DoubleValue { + export interface DoubleValue { type: "doubleValue"; value: number; } - interface StringValue { + export interface StringValue { type: "stringValue"; value: string; } - interface CharValue { + export interface CharValue { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.MapValue { + export interface MapValue extends SeedTrace.MapValue { type: "mapValue"; } - interface ListValue { + export interface ListValue { type: "listValue"; value: SeedTrace.VariableValue[]; } - interface BinaryTreeValue extends SeedTrace.BinaryTreeValue { + export interface BinaryTreeValue extends SeedTrace.BinaryTreeValue { type: "binaryTreeValue"; } - interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue { + export interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue { type: "singlyLinkedListValue"; } - interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue { + export interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue { type: "doublyLinkedListValue"; } - interface NullValue { + export interface NullValue { type: "nullValue"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/homepage/client/getHomepageProblems.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/homepage/client/getHomepageProblems.ts index 465074e1b40..f1ba1d97bf5 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/homepage/client/getHomepageProblems.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/homepage/client/getHomepageProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.homepage.getHomepageProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/homepage/client/setHomepageProblems.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/homepage/client/setHomepageProblems.ts index 04d6308a84b..cf1ff349c4c 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/homepage/client/setHomepageProblems.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/homepage/client/setHomepageProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.homepage.setHomepageProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/client/getAttemptedMigrations.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/client/getAttemptedMigrations.ts index 0d6dccc0ff9..3a07736e2de 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/client/getAttemptedMigrations.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/client/getAttemptedMigrations.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.migration.getAttemptedMigrations.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/types/MigrationStatus.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/types/MigrationStatus.ts index 0a6bc6f9b03..a38078ae2c0 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/types/MigrationStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/types/MigrationStatus.ts @@ -10,7 +10,6 @@ export type MigrationStatus = * The migration is failed */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/createPlaylist.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/createPlaylist.ts index d850bafccf0..18cd93b87fd 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/createPlaylist.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/createPlaylist.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.playlist.createPlaylist.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/deletePlaylist.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/deletePlaylist.ts index 3eeeb7f616d..bfafedbf47a 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/deletePlaylist.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/deletePlaylist.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.playlist.deletePlaylist.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/getPlaylist.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/getPlaylist.ts index 2baeaa1876d..8752fd81406 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/getPlaylist.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/getPlaylist.ts @@ -10,17 +10,17 @@ export type Error = | SeedTrace.playlist.getPlaylist.Error.UnauthorizedError | SeedTrace.playlist.getPlaylist.Error._Unknown; -export declare namespace Error { - interface PlaylistIdNotFoundError { +export namespace Error { + export interface PlaylistIdNotFoundError { errorName: "PlaylistIdNotFoundError"; content: SeedTrace.PlaylistIdNotFoundErrorBody; } - interface UnauthorizedError { + export interface UnauthorizedError { errorName: "UnauthorizedError"; } - interface _Unknown { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/getPlaylists.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/getPlaylists.ts index 6445f8675f5..f53afc34e11 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/getPlaylists.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/getPlaylists.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.playlist.getPlaylists.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/updatePlaylist.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/updatePlaylist.ts index 31b7c6ff14c..52d878912e7 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/updatePlaylist.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/client/updatePlaylist.ts @@ -9,13 +9,13 @@ export type Error = | SeedTrace.playlist.updatePlaylist.Error.PlaylistIdNotFoundError | SeedTrace.playlist.updatePlaylist.Error._Unknown; -export declare namespace Error { - interface PlaylistIdNotFoundError { +export namespace Error { + export interface PlaylistIdNotFoundError { errorName: "PlaylistIdNotFoundError"; content: SeedTrace.PlaylistIdNotFoundErrorBody; } - interface _Unknown { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts index 577034ea128..83901a81226 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts @@ -6,8 +6,8 @@ import * as SeedTrace from "../../../index"; export type PlaylistIdNotFoundErrorBody = SeedTrace.PlaylistIdNotFoundErrorBody.PlaylistId; -export declare namespace PlaylistIdNotFoundErrorBody { - interface PlaylistId { +export namespace PlaylistIdNotFoundErrorBody { + export interface PlaylistId { type: "playlistId"; value: SeedTrace.PlaylistId; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/ReservedKeywordEnum.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/ReservedKeywordEnum.ts index 8ccd3d4c13e..a77a48fd64a 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/ReservedKeywordEnum.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/ReservedKeywordEnum.ts @@ -3,7 +3,6 @@ */ export type ReservedKeywordEnum = "is" | "as"; - export const ReservedKeywordEnum = { Is: "is", As: "as", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/createProblem.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/createProblem.ts index 4d71e3566b8..b942c582330 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/createProblem.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/createProblem.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.problem.createProblem.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/deleteProblem.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/deleteProblem.ts index 1bb52d4994d..c91bcc1f8d1 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/deleteProblem.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/deleteProblem.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.problem.deleteProblem.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/getDefaultStarterFiles.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/getDefaultStarterFiles.ts index 5d9dab79145..5cb56541d6f 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/getDefaultStarterFiles.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/getDefaultStarterFiles.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.problem.getDefaultStarterFiles.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/updateProblem.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/updateProblem.ts index dae3cef602a..019388eca10 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/updateProblem.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/client/updateProblem.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.problem.updateProblem.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/CreateProblemError.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/CreateProblemError.ts index e764e29d34c..c43c26296dc 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/CreateProblemError.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/CreateProblemError.ts @@ -6,8 +6,8 @@ import * as SeedTrace from "../../../index"; export type CreateProblemError = SeedTrace.CreateProblemError.Generic; -export declare namespace CreateProblemError { - interface Generic extends SeedTrace.GenericCreateProblemError { +export namespace CreateProblemError { + export interface Generic extends SeedTrace.GenericCreateProblemError { _type: "generic"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/CreateProblemResponse.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/CreateProblemResponse.ts index 80f89cfcb84..0e4095cac69 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/CreateProblemResponse.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/CreateProblemResponse.ts @@ -6,13 +6,13 @@ import * as SeedTrace from "../../../index"; export type CreateProblemResponse = SeedTrace.CreateProblemResponse.Success | SeedTrace.CreateProblemResponse.Error_; -export declare namespace CreateProblemResponse { - interface Success { +export namespace CreateProblemResponse { + export interface Success { type: "success"; value: SeedTrace.ProblemId; } - interface Error_ { + export interface Error_ { type: "error"; value: SeedTrace.CreateProblemError; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/ProblemDescriptionBoard.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/ProblemDescriptionBoard.ts index ae5a369c3e7..efcc213fcbb 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/ProblemDescriptionBoard.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/problem/types/ProblemDescriptionBoard.ts @@ -9,18 +9,18 @@ export type ProblemDescriptionBoard = | SeedTrace.ProblemDescriptionBoard.Variable | SeedTrace.ProblemDescriptionBoard.TestCaseId; -export declare namespace ProblemDescriptionBoard { - interface Html { +export namespace ProblemDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface Variable { + export interface Variable { type: "variable"; value: SeedTrace.VariableValue; } - interface TestCaseId { + export interface TestCaseId { type: "testCaseId"; value: string; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/createExecutionSession.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/createExecutionSession.ts index 7474eb137ea..706aed35364 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/createExecutionSession.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/createExecutionSession.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.submission.createExecutionSession.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/getExecutionSession.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/getExecutionSession.ts index e445833f935..227c26b047d 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/getExecutionSession.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/getExecutionSession.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.submission.getExecutionSession.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/getExecutionSessionsState.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/getExecutionSessionsState.ts index 14752d4b6aa..11312af8b2f 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/getExecutionSessionsState.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/getExecutionSessionsState.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.submission.getExecutionSessionsState.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/stopExecutionSession.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/stopExecutionSession.ts index c1409855bcf..7b7f47ce33a 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/stopExecutionSession.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/client/stopExecutionSession.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.submission.stopExecutionSession.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ActualResult.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ActualResult.ts index 6986afad702..b78eb0c13b9 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ActualResult.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ActualResult.ts @@ -9,17 +9,17 @@ export type ActualResult = | SeedTrace.ActualResult.Exception | SeedTrace.ActualResult.ExceptionV2; -export declare namespace ActualResult { - interface Value { +export namespace ActualResult { + export interface Value { type: "value"; value: SeedTrace.VariableValue; } - interface Exception extends SeedTrace.ExceptionInfo { + export interface Exception extends SeedTrace.ExceptionInfo { type: "exception"; } - interface ExceptionV2 { + export interface ExceptionV2 { type: "exceptionV2"; value: SeedTrace.ExceptionV2; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/CodeExecutionUpdate.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/CodeExecutionUpdate.ts index 7e17d4aa354..9e41b5a9000 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/CodeExecutionUpdate.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/CodeExecutionUpdate.ts @@ -39,48 +39,48 @@ export type CodeExecutionUpdate = * Sent once a submission is graded and fully recorded. */ | SeedTrace.CodeExecutionUpdate.Finished; -export declare namespace CodeExecutionUpdate { - interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse { +export namespace CodeExecutionUpdate { + export interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse { type: "buildingExecutor"; } - interface Running extends SeedTrace.RunningResponse { + export interface Running extends SeedTrace.RunningResponse { type: "running"; } - interface Errored extends SeedTrace.ErroredResponse { + export interface Errored extends SeedTrace.ErroredResponse { type: "errored"; } - interface Stopped extends SeedTrace.StoppedResponse { + export interface Stopped extends SeedTrace.StoppedResponse { type: "stopped"; } - interface Graded extends SeedTrace.GradedResponse { + export interface Graded extends SeedTrace.GradedResponse { type: "graded"; } - interface GradedV2 extends SeedTrace.GradedResponseV2 { + export interface GradedV2 extends SeedTrace.GradedResponseV2 { type: "gradedV2"; } - interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse { + export interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse { type: "workspaceRan"; } - interface Recording extends SeedTrace.RecordingResponseNotification { + export interface Recording extends SeedTrace.RecordingResponseNotification { type: "recording"; } - interface Recorded extends SeedTrace.RecordedResponseNotification { + export interface Recorded extends SeedTrace.RecordedResponseNotification { type: "recorded"; } - interface InvalidRequest extends SeedTrace.InvalidRequestResponse { + export interface InvalidRequest extends SeedTrace.InvalidRequestResponse { type: "invalidRequest"; } - interface Finished extends SeedTrace.FinishedResponse { + export interface Finished extends SeedTrace.FinishedResponse { type: "finished"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ErrorInfo.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ErrorInfo.ts index ef3283fe81e..ddb886b4c9a 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ErrorInfo.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ErrorInfo.ts @@ -15,16 +15,16 @@ export type ErrorInfo = * */ | SeedTrace.ErrorInfo.InternalError; -export declare namespace ErrorInfo { - interface CompileError extends SeedTrace.CompileError { +export namespace ErrorInfo { + export interface CompileError extends SeedTrace.CompileError { type: "compileError"; } - interface RuntimeError extends SeedTrace.RuntimeError { + export interface RuntimeError extends SeedTrace.RuntimeError { type: "runtimeError"; } - interface InternalError extends SeedTrace.InternalError { + export interface InternalError extends SeedTrace.InternalError { type: "internalError"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExceptionV2.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExceptionV2.ts index 880817d708d..f43362137ad 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExceptionV2.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExceptionV2.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type ExceptionV2 = SeedTrace.ExceptionV2.Generic | SeedTrace.ExceptionV2.Timeout; -export declare namespace ExceptionV2 { - interface Generic extends SeedTrace.ExceptionInfo { +export namespace ExceptionV2 { + export interface Generic extends SeedTrace.ExceptionInfo { type: "generic"; } - interface Timeout { + export interface Timeout { type: "timeout"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExecutionSessionStatus.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExecutionSessionStatus.ts index a14d2035332..3709aaa7a69 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExecutionSessionStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExecutionSessionStatus.ts @@ -9,7 +9,6 @@ export type ExecutionSessionStatus = | "RUNNING_CONTAINER" | "LIVE_CONTAINER" | "FAILED_TO_LAUNCH"; - export const ExecutionSessionStatus = { CreatingContainer: "CREATING_CONTAINER", ProvisioningContainer: "PROVISIONING_CONTAINER", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/InvalidRequestCause.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/InvalidRequestCause.ts index 3bb60f89b0f..3504cf7eaa3 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/InvalidRequestCause.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/InvalidRequestCause.ts @@ -13,16 +13,16 @@ export type InvalidRequestCause = * The submission request was routed to an incorrect language executor. */ | SeedTrace.InvalidRequestCause.UnexpectedLanguage; -export declare namespace InvalidRequestCause { - interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound { +export namespace InvalidRequestCause { + export interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound { type: "submissionIdNotFound"; } - interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported { + export interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported { type: "customTestCasesUnsupported"; } - interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError { + export interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError { type: "unexpectedLanguage"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/RunningSubmissionState.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/RunningSubmissionState.ts index 5d15c5180a9..38031ccd887 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/RunningSubmissionState.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/RunningSubmissionState.ts @@ -8,7 +8,6 @@ export type RunningSubmissionState = | "WRITING_SUBMISSION_TO_FILE" | "COMPILING_SUBMISSION" | "RUNNING_SUBMISSION"; - export const RunningSubmissionState = { QueueingSubmission: "QUEUEING_SUBMISSION", KillingHistoricalSubmissions: "KILLING_HISTORICAL_SUBMISSIONS", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionRequest.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionRequest.ts index e63f940c5b8..e4907b98e7c 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionRequest.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionRequest.ts @@ -11,24 +11,24 @@ export type SubmissionRequest = | SeedTrace.SubmissionRequest.WorkspaceSubmit | SeedTrace.SubmissionRequest.Stop; -export declare namespace SubmissionRequest { - interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest { +export namespace SubmissionRequest { + export interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest { type: "initializeProblemRequest"; } - interface InitializeWorkspaceRequest { + export interface InitializeWorkspaceRequest { type: "initializeWorkspaceRequest"; } - interface SubmitV2 extends SeedTrace.SubmitRequestV2 { + export interface SubmitV2 extends SeedTrace.SubmitRequestV2 { type: "submitV2"; } - interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest { + export interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest { type: "workspaceSubmit"; } - interface Stop extends SeedTrace.StopRequest { + export interface Stop extends SeedTrace.StopRequest { type: "stop"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionResponse.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionResponse.ts index d2fb3f8172f..ca463a332a6 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionResponse.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionResponse.ts @@ -12,30 +12,30 @@ export type SubmissionResponse = | SeedTrace.SubmissionResponse.CodeExecutionUpdate | SeedTrace.SubmissionResponse.Terminated; -export declare namespace SubmissionResponse { - interface ServerInitialized { +export namespace SubmissionResponse { + export interface ServerInitialized { type: "serverInitialized"; } - interface ProblemInitialized { + export interface ProblemInitialized { type: "problemInitialized"; value: SeedTrace.ProblemId; } - interface WorkspaceInitialized { + export interface WorkspaceInitialized { type: "workspaceInitialized"; } - interface ServerErrored extends SeedTrace.ExceptionInfo { + export interface ServerErrored extends SeedTrace.ExceptionInfo { type: "serverErrored"; } - interface CodeExecutionUpdate { + export interface CodeExecutionUpdate { type: "codeExecutionUpdate"; value: SeedTrace.CodeExecutionUpdate; } - interface Terminated extends SeedTrace.TerminatedResponse { + export interface Terminated extends SeedTrace.TerminatedResponse { type: "terminated"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionStatusForTestCase.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionStatusForTestCase.ts index 8698643d86b..dd0d6039fee 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionStatusForTestCase.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionStatusForTestCase.ts @@ -9,17 +9,17 @@ export type SubmissionStatusForTestCase = | SeedTrace.SubmissionStatusForTestCase.GradedV2 | SeedTrace.SubmissionStatusForTestCase.Traced; -export declare namespace SubmissionStatusForTestCase { - interface Graded extends SeedTrace.TestCaseResultWithStdout { +export namespace SubmissionStatusForTestCase { + export interface Graded extends SeedTrace.TestCaseResultWithStdout { type: "graded"; } - interface GradedV2 { + export interface GradedV2 { type: "gradedV2"; value: SeedTrace.TestCaseGrade; } - interface Traced extends SeedTrace.TracedTestCase { + export interface Traced extends SeedTrace.TracedTestCase { type: "traced"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionStatusV2.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionStatusV2.ts index 652c732c408..95710f67978 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionStatusV2.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionStatusV2.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type SubmissionStatusV2 = SeedTrace.SubmissionStatusV2.Test | SeedTrace.SubmissionStatusV2.Workspace; -export declare namespace SubmissionStatusV2 { - interface Test extends SeedTrace.TestSubmissionStatusV2 { +export namespace SubmissionStatusV2 { + export interface Test extends SeedTrace.TestSubmissionStatusV2 { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2 { + export interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2 { type: "workspace"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeEnum.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeEnum.ts index bff5583dad7..8414392abfc 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeEnum.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeEnum.ts @@ -6,7 +6,6 @@ * Keep in sync with SubmissionType. */ export type SubmissionTypeEnum = "TEST"; - export const SubmissionTypeEnum = { Test: "TEST", } as const; diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeState.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeState.ts index fa4855ce698..c811ee050db 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeState.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeState.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type SubmissionTypeState = SeedTrace.SubmissionTypeState.Test | SeedTrace.SubmissionTypeState.Workspace; -export declare namespace SubmissionTypeState { - interface Test extends SeedTrace.TestSubmissionState { +export namespace SubmissionTypeState { + export interface Test extends SeedTrace.TestSubmissionState { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionState { + export interface Workspace extends SeedTrace.WorkspaceSubmissionState { type: "workspace"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestCaseGrade.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestCaseGrade.ts index 2f02296e05a..901cf5fc6ec 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestCaseGrade.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestCaseGrade.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type TestCaseGrade = SeedTrace.TestCaseGrade.Hidden | SeedTrace.TestCaseGrade.NonHidden; -export declare namespace TestCaseGrade { - interface Hidden extends SeedTrace.TestCaseHiddenGrade { +export namespace TestCaseGrade { + export interface Hidden extends SeedTrace.TestCaseHiddenGrade { type: "hidden"; } - interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade { + export interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade { type: "nonHidden"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestSubmissionStatus.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestSubmissionStatus.ts index da3e7c63984..04dc0c011e9 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestSubmissionStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestSubmissionStatus.ts @@ -10,22 +10,22 @@ export type TestSubmissionStatus = | SeedTrace.TestSubmissionStatus.Running | SeedTrace.TestSubmissionStatus.TestCaseIdToState; -export declare namespace TestSubmissionStatus { - interface Stopped { +export namespace TestSubmissionStatus { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface TestCaseIdToState { + export interface TestCaseIdToState { type: "testCaseIdToState"; value: Record; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts index 69a146a5067..f04f0e0479c 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts @@ -12,30 +12,30 @@ export type TestSubmissionUpdateInfo = | SeedTrace.TestSubmissionUpdateInfo.RecordedTestCase | SeedTrace.TestSubmissionUpdateInfo.Finished; -export declare namespace TestSubmissionUpdateInfo { - interface Running { +export namespace TestSubmissionUpdateInfo { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Stopped { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate { + export interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate { type: "gradedTestCase"; } - interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate { + export interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate { type: "recordedTestCase"; } - interface Finished { + export interface Finished { type: "finished"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts index 5151126e193..cad2d60cdae 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts @@ -11,26 +11,26 @@ export type WorkspaceSubmissionStatus = | SeedTrace.WorkspaceSubmissionStatus.Ran | SeedTrace.WorkspaceSubmissionStatus.Traced; -export declare namespace WorkspaceSubmissionStatus { - interface Stopped { +export namespace WorkspaceSubmissionStatus { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails { + export interface Ran extends SeedTrace.WorkspaceRunDetails { type: "ran"; } - interface Traced extends SeedTrace.WorkspaceRunDetails { + export interface Traced extends SeedTrace.WorkspaceRunDetails { type: "traced"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts index 78c1249225c..a8b008b38fb 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts @@ -13,34 +13,34 @@ export type WorkspaceSubmissionUpdateInfo = | SeedTrace.WorkspaceSubmissionUpdateInfo.Errored | SeedTrace.WorkspaceSubmissionUpdateInfo.Finished; -export declare namespace WorkspaceSubmissionUpdateInfo { - interface Running { +export namespace WorkspaceSubmissionUpdateInfo { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails { + export interface Ran extends SeedTrace.WorkspaceRunDetails { type: "ran"; } - interface Stopped { + export interface Stopped { type: "stopped"; } - interface Traced { + export interface Traced { type: "traced"; } - interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate { + export interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate { type: "tracedV2"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Finished { + export interface Finished { type: "finished"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/sysprop/client/getNumWarmInstances.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/sysprop/client/getNumWarmInstances.ts index d26a51dc1b9..ea8c71b3a80 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/sysprop/client/getNumWarmInstances.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/sysprop/client/getNumWarmInstances.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.sysprop.getNumWarmInstances.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/sysprop/client/setNumWarmInstances.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/sysprop/client/setNumWarmInstances.ts index 3dff5db21ce..183145b62d1 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/sysprop/client/setNumWarmInstances.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/sysprop/client/setNumWarmInstances.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.sysprop.setNumWarmInstances.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/Client.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/Client.ts index 525147c83e1..5d9a4606e81 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/Client.ts @@ -31,8 +31,19 @@ export declare namespace V2 { } export class V2 { + protected _problem: Problem | undefined; + protected _v3: V3 | undefined; + constructor(protected readonly _options: V2.Options = {}) {} + public get problem(): Problem { + return (this._problem ??= new Problem(this._options)); + } + + public get v3(): V3 { + return (this._v3 ??= new V3(this._options)); + } + /** * @param {V2.RequestOptions} requestOptions - Request-specific configuration. * @@ -76,18 +87,6 @@ export class V2 { }; } - protected _problem: Problem | undefined; - - public get problem(): Problem { - return (this._problem ??= new Problem(this._options)); - } - - protected _v3: V3 | undefined; - - public get v3(): V3 { - return (this._v3 ??= new V3(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/test.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/test.ts index 8c03d2c72ae..6668706ac9b 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/test.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/test.ts @@ -7,8 +7,8 @@ import * as core from "../../../../core"; export type Error = SeedTrace.v2.test.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getLatestProblem.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getLatestProblem.ts index a8ee64d9fcf..05cb79e9bfc 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getLatestProblem.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getLatestProblem.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = SeedTrace.v2.problem.getLatestProblem.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getLightweightProblems.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getLightweightProblems.ts index ce449821953..baf227cce5d 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getLightweightProblems.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getLightweightProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = SeedTrace.v2.problem.getLightweightProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getProblemVersion.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getProblemVersion.ts index 02a6825545b..77d38f1efef 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getProblemVersion.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getProblemVersion.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = SeedTrace.v2.problem.getProblemVersion.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getProblems.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getProblems.ts index 8a81e9dfde0..dd7032ef5ae 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getProblems.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/client/getProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../core"; export type Error = SeedTrace.v2.problem.getProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts index 85c6b996461..d2be6b87b97 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts @@ -8,12 +8,12 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.AssertCorrectnessCheck.DeepEquality | SeedTrace.v2.AssertCorrectnessCheck.Custom; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/CustomFiles.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/CustomFiles.ts index b430b089eaf..06ccba9d49d 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/CustomFiles.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/CustomFiles.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../index"; export type CustomFiles = SeedTrace.v2.CustomFiles.Basic | SeedTrace.v2.CustomFiles.Custom; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.BasicCustomFiles { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.BasicCustomFiles { type: "basic"; } - interface Custom { + export interface Custom { type: "custom"; value: Record; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/FunctionSignature.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/FunctionSignature.ts index 251760cd97e..f4adeea0b90 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/FunctionSignature.ts @@ -11,16 +11,16 @@ export type FunctionSignature = * Useful when specifying custom grading for a testcase where actualResult is defined. */ | SeedTrace.v2.FunctionSignature.VoidThatTakesActualResult; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.VoidFunctionSignature { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.VoidFunctionSignature { type: "void"; } - interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature { + export interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult { + export interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult { type: "voidThatTakesActualResult"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts index c70bdafe6bb..cc8ea6e85c2 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../index"; export type TestCaseFunction = SeedTrace.v2.TestCaseFunction.WithActualResult | SeedTrace.v2.TestCaseFunction.Custom; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinition { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinition { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index af60df46b61..3a83452376c 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.TestCaseImplementationDescriptionBoard.Html | SeedTrace.v2.TestCaseImplementationDescriptionBoard.ParamId; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface ParamId { + export interface ParamId { type: "paramId"; value: SeedTrace.v2.ParameterId; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts index 045115835ab..66182e14e9f 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationReference = | SeedTrace.v2.TestCaseImplementationReference.TemplateId | SeedTrace.v2.TestCaseImplementationReference.Implementation; -export declare namespace TestCaseImplementationReference { - interface TemplateId { +export namespace TestCaseImplementationReference { + export interface TemplateId { type: "templateId"; value: SeedTrace.v2.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.TestCaseImplementation { + export interface Implementation extends SeedTrace.v2.TestCaseImplementation { type: "implementation"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/client/Client.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/client/Client.ts index faa07d6c9d0..4aa14f494e7 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/client/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/client/Client.ts @@ -29,10 +29,10 @@ export declare namespace V3 { } export class V3 { - constructor(protected readonly _options: V3.Options = {}) {} - protected _problem: Problem | undefined; + constructor(protected readonly _options: V3.Options = {}) {} + public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getLatestProblem.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getLatestProblem.ts index 6719c8d9048..28d41b27542 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getLatestProblem.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getLatestProblem.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../../../core"; export type Error = SeedTrace.v2.v3.problem.getLatestProblem.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getLightweightProblems.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getLightweightProblems.ts index 9d1f82a724f..ec0246578a7 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getLightweightProblems.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getLightweightProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../../../core"; export type Error = SeedTrace.v2.v3.problem.getLightweightProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getProblemVersion.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getProblemVersion.ts index d8bce253f79..56f797f11e4 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getProblemVersion.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getProblemVersion.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../../../core"; export type Error = SeedTrace.v2.v3.problem.getProblemVersion.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getProblems.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getProblems.ts index 080b2c5b870..b7da8da198c 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getProblems.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/client/getProblems.ts @@ -7,8 +7,8 @@ import * as core from "../../../../../../../../core"; export type Error = SeedTrace.v2.v3.problem.getProblems.Error._Unknown; -export declare namespace Error { - interface _Unknown { +export namespace Error { + export interface _Unknown { errorName: void; content: core.Fetcher.Error; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts index 79d32643560..2c0e9b49c7c 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts @@ -8,12 +8,12 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.v3.AssertCorrectnessCheck.DeepEquality | SeedTrace.v2.v3.AssertCorrectnessCheck.Custom; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts index 4ac8078742b..c287f6286f3 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../../../index"; export type CustomFiles = SeedTrace.v2.v3.CustomFiles.Basic | SeedTrace.v2.v3.CustomFiles.Custom; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.v3.BasicCustomFiles { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.v3.BasicCustomFiles { type: "basic"; } - interface Custom { + export interface Custom { type: "custom"; value: Record; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts index 548b1d9092b..82243201aba 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts @@ -11,16 +11,16 @@ export type FunctionSignature = * Useful when specifying custom grading for a testcase where actualResult is defined. */ | SeedTrace.v2.v3.FunctionSignature.VoidThatTakesActualResult; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.v3.VoidFunctionSignature { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.v3.VoidFunctionSignature { type: "void"; } - interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature { + export interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult { + export interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult { type: "voidThatTakesActualResult"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts index 2381196a692..031ff15274d 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts @@ -8,12 +8,12 @@ export type TestCaseFunction = | SeedTrace.v2.v3.TestCaseFunction.WithActualResult | SeedTrace.v2.v3.TestCaseFunction.Custom; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index 8d670c214fc..157e99b52ac 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.Html | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.ParamId; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface ParamId { + export interface ParamId { type: "paramId"; value: SeedTrace.v2.v3.ParameterId; } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts index 0fad5ef9988..67af0e57047 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationReference = | SeedTrace.v2.v3.TestCaseImplementationReference.TemplateId | SeedTrace.v2.v3.TestCaseImplementationReference.Implementation; -export declare namespace TestCaseImplementationReference { - interface TemplateId { +export namespace TestCaseImplementationReference { + export interface TemplateId { type: "templateId"; value: SeedTrace.v2.v3.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation { + export interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation { type: "implementation"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/Client.ts b/seed/ts-sdk/trace/no-zurg-trace/src/Client.ts index 29bb5b0d035..845a9793bbd 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/Client.ts @@ -36,52 +36,45 @@ export declare namespace SeedTraceClient { } export class SeedTraceClient { - constructor(protected readonly _options: SeedTraceClient.Options = {}) {} - protected _v2: V2 | undefined; + protected _admin: Admin | undefined; + protected _homepage: Homepage | undefined; + protected _migration: Migration | undefined; + protected _playlist: Playlist | undefined; + protected _problem: Problem | undefined; + protected _submission: Submission | undefined; + protected _sysprop: Sysprop | undefined; + + constructor(protected readonly _options: SeedTraceClient.Options = {}) {} public get v2(): V2 { return (this._v2 ??= new V2(this._options)); } - protected _admin: Admin | undefined; - public get admin(): Admin { return (this._admin ??= new Admin(this._options)); } - protected _homepage: Homepage | undefined; - public get homepage(): Homepage { return (this._homepage ??= new Homepage(this._options)); } - protected _migration: Migration | undefined; - public get migration(): Migration { return (this._migration ??= new Migration(this._options)); } - protected _playlist: Playlist | undefined; - public get playlist(): Playlist { return (this._playlist ??= new Playlist(this._options)); } - protected _problem: Problem | undefined; - public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } - protected _submission: Submission | undefined; - public get submission(): Submission { return (this._submission ??= new Submission(this._options)); } - protected _sysprop: Sysprop | undefined; - public get sysprop(): Sysprop { return (this._sysprop ??= new Sysprop(this._options)); } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/admin/types/Test.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/admin/types/Test.ts index 70dd2b7fc56..ae63f5ef12d 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/admin/types/Test.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/admin/types/Test.ts @@ -6,13 +6,13 @@ import * as SeedTrace from "../../../index"; export type Test = SeedTrace.Test.And | SeedTrace.Test.Or; -export declare namespace Test { - interface And { +export namespace Test { + export interface And { type: "and"; value: boolean; } - interface Or { + export interface Or { type: "or"; value: boolean; } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/DebugVariableValue.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/DebugVariableValue.ts index 7c3eaed6311..ac7f88480fc 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/DebugVariableValue.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/DebugVariableValue.ts @@ -19,62 +19,62 @@ export type DebugVariableValue = | SeedTrace.DebugVariableValue.NullValue | SeedTrace.DebugVariableValue.GenericValue; -export declare namespace DebugVariableValue { - interface IntegerValue { +export namespace DebugVariableValue { + export interface IntegerValue { type: "integerValue"; value: number; } - interface BooleanValue { + export interface BooleanValue { type: "booleanValue"; value: boolean; } - interface DoubleValue { + export interface DoubleValue { type: "doubleValue"; value: number; } - interface StringValue { + export interface StringValue { type: "stringValue"; value: string; } - interface CharValue { + export interface CharValue { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.DebugMapValue { + export interface MapValue extends SeedTrace.DebugMapValue { type: "mapValue"; } - interface ListValue { + export interface ListValue { type: "listValue"; value: SeedTrace.DebugVariableValue[]; } - interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue { + export interface BinaryTreeNodeValue extends SeedTrace.BinaryTreeNodeAndTreeValue { type: "binaryTreeNodeValue"; } - interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue { + export interface SinglyLinkedListNodeValue extends SeedTrace.SinglyLinkedListNodeAndListValue { type: "singlyLinkedListNodeValue"; } - interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue { + export interface DoublyLinkedListNodeValue extends SeedTrace.DoublyLinkedListNodeAndListValue { type: "doublyLinkedListNodeValue"; } - interface UndefinedValue { + export interface UndefinedValue { type: "undefinedValue"; } - interface NullValue { + export interface NullValue { type: "nullValue"; } - interface GenericValue extends SeedTrace.GenericValue { + export interface GenericValue extends SeedTrace.GenericValue { type: "genericValue"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/Language.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/Language.ts index 0cc47c2d31f..7f1719a43ea 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/Language.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/Language.ts @@ -3,7 +3,6 @@ */ export type Language = "JAVA" | "JAVASCRIPT" | "PYTHON"; - export const Language = { Java: "JAVA", Javascript: "JAVASCRIPT", diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/VariableType.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/VariableType.ts index 3725c71223d..d38a364dfe5 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/VariableType.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/VariableType.ts @@ -16,44 +16,44 @@ export type VariableType = | SeedTrace.VariableType.SinglyLinkedListType | SeedTrace.VariableType.DoublyLinkedListType; -export declare namespace VariableType { - interface IntegerType { +export namespace VariableType { + export interface IntegerType { type: "integerType"; } - interface DoubleType { + export interface DoubleType { type: "doubleType"; } - interface BooleanType { + export interface BooleanType { type: "booleanType"; } - interface StringType { + export interface StringType { type: "stringType"; } - interface CharType { + export interface CharType { type: "charType"; } - interface ListType extends SeedTrace.ListType { + export interface ListType extends SeedTrace.ListType { type: "listType"; } - interface MapType extends SeedTrace.MapType { + export interface MapType extends SeedTrace.MapType { type: "mapType"; } - interface BinaryTreeType { + export interface BinaryTreeType { type: "binaryTreeType"; } - interface SinglyLinkedListType { + export interface SinglyLinkedListType { type: "singlyLinkedListType"; } - interface DoublyLinkedListType { + export interface DoublyLinkedListType { type: "doublyLinkedListType"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/VariableValue.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/VariableValue.ts index d73c90ca9d7..94240a2c2b4 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/VariableValue.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/VariableValue.ts @@ -17,54 +17,54 @@ export type VariableValue = | SeedTrace.VariableValue.DoublyLinkedListValue | SeedTrace.VariableValue.NullValue; -export declare namespace VariableValue { - interface IntegerValue { +export namespace VariableValue { + export interface IntegerValue { type: "integerValue"; value: number; } - interface BooleanValue { + export interface BooleanValue { type: "booleanValue"; value: boolean; } - interface DoubleValue { + export interface DoubleValue { type: "doubleValue"; value: number; } - interface StringValue { + export interface StringValue { type: "stringValue"; value: string; } - interface CharValue { + export interface CharValue { type: "charValue"; value: string; } - interface MapValue extends SeedTrace.MapValue { + export interface MapValue extends SeedTrace.MapValue { type: "mapValue"; } - interface ListValue { + export interface ListValue { type: "listValue"; value: SeedTrace.VariableValue[]; } - interface BinaryTreeValue extends SeedTrace.BinaryTreeValue { + export interface BinaryTreeValue extends SeedTrace.BinaryTreeValue { type: "binaryTreeValue"; } - interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue { + export interface SinglyLinkedListValue extends SeedTrace.SinglyLinkedListValue { type: "singlyLinkedListValue"; } - interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue { + export interface DoublyLinkedListValue extends SeedTrace.DoublyLinkedListValue { type: "doublyLinkedListValue"; } - interface NullValue { + export interface NullValue { type: "nullValue"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/migration/types/MigrationStatus.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/migration/types/MigrationStatus.ts index 0a6bc6f9b03..a38078ae2c0 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/migration/types/MigrationStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/migration/types/MigrationStatus.ts @@ -10,7 +10,6 @@ export type MigrationStatus = * The migration is failed */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts index 577034ea128..83901a81226 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/PlaylistIdNotFoundErrorBody.ts @@ -6,8 +6,8 @@ import * as SeedTrace from "../../../index"; export type PlaylistIdNotFoundErrorBody = SeedTrace.PlaylistIdNotFoundErrorBody.PlaylistId; -export declare namespace PlaylistIdNotFoundErrorBody { - interface PlaylistId { +export namespace PlaylistIdNotFoundErrorBody { + export interface PlaylistId { type: "playlistId"; value: SeedTrace.PlaylistId; } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/ReservedKeywordEnum.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/ReservedKeywordEnum.ts index 8ccd3d4c13e..a77a48fd64a 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/ReservedKeywordEnum.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/ReservedKeywordEnum.ts @@ -3,7 +3,6 @@ */ export type ReservedKeywordEnum = "is" | "as"; - export const ReservedKeywordEnum = { Is: "is", As: "as", diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/CreateProblemError.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/CreateProblemError.ts index e764e29d34c..c43c26296dc 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/CreateProblemError.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/CreateProblemError.ts @@ -6,8 +6,8 @@ import * as SeedTrace from "../../../index"; export type CreateProblemError = SeedTrace.CreateProblemError.Generic; -export declare namespace CreateProblemError { - interface Generic extends SeedTrace.GenericCreateProblemError { +export namespace CreateProblemError { + export interface Generic extends SeedTrace.GenericCreateProblemError { _type: "generic"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/CreateProblemResponse.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/CreateProblemResponse.ts index 80f89cfcb84..0e4095cac69 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/CreateProblemResponse.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/CreateProblemResponse.ts @@ -6,13 +6,13 @@ import * as SeedTrace from "../../../index"; export type CreateProblemResponse = SeedTrace.CreateProblemResponse.Success | SeedTrace.CreateProblemResponse.Error_; -export declare namespace CreateProblemResponse { - interface Success { +export namespace CreateProblemResponse { + export interface Success { type: "success"; value: SeedTrace.ProblemId; } - interface Error_ { + export interface Error_ { type: "error"; value: SeedTrace.CreateProblemError; } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/ProblemDescriptionBoard.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/ProblemDescriptionBoard.ts index ae5a369c3e7..efcc213fcbb 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/ProblemDescriptionBoard.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/problem/types/ProblemDescriptionBoard.ts @@ -9,18 +9,18 @@ export type ProblemDescriptionBoard = | SeedTrace.ProblemDescriptionBoard.Variable | SeedTrace.ProblemDescriptionBoard.TestCaseId; -export declare namespace ProblemDescriptionBoard { - interface Html { +export namespace ProblemDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface Variable { + export interface Variable { type: "variable"; value: SeedTrace.VariableValue; } - interface TestCaseId { + export interface TestCaseId { type: "testCaseId"; value: string; } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ActualResult.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ActualResult.ts index 6986afad702..b78eb0c13b9 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ActualResult.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ActualResult.ts @@ -9,17 +9,17 @@ export type ActualResult = | SeedTrace.ActualResult.Exception | SeedTrace.ActualResult.ExceptionV2; -export declare namespace ActualResult { - interface Value { +export namespace ActualResult { + export interface Value { type: "value"; value: SeedTrace.VariableValue; } - interface Exception extends SeedTrace.ExceptionInfo { + export interface Exception extends SeedTrace.ExceptionInfo { type: "exception"; } - interface ExceptionV2 { + export interface ExceptionV2 { type: "exceptionV2"; value: SeedTrace.ExceptionV2; } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/CodeExecutionUpdate.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/CodeExecutionUpdate.ts index 7e17d4aa354..9e41b5a9000 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/CodeExecutionUpdate.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/CodeExecutionUpdate.ts @@ -39,48 +39,48 @@ export type CodeExecutionUpdate = * Sent once a submission is graded and fully recorded. */ | SeedTrace.CodeExecutionUpdate.Finished; -export declare namespace CodeExecutionUpdate { - interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse { +export namespace CodeExecutionUpdate { + export interface BuildingExecutor extends SeedTrace.BuildingExecutorResponse { type: "buildingExecutor"; } - interface Running extends SeedTrace.RunningResponse { + export interface Running extends SeedTrace.RunningResponse { type: "running"; } - interface Errored extends SeedTrace.ErroredResponse { + export interface Errored extends SeedTrace.ErroredResponse { type: "errored"; } - interface Stopped extends SeedTrace.StoppedResponse { + export interface Stopped extends SeedTrace.StoppedResponse { type: "stopped"; } - interface Graded extends SeedTrace.GradedResponse { + export interface Graded extends SeedTrace.GradedResponse { type: "graded"; } - interface GradedV2 extends SeedTrace.GradedResponseV2 { + export interface GradedV2 extends SeedTrace.GradedResponseV2 { type: "gradedV2"; } - interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse { + export interface WorkspaceRan extends SeedTrace.WorkspaceRanResponse { type: "workspaceRan"; } - interface Recording extends SeedTrace.RecordingResponseNotification { + export interface Recording extends SeedTrace.RecordingResponseNotification { type: "recording"; } - interface Recorded extends SeedTrace.RecordedResponseNotification { + export interface Recorded extends SeedTrace.RecordedResponseNotification { type: "recorded"; } - interface InvalidRequest extends SeedTrace.InvalidRequestResponse { + export interface InvalidRequest extends SeedTrace.InvalidRequestResponse { type: "invalidRequest"; } - interface Finished extends SeedTrace.FinishedResponse { + export interface Finished extends SeedTrace.FinishedResponse { type: "finished"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ErrorInfo.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ErrorInfo.ts index ef3283fe81e..ddb886b4c9a 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ErrorInfo.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ErrorInfo.ts @@ -15,16 +15,16 @@ export type ErrorInfo = * */ | SeedTrace.ErrorInfo.InternalError; -export declare namespace ErrorInfo { - interface CompileError extends SeedTrace.CompileError { +export namespace ErrorInfo { + export interface CompileError extends SeedTrace.CompileError { type: "compileError"; } - interface RuntimeError extends SeedTrace.RuntimeError { + export interface RuntimeError extends SeedTrace.RuntimeError { type: "runtimeError"; } - interface InternalError extends SeedTrace.InternalError { + export interface InternalError extends SeedTrace.InternalError { type: "internalError"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExceptionV2.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExceptionV2.ts index 880817d708d..f43362137ad 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExceptionV2.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExceptionV2.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type ExceptionV2 = SeedTrace.ExceptionV2.Generic | SeedTrace.ExceptionV2.Timeout; -export declare namespace ExceptionV2 { - interface Generic extends SeedTrace.ExceptionInfo { +export namespace ExceptionV2 { + export interface Generic extends SeedTrace.ExceptionInfo { type: "generic"; } - interface Timeout { + export interface Timeout { type: "timeout"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExecutionSessionStatus.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExecutionSessionStatus.ts index a14d2035332..3709aaa7a69 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExecutionSessionStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExecutionSessionStatus.ts @@ -9,7 +9,6 @@ export type ExecutionSessionStatus = | "RUNNING_CONTAINER" | "LIVE_CONTAINER" | "FAILED_TO_LAUNCH"; - export const ExecutionSessionStatus = { CreatingContainer: "CREATING_CONTAINER", ProvisioningContainer: "PROVISIONING_CONTAINER", diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/InvalidRequestCause.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/InvalidRequestCause.ts index 3bb60f89b0f..3504cf7eaa3 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/InvalidRequestCause.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/InvalidRequestCause.ts @@ -13,16 +13,16 @@ export type InvalidRequestCause = * The submission request was routed to an incorrect language executor. */ | SeedTrace.InvalidRequestCause.UnexpectedLanguage; -export declare namespace InvalidRequestCause { - interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound { +export namespace InvalidRequestCause { + export interface SubmissionIdNotFound extends SeedTrace.SubmissionIdNotFound { type: "submissionIdNotFound"; } - interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported { + export interface CustomTestCasesUnsupported extends SeedTrace.CustomTestCasesUnsupported { type: "customTestCasesUnsupported"; } - interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError { + export interface UnexpectedLanguage extends SeedTrace.UnexpectedLanguageError { type: "unexpectedLanguage"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/RunningSubmissionState.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/RunningSubmissionState.ts index 5d15c5180a9..38031ccd887 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/RunningSubmissionState.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/RunningSubmissionState.ts @@ -8,7 +8,6 @@ export type RunningSubmissionState = | "WRITING_SUBMISSION_TO_FILE" | "COMPILING_SUBMISSION" | "RUNNING_SUBMISSION"; - export const RunningSubmissionState = { QueueingSubmission: "QUEUEING_SUBMISSION", KillingHistoricalSubmissions: "KILLING_HISTORICAL_SUBMISSIONS", diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionRequest.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionRequest.ts index e63f940c5b8..e4907b98e7c 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionRequest.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionRequest.ts @@ -11,24 +11,24 @@ export type SubmissionRequest = | SeedTrace.SubmissionRequest.WorkspaceSubmit | SeedTrace.SubmissionRequest.Stop; -export declare namespace SubmissionRequest { - interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest { +export namespace SubmissionRequest { + export interface InitializeProblemRequest extends SeedTrace.InitializeProblemRequest { type: "initializeProblemRequest"; } - interface InitializeWorkspaceRequest { + export interface InitializeWorkspaceRequest { type: "initializeWorkspaceRequest"; } - interface SubmitV2 extends SeedTrace.SubmitRequestV2 { + export interface SubmitV2 extends SeedTrace.SubmitRequestV2 { type: "submitV2"; } - interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest { + export interface WorkspaceSubmit extends SeedTrace.WorkspaceSubmitRequest { type: "workspaceSubmit"; } - interface Stop extends SeedTrace.StopRequest { + export interface Stop extends SeedTrace.StopRequest { type: "stop"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionResponse.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionResponse.ts index d2fb3f8172f..ca463a332a6 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionResponse.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionResponse.ts @@ -12,30 +12,30 @@ export type SubmissionResponse = | SeedTrace.SubmissionResponse.CodeExecutionUpdate | SeedTrace.SubmissionResponse.Terminated; -export declare namespace SubmissionResponse { - interface ServerInitialized { +export namespace SubmissionResponse { + export interface ServerInitialized { type: "serverInitialized"; } - interface ProblemInitialized { + export interface ProblemInitialized { type: "problemInitialized"; value: SeedTrace.ProblemId; } - interface WorkspaceInitialized { + export interface WorkspaceInitialized { type: "workspaceInitialized"; } - interface ServerErrored extends SeedTrace.ExceptionInfo { + export interface ServerErrored extends SeedTrace.ExceptionInfo { type: "serverErrored"; } - interface CodeExecutionUpdate { + export interface CodeExecutionUpdate { type: "codeExecutionUpdate"; value: SeedTrace.CodeExecutionUpdate; } - interface Terminated extends SeedTrace.TerminatedResponse { + export interface Terminated extends SeedTrace.TerminatedResponse { type: "terminated"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionStatusForTestCase.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionStatusForTestCase.ts index 8698643d86b..dd0d6039fee 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionStatusForTestCase.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionStatusForTestCase.ts @@ -9,17 +9,17 @@ export type SubmissionStatusForTestCase = | SeedTrace.SubmissionStatusForTestCase.GradedV2 | SeedTrace.SubmissionStatusForTestCase.Traced; -export declare namespace SubmissionStatusForTestCase { - interface Graded extends SeedTrace.TestCaseResultWithStdout { +export namespace SubmissionStatusForTestCase { + export interface Graded extends SeedTrace.TestCaseResultWithStdout { type: "graded"; } - interface GradedV2 { + export interface GradedV2 { type: "gradedV2"; value: SeedTrace.TestCaseGrade; } - interface Traced extends SeedTrace.TracedTestCase { + export interface Traced extends SeedTrace.TracedTestCase { type: "traced"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionStatusV2.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionStatusV2.ts index 652c732c408..95710f67978 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionStatusV2.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionStatusV2.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type SubmissionStatusV2 = SeedTrace.SubmissionStatusV2.Test | SeedTrace.SubmissionStatusV2.Workspace; -export declare namespace SubmissionStatusV2 { - interface Test extends SeedTrace.TestSubmissionStatusV2 { +export namespace SubmissionStatusV2 { + export interface Test extends SeedTrace.TestSubmissionStatusV2 { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2 { + export interface Workspace extends SeedTrace.WorkspaceSubmissionStatusV2 { type: "workspace"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeEnum.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeEnum.ts index bff5583dad7..8414392abfc 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeEnum.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeEnum.ts @@ -6,7 +6,6 @@ * Keep in sync with SubmissionType. */ export type SubmissionTypeEnum = "TEST"; - export const SubmissionTypeEnum = { Test: "TEST", } as const; diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeState.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeState.ts index fa4855ce698..c811ee050db 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeState.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeState.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type SubmissionTypeState = SeedTrace.SubmissionTypeState.Test | SeedTrace.SubmissionTypeState.Workspace; -export declare namespace SubmissionTypeState { - interface Test extends SeedTrace.TestSubmissionState { +export namespace SubmissionTypeState { + export interface Test extends SeedTrace.TestSubmissionState { type: "test"; } - interface Workspace extends SeedTrace.WorkspaceSubmissionState { + export interface Workspace extends SeedTrace.WorkspaceSubmissionState { type: "workspace"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestCaseGrade.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestCaseGrade.ts index 2f02296e05a..901cf5fc6ec 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestCaseGrade.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestCaseGrade.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../index"; export type TestCaseGrade = SeedTrace.TestCaseGrade.Hidden | SeedTrace.TestCaseGrade.NonHidden; -export declare namespace TestCaseGrade { - interface Hidden extends SeedTrace.TestCaseHiddenGrade { +export namespace TestCaseGrade { + export interface Hidden extends SeedTrace.TestCaseHiddenGrade { type: "hidden"; } - interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade { + export interface NonHidden extends SeedTrace.TestCaseNonHiddenGrade { type: "nonHidden"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestSubmissionStatus.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestSubmissionStatus.ts index da3e7c63984..04dc0c011e9 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestSubmissionStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestSubmissionStatus.ts @@ -10,22 +10,22 @@ export type TestSubmissionStatus = | SeedTrace.TestSubmissionStatus.Running | SeedTrace.TestSubmissionStatus.TestCaseIdToState; -export declare namespace TestSubmissionStatus { - interface Stopped { +export namespace TestSubmissionStatus { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface TestCaseIdToState { + export interface TestCaseIdToState { type: "testCaseIdToState"; value: Record; } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts index 69a146a5067..f04f0e0479c 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/TestSubmissionUpdateInfo.ts @@ -12,30 +12,30 @@ export type TestSubmissionUpdateInfo = | SeedTrace.TestSubmissionUpdateInfo.RecordedTestCase | SeedTrace.TestSubmissionUpdateInfo.Finished; -export declare namespace TestSubmissionUpdateInfo { - interface Running { +export namespace TestSubmissionUpdateInfo { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Stopped { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate { + export interface GradedTestCase extends SeedTrace.GradedTestCaseUpdate { type: "gradedTestCase"; } - interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate { + export interface RecordedTestCase extends SeedTrace.RecordedTestCaseUpdate { type: "recordedTestCase"; } - interface Finished { + export interface Finished { type: "finished"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts index 5151126e193..cad2d60cdae 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/WorkspaceSubmissionStatus.ts @@ -11,26 +11,26 @@ export type WorkspaceSubmissionStatus = | SeedTrace.WorkspaceSubmissionStatus.Ran | SeedTrace.WorkspaceSubmissionStatus.Traced; -export declare namespace WorkspaceSubmissionStatus { - interface Stopped { +export namespace WorkspaceSubmissionStatus { + export interface Stopped { type: "stopped"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Running { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails { + export interface Ran extends SeedTrace.WorkspaceRunDetails { type: "ran"; } - interface Traced extends SeedTrace.WorkspaceRunDetails { + export interface Traced extends SeedTrace.WorkspaceRunDetails { type: "traced"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts index 78c1249225c..a8b008b38fb 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/WorkspaceSubmissionUpdateInfo.ts @@ -13,34 +13,34 @@ export type WorkspaceSubmissionUpdateInfo = | SeedTrace.WorkspaceSubmissionUpdateInfo.Errored | SeedTrace.WorkspaceSubmissionUpdateInfo.Finished; -export declare namespace WorkspaceSubmissionUpdateInfo { - interface Running { +export namespace WorkspaceSubmissionUpdateInfo { + export interface Running { type: "running"; value: SeedTrace.RunningSubmissionState; } - interface Ran extends SeedTrace.WorkspaceRunDetails { + export interface Ran extends SeedTrace.WorkspaceRunDetails { type: "ran"; } - interface Stopped { + export interface Stopped { type: "stopped"; } - interface Traced { + export interface Traced { type: "traced"; } - interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate { + export interface TracedV2 extends SeedTrace.WorkspaceTracedUpdate { type: "tracedV2"; } - interface Errored { + export interface Errored { type: "errored"; value: SeedTrace.ErrorInfo; } - interface Finished { + export interface Finished { type: "finished"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/client/Client.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/client/Client.ts index ea7ff879e01..627705ac28b 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/client/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/client/Client.ts @@ -31,8 +31,19 @@ export declare namespace V2 { } export class V2 { + protected _problem: Problem | undefined; + protected _v3: V3 | undefined; + constructor(protected readonly _options: V2.Options = {}) {} + public get problem(): Problem { + return (this._problem ??= new Problem(this._options)); + } + + public get v3(): V3 { + return (this._v3 ??= new V3(this._options)); + } + /** * @param {V2.RequestOptions} requestOptions - Request-specific configuration. * @@ -89,18 +100,6 @@ export class V2 { } } - protected _problem: Problem | undefined; - - public get problem(): Problem { - return (this._problem ??= new Problem(this._options)); - } - - protected _v3: V3 | undefined; - - public get v3(): V3 { - return (this._v3 ??= new V3(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts index 85c6b996461..d2be6b87b97 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/AssertCorrectnessCheck.ts @@ -8,12 +8,12 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.AssertCorrectnessCheck.DeepEquality | SeedTrace.v2.AssertCorrectnessCheck.Custom; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.DeepEqualityCorrectnessCheck { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinitionThatTakesActualResult { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/CustomFiles.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/CustomFiles.ts index b430b089eaf..06ccba9d49d 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/CustomFiles.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/CustomFiles.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../index"; export type CustomFiles = SeedTrace.v2.CustomFiles.Basic | SeedTrace.v2.CustomFiles.Custom; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.BasicCustomFiles { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.BasicCustomFiles { type: "basic"; } - interface Custom { + export interface Custom { type: "custom"; value: Record; } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/FunctionSignature.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/FunctionSignature.ts index 251760cd97e..f4adeea0b90 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/FunctionSignature.ts @@ -11,16 +11,16 @@ export type FunctionSignature = * Useful when specifying custom grading for a testcase where actualResult is defined. */ | SeedTrace.v2.FunctionSignature.VoidThatTakesActualResult; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.VoidFunctionSignature { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.VoidFunctionSignature { type: "void"; } - interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature { + export interface NonVoid extends SeedTrace.v2.NonVoidFunctionSignature { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult { + export interface VoidThatTakesActualResult extends SeedTrace.v2.VoidFunctionSignatureThatTakesActualResult { type: "voidThatTakesActualResult"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts index c70bdafe6bb..cc8ea6e85c2 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseFunction.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../index"; export type TestCaseFunction = SeedTrace.v2.TestCaseFunction.WithActualResult | SeedTrace.v2.TestCaseFunction.Custom; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.TestCaseWithActualResultImplementation { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.VoidFunctionDefinition { + export interface Custom extends SeedTrace.v2.VoidFunctionDefinition { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index af60df46b61..3a83452376c 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.TestCaseImplementationDescriptionBoard.Html | SeedTrace.v2.TestCaseImplementationDescriptionBoard.ParamId; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface ParamId { + export interface ParamId { type: "paramId"; value: SeedTrace.v2.ParameterId; } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts index 045115835ab..66182e14e9f 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/problem/types/TestCaseImplementationReference.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationReference = | SeedTrace.v2.TestCaseImplementationReference.TemplateId | SeedTrace.v2.TestCaseImplementationReference.Implementation; -export declare namespace TestCaseImplementationReference { - interface TemplateId { +export namespace TestCaseImplementationReference { + export interface TemplateId { type: "templateId"; value: SeedTrace.v2.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.TestCaseImplementation { + export interface Implementation extends SeedTrace.v2.TestCaseImplementation { type: "implementation"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/client/Client.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/client/Client.ts index faa07d6c9d0..4aa14f494e7 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/client/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/client/Client.ts @@ -29,10 +29,10 @@ export declare namespace V3 { } export class V3 { - constructor(protected readonly _options: V3.Options = {}) {} - protected _problem: Problem | undefined; + constructor(protected readonly _options: V3.Options = {}) {} + public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts index 79d32643560..2c0e9b49c7c 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/AssertCorrectnessCheck.ts @@ -8,12 +8,12 @@ export type AssertCorrectnessCheck = | SeedTrace.v2.v3.AssertCorrectnessCheck.DeepEquality | SeedTrace.v2.v3.AssertCorrectnessCheck.Custom; -export declare namespace AssertCorrectnessCheck { - interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck { +export namespace AssertCorrectnessCheck { + export interface DeepEquality extends SeedTrace.v2.v3.DeepEqualityCorrectnessCheck { type: "deepEquality"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinitionThatTakesActualResult { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts index 4ac8078742b..c287f6286f3 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/CustomFiles.ts @@ -6,12 +6,12 @@ import * as SeedTrace from "../../../../../../../index"; export type CustomFiles = SeedTrace.v2.v3.CustomFiles.Basic | SeedTrace.v2.v3.CustomFiles.Custom; -export declare namespace CustomFiles { - interface Basic extends SeedTrace.v2.v3.BasicCustomFiles { +export namespace CustomFiles { + export interface Basic extends SeedTrace.v2.v3.BasicCustomFiles { type: "basic"; } - interface Custom { + export interface Custom { type: "custom"; value: Record; } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts index 548b1d9092b..82243201aba 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/FunctionSignature.ts @@ -11,16 +11,16 @@ export type FunctionSignature = * Useful when specifying custom grading for a testcase where actualResult is defined. */ | SeedTrace.v2.v3.FunctionSignature.VoidThatTakesActualResult; -export declare namespace FunctionSignature { - interface Void extends SeedTrace.v2.v3.VoidFunctionSignature { +export namespace FunctionSignature { + export interface Void extends SeedTrace.v2.v3.VoidFunctionSignature { type: "void"; } - interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature { + export interface NonVoid extends SeedTrace.v2.v3.NonVoidFunctionSignature { type: "nonVoid"; } - interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult { + export interface VoidThatTakesActualResult extends SeedTrace.v2.v3.VoidFunctionSignatureThatTakesActualResult { type: "voidThatTakesActualResult"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts index 2381196a692..031ff15274d 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseFunction.ts @@ -8,12 +8,12 @@ export type TestCaseFunction = | SeedTrace.v2.v3.TestCaseFunction.WithActualResult | SeedTrace.v2.v3.TestCaseFunction.Custom; -export declare namespace TestCaseFunction { - interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation { +export namespace TestCaseFunction { + export interface WithActualResult extends SeedTrace.v2.v3.TestCaseWithActualResultImplementation { type: "withActualResult"; } - interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition { + export interface Custom extends SeedTrace.v2.v3.VoidFunctionDefinition { type: "custom"; } } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts index 8d670c214fc..157e99b52ac 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationDescriptionBoard.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationDescriptionBoard = | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.Html | SeedTrace.v2.v3.TestCaseImplementationDescriptionBoard.ParamId; -export declare namespace TestCaseImplementationDescriptionBoard { - interface Html { +export namespace TestCaseImplementationDescriptionBoard { + export interface Html { type: "html"; value: string; } - interface ParamId { + export interface ParamId { type: "paramId"; value: SeedTrace.v2.v3.ParameterId; } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts index 0fad5ef9988..67af0e57047 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/resources/problem/types/TestCaseImplementationReference.ts @@ -8,13 +8,13 @@ export type TestCaseImplementationReference = | SeedTrace.v2.v3.TestCaseImplementationReference.TemplateId | SeedTrace.v2.v3.TestCaseImplementationReference.Implementation; -export declare namespace TestCaseImplementationReference { - interface TemplateId { +export namespace TestCaseImplementationReference { + export interface TemplateId { type: "templateId"; value: SeedTrace.v2.v3.TestCaseTemplateId; } - interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation { + export interface Implementation extends SeedTrace.v2.v3.TestCaseImplementation { type: "implementation"; } } diff --git a/seed/ts-sdk/ts-express-casing/src/Client.ts b/seed/ts-sdk/ts-express-casing/src/Client.ts index 16058002bad..f31d80e954d 100644 --- a/seed/ts-sdk/ts-express-casing/src/Client.ts +++ b/seed/ts-sdk/ts-express-casing/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedApiClient { } export class SeedApiClient { - constructor(protected readonly _options: SeedApiClient.Options) {} - protected _imdb: Imdb | undefined; + constructor(protected readonly _options: SeedApiClient.Options) {} + public get imdb(): Imdb { return (this._imdb ??= new Imdb(this._options)); } diff --git a/seed/ts-sdk/inline-types/.github/workflows/ci.yml b/seed/ts-sdk/ts-inline-types/inline/.github/workflows/ci.yml similarity index 100% rename from seed/ts-sdk/inline-types/.github/workflows/ci.yml rename to seed/ts-sdk/ts-inline-types/inline/.github/workflows/ci.yml diff --git a/seed/ts-sdk/inline-types/.gitignore b/seed/ts-sdk/ts-inline-types/inline/.gitignore similarity index 100% rename from seed/ts-sdk/inline-types/.gitignore rename to seed/ts-sdk/ts-inline-types/inline/.gitignore diff --git a/seed/ts-sdk/ts-inline-types/inline/.mock/definition/__package__.yml b/seed/ts-sdk/ts-inline-types/inline/.mock/definition/__package__.yml new file mode 100644 index 00000000000..af14bf356cd --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/.mock/definition/__package__.yml @@ -0,0 +1,365 @@ +service: + base-path: /root + auth: false + endpoints: + getRoot: + path: /root + method: POST + request: + body: + properties: + bar: RequestTypeInlineType1 + foo: string + content-type: application/json + name: PostRootRequest + response: RootType1 + getDiscriminatedUnion: + path: /discriminated-union + method: POST + request: + body: + properties: + bar: DiscriminatedUnion1 + foo: string + content-type: application/json + name: GetDiscriminatedUnionRequest + getUndiscriminatedUnion: + path: /undiscriminated-union + method: POST + request: + body: + properties: + bar: UndiscriminatedUnion1 + foo: string + content-type: application/json + name: GetUndiscriminatedUnionRequest + +types: + # this is also the type that would be produced by + AliasMapInline: map + AliasSetInline: set + AliasListInline: list + + AliasInlineValue: + inline: true + properties: + foo: string + bar: string + + RequestTypeInlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + + RootType1: + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: RootType1InlineType1 + docs: lorem ipsum + fooMap: + type: map + docs: lorem ipsum + fooList: + type: list + docs: lorem ipsum + fooSet: + type: set + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1FooMapValue: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1FooListItem: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1FooSetItem: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: RootType1InlineType1NestedInlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1InlineType1NestedInlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: string + docs: lorem ipsum + myEnum: + type: InlineEnum1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1: + inline: true + docs: lorem ipsum + union: + type1: + type: DiscriminatedUnion1InlineType1 + docs: lorem ipsum + type2: + type: DiscriminatedUnion1InlineType2 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: DiscriminatedUnion1InlineType1InlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1InlineType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1InlineType2: + inline: true + docs: lorem ipsum + properties: + baz: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1: + inline: true + docs: lorem ipsum + discriminated: false + union: + - type: UndiscriminatedUnion1InlineType1 + docs: lorem ipsum + - type: UndiscriminatedUnion1InlineType2 + docs: lorem ipsum + - type: UndiscriminatedUnion1DiscriminatedUnion1 + docs: lorem ipsum + - type: UndiscriminatedUnion1DiscriminatedUnion1 + docs: lorem ipsum + - type: UndiscriminatedUnion1InlineEnum1 + docs: lorem ipsum + - type: UserId + docs: lorem ipsum + - type: list + docs: lorem ipsum + - type: set + docs: lorem ipsum + - type: map + docs: lorem ipsum + - type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: UndiscriminatedUnion1InlineType1InlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineType2: + inline: true + docs: lorem ipsum + properties: + baz: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + InlineEnum1: + inline: true + docs: lorem ipsum + enum: + - SUNNY + - CLOUDY + - RAINING + - SNOWING + + UndiscriminatedUnion1DiscriminatedUnion1: + inline: true + docs: lorem ipsum + union: + type1: + type: UndiscriminatedUnion1DiscriminatedUnion1InlineType1 + docs: lorem ipsum + type2: + type: UndiscriminatedUnion1DiscriminatedUnion1InlineType2 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1DiscriminatedUnion1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1DiscriminatedUnion1InlineType2: + inline: true + docs: lorem ipsum + properties: + baz: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineEnum1: + inline: true + docs: lorem ipsum + enum: + - SUNNY + - CLOUDY + - RAINING + - SNOWING + + UserId: + type: string + docs: lorem ipsum + + UndiscriminatedUnion1InlineListItem1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineSetItem1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineMapItem1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + ReferenceType: + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum diff --git a/seed/csharp-model/inline-types/.mock/definition/api.yml b/seed/ts-sdk/ts-inline-types/inline/.mock/definition/api.yml similarity index 100% rename from seed/csharp-model/inline-types/.mock/definition/api.yml rename to seed/ts-sdk/ts-inline-types/inline/.mock/definition/api.yml diff --git a/seed/csharp-sdk/inline-types/.mock/fern.config.json b/seed/ts-sdk/ts-inline-types/inline/.mock/fern.config.json similarity index 100% rename from seed/csharp-sdk/inline-types/.mock/fern.config.json rename to seed/ts-sdk/ts-inline-types/inline/.mock/fern.config.json diff --git a/seed/fastapi/inline-types/.mock/generators.yml b/seed/ts-sdk/ts-inline-types/inline/.mock/generators.yml similarity index 100% rename from seed/fastapi/inline-types/.mock/generators.yml rename to seed/ts-sdk/ts-inline-types/inline/.mock/generators.yml diff --git a/seed/ts-sdk/inline-types/.npmignore b/seed/ts-sdk/ts-inline-types/inline/.npmignore similarity index 100% rename from seed/ts-sdk/inline-types/.npmignore rename to seed/ts-sdk/ts-inline-types/inline/.npmignore diff --git a/seed/ts-sdk/inline-types/.prettierrc.yml b/seed/ts-sdk/ts-inline-types/inline/.prettierrc.yml similarity index 100% rename from seed/ts-sdk/inline-types/.prettierrc.yml rename to seed/ts-sdk/ts-inline-types/inline/.prettierrc.yml diff --git a/seed/ts-sdk/ts-inline-types/inline/README.md b/seed/ts-sdk/ts-inline-types/inline/README.md new file mode 100644 index 00000000000..1c1803e3a0f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/README.md @@ -0,0 +1,156 @@ +# Seed TypeScript 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%2FTypeScript) +[![npm shield](https://img.shields.io/npm/v/@fern/ts-inline-types)](https://www.npmjs.com/package/@fern/ts-inline-types) + +The Seed TypeScript library provides convenient access to the Seed API from TypeScript. + +## Installation + +```sh +npm i -s @fern/ts-inline-types +``` + +## Reference + +A full reference for this library is available [here](./reference.md). + +## Usage + +Instantiate and use the client with the following: + +```typescript +import { SeedObjectClient } from "@fern/ts-inline-types"; + +const client = new SeedObjectClient({ environment: "YOUR_BASE_URL" }); +await client.getRoot({ + bar: { + foo: "foo", + }, + foo: "foo", +}); +``` + +## Request And Response Types + +The SDK exports all request and response types as TypeScript interfaces. Simply import them with the +following namespace: + +```typescript +import { SeedObject } from "@fern/ts-inline-types"; + +const request: SeedObject.PostRootRequest = { + ... +}; +``` + +## Exception Handling + +When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error +will be thrown. + +```typescript +import { SeedObjectError } from "@fern/ts-inline-types"; + +try { + await client.getRoot(...); +} catch (err) { + if (err instanceof SeedObjectError) { + console.log(err.statusCode); + console.log(err.message); + console.log(err.body); + } +} +``` + +## Advanced + +### Additional Headers + +If you would like to send additional headers as part of the request, use the `headers` request option. + +```typescript +const response = await client.getRoot(..., { + headers: { + 'X-Custom-Header': 'custom value' + } +}); +``` + +### Retries + +The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long +as the request is deemed retriable and the number of retry attempts has not grown larger than the configured +retry limit (default: 2). + +A request is deemed retriable when any of the following HTTP status codes is returned: + +- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) +- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) +- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) + +Use the `maxRetries` request option to configure this behavior. + +```typescript +const response = await client.getRoot(..., { + maxRetries: 0 // override maxRetries at the request level +}); +``` + +### Timeouts + +The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior. + +```typescript +const response = await client.getRoot(..., { + timeoutInSeconds: 30 // override timeout to 30s +}); +``` + +### Aborting Requests + +The SDK allows users to abort requests at any point by passing in an abort signal. + +```typescript +const controller = new AbortController(); +const response = await client.getRoot(..., { + abortSignal: controller.signal +}); +controller.abort(); // aborts the request +``` + +### Runtime Compatibility + +The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following +runtimes: + +- Node.js 18+ +- Vercel +- Cloudflare Workers +- Deno v1.25+ +- Bun 1.0+ +- React Native + +### Customizing Fetch Client + +The SDK provides a way for your to customize the underlying HTTP client / Fetch function. If you're running in an +unsupported environment, this provides a way for you to break glass and ensure the SDK works. + +```typescript +import { SeedObjectClient } from "@fern/ts-inline-types"; + +const client = new SeedObjectClient({ + ... + fetcher: // provide your implementation here +}); +``` + +## 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/ts-sdk/inline-types/jest.config.js b/seed/ts-sdk/ts-inline-types/inline/jest.config.js similarity index 100% rename from seed/ts-sdk/inline-types/jest.config.js rename to seed/ts-sdk/ts-inline-types/inline/jest.config.js diff --git a/seed/ts-sdk/ts-inline-types/inline/package.json b/seed/ts-sdk/ts-inline-types/inline/package.json new file mode 100644 index 00000000000..dc2a30803f2 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/package.json @@ -0,0 +1,42 @@ +{ + "name": "@fern/ts-inline-types", + "version": "0.0.1", + "private": false, + "repository": "https://github.com/ts-inline-types/fern", + "main": "./index.js", + "types": "./index.d.ts", + "scripts": { + "format": "prettier . --write --ignore-unknown", + "build": "tsc", + "prepack": "cp -rv dist/. .", + "test": "jest" + }, + "dependencies": { + "url-join": "4.0.1", + "form-data": "^4.0.0", + "formdata-node": "^6.0.3", + "node-fetch": "2.7.0", + "qs": "6.11.2", + "readable-stream": "^4.5.2" + }, + "devDependencies": { + "@types/url-join": "4.0.1", + "@types/qs": "6.9.8", + "@types/node-fetch": "2.6.9", + "@types/readable-stream": "^4.0.15", + "webpack": "^5.94.0", + "ts-loader": "^9.3.1", + "jest": "29.7.0", + "@types/jest": "29.5.5", + "ts-jest": "29.1.1", + "jest-environment-jsdom": "29.7.0", + "@types/node": "17.0.33", + "prettier": "2.7.1", + "typescript": "4.6.4" + }, + "browser": { + "fs": false, + "os": false, + "path": false + } +} diff --git a/seed/ts-sdk/ts-inline-types/inline/reference.md b/seed/ts-sdk/ts-inline-types/inline/reference.md new file mode 100644 index 00000000000..25a9fd05cf9 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/reference.md @@ -0,0 +1,65 @@ +# Reference + +

client.getUndiscriminatedUnion({ ...params }) -> void +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.getUndiscriminatedUnion({ + bar: { + foo: "foo", + bar: { + foo: "foo", + ref: { + foo: "foo", + }, + }, + ref: { + foo: "foo", + }, + }, + foo: "foo", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedObject.GetUndiscriminatedUnionRequest` + +
+
+ +
+
+ +**requestOptions:** `SeedObjectClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +## diff --git a/seed/ts-sdk/ts-inline-types/inline/resolved-snippet-templates.md b/seed/ts-sdk/ts-inline-types/inline/resolved-snippet-templates.md new file mode 100644 index 00000000000..fbcda93ce53 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/resolved-snippet-templates.md @@ -0,0 +1,51 @@ +```typescript +import { SeedObjectClient } from "@fern/ts-inline-types"; + +const client = new SeedObjectClient({ environment: "YOUR_BASE_URL" }); +await client.getRoot({ + bar: { + foo: "foo", + }, + foo: "foo", +}); + +``` + + +```typescript +import { SeedObjectClient } from "@fern/ts-inline-types"; + +const client = new SeedObjectClient({ environment: "YOUR_BASE_URL" }); +await client.getDiscriminatedUnion( + { + bar: bar: { + type : "type1", + foo: "foo", + bar: { + foo: "foo", + ref: { + foo: "foo" + } + }, + ref: { + foo: "foo" + } + }, + foo: "foo" + } +) + +``` + + +```typescript +import { SeedObjectClient } from "@fern/ts-inline-types"; + +const client = new SeedObjectClient({ environment: "YOUR_BASE_URL" }); +await client.getUndiscriminatedUnion({ + foo: "foo", +}); + +``` + + diff --git a/seed/ts-sdk/ts-inline-types/inline/snippet-templates.json b/seed/ts-sdk/ts-inline-types/inline/snippet-templates.json new file mode 100644 index 00000000000..cd56b6e54ef --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/snippet-templates.json @@ -0,0 +1,1496 @@ +[ + { + "sdk": { + "package": "@fern/ts-inline-types", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/root/root", + "method": "POST", + "identifierOverride": "endpoint_.getRoot" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "import { SeedObjectClient } from \"@fern/ts-inline-types\";" + ], + "templateString": "const client = new SeedObjectClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await client.getRoot(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "bar: {\n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/ts-inline-types", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/root/discriminated-union", + "method": "POST", + "identifierOverride": "endpoint_.getDiscriminatedUnion" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "import { SeedObjectClient } from \"@fern/ts-inline-types\";" + ], + "templateString": "const client = new SeedObjectClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await client.getDiscriminatedUnion(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "templateString": "bar: $FERN_INPUT", + "discriminantField": "type", + "members": { + "type1": { + "imports": [], + "templateString": "bar: { \n\t\t\ttype : \"type1\", \n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "bar: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type2": { + "imports": [], + "templateString": "bar: { \n\t\t\ttype : \"type2\", \n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "baz: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.baz", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "ref": { + "imports": [], + "templateString": "bar: { \n\t\t\ttype : \"ref\", \n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + } + }, + "templateInput": { + "location": "BODY", + "path": "bar", + "type": "payload" + }, + "type": "discriminatedUnion" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/ts-inline-types", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/root/undiscriminated-union", + "method": "POST", + "identifierOverride": "endpoint_.getUndiscriminatedUnion" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "import { SeedObjectClient } from \"@fern/ts-inline-types\";" + ], + "templateString": "const client = new SeedObjectClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await client.getUndiscriminatedUnion(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "templateString": "bar: $FERN_INPUT", + "members": [ + { + "template": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "bar: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": { + "value": "type_:UndiscriminatedUnion1InlineType1", + "type": "id" + } + }, + { + "template": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "baz: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "baz", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": { + "value": "type_:UndiscriminatedUnion1InlineType2", + "type": "id" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "discriminantField": "type", + "members": { + "type1": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"type1\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "bar: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type2": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"type2\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "baz: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "baz", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "ref": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"ref\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + } + }, + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "discriminatedUnion" + }, + "type": { + "value": "type_:UndiscriminatedUnion1DiscriminatedUnion1", + "type": "id" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "discriminantField": "type", + "members": { + "type1": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"type1\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "bar: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type2": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"type2\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "baz: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "baz", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "ref": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"ref\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + } + }, + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "discriminatedUnion" + }, + "type": { + "value": "type_:UndiscriminatedUnion1DiscriminatedUnion1", + "type": "id" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "values": { + "SUNNY": "\"SUNNY\"", + "CLOUDY": "\"CLOUDY\"", + "RAINING": "\"RAINING\"", + "SNOWING": "\"SNOWING\"" + }, + "templateString": "$FERN_INPUT", + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "enum" + }, + "type": { + "value": "type_:UndiscriminatedUnion1InlineEnum1", + "type": "id" + } + }, + { + "template": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "type": "payload" + } + ], + "type": "generic" + }, + "type": { + "value": "type_:UserId", + "type": "id" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "containerTemplateString": "[\n\t\t\t\t$FERN_INPUT\n\t\t\t]", + "delimiter": ",\n\t\t\t\t", + "innerTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "iterable" + }, + "type": { + "itemType": { + "value": "type_:UndiscriminatedUnion1InlineListItem1", + "type": "id" + }, + "type": "list" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "containerTemplateString": "new Set([\n\t\t\t\t$FERN_INPUT\n\t\t\t])", + "delimiter": ",\n\t\t\t\t", + "innerTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "iterable" + }, + "type": { + "itemType": { + "value": "type_:UndiscriminatedUnion1InlineSetItem1", + "type": "id" + }, + "type": "set" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "containerTemplateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "delimiter": ",\n\t\t\t\t", + "keyValueSeparator": ": ", + "keyTemplate": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "dict" + }, + "type": { + "keyType": { + "value": { + "type": "string" + }, + "type": "primitive" + }, + "valueType": { + "value": "type_:UndiscriminatedUnion1InlineMapItem1", + "type": "id" + }, + "type": "map" + } + }, + { + "template": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": { + "value": "type_:ReferenceType", + "type": "id" + } + } + ], + "templateInput": { + "location": "BODY", + "path": "bar", + "type": "payload" + }, + "type": "union_v2" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + } +] \ No newline at end of file diff --git a/seed/ts-sdk/ts-inline-types/inline/snippet.json b/seed/ts-sdk/ts-inline-types/inline/snippet.json new file mode 100644 index 00000000000..e312ef07c6f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/snippet.json @@ -0,0 +1,38 @@ +{ + "endpoints": [ + { + "id": { + "path": "/root/root", + "method": "POST", + "identifier_override": "endpoint_.getRoot" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedObjectClient } from \"@fern/ts-inline-types\";\n\nconst client = new SeedObjectClient({ environment: \"YOUR_BASE_URL\" });\nawait client.getRoot({\n bar: {\n foo: \"foo\"\n },\n foo: \"foo\"\n});\n" + } + }, + { + "id": { + "path": "/root/discriminated-union", + "method": "POST", + "identifier_override": "endpoint_.getDiscriminatedUnion" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedObjectClient } from \"@fern/ts-inline-types\";\n\nconst client = new SeedObjectClient({ environment: \"YOUR_BASE_URL\" });\nawait client.getDiscriminatedUnion({\n bar: {\n type: \"type1\",\n foo: \"foo\",\n bar: {\n foo: \"foo\",\n ref: {\n foo: \"foo\"\n }\n },\n ref: {\n foo: \"foo\"\n }\n },\n foo: \"foo\"\n});\n" + } + }, + { + "id": { + "path": "/root/undiscriminated-union", + "method": "POST", + "identifier_override": "endpoint_.getUndiscriminatedUnion" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedObjectClient } from \"@fern/ts-inline-types\";\n\nconst client = new SeedObjectClient({ environment: \"YOUR_BASE_URL\" });\nawait client.getUndiscriminatedUnion({\n bar: {\n foo: \"foo\",\n bar: {\n foo: \"foo\",\n ref: {\n foo: \"foo\"\n }\n },\n ref: {\n foo: \"foo\"\n }\n },\n foo: \"foo\"\n});\n" + } + } + ], + "types": {} +} \ No newline at end of file diff --git a/seed/ts-sdk/ts-inline-types/inline/src/Client.ts b/seed/ts-sdk/ts-inline-types/inline/src/Client.ts new file mode 100644 index 00000000000..d0e9dbcc717 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/Client.ts @@ -0,0 +1,235 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as core from "./core"; +import * as SeedObject from "./api/index"; +import urlJoin from "url-join"; +import * as errors from "./errors/index"; + +export declare namespace SeedObjectClient { + interface Options { + environment: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class SeedObjectClient { + constructor(protected readonly _options: SeedObjectClient.Options) {} + + /** + * @param {SeedObject.PostRootRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getRoot({ + * bar: { + * foo: "foo" + * }, + * foo: "foo" + * }) + */ + public async getRoot( + request: SeedObject.PostRootRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/root"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/ts-inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/ts-inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as SeedObject.RootType1; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError("Timeout exceeded when calling POST /root/root."); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {SeedObject.GetDiscriminatedUnionRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getDiscriminatedUnion({ + * bar: { + * type: "type1", + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * }) + */ + public async getDiscriminatedUnion( + request: SeedObject.GetDiscriminatedUnionRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/discriminated-union"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/ts-inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/ts-inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError( + "Timeout exceeded when calling POST /root/discriminated-union." + ); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {SeedObject.GetUndiscriminatedUnionRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getUndiscriminatedUnion({ + * bar: { + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * }) + */ + public async getUndiscriminatedUnion( + request: SeedObject.GetUndiscriminatedUnionRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/undiscriminated-union"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/ts-inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/ts-inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError( + "Timeout exceeded when calling POST /root/undiscriminated-union." + ); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } +} diff --git a/seed/ts-express/inline-types/api/service/index.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/client/index.ts similarity index 100% rename from seed/ts-express/inline-types/api/service/index.ts rename to seed/ts-sdk/ts-inline-types/inline/src/api/client/index.ts diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/GetDiscriminatedUnionRequest.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/GetDiscriminatedUnionRequest.ts new file mode 100644 index 00000000000..a5ec42dca0f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/GetDiscriminatedUnionRequest.ts @@ -0,0 +1,81 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../../index"; + +/** + * @example + * { + * bar: { + * type: "type1", + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * } + */ +export interface GetDiscriminatedUnionRequest { + bar: GetDiscriminatedUnionRequest.Bar; + foo: string; +} + +export namespace GetDiscriminatedUnionRequest { + /** + * lorem ipsum + */ + export type Bar = + /** + * lorem ipsum */ + | Bar.Type1 + /** + * lorem ipsum */ + | Bar.Type2 + /** + * lorem ipsum */ + | Bar.Ref; + + export namespace Bar { + export interface Type1 { + type: "type1"; + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + bar: DiscriminatedUnion1InlineType1.Bar; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; + } + + export namespace DiscriminatedUnion1InlineType1 { + /** + * lorem ipsum + */ + export interface Bar { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; + } + } + + export interface Type2 { + type: "type2"; + /** lorem ipsum */ + baz: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; + } + + export interface Ref extends SeedObject.ReferenceType { + type: "ref"; + } + } +} diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/GetUndiscriminatedUnionRequest.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/GetUndiscriminatedUnionRequest.ts new file mode 100644 index 00000000000..dda9e5023fe --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/GetUndiscriminatedUnionRequest.ts @@ -0,0 +1,115 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../../index"; + +/** + * @example + * { + * bar: { + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * } + */ +export interface GetUndiscriminatedUnionRequest { + bar: GetUndiscriminatedUnionRequest.Bar; + foo: string; +} + +export namespace GetUndiscriminatedUnionRequest { + /** + * lorem ipsum + */ + export type Bar = + /** + * lorem ipsum */ + | { + foo: string; + bar: { + foo: string; + ref: SeedObject.ReferenceType; + }; + ref: SeedObject.ReferenceType; + } + /** + * lorem ipsum */ + | { + baz: string; + ref: SeedObject.ReferenceType; + } + /** + * lorem ipsum */ + | ( + | { + foo: string; + bar: { + foo: string; + ref: SeedObject.ReferenceType; + }; + ref: SeedObject.ReferenceType; + } + | { + baz: string; + ref: SeedObject.ReferenceType; + } + | SeedObject.ReferenceType + ) + /** + * lorem ipsum */ + | ( + | { + foo: string; + bar: { + foo: string; + ref: SeedObject.ReferenceType; + }; + ref: SeedObject.ReferenceType; + } + | { + baz: string; + ref: SeedObject.ReferenceType; + } + | SeedObject.ReferenceType + ) + /** + * lorem ipsum */ + | ("SUNNY" | "CLOUDY" | "RAINING" | "SNOWING") + /** + * lorem ipsum */ + | SeedObject.UserId + /** + * lorem ipsum */ + | { + foo: string; + ref: SeedObject.ReferenceType; + }[] + /** + * lorem ipsum */ + | { + foo: string; + ref: SeedObject.ReferenceType; + }[] + /** + * lorem ipsum */ + | Record< + string, + { + foo: string; + ref: SeedObject.ReferenceType; + } + > + /** + * lorem ipsum */ + | SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/PostRootRequest.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/PostRootRequest.ts new file mode 100644 index 00000000000..beab02b7863 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/PostRootRequest.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * bar: { + * foo: "foo" + * }, + * foo: "foo" + * } + */ +export interface PostRootRequest { + bar: PostRootRequest.Bar; + foo: string; +} + +export namespace PostRootRequest { + /** + * lorem ipsum + */ + export interface Bar { + /** lorem ipsum */ + foo: string; + } +} diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/index.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/index.ts new file mode 100644 index 00000000000..20fc5cd64ec --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/client/requests/index.ts @@ -0,0 +1,3 @@ +export { type PostRootRequest } from "./PostRootRequest"; +export { type GetDiscriminatedUnionRequest } from "./GetDiscriminatedUnionRequest"; +export { type GetUndiscriminatedUnionRequest } from "./GetUndiscriminatedUnionRequest"; diff --git a/seed/ts-sdk/inline-types/src/api/index.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/index.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/api/index.ts rename to seed/ts-sdk/ts-inline-types/inline/src/api/index.ts diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/types/AliasListInline.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/types/AliasListInline.ts new file mode 100644 index 00000000000..a74cec8eb2f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/types/AliasListInline.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type AliasListInline = AliasListInline.Item[]; + +export namespace AliasListInline { + export interface Item { + foo: string; + bar: string; + } +} diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/types/AliasMapInline.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/types/AliasMapInline.ts new file mode 100644 index 00000000000..8bde68a6297 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/types/AliasMapInline.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type AliasMapInline = Record; + +export namespace AliasMapInline { + export interface Value { + foo: string; + bar: string; + } +} diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/types/AliasSetInline.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/types/AliasSetInline.ts new file mode 100644 index 00000000000..5c07872142b --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/types/AliasSetInline.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type AliasSetInline = AliasSetInline.Item[]; + +export namespace AliasSetInline { + export interface Item { + foo: string; + bar: string; + } +} diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/types/ReferenceType.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/types/ReferenceType.ts new file mode 100644 index 00000000000..3754bc9c7e2 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/types/ReferenceType.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * lorem ipsum + */ +export interface ReferenceType { + /** lorem ipsum */ + foo: string; +} diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/types/RootType1.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/types/RootType1.ts new file mode 100644 index 00000000000..139e5f42231 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/types/RootType1.ts @@ -0,0 +1,106 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface RootType1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + bar: RootType1.Bar; + /** lorem ipsum */ + fooMap: Record; + /** lorem ipsum */ + fooList: RootType1.FooList.Item[]; + /** lorem ipsum */ + fooSet: RootType1.FooSet.Item[]; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} + +export namespace RootType1 { + /** + * lorem ipsum + */ + export interface Bar { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + bar: Bar.Bar; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; + } + + export namespace Bar { + /** + * lorem ipsum + */ + export interface Bar { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + bar: string; + /** lorem ipsum */ + myEnum: Bar.MyEnum; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; + } + + export namespace Bar { + /** + * lorem ipsum + */ + export type MyEnum = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; + export const MyEnum = { + Sunny: "SUNNY", + Cloudy: "CLOUDY", + Raining: "RAINING", + Snowing: "SNOWING", + } as const; + } + } + + export namespace FooMap { + /** + * lorem ipsum + */ + export interface Value { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; + } + } + + export type FooList = FooList.Item[]; + + export namespace FooList { + /** + * lorem ipsum + */ + export interface Item { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; + } + } + + export type FooSet = FooSet.Item[]; + + export namespace FooSet { + /** + * lorem ipsum + */ + export interface Item { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; + } + } +} diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/types/UserId.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/types/UserId.ts new file mode 100644 index 00000000000..5a6e3e5152f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/types/UserId.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * lorem ipsum + */ +export type UserId = string; diff --git a/seed/ts-sdk/ts-inline-types/inline/src/api/types/index.ts b/seed/ts-sdk/ts-inline-types/inline/src/api/types/index.ts new file mode 100644 index 00000000000..a96d5677b58 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/api/types/index.ts @@ -0,0 +1,6 @@ +export * from "./AliasMapInline"; +export * from "./AliasSetInline"; +export * from "./AliasListInline"; +export * from "./RootType1"; +export * from "./UserId"; +export * from "./ReferenceType"; diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/APIResponse.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/APIResponse.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/APIResponse.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/APIResponse.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/Fetcher.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/Fetcher.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/Fetcher.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/Fetcher.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/Supplier.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/Supplier.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/Supplier.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/Supplier.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/createRequestUrl.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/createRequestUrl.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/createRequestUrl.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/createRequestUrl.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/getFetchFn.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/getFetchFn.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/getFetchFn.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/getFetchFn.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/getHeader.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/getHeader.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/getHeader.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/getHeader.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/getRequestBody.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/getRequestBody.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/getRequestBody.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/getRequestBody.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/getResponseBody.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/getResponseBody.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/getResponseBody.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/getResponseBody.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/index.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/index.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/index.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/index.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/makeRequest.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/makeRequest.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/makeRequest.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/makeRequest.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/requestWithRetries.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/requestWithRetries.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/requestWithRetries.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/requestWithRetries.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/signals.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/signals.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/signals.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/signals.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts diff --git a/seed/ts-sdk/inline-types/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts diff --git a/seed/ts-sdk/ts-inline-types/inline/src/core/index.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/index.ts new file mode 100644 index 00000000000..000107d9932 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/inline/src/core/index.ts @@ -0,0 +1,2 @@ +export * from "./fetcher"; +export * from "./runtime"; diff --git a/seed/ts-sdk/inline-types/src/core/runtime/index.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/runtime/index.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/runtime/index.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/runtime/index.ts diff --git a/seed/ts-sdk/inline-types/src/core/runtime/runtime.ts b/seed/ts-sdk/ts-inline-types/inline/src/core/runtime/runtime.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/core/runtime/runtime.ts rename to seed/ts-sdk/ts-inline-types/inline/src/core/runtime/runtime.ts diff --git a/seed/ts-sdk/inline-types/src/errors/SeedObjectError.ts b/seed/ts-sdk/ts-inline-types/inline/src/errors/SeedObjectError.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/errors/SeedObjectError.ts rename to seed/ts-sdk/ts-inline-types/inline/src/errors/SeedObjectError.ts diff --git a/seed/ts-sdk/inline-types/src/errors/SeedObjectTimeoutError.ts b/seed/ts-sdk/ts-inline-types/inline/src/errors/SeedObjectTimeoutError.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/errors/SeedObjectTimeoutError.ts rename to seed/ts-sdk/ts-inline-types/inline/src/errors/SeedObjectTimeoutError.ts diff --git a/seed/ts-sdk/inline-types/src/errors/index.ts b/seed/ts-sdk/ts-inline-types/inline/src/errors/index.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/errors/index.ts rename to seed/ts-sdk/ts-inline-types/inline/src/errors/index.ts diff --git a/seed/ts-sdk/inline-types/src/index.ts b/seed/ts-sdk/ts-inline-types/inline/src/index.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/index.ts rename to seed/ts-sdk/ts-inline-types/inline/src/index.ts diff --git a/seed/ts-sdk/inline-types/src/version.ts b/seed/ts-sdk/ts-inline-types/inline/src/version.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/version.ts rename to seed/ts-sdk/ts-inline-types/inline/src/version.ts diff --git a/seed/ts-sdk/inline-types/tests/custom.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/custom.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/custom.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/custom.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/Fetcher.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/Fetcher.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/Fetcher.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/Fetcher.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/createRequestUrl.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/createRequestUrl.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/createRequestUrl.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/createRequestUrl.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/getFetchFn.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/getFetchFn.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/getFetchFn.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/getFetchFn.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/getRequestBody.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/getRequestBody.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/getRequestBody.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/getRequestBody.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/getResponseBody.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/getResponseBody.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/getResponseBody.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/getResponseBody.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/makeRequest.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/makeRequest.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/makeRequest.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/makeRequest.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/requestWithRetries.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/requestWithRetries.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/requestWithRetries.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/requestWithRetries.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/signals.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/signals.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/signals.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/signals.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/stream-wrappers/webpack.test.ts b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/stream-wrappers/webpack.test.ts similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/stream-wrappers/webpack.test.ts rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/stream-wrappers/webpack.test.ts diff --git a/seed/ts-sdk/inline-types/tests/unit/fetcher/test-file.txt b/seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/test-file.txt similarity index 100% rename from seed/ts-sdk/inline-types/tests/unit/fetcher/test-file.txt rename to seed/ts-sdk/ts-inline-types/inline/tests/unit/fetcher/test-file.txt diff --git a/seed/ts-sdk/inline-types/tsconfig.json b/seed/ts-sdk/ts-inline-types/inline/tsconfig.json similarity index 100% rename from seed/ts-sdk/inline-types/tsconfig.json rename to seed/ts-sdk/ts-inline-types/inline/tsconfig.json diff --git a/seed/ts-sdk/ts-inline-types/no-inline/.github/workflows/ci.yml b/seed/ts-sdk/ts-inline-types/no-inline/.github/workflows/ci.yml new file mode 100644 index 00000000000..b64a6cbbb4a --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +name: ci + +on: [push] + +jobs: + compile: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up node + uses: actions/setup-node@v3 + + - name: Compile + run: yarn && yarn build + + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up node + uses: actions/setup-node@v3 + + - name: Compile + run: yarn && yarn test + + publish: + needs: [ compile, test ] + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Set up node + uses: actions/setup-node@v3 + - name: Install dependencies + run: yarn install + - name: Build + run: yarn build + + - name: Publish to npm + run: | + npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} + if [[ ${GITHUB_REF} == *alpha* ]]; then + npm publish --access public --tag alpha + elif [[ ${GITHUB_REF} == *beta* ]]; then + npm publish --access public --tag beta + else + npm publish --access public + fi + env: + NPM_TOKEN: ${{ secrets. }} \ No newline at end of file diff --git a/seed/ts-sdk/ts-inline-types/no-inline/.gitignore b/seed/ts-sdk/ts-inline-types/no-inline/.gitignore new file mode 100644 index 00000000000..72271e049c0 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/.gitignore @@ -0,0 +1,3 @@ +node_modules +.DS_Store +/dist \ No newline at end of file diff --git a/seed/ts-sdk/ts-inline-types/no-inline/.mock/definition/__package__.yml b/seed/ts-sdk/ts-inline-types/no-inline/.mock/definition/__package__.yml new file mode 100644 index 00000000000..af14bf356cd --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/.mock/definition/__package__.yml @@ -0,0 +1,365 @@ +service: + base-path: /root + auth: false + endpoints: + getRoot: + path: /root + method: POST + request: + body: + properties: + bar: RequestTypeInlineType1 + foo: string + content-type: application/json + name: PostRootRequest + response: RootType1 + getDiscriminatedUnion: + path: /discriminated-union + method: POST + request: + body: + properties: + bar: DiscriminatedUnion1 + foo: string + content-type: application/json + name: GetDiscriminatedUnionRequest + getUndiscriminatedUnion: + path: /undiscriminated-union + method: POST + request: + body: + properties: + bar: UndiscriminatedUnion1 + foo: string + content-type: application/json + name: GetUndiscriminatedUnionRequest + +types: + # this is also the type that would be produced by + AliasMapInline: map + AliasSetInline: set + AliasListInline: list + + AliasInlineValue: + inline: true + properties: + foo: string + bar: string + + RequestTypeInlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + + RootType1: + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: RootType1InlineType1 + docs: lorem ipsum + fooMap: + type: map + docs: lorem ipsum + fooList: + type: list + docs: lorem ipsum + fooSet: + type: set + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1FooMapValue: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1FooListItem: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1FooSetItem: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: RootType1InlineType1NestedInlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1InlineType1NestedInlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: string + docs: lorem ipsum + myEnum: + type: InlineEnum1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1: + inline: true + docs: lorem ipsum + union: + type1: + type: DiscriminatedUnion1InlineType1 + docs: lorem ipsum + type2: + type: DiscriminatedUnion1InlineType2 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: DiscriminatedUnion1InlineType1InlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1InlineType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1InlineType2: + inline: true + docs: lorem ipsum + properties: + baz: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1: + inline: true + docs: lorem ipsum + discriminated: false + union: + - type: UndiscriminatedUnion1InlineType1 + docs: lorem ipsum + - type: UndiscriminatedUnion1InlineType2 + docs: lorem ipsum + - type: UndiscriminatedUnion1DiscriminatedUnion1 + docs: lorem ipsum + - type: UndiscriminatedUnion1DiscriminatedUnion1 + docs: lorem ipsum + - type: UndiscriminatedUnion1InlineEnum1 + docs: lorem ipsum + - type: UserId + docs: lorem ipsum + - type: list + docs: lorem ipsum + - type: set + docs: lorem ipsum + - type: map + docs: lorem ipsum + - type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: UndiscriminatedUnion1InlineType1InlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineType2: + inline: true + docs: lorem ipsum + properties: + baz: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + InlineEnum1: + inline: true + docs: lorem ipsum + enum: + - SUNNY + - CLOUDY + - RAINING + - SNOWING + + UndiscriminatedUnion1DiscriminatedUnion1: + inline: true + docs: lorem ipsum + union: + type1: + type: UndiscriminatedUnion1DiscriminatedUnion1InlineType1 + docs: lorem ipsum + type2: + type: UndiscriminatedUnion1DiscriminatedUnion1InlineType2 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1DiscriminatedUnion1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1DiscriminatedUnion1InlineType2: + inline: true + docs: lorem ipsum + properties: + baz: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineEnum1: + inline: true + docs: lorem ipsum + enum: + - SUNNY + - CLOUDY + - RAINING + - SNOWING + + UserId: + type: string + docs: lorem ipsum + + UndiscriminatedUnion1InlineListItem1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineSetItem1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineMapItem1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + ReferenceType: + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum diff --git a/seed/csharp-sdk/inline-types/.mock/definition/api.yml b/seed/ts-sdk/ts-inline-types/no-inline/.mock/definition/api.yml similarity index 100% rename from seed/csharp-sdk/inline-types/.mock/definition/api.yml rename to seed/ts-sdk/ts-inline-types/no-inline/.mock/definition/api.yml diff --git a/seed/fastapi/inline-types/.mock/fern.config.json b/seed/ts-sdk/ts-inline-types/no-inline/.mock/fern.config.json similarity index 100% rename from seed/fastapi/inline-types/.mock/fern.config.json rename to seed/ts-sdk/ts-inline-types/no-inline/.mock/fern.config.json diff --git a/seed/go-fiber/inline-types/.mock/generators.yml b/seed/ts-sdk/ts-inline-types/no-inline/.mock/generators.yml similarity index 100% rename from seed/go-fiber/inline-types/.mock/generators.yml rename to seed/ts-sdk/ts-inline-types/no-inline/.mock/generators.yml diff --git a/seed/ts-sdk/ts-inline-types/no-inline/.npmignore b/seed/ts-sdk/ts-inline-types/no-inline/.npmignore new file mode 100644 index 00000000000..6db0876c41c --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/.npmignore @@ -0,0 +1,9 @@ +node_modules +src +tests +.gitignore +.github +.fernignore +.prettierrc.yml +tsconfig.json +yarn.lock \ No newline at end of file diff --git a/seed/ts-sdk/ts-inline-types/no-inline/.prettierrc.yml b/seed/ts-sdk/ts-inline-types/no-inline/.prettierrc.yml new file mode 100644 index 00000000000..0c06786bf53 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/.prettierrc.yml @@ -0,0 +1,2 @@ +tabWidth: 4 +printWidth: 120 diff --git a/seed/ts-sdk/ts-inline-types/no-inline/README.md b/seed/ts-sdk/ts-inline-types/no-inline/README.md new file mode 100644 index 00000000000..1c1803e3a0f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/README.md @@ -0,0 +1,156 @@ +# Seed TypeScript 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%2FTypeScript) +[![npm shield](https://img.shields.io/npm/v/@fern/ts-inline-types)](https://www.npmjs.com/package/@fern/ts-inline-types) + +The Seed TypeScript library provides convenient access to the Seed API from TypeScript. + +## Installation + +```sh +npm i -s @fern/ts-inline-types +``` + +## Reference + +A full reference for this library is available [here](./reference.md). + +## Usage + +Instantiate and use the client with the following: + +```typescript +import { SeedObjectClient } from "@fern/ts-inline-types"; + +const client = new SeedObjectClient({ environment: "YOUR_BASE_URL" }); +await client.getRoot({ + bar: { + foo: "foo", + }, + foo: "foo", +}); +``` + +## Request And Response Types + +The SDK exports all request and response types as TypeScript interfaces. Simply import them with the +following namespace: + +```typescript +import { SeedObject } from "@fern/ts-inline-types"; + +const request: SeedObject.PostRootRequest = { + ... +}; +``` + +## Exception Handling + +When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error +will be thrown. + +```typescript +import { SeedObjectError } from "@fern/ts-inline-types"; + +try { + await client.getRoot(...); +} catch (err) { + if (err instanceof SeedObjectError) { + console.log(err.statusCode); + console.log(err.message); + console.log(err.body); + } +} +``` + +## Advanced + +### Additional Headers + +If you would like to send additional headers as part of the request, use the `headers` request option. + +```typescript +const response = await client.getRoot(..., { + headers: { + 'X-Custom-Header': 'custom value' + } +}); +``` + +### Retries + +The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long +as the request is deemed retriable and the number of retry attempts has not grown larger than the configured +retry limit (default: 2). + +A request is deemed retriable when any of the following HTTP status codes is returned: + +- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) +- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) +- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) + +Use the `maxRetries` request option to configure this behavior. + +```typescript +const response = await client.getRoot(..., { + maxRetries: 0 // override maxRetries at the request level +}); +``` + +### Timeouts + +The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior. + +```typescript +const response = await client.getRoot(..., { + timeoutInSeconds: 30 // override timeout to 30s +}); +``` + +### Aborting Requests + +The SDK allows users to abort requests at any point by passing in an abort signal. + +```typescript +const controller = new AbortController(); +const response = await client.getRoot(..., { + abortSignal: controller.signal +}); +controller.abort(); // aborts the request +``` + +### Runtime Compatibility + +The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following +runtimes: + +- Node.js 18+ +- Vercel +- Cloudflare Workers +- Deno v1.25+ +- Bun 1.0+ +- React Native + +### Customizing Fetch Client + +The SDK provides a way for your to customize the underlying HTTP client / Fetch function. If you're running in an +unsupported environment, this provides a way for you to break glass and ensure the SDK works. + +```typescript +import { SeedObjectClient } from "@fern/ts-inline-types"; + +const client = new SeedObjectClient({ + ... + fetcher: // provide your implementation here +}); +``` + +## 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/ts-sdk/ts-inline-types/no-inline/jest.config.js b/seed/ts-sdk/ts-inline-types/no-inline/jest.config.js new file mode 100644 index 00000000000..35d6e65bf93 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/jest.config.js @@ -0,0 +1,5 @@ +/** @type {import('jest').Config} */ +module.exports = { + preset: "ts-jest", + testEnvironment: "node", +}; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/package.json b/seed/ts-sdk/ts-inline-types/no-inline/package.json new file mode 100644 index 00000000000..dc2a30803f2 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/package.json @@ -0,0 +1,42 @@ +{ + "name": "@fern/ts-inline-types", + "version": "0.0.1", + "private": false, + "repository": "https://github.com/ts-inline-types/fern", + "main": "./index.js", + "types": "./index.d.ts", + "scripts": { + "format": "prettier . --write --ignore-unknown", + "build": "tsc", + "prepack": "cp -rv dist/. .", + "test": "jest" + }, + "dependencies": { + "url-join": "4.0.1", + "form-data": "^4.0.0", + "formdata-node": "^6.0.3", + "node-fetch": "2.7.0", + "qs": "6.11.2", + "readable-stream": "^4.5.2" + }, + "devDependencies": { + "@types/url-join": "4.0.1", + "@types/qs": "6.9.8", + "@types/node-fetch": "2.6.9", + "@types/readable-stream": "^4.0.15", + "webpack": "^5.94.0", + "ts-loader": "^9.3.1", + "jest": "29.7.0", + "@types/jest": "29.5.5", + "ts-jest": "29.1.1", + "jest-environment-jsdom": "29.7.0", + "@types/node": "17.0.33", + "prettier": "2.7.1", + "typescript": "4.6.4" + }, + "browser": { + "fs": false, + "os": false, + "path": false + } +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/reference.md b/seed/ts-sdk/ts-inline-types/no-inline/reference.md new file mode 100644 index 00000000000..25a9fd05cf9 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/reference.md @@ -0,0 +1,65 @@ +# Reference + +
client.getUndiscriminatedUnion({ ...params }) -> void +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.getUndiscriminatedUnion({ + bar: { + foo: "foo", + bar: { + foo: "foo", + ref: { + foo: "foo", + }, + }, + ref: { + foo: "foo", + }, + }, + foo: "foo", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedObject.GetUndiscriminatedUnionRequest` + +
+
+ +
+
+ +**requestOptions:** `SeedObjectClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +## diff --git a/seed/ts-sdk/ts-inline-types/no-inline/resolved-snippet-templates.md b/seed/ts-sdk/ts-inline-types/no-inline/resolved-snippet-templates.md new file mode 100644 index 00000000000..fbcda93ce53 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/resolved-snippet-templates.md @@ -0,0 +1,51 @@ +```typescript +import { SeedObjectClient } from "@fern/ts-inline-types"; + +const client = new SeedObjectClient({ environment: "YOUR_BASE_URL" }); +await client.getRoot({ + bar: { + foo: "foo", + }, + foo: "foo", +}); + +``` + + +```typescript +import { SeedObjectClient } from "@fern/ts-inline-types"; + +const client = new SeedObjectClient({ environment: "YOUR_BASE_URL" }); +await client.getDiscriminatedUnion( + { + bar: bar: { + type : "type1", + foo: "foo", + bar: { + foo: "foo", + ref: { + foo: "foo" + } + }, + ref: { + foo: "foo" + } + }, + foo: "foo" + } +) + +``` + + +```typescript +import { SeedObjectClient } from "@fern/ts-inline-types"; + +const client = new SeedObjectClient({ environment: "YOUR_BASE_URL" }); +await client.getUndiscriminatedUnion({ + foo: "foo", +}); + +``` + + diff --git a/seed/ts-sdk/ts-inline-types/no-inline/snippet-templates.json b/seed/ts-sdk/ts-inline-types/no-inline/snippet-templates.json new file mode 100644 index 00000000000..cd56b6e54ef --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/snippet-templates.json @@ -0,0 +1,1496 @@ +[ + { + "sdk": { + "package": "@fern/ts-inline-types", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/root/root", + "method": "POST", + "identifierOverride": "endpoint_.getRoot" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "import { SeedObjectClient } from \"@fern/ts-inline-types\";" + ], + "templateString": "const client = new SeedObjectClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await client.getRoot(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "bar: {\n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/ts-inline-types", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/root/discriminated-union", + "method": "POST", + "identifierOverride": "endpoint_.getDiscriminatedUnion" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "import { SeedObjectClient } from \"@fern/ts-inline-types\";" + ], + "templateString": "const client = new SeedObjectClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await client.getDiscriminatedUnion(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "templateString": "bar: $FERN_INPUT", + "discriminantField": "type", + "members": { + "type1": { + "imports": [], + "templateString": "bar: { \n\t\t\ttype : \"type1\", \n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "bar: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type2": { + "imports": [], + "templateString": "bar: { \n\t\t\ttype : \"type2\", \n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "baz: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.baz", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "ref": { + "imports": [], + "templateString": "bar: { \n\t\t\ttype : \"ref\", \n\t\t\t$FERN_INPUT\n\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + } + }, + "templateInput": { + "location": "BODY", + "path": "bar", + "type": "payload" + }, + "type": "discriminatedUnion" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + }, + { + "sdk": { + "package": "@fern/ts-inline-types", + "version": "0.0.1", + "type": "typescript" + }, + "endpointId": { + "path": "/root/undiscriminated-union", + "method": "POST", + "identifierOverride": "endpoint_.getUndiscriminatedUnion" + }, + "snippetTemplate": { + "clientInstantiation": { + "imports": [ + "import { SeedObjectClient } from \"@fern/ts-inline-types\";" + ], + "templateString": "const client = new SeedObjectClient($FERN_INPUT);", + "isOptional": false, + "inputDelimiter": ",", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{ $FERN_INPUT }", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "environment: \"YOUR_BASE_URL\"", + "isOptional": false, + "templateInputs": [], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "functionInvocation": { + "imports": [], + "templateString": "await client.getUndiscriminatedUnion(\n\t$FERN_INPUT\n)", + "isOptional": false, + "inputDelimiter": ",\n\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "{\n\t\t$FERN_INPUT\n\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "isOptional": true, + "templateString": "bar: $FERN_INPUT", + "members": [ + { + "template": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "bar: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": { + "value": "type_:UndiscriminatedUnion1InlineType1", + "type": "id" + } + }, + { + "template": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "baz: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "baz", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": { + "value": "type_:UndiscriminatedUnion1InlineType2", + "type": "id" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "discriminantField": "type", + "members": { + "type1": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"type1\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "bar: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type2": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"type2\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "baz: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "baz", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "ref": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"ref\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + } + }, + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "discriminatedUnion" + }, + "type": { + "value": "type_:UndiscriminatedUnion1DiscriminatedUnion1", + "type": "id" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "templateString": "$FERN_INPUT", + "discriminantField": "type", + "members": { + "type1": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"type1\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "bar: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "bar.ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type2": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"type2\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "baz: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "baz", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "ref": { + "imports": [], + "templateString": "{ \n\t\t\t\ttype : \"ref\", \n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "isOptional": true, + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + } + }, + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "discriminatedUnion" + }, + "type": { + "value": "type_:UndiscriminatedUnion1DiscriminatedUnion1", + "type": "id" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "values": { + "SUNNY": "\"SUNNY\"", + "CLOUDY": "\"CLOUDY\"", + "RAINING": "\"RAINING\"", + "SNOWING": "\"SNOWING\"" + }, + "templateString": "$FERN_INPUT", + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "enum" + }, + "type": { + "value": "type_:UndiscriminatedUnion1InlineEnum1", + "type": "id" + } + }, + { + "template": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "type": "payload" + } + ], + "type": "generic" + }, + "type": { + "value": "type_:UserId", + "type": "id" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "containerTemplateString": "[\n\t\t\t\t$FERN_INPUT\n\t\t\t]", + "delimiter": ",\n\t\t\t\t", + "innerTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "iterable" + }, + "type": { + "itemType": { + "value": "type_:UndiscriminatedUnion1InlineListItem1", + "type": "id" + }, + "type": "list" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "containerTemplateString": "new Set([\n\t\t\t\t$FERN_INPUT\n\t\t\t])", + "delimiter": ",\n\t\t\t\t", + "innerTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "iterable" + }, + "type": { + "itemType": { + "value": "type_:UndiscriminatedUnion1InlineSetItem1", + "type": "id" + }, + "type": "set" + } + }, + { + "template": { + "imports": [], + "isOptional": true, + "containerTemplateString": "{\n\t\t\t\t$FERN_INPUT\n\t\t\t}", + "delimiter": ",\n\t\t\t\t", + "keyValueSeparator": ": ", + "keyTemplate": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "type": "payload" + } + ], + "type": "generic" + }, + "valueTemplate": { + "imports": [], + "templateString": "{\n\t\t\t\t\t$FERN_INPUT\n\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "ref: {\n\t\t\t\t\t\t$FERN_INPUT\n\t\t\t\t\t}", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "ref.foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "templateInput": { + "location": "RELATIVE", + "type": "payload" + }, + "type": "dict" + }, + "type": { + "keyType": { + "value": { + "type": "string" + }, + "type": "primitive" + }, + "valueType": { + "value": "type_:UndiscriminatedUnion1InlineMapItem1", + "type": "id" + }, + "type": "map" + } + }, + { + "template": { + "imports": [], + "templateString": "$FERN_INPUT", + "isOptional": true, + "inputDelimiter": ",\n\t\t\t", + "templateInputs": [ + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "RELATIVE", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": { + "value": "type_:ReferenceType", + "type": "id" + } + } + ], + "templateInput": { + "location": "BODY", + "path": "bar", + "type": "payload" + }, + "type": "union_v2" + }, + "type": "template" + }, + { + "value": { + "imports": [], + "templateString": "foo: $FERN_INPUT", + "isOptional": true, + "templateInputs": [ + { + "location": "BODY", + "path": "foo", + "type": "payload" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "template" + } + ], + "type": "generic" + }, + "type": "v1" + } + } +] \ No newline at end of file diff --git a/seed/ts-sdk/ts-inline-types/no-inline/snippet.json b/seed/ts-sdk/ts-inline-types/no-inline/snippet.json new file mode 100644 index 00000000000..e312ef07c6f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/snippet.json @@ -0,0 +1,38 @@ +{ + "endpoints": [ + { + "id": { + "path": "/root/root", + "method": "POST", + "identifier_override": "endpoint_.getRoot" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedObjectClient } from \"@fern/ts-inline-types\";\n\nconst client = new SeedObjectClient({ environment: \"YOUR_BASE_URL\" });\nawait client.getRoot({\n bar: {\n foo: \"foo\"\n },\n foo: \"foo\"\n});\n" + } + }, + { + "id": { + "path": "/root/discriminated-union", + "method": "POST", + "identifier_override": "endpoint_.getDiscriminatedUnion" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedObjectClient } from \"@fern/ts-inline-types\";\n\nconst client = new SeedObjectClient({ environment: \"YOUR_BASE_URL\" });\nawait client.getDiscriminatedUnion({\n bar: {\n type: \"type1\",\n foo: \"foo\",\n bar: {\n foo: \"foo\",\n ref: {\n foo: \"foo\"\n }\n },\n ref: {\n foo: \"foo\"\n }\n },\n foo: \"foo\"\n});\n" + } + }, + { + "id": { + "path": "/root/undiscriminated-union", + "method": "POST", + "identifier_override": "endpoint_.getUndiscriminatedUnion" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedObjectClient } from \"@fern/ts-inline-types\";\n\nconst client = new SeedObjectClient({ environment: \"YOUR_BASE_URL\" });\nawait client.getUndiscriminatedUnion({\n bar: {\n foo: \"foo\",\n bar: {\n foo: \"foo\",\n ref: {\n foo: \"foo\"\n }\n },\n ref: {\n foo: \"foo\"\n }\n },\n foo: \"foo\"\n});\n" + } + } + ], + "types": {} +} \ No newline at end of file diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/Client.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/Client.ts new file mode 100644 index 00000000000..d0e9dbcc717 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/Client.ts @@ -0,0 +1,235 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as core from "./core"; +import * as SeedObject from "./api/index"; +import urlJoin from "url-join"; +import * as errors from "./errors/index"; + +export declare namespace SeedObjectClient { + interface Options { + environment: core.Supplier; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class SeedObjectClient { + constructor(protected readonly _options: SeedObjectClient.Options) {} + + /** + * @param {SeedObject.PostRootRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getRoot({ + * bar: { + * foo: "foo" + * }, + * foo: "foo" + * }) + */ + public async getRoot( + request: SeedObject.PostRootRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/root"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/ts-inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/ts-inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as SeedObject.RootType1; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError("Timeout exceeded when calling POST /root/root."); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {SeedObject.GetDiscriminatedUnionRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getDiscriminatedUnion({ + * bar: { + * type: "type1", + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * }) + */ + public async getDiscriminatedUnion( + request: SeedObject.GetDiscriminatedUnionRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/discriminated-union"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/ts-inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/ts-inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError( + "Timeout exceeded when calling POST /root/discriminated-union." + ); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {SeedObject.GetUndiscriminatedUnionRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getUndiscriminatedUnion({ + * bar: { + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * }) + */ + public async getUndiscriminatedUnion( + request: SeedObject.GetUndiscriminatedUnionRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/undiscriminated-union"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/ts-inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/ts-inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError( + "Timeout exceeded when calling POST /root/undiscriminated-union." + ); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } +} diff --git a/seed/ts-express/inline-types/serialization/service/index.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/index.ts similarity index 100% rename from seed/ts-express/inline-types/serialization/service/index.ts rename to seed/ts-sdk/ts-inline-types/no-inline/src/api/client/index.ts diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/GetDiscriminatedUnionRequest.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/GetDiscriminatedUnionRequest.ts new file mode 100644 index 00000000000..a89b16d314e --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/GetDiscriminatedUnionRequest.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../../index"; + +/** + * @example + * { + * bar: { + * type: "type1", + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * } + */ +export interface GetDiscriminatedUnionRequest { + bar: SeedObject.DiscriminatedUnion1; + foo: string; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/GetUndiscriminatedUnionRequest.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/GetUndiscriminatedUnionRequest.ts new file mode 100644 index 00000000000..e0e9f214ca5 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/GetUndiscriminatedUnionRequest.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../../index"; + +/** + * @example + * { + * bar: { + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * } + */ +export interface GetUndiscriminatedUnionRequest { + bar: SeedObject.UndiscriminatedUnion1; + foo: string; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/PostRootRequest.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/PostRootRequest.ts new file mode 100644 index 00000000000..f509f577f12 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/PostRootRequest.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../../index"; + +/** + * @example + * { + * bar: { + * foo: "foo" + * }, + * foo: "foo" + * } + */ +export interface PostRootRequest { + bar: SeedObject.RequestTypeInlineType1; + foo: string; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/index.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/index.ts new file mode 100644 index 00000000000..20fc5cd64ec --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/client/requests/index.ts @@ -0,0 +1,3 @@ +export { type PostRootRequest } from "./PostRootRequest"; +export { type GetDiscriminatedUnionRequest } from "./GetDiscriminatedUnionRequest"; +export { type GetUndiscriminatedUnionRequest } from "./GetUndiscriminatedUnionRequest"; diff --git a/seed/ts-sdk/inline-types/src/serialization/index.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/index.ts similarity index 100% rename from seed/ts-sdk/inline-types/src/serialization/index.ts rename to seed/ts-sdk/ts-inline-types/no-inline/src/api/index.ts diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasInlineValue.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasInlineValue.ts new file mode 100644 index 00000000000..0beb9652513 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasInlineValue.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface AliasInlineValue { + foo: string; + bar: string; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasListInline.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasListInline.ts new file mode 100644 index 00000000000..a684ff0eef7 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasListInline.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +export type AliasListInline = SeedObject.AliasInlineValue[]; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasMapInline.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasMapInline.ts new file mode 100644 index 00000000000..f0d6f380859 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasMapInline.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +export type AliasMapInline = Record; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasSetInline.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasSetInline.ts new file mode 100644 index 00000000000..32d6e6ebd97 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/AliasSetInline.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +export type AliasSetInline = SeedObject.AliasInlineValue[]; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1.ts new file mode 100644 index 00000000000..1ecb788196f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export type DiscriminatedUnion1 = + /** + * lorem ipsum */ + | SeedObject.DiscriminatedUnion1.Type1 + /** + * lorem ipsum */ + | SeedObject.DiscriminatedUnion1.Type2 + /** + * lorem ipsum */ + | SeedObject.DiscriminatedUnion1.Ref; + +export namespace DiscriminatedUnion1 { + export interface Type1 extends SeedObject.DiscriminatedUnion1InlineType1 { + type: "type1"; + } + + export interface Type2 extends SeedObject.DiscriminatedUnion1InlineType2 { + type: "type2"; + } + + export interface Ref extends SeedObject.ReferenceType { + type: "ref"; + } +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1.ts new file mode 100644 index 00000000000..aee4789e932 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface DiscriminatedUnion1InlineType1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + bar: SeedObject.DiscriminatedUnion1InlineType1InlineType1; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1InlineType1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1InlineType1.ts new file mode 100644 index 00000000000..259925b7704 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1InlineType1.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface DiscriminatedUnion1InlineType1InlineType1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType2.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType2.ts new file mode 100644 index 00000000000..b90bfb679a2 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType2.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface DiscriminatedUnion1InlineType2 { + /** lorem ipsum */ + baz: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/InlineEnum1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/InlineEnum1.ts new file mode 100644 index 00000000000..c678052d190 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/InlineEnum1.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * lorem ipsum + */ +export type InlineEnum1 = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; +export const InlineEnum1 = { + Sunny: "SUNNY", + Cloudy: "CLOUDY", + Raining: "RAINING", + Snowing: "SNOWING", +} as const; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/ReferenceType.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/ReferenceType.ts new file mode 100644 index 00000000000..3754bc9c7e2 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/ReferenceType.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * lorem ipsum + */ +export interface ReferenceType { + /** lorem ipsum */ + foo: string; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RequestTypeInlineType1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RequestTypeInlineType1.ts new file mode 100644 index 00000000000..1e390edb73c --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RequestTypeInlineType1.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * lorem ipsum + */ +export interface RequestTypeInlineType1 { + /** lorem ipsum */ + foo: string; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1.ts new file mode 100644 index 00000000000..d0d33243bcc --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface RootType1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + bar: SeedObject.RootType1InlineType1; + /** lorem ipsum */ + fooMap: Record; + /** lorem ipsum */ + fooList: SeedObject.RootType1FooListItem[]; + /** lorem ipsum */ + fooSet: SeedObject.RootType1FooSetItem[]; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1FooListItem.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1FooListItem.ts new file mode 100644 index 00000000000..0ffcae98837 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1FooListItem.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface RootType1FooListItem { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1FooMapValue.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1FooMapValue.ts new file mode 100644 index 00000000000..431bc3c905f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1FooMapValue.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface RootType1FooMapValue { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1FooSetItem.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1FooSetItem.ts new file mode 100644 index 00000000000..b4c3b6b5788 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1FooSetItem.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface RootType1FooSetItem { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1InlineType1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1InlineType1.ts new file mode 100644 index 00000000000..786b87523f5 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1InlineType1.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface RootType1InlineType1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + bar: SeedObject.RootType1InlineType1NestedInlineType1; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1InlineType1NestedInlineType1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1InlineType1NestedInlineType1.ts new file mode 100644 index 00000000000..7f2cca73ba7 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/RootType1InlineType1NestedInlineType1.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface RootType1InlineType1NestedInlineType1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + bar: string; + /** lorem ipsum */ + myEnum: SeedObject.InlineEnum1; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1.ts new file mode 100644 index 00000000000..e27127ef2eb --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export type UndiscriminatedUnion1 = + /** + * lorem ipsum */ + | SeedObject.UndiscriminatedUnion1InlineType1 + /** + * lorem ipsum */ + | SeedObject.UndiscriminatedUnion1InlineType2 + /** + * lorem ipsum */ + | SeedObject.UndiscriminatedUnion1DiscriminatedUnion1 + /** + * lorem ipsum */ + | SeedObject.UndiscriminatedUnion1DiscriminatedUnion1 + /** + * lorem ipsum */ + | SeedObject.UndiscriminatedUnion1InlineEnum1 + /** + * lorem ipsum */ + | SeedObject.UserId + /** + * lorem ipsum */ + | SeedObject.UndiscriminatedUnion1InlineListItem1[] + /** + * lorem ipsum */ + | SeedObject.UndiscriminatedUnion1InlineSetItem1[] + /** + * lorem ipsum */ + | Record + /** + * lorem ipsum */ + | SeedObject.ReferenceType; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1.ts new file mode 100644 index 00000000000..79d5ac09d41 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export type UndiscriminatedUnion1DiscriminatedUnion1 = + /** + * lorem ipsum */ + | SeedObject.UndiscriminatedUnion1DiscriminatedUnion1.Type1 + /** + * lorem ipsum */ + | SeedObject.UndiscriminatedUnion1DiscriminatedUnion1.Type2 + /** + * lorem ipsum */ + | SeedObject.UndiscriminatedUnion1DiscriminatedUnion1.Ref; + +export namespace UndiscriminatedUnion1DiscriminatedUnion1 { + export interface Type1 extends SeedObject.UndiscriminatedUnion1DiscriminatedUnion1InlineType1 { + type: "type1"; + } + + export interface Type2 extends SeedObject.UndiscriminatedUnion1DiscriminatedUnion1InlineType2 { + type: "type2"; + } + + export interface Ref extends SeedObject.ReferenceType { + type: "ref"; + } +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1.ts new file mode 100644 index 00000000000..ed023f35ece --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface UndiscriminatedUnion1DiscriminatedUnion1InlineType1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + bar: SeedObject.UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1.ts new file mode 100644 index 00000000000..06dc9f4879f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType2.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType2.ts new file mode 100644 index 00000000000..a691050422a --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType2.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface UndiscriminatedUnion1DiscriminatedUnion1InlineType2 { + /** lorem ipsum */ + baz: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineEnum1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineEnum1.ts new file mode 100644 index 00000000000..b0184d4a8fe --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineEnum1.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * lorem ipsum + */ +export type UndiscriminatedUnion1InlineEnum1 = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; +export const UndiscriminatedUnion1InlineEnum1 = { + Sunny: "SUNNY", + Cloudy: "CLOUDY", + Raining: "RAINING", + Snowing: "SNOWING", +} as const; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineListItem1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineListItem1.ts new file mode 100644 index 00000000000..a4e8738f30e --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineListItem1.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface UndiscriminatedUnion1InlineListItem1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineMapItem1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineMapItem1.ts new file mode 100644 index 00000000000..2c343a1648d --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineMapItem1.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface UndiscriminatedUnion1InlineMapItem1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineSetItem1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineSetItem1.ts new file mode 100644 index 00000000000..bfb627dff7a --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineSetItem1.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface UndiscriminatedUnion1InlineSetItem1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1.ts new file mode 100644 index 00000000000..cd15e0f5170 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface UndiscriminatedUnion1InlineType1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + bar: SeedObject.UndiscriminatedUnion1InlineType1InlineType1; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1InlineType1.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1InlineType1.ts new file mode 100644 index 00000000000..104de7c900d --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1InlineType1.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface UndiscriminatedUnion1InlineType1InlineType1 { + /** lorem ipsum */ + foo: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType2.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType2.ts new file mode 100644 index 00000000000..ceaf78891a0 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType2.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedObject from "../index"; + +/** + * lorem ipsum + */ +export interface UndiscriminatedUnion1InlineType2 { + /** lorem ipsum */ + baz: string; + /** lorem ipsum */ + ref: SeedObject.ReferenceType; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UserId.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UserId.ts new file mode 100644 index 00000000000..5a6e3e5152f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/UserId.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * lorem ipsum + */ +export type UserId = string; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/index.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/index.ts new file mode 100644 index 00000000000..57d21ed5261 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/api/types/index.ts @@ -0,0 +1,30 @@ +export * from "./AliasMapInline"; +export * from "./AliasSetInline"; +export * from "./AliasListInline"; +export * from "./AliasInlineValue"; +export * from "./RequestTypeInlineType1"; +export * from "./RootType1"; +export * from "./RootType1FooMapValue"; +export * from "./RootType1FooListItem"; +export * from "./RootType1FooSetItem"; +export * from "./RootType1InlineType1"; +export * from "./RootType1InlineType1NestedInlineType1"; +export * from "./DiscriminatedUnion1"; +export * from "./DiscriminatedUnion1InlineType1"; +export * from "./DiscriminatedUnion1InlineType1InlineType1"; +export * from "./DiscriminatedUnion1InlineType2"; +export * from "./UndiscriminatedUnion1"; +export * from "./UndiscriminatedUnion1InlineType1"; +export * from "./UndiscriminatedUnion1InlineType1InlineType1"; +export * from "./UndiscriminatedUnion1InlineType2"; +export * from "./InlineEnum1"; +export * from "./UndiscriminatedUnion1DiscriminatedUnion1"; +export * from "./UndiscriminatedUnion1DiscriminatedUnion1InlineType1"; +export * from "./UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1"; +export * from "./UndiscriminatedUnion1DiscriminatedUnion1InlineType2"; +export * from "./UndiscriminatedUnion1InlineEnum1"; +export * from "./UserId"; +export * from "./UndiscriminatedUnion1InlineListItem1"; +export * from "./UndiscriminatedUnion1InlineSetItem1"; +export * from "./UndiscriminatedUnion1InlineMapItem1"; +export * from "./ReferenceType"; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/APIResponse.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/APIResponse.ts new file mode 100644 index 00000000000..3664d09e168 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/APIResponse.ts @@ -0,0 +1,12 @@ +export type APIResponse = SuccessfulResponse | FailedResponse; + +export interface SuccessfulResponse { + ok: true; + body: T; + headers?: Record; +} + +export interface FailedResponse { + ok: false; + error: T; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/Fetcher.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/Fetcher.ts new file mode 100644 index 00000000000..b8f23717b69 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/Fetcher.ts @@ -0,0 +1,143 @@ +import { APIResponse } from "./APIResponse"; +import { createRequestUrl } from "./createRequestUrl"; +import { getFetchFn } from "./getFetchFn"; +import { getRequestBody } from "./getRequestBody"; +import { getResponseBody } from "./getResponseBody"; +import { makeRequest } from "./makeRequest"; +import { requestWithRetries } from "./requestWithRetries"; + +export type FetchFunction = (args: Fetcher.Args) => Promise>; + +export declare namespace Fetcher { + export interface Args { + url: string; + method: string; + contentType?: string; + headers?: Record; + queryParameters?: Record; + body?: unknown; + timeoutMs?: number; + maxRetries?: number; + withCredentials?: boolean; + abortSignal?: AbortSignal; + requestType?: "json" | "file" | "bytes"; + responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer"; + duplex?: "half"; + } + + export type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError; + + export interface FailedStatusCodeError { + reason: "status-code"; + statusCode: number; + body: unknown; + } + + export interface NonJsonError { + reason: "non-json"; + statusCode: number; + rawBody: string; + } + + export interface TimeoutError { + reason: "timeout"; + } + + export interface UnknownError { + reason: "unknown"; + errorMessage: string; + } +} + +export async function fetcherImpl(args: Fetcher.Args): Promise> { + const headers: Record = {}; + if (args.body !== undefined && args.contentType != null) { + headers["Content-Type"] = args.contentType; + } + + if (args.headers != null) { + for (const [key, value] of Object.entries(args.headers)) { + if (value != null) { + headers[key] = value; + } + } + } + + const url = createRequestUrl(args.url, args.queryParameters); + let requestBody: BodyInit | undefined = await getRequestBody({ + body: args.body, + type: args.requestType === "json" ? "json" : "other", + }); + const fetchFn = await getFetchFn(); + + try { + const response = await requestWithRetries( + async () => + makeRequest( + fetchFn, + url, + args.method, + headers, + requestBody, + args.timeoutMs, + args.abortSignal, + args.withCredentials, + args.duplex + ), + args.maxRetries + ); + let responseBody = await getResponseBody(response, args.responseType); + + if (response.status >= 200 && response.status < 400) { + return { + ok: true, + body: responseBody as R, + headers: response.headers, + }; + } else { + return { + ok: false, + error: { + reason: "status-code", + statusCode: response.status, + body: responseBody, + }, + }; + } + } catch (error) { + if (args.abortSignal != null && args.abortSignal.aborted) { + return { + ok: false, + error: { + reason: "unknown", + errorMessage: "The user aborted a request", + }, + }; + } else if (error instanceof Error && error.name === "AbortError") { + return { + ok: false, + error: { + reason: "timeout", + }, + }; + } else if (error instanceof Error) { + return { + ok: false, + error: { + reason: "unknown", + errorMessage: error.message, + }, + }; + } + + return { + ok: false, + error: { + reason: "unknown", + errorMessage: JSON.stringify(error), + }, + }; + } +} + +export const fetcher: FetchFunction = fetcherImpl; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/Supplier.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/Supplier.ts new file mode 100644 index 00000000000..867c931c02f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/Supplier.ts @@ -0,0 +1,11 @@ +export type Supplier = T | Promise | (() => T | Promise); + +export const Supplier = { + get: async (supplier: Supplier): Promise => { + if (typeof supplier === "function") { + return (supplier as () => T)(); + } else { + return supplier; + } + }, +}; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/createRequestUrl.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/createRequestUrl.ts new file mode 100644 index 00000000000..9288a99bb22 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/createRequestUrl.ts @@ -0,0 +1,10 @@ +import qs from "qs"; + +export function createRequestUrl( + baseUrl: string, + queryParameters?: Record +): string { + return Object.keys(queryParameters ?? {}).length > 0 + ? `${baseUrl}?${qs.stringify(queryParameters, { arrayFormat: "repeat" })}` + : baseUrl; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getFetchFn.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getFetchFn.ts new file mode 100644 index 00000000000..9fd9bfc42bd --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getFetchFn.ts @@ -0,0 +1,25 @@ +import { RUNTIME } from "../runtime"; + +/** + * Returns a fetch function based on the runtime + */ +export async function getFetchFn(): Promise { + // In Node.js 18+ environments, use native fetch + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return fetch; + } + + // In Node.js 18 or lower environments, the SDK always uses`node-fetch`. + if (RUNTIME.type === "node") { + return (await import("node-fetch")).default as any; + } + + // Otherwise the SDK uses global fetch if available, + // and falls back to node-fetch. + if (typeof fetch == "function") { + return fetch; + } + + // Defaults to node `node-fetch` if global fetch isn't available + return (await import("node-fetch")).default as any; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getHeader.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getHeader.ts new file mode 100644 index 00000000000..50f922b0e87 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getHeader.ts @@ -0,0 +1,8 @@ +export function getHeader(headers: Record, header: string): string | undefined { + for (const [headerKey, headerValue] of Object.entries(headers)) { + if (headerKey.toLowerCase() === header.toLowerCase()) { + return headerValue; + } + } + return undefined; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getRequestBody.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getRequestBody.ts new file mode 100644 index 00000000000..1138414b1c2 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getRequestBody.ts @@ -0,0 +1,14 @@ +export declare namespace GetRequestBody { + interface Args { + body: unknown; + type: "json" | "file" | "bytes" | "other"; + } +} + +export async function getRequestBody({ body, type }: GetRequestBody.Args): Promise { + if (type.includes("json")) { + return JSON.stringify(body); + } else { + return body as BodyInit; + } +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getResponseBody.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getResponseBody.ts new file mode 100644 index 00000000000..d046e6ea275 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/getResponseBody.ts @@ -0,0 +1,34 @@ +import { chooseStreamWrapper } from "./stream-wrappers/chooseStreamWrapper"; + +export async function getResponseBody(response: Response, responseType?: string): Promise { + if (response.body != null && responseType === "blob") { + return await response.blob(); + } else if (response.body != null && responseType === "arrayBuffer") { + return await response.arrayBuffer(); + } else if (response.body != null && responseType === "sse") { + return response.body; + } else if (response.body != null && responseType === "streaming") { + return chooseStreamWrapper(response.body); + } else if (response.body != null && responseType === "text") { + return await response.text(); + } else { + const text = await response.text(); + if (text.length > 0) { + try { + let responseBody = JSON.parse(text); + return responseBody; + } catch (err) { + return { + ok: false, + error: { + reason: "non-json", + statusCode: response.status, + rawBody: text, + }, + }; + } + } else { + return undefined; + } + } +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/index.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/index.ts new file mode 100644 index 00000000000..2d658ca48f9 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/index.ts @@ -0,0 +1,5 @@ +export type { APIResponse } from "./APIResponse"; +export { fetcher } from "./Fetcher"; +export type { Fetcher, FetchFunction } from "./Fetcher"; +export { getHeader } from "./getHeader"; +export { Supplier } from "./Supplier"; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/makeRequest.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/makeRequest.ts new file mode 100644 index 00000000000..8fb4bace466 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/makeRequest.ts @@ -0,0 +1,44 @@ +import { anySignal, getTimeoutSignal } from "./signals"; + +export const makeRequest = async ( + fetchFn: (url: string, init: RequestInit) => Promise, + url: string, + method: string, + headers: Record, + requestBody: BodyInit | undefined, + timeoutMs?: number, + abortSignal?: AbortSignal, + withCredentials?: boolean, + duplex?: "half" +): Promise => { + const signals: AbortSignal[] = []; + + // Add timeout signal + let timeoutAbortId: NodeJS.Timeout | undefined = undefined; + if (timeoutMs != null) { + const { signal, abortId } = getTimeoutSignal(timeoutMs); + timeoutAbortId = abortId; + signals.push(signal); + } + + // Add arbitrary signal + if (abortSignal != null) { + signals.push(abortSignal); + } + let newSignals = anySignal(signals); + const response = await fetchFn(url, { + method: method, + headers, + body: requestBody, + signal: newSignals, + credentials: withCredentials ? "include" : undefined, + // @ts-ignore + duplex, + }); + + if (timeoutAbortId != null) { + clearTimeout(timeoutAbortId); + } + + return response; +}; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/requestWithRetries.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/requestWithRetries.ts new file mode 100644 index 00000000000..8d5af9d5a82 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/requestWithRetries.ts @@ -0,0 +1,33 @@ +const INITIAL_RETRY_DELAY = 1000; // in milliseconds +const MAX_RETRY_DELAY = 60000; // in milliseconds +const DEFAULT_MAX_RETRIES = 2; +const JITTER_FACTOR = 0.2; // 20% random jitter + +function addJitter(delay: number): number { + // Generate a random value between -JITTER_FACTOR and +JITTER_FACTOR + const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR; + return delay * jitterMultiplier; +} + +export async function requestWithRetries( + requestFn: () => Promise, + maxRetries: number = DEFAULT_MAX_RETRIES +): Promise { + let response: Response = await requestFn(); + + for (let i = 0; i < maxRetries; ++i) { + if ([408, 409, 429].includes(response.status) || response.status >= 500) { + // Calculate base delay using exponential backoff (in milliseconds) + const baseDelay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY); + + // Add jitter to the delay + const delayWithJitter = addJitter(baseDelay); + + await new Promise((resolve) => setTimeout(resolve, delayWithJitter)); + response = await requestFn(); + } else { + break; + } + } + return response!; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/signals.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/signals.ts new file mode 100644 index 00000000000..6c124ff7985 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/signals.ts @@ -0,0 +1,38 @@ +const TIMEOUT = "timeout"; + +export function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abortId: NodeJS.Timeout } { + const controller = new AbortController(); + const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs); + return { signal: controller.signal, abortId }; +} + +/** + * Returns an abort signal that is getting aborted when + * at least one of the specified abort signals is aborted. + * + * Requires at least node.js 18. + */ +export function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal { + // Allowing signals to be passed either as array + // of signals or as multiple arguments. + const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args); + + const controller = new AbortController(); + + for (const signal of signals) { + if (signal.aborted) { + // Exiting early if one of the signals + // is already aborted. + controller.abort((signal as any)?.reason); + break; + } + + // Listening for signals and removing the listeners + // when at least one symbol is aborted. + signal.addEventListener("abort", () => controller.abort((signal as any)?.reason), { + signal: controller.signal, + }); + } + + return controller.signal; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts new file mode 100644 index 00000000000..4d7b7d52e8f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts @@ -0,0 +1,256 @@ +import type { Writable } from "readable-stream"; +import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; + +export class Node18UniversalStreamWrapper + implements + StreamWrapper | Writable | WritableStream, ReadFormat> +{ + private readableStream: ReadableStream; + private reader: ReadableStreamDefaultReader; + private events: Record; + private paused: boolean; + private resumeCallback: ((value?: unknown) => void) | null; + private encoding: string | null; + + constructor(readableStream: ReadableStream) { + this.readableStream = readableStream; + this.reader = this.readableStream.getReader(); + this.events = { + data: [], + end: [], + error: [], + readable: [], + close: [], + pause: [], + resume: [], + }; + this.paused = false; + this.resumeCallback = null; + this.encoding = null; + } + + public on(event: string, callback: EventCallback): void { + this.events[event]?.push(callback); + } + + public off(event: string, callback: EventCallback): void { + this.events[event] = this.events[event]?.filter((cb) => cb !== callback); + } + + public pipe( + dest: Node18UniversalStreamWrapper | Writable | WritableStream + ): Node18UniversalStreamWrapper | Writable | WritableStream { + this.on("data", async (chunk) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._write(chunk); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } else { + dest.write(chunk); + } + }); + + this.on("end", async () => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._end(); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.close(); + } else { + dest.end(); + } + }); + + this.on("error", async (error) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._error(error); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.abort(error); + } else { + dest.destroy(error); + } + }); + + this._startReading(); + + return dest; + } + + public pipeTo( + dest: Node18UniversalStreamWrapper | Writable | WritableStream + ): Node18UniversalStreamWrapper | Writable | WritableStream { + return this.pipe(dest); + } + + public unpipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream): void { + this.off("data", async (chunk) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._write(chunk); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } else { + dest.write(chunk); + } + }); + + this.off("end", async () => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._end(); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.close(); + } else { + dest.end(); + } + }); + + this.off("error", async (error) => { + if (dest instanceof Node18UniversalStreamWrapper) { + dest._error(error); + } else if (dest instanceof WritableStream) { + const writer = dest.getWriter(); + writer.abort(error); + } else { + dest.destroy(error); + } + }); + } + + public destroy(error?: Error): void { + this.reader + .cancel(error) + .then(() => { + this._emit("close"); + }) + .catch((err) => { + this._emit("error", err); + }); + } + + public pause(): void { + this.paused = true; + this._emit("pause"); + } + + public resume(): void { + if (this.paused) { + this.paused = false; + this._emit("resume"); + if (this.resumeCallback) { + this.resumeCallback(); + this.resumeCallback = null; + } + } + } + + public get isPaused(): boolean { + return this.paused; + } + + public async read(): Promise { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + + if (done) { + return undefined; + } + return value; + } + + public setEncoding(encoding: string): void { + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: ReadFormat[] = []; + + while (true) { + const { done, value } = await this.reader.read(); + if (done) { + break; + } + if (value) { + chunks.push(value); + } + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(await new Blob(chunks).arrayBuffer()); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + private _write(chunk: ReadFormat): void { + this._emit("data", chunk); + } + + private _end(): void { + this._emit("end"); + } + + private _error(error: any): void { + this._emit("error", error); + } + + private _emit(event: string, data?: any): void { + if (this.events[event]) { + for (const callback of this.events[event] || []) { + callback(data); + } + } + } + + private async _startReading(): Promise { + try { + this._emit("readable"); + while (true) { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + this._emit("end"); + this._emit("close"); + break; + } + if (value) { + this._emit("data", value); + } + } + } catch (error) { + this._emit("error", error); + } + } + + [Symbol.asyncIterator](): AsyncIterableIterator { + return { + next: async () => { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return { done: true, value: undefined }; + } + return { done: false, value }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + } +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts new file mode 100644 index 00000000000..ba5f7276750 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts @@ -0,0 +1,106 @@ +import type { Readable, Writable } from "readable-stream"; +import { EventCallback, StreamWrapper } from "./chooseStreamWrapper"; + +export class NodePre18StreamWrapper implements StreamWrapper { + private readableStream: Readable; + private encoding: string | undefined; + + constructor(readableStream: Readable) { + this.readableStream = readableStream; + } + + public on(event: string, callback: EventCallback): void { + this.readableStream.on(event, callback); + } + + public off(event: string, callback: EventCallback): void { + this.readableStream.off(event, callback); + } + + public pipe(dest: Writable): Writable { + this.readableStream.pipe(dest); + return dest; + } + + public pipeTo(dest: Writable): Writable { + return this.pipe(dest); + } + + public unpipe(dest?: Writable): void { + if (dest) { + this.readableStream.unpipe(dest); + } else { + this.readableStream.unpipe(); + } + } + + public destroy(error?: Error): void { + this.readableStream.destroy(error); + } + + public pause(): void { + this.readableStream.pause(); + } + + public resume(): void { + this.readableStream.resume(); + } + + public get isPaused(): boolean { + return this.readableStream.isPaused(); + } + + public async read(): Promise { + return new Promise((resolve, reject) => { + const chunk = this.readableStream.read(); + if (chunk) { + resolve(chunk); + } else { + this.readableStream.once("readable", () => { + const chunk = this.readableStream.read(); + resolve(chunk); + }); + this.readableStream.once("error", reject); + } + }); + } + + public setEncoding(encoding?: string): void { + this.readableStream.setEncoding(encoding as BufferEncoding); + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: Uint8Array[] = []; + const encoder = new TextEncoder(); + this.readableStream.setEncoding((this.encoding || "utf-8") as BufferEncoding); + + for await (const chunk of this.readableStream) { + chunks.push(encoder.encode(chunk)); + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(Buffer.concat(chunks)); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + public [Symbol.asyncIterator](): AsyncIterableIterator { + const readableStream = this.readableStream; + const iterator = readableStream[Symbol.asyncIterator](); + + // Create and return an async iterator that yields buffers + return { + async next(): Promise> { + const { value, done } = await iterator.next(); + return { value: value as Buffer, done }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + } +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts new file mode 100644 index 00000000000..263af00911f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts @@ -0,0 +1,243 @@ +import { StreamWrapper } from "./chooseStreamWrapper"; + +type EventCallback = (data?: any) => void; + +export class UndiciStreamWrapper + implements StreamWrapper | WritableStream, ReadFormat> +{ + private readableStream: ReadableStream; + private reader: ReadableStreamDefaultReader; + private events: Record; + private paused: boolean; + private resumeCallback: ((value?: unknown) => void) | null; + private encoding: string | null; + + constructor(readableStream: ReadableStream) { + this.readableStream = readableStream; + this.reader = this.readableStream.getReader(); + this.events = { + data: [], + end: [], + error: [], + readable: [], + close: [], + pause: [], + resume: [], + }; + this.paused = false; + this.resumeCallback = null; + this.encoding = null; + } + + public on(event: string, callback: EventCallback): void { + this.events[event]?.push(callback); + } + + public off(event: string, callback: EventCallback): void { + this.events[event] = this.events[event]?.filter((cb) => cb !== callback); + } + + public pipe( + dest: UndiciStreamWrapper | WritableStream + ): UndiciStreamWrapper | WritableStream { + this.on("data", (chunk) => { + if (dest instanceof UndiciStreamWrapper) { + dest._write(chunk); + } else { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } + }); + + this.on("end", () => { + if (dest instanceof UndiciStreamWrapper) { + dest._end(); + } else { + const writer = dest.getWriter(); + writer.close(); + } + }); + + this.on("error", (error) => { + if (dest instanceof UndiciStreamWrapper) { + dest._error(error); + } else { + const writer = dest.getWriter(); + writer.abort(error); + } + }); + + this._startReading(); + + return dest; + } + + public pipeTo( + dest: UndiciStreamWrapper | WritableStream + ): UndiciStreamWrapper | WritableStream { + return this.pipe(dest); + } + + public unpipe(dest: UndiciStreamWrapper | WritableStream): void { + this.off("data", (chunk) => { + if (dest instanceof UndiciStreamWrapper) { + dest._write(chunk); + } else { + const writer = dest.getWriter(); + writer.write(chunk).then(() => writer.releaseLock()); + } + }); + + this.off("end", () => { + if (dest instanceof UndiciStreamWrapper) { + dest._end(); + } else { + const writer = dest.getWriter(); + writer.close(); + } + }); + + this.off("error", (error) => { + if (dest instanceof UndiciStreamWrapper) { + dest._error(error); + } else { + const writer = dest.getWriter(); + writer.abort(error); + } + }); + } + + public destroy(error?: Error): void { + this.reader + .cancel(error) + .then(() => { + this._emit("close"); + }) + .catch((err) => { + this._emit("error", err); + }); + } + + public pause(): void { + this.paused = true; + this._emit("pause"); + } + + public resume(): void { + if (this.paused) { + this.paused = false; + this._emit("resume"); + if (this.resumeCallback) { + this.resumeCallback(); + this.resumeCallback = null; + } + } + } + + public get isPaused(): boolean { + return this.paused; + } + + public async read(): Promise { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return undefined; + } + return value; + } + + public setEncoding(encoding: string): void { + this.encoding = encoding; + } + + public async text(): Promise { + const chunks: BlobPart[] = []; + + while (true) { + const { done, value } = await this.reader.read(); + if (done) { + break; + } + if (value) { + chunks.push(value); + } + } + + const decoder = new TextDecoder(this.encoding || "utf-8"); + return decoder.decode(await new Blob(chunks).arrayBuffer()); + } + + public async json(): Promise { + const text = await this.text(); + return JSON.parse(text); + } + + private _write(chunk: ReadFormat): void { + this._emit("data", chunk); + } + + private _end(): void { + this._emit("end"); + } + + private _error(error: any): void { + this._emit("error", error); + } + + private _emit(event: string, data?: any): void { + if (this.events[event]) { + for (const callback of this.events[event] || []) { + callback(data); + } + } + } + + private async _startReading(): Promise { + try { + this._emit("readable"); + while (true) { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + this._emit("end"); + this._emit("close"); + break; + } + if (value) { + this._emit("data", value); + } + } + } catch (error) { + this._emit("error", error); + } + } + + [Symbol.asyncIterator](): AsyncIterableIterator { + return { + next: async () => { + if (this.paused) { + await new Promise((resolve) => { + this.resumeCallback = resolve; + }); + } + const { done, value } = await this.reader.read(); + if (done) { + return { done: true, value: undefined }; + } + return { done: false, value }; + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + } +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts new file mode 100644 index 00000000000..2abd6b2ba1c --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/fetcher/stream-wrappers/chooseStreamWrapper.ts @@ -0,0 +1,33 @@ +import type { Readable } from "readable-stream"; +import { RUNTIME } from "../../runtime"; + +export type EventCallback = (data?: any) => void; + +export interface StreamWrapper { + setEncoding(encoding?: string): void; + on(event: string, callback: EventCallback): void; + off(event: string, callback: EventCallback): void; + pipe(dest: WritableStream): WritableStream; + pipeTo(dest: WritableStream): WritableStream; + unpipe(dest?: WritableStream): void; + destroy(error?: Error): void; + pause(): void; + resume(): void; + get isPaused(): boolean; + read(): Promise; + text(): Promise; + json(): Promise; + [Symbol.asyncIterator](): AsyncIterableIterator; +} + +export async function chooseStreamWrapper(responseBody: any): Promise>> { + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return new (await import("./Node18UniversalStreamWrapper")).Node18UniversalStreamWrapper( + responseBody as ReadableStream + ); + } else if (RUNTIME.type !== "node" && typeof fetch === "function") { + return new (await import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody as ReadableStream); + } else { + return new (await import("./NodePre18StreamWrapper")).NodePre18StreamWrapper(responseBody as Readable); + } +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/index.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/index.ts new file mode 100644 index 00000000000..000107d9932 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/index.ts @@ -0,0 +1,2 @@ +export * from "./fetcher"; +export * from "./runtime"; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/runtime/index.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/runtime/index.ts new file mode 100644 index 00000000000..5c76dbb133f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/runtime/index.ts @@ -0,0 +1 @@ +export { RUNTIME } from "./runtime"; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/core/runtime/runtime.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/core/runtime/runtime.ts new file mode 100644 index 00000000000..4d0687e8eb4 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/core/runtime/runtime.ts @@ -0,0 +1,126 @@ +interface DenoGlobal { + version: { + deno: string; + }; +} + +interface BunGlobal { + version: string; +} + +declare const Deno: DenoGlobal; +declare const Bun: BunGlobal; + +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +const isWebWorker = + typeof self === "object" && + // @ts-ignore + typeof self?.importScripts === "function" && + (self.constructor?.name === "DedicatedWorkerGlobalScope" || + self.constructor?.name === "ServiceWorkerGlobalScope" || + self.constructor?.name === "SharedWorkerGlobalScope"); + +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +const isDeno = + typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +const isNode = + typeof process !== "undefined" && + Boolean(process.version) && + Boolean(process.versions?.node) && + // Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions + !isDeno && + !isBun; + +/** + * A constant that indicates whether the environment the code is running is in React-Native. + * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js + */ +const isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + +/** + * A constant that indicates whether the environment the code is running is Cloudflare. + * https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent + */ +const isCloudflare = typeof globalThis !== "undefined" && globalThis?.navigator?.userAgent === "Cloudflare-Workers"; + +/** + * A constant that indicates which environment and version the SDK is running in. + */ +export const RUNTIME: Runtime = evaluateRuntime(); + +export interface Runtime { + type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd"; + version?: string; + parsedVersion?: number; +} + +function evaluateRuntime(): Runtime { + if (isBrowser) { + return { + type: "browser", + version: window.navigator.userAgent, + }; + } + + if (isCloudflare) { + return { + type: "workerd", + }; + } + + if (isWebWorker) { + return { + type: "web-worker", + }; + } + + if (isDeno) { + return { + type: "deno", + version: Deno.version.deno, + }; + } + + if (isBun) { + return { + type: "bun", + version: Bun.version, + }; + } + + if (isNode) { + return { + type: "node", + version: process.versions.node, + parsedVersion: Number(process.versions.node.split(".")[0]), + }; + } + + if (isReactNative) { + return { + type: "react-native", + }; + } + + return { + type: "unknown", + }; +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/errors/SeedObjectError.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/errors/SeedObjectError.ts new file mode 100644 index 00000000000..489ad43d19e --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/errors/SeedObjectError.ts @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export class SeedObjectError extends Error { + readonly statusCode?: number; + readonly body?: unknown; + + constructor({ message, statusCode, body }: { message?: string; statusCode?: number; body?: unknown }) { + super(buildMessage({ message, statusCode, body })); + Object.setPrototypeOf(this, SeedObjectError.prototype); + if (statusCode != null) { + this.statusCode = statusCode; + } + + if (body !== undefined) { + this.body = body; + } + } +} + +function buildMessage({ + message, + statusCode, + body, +}: { + message: string | undefined; + statusCode: number | undefined; + body: unknown | undefined; +}): string { + let lines: string[] = []; + if (message != null) { + lines.push(message); + } + + if (statusCode != null) { + lines.push(`Status code: ${statusCode.toString()}`); + } + + if (body != null) { + lines.push(`Body: ${JSON.stringify(body, undefined, 2)}`); + } + + return lines.join("\n"); +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/errors/SeedObjectTimeoutError.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/errors/SeedObjectTimeoutError.ts new file mode 100644 index 00000000000..27e69eb189f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/errors/SeedObjectTimeoutError.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export class SeedObjectTimeoutError extends Error { + constructor(message: string) { + super(message); + Object.setPrototypeOf(this, SeedObjectTimeoutError.prototype); + } +} diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/errors/index.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/errors/index.ts new file mode 100644 index 00000000000..c41ddbbfd72 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/errors/index.ts @@ -0,0 +1,2 @@ +export { SeedObjectError } from "./SeedObjectError"; +export { SeedObjectTimeoutError } from "./SeedObjectTimeoutError"; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/index.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/index.ts new file mode 100644 index 00000000000..bbb7c569b72 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/index.ts @@ -0,0 +1,3 @@ +export * as SeedObject from "./api"; +export { SeedObjectClient } from "./Client"; +export { SeedObjectError, SeedObjectTimeoutError } from "./errors"; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/version.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/version.ts new file mode 100644 index 00000000000..b643a3e3ea2 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/version.ts @@ -0,0 +1 @@ +export const SDK_VERSION = "0.0.1"; diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/custom.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/custom.test.ts new file mode 100644 index 00000000000..7f5e031c839 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/custom.test.ts @@ -0,0 +1,13 @@ +/** + * This is a custom test file, if you wish to add more tests + * to your SDK. + * Be sure to mark this file in `.fernignore`. + * + * If you include example requests/responses in your fern definition, + * you will have tests automatically generated for you. + */ +describe("test", () => { + it("default", () => { + expect(true).toBe(true); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/Fetcher.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/Fetcher.test.ts new file mode 100644 index 00000000000..ff8042175ff --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/Fetcher.test.ts @@ -0,0 +1,73 @@ +import fs from "fs"; +import { Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher"; +import { join } from "path"; + +describe("Test fetcherImpl", () => { + it("should handle successful request", async () => { + const mockArgs: Fetcher.Args = { + url: "https://httpbin.org/post", + method: "POST", + headers: { "X-Test": "x-test-header" }, + body: { data: "test" }, + contentType: "application/json", + requestType: "json", + }; + + global.fetch = jest.fn().mockResolvedValue({ + ok: true, + status: 200, + text: () => Promise.resolve(JSON.stringify({ data: "test" })), + json: () => ({ data: "test" }), + }); + + const result = await fetcherImpl(mockArgs); + expect(result.ok).toBe(true); + if (result.ok) { + expect(result.body).toEqual({ data: "test" }); + } + + expect(global.fetch).toHaveBeenCalledWith( + "https://httpbin.org/post", + expect.objectContaining({ + method: "POST", + headers: expect.objectContaining({ "X-Test": "x-test-header" }), + body: JSON.stringify({ data: "test" }), + }) + ); + }); + + it("should send octet stream", async () => { + const url = "https://httpbin.org/post/file"; + const mockArgs: Fetcher.Args = { + url, + method: "POST", + headers: { "X-Test": "x-test-header" }, + contentType: "application/octet-stream", + requestType: "bytes", + duplex: "half", + body: fs.createReadStream(join(__dirname, "test-file.txt")), + }; + + global.fetch = jest.fn().mockResolvedValue({ + ok: true, + status: 200, + text: () => Promise.resolve(JSON.stringify({ data: "test" })), + json: () => Promise.resolve({ data: "test" }), + }); + + const result = await fetcherImpl(mockArgs); + + expect(global.fetch).toHaveBeenCalledWith( + url, + expect.objectContaining({ + method: "POST", + headers: expect.objectContaining({ "X-Test": "x-test-header" }), + body: expect.any(fs.ReadStream), + }) + ); + expect(result.ok).toBe(true); + if (result.ok) { + expect(result.body).toEqual({ data: "test" }); + } + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/createRequestUrl.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/createRequestUrl.test.ts new file mode 100644 index 00000000000..f2cd24b6721 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/createRequestUrl.test.ts @@ -0,0 +1,51 @@ +import { createRequestUrl } from "../../../src/core/fetcher/createRequestUrl"; + +describe("Test createRequestUrl", () => { + it("should return the base URL when no query parameters are provided", () => { + const baseUrl = "https://api.example.com"; + expect(createRequestUrl(baseUrl)).toBe(baseUrl); + }); + + it("should append simple query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { key: "value", another: "param" }; + expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?key=value&another=param"); + }); + + it("should handle array query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { items: ["a", "b", "c"] }; + expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?items=a&items=b&items=c"); + }); + + it("should handle object query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { filter: { name: "John", age: 30 } }; + expect(createRequestUrl(baseUrl, queryParams)).toBe( + "https://api.example.com?filter%5Bname%5D=John&filter%5Bage%5D=30" + ); + }); + + it("should handle mixed types of query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { + simple: "value", + array: ["x", "y"], + object: { key: "value" }, + }; + expect(createRequestUrl(baseUrl, queryParams)).toBe( + "https://api.example.com?simple=value&array=x&array=y&object%5Bkey%5D=value" + ); + }); + + it("should handle empty query parameters object", () => { + const baseUrl = "https://api.example.com"; + expect(createRequestUrl(baseUrl, {})).toBe(baseUrl); + }); + + it("should encode special characters in query parameters", () => { + const baseUrl = "https://api.example.com"; + const queryParams = { special: "a&b=c d" }; + expect(createRequestUrl(baseUrl, queryParams)).toBe("https://api.example.com?special=a%26b%3Dc%20d"); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/getFetchFn.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/getFetchFn.test.ts new file mode 100644 index 00000000000..9b315ad095a --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/getFetchFn.test.ts @@ -0,0 +1,22 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { getFetchFn } from "../../../src/core/fetcher/getFetchFn"; + +describe("Test for getFetchFn", () => { + it("should get node-fetch function", async () => { + if (RUNTIME.type == "node") { + if (RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + expect(await getFetchFn()).toBe(fetch); + } else { + expect(await getFetchFn()).toEqual((await import("node-fetch")).default as any); + } + } + }); + + it("should get fetch function", async () => { + if (RUNTIME.type == "browser") { + const fetchFn = await getFetchFn(); + expect(typeof fetchFn).toBe("function"); + expect(fetchFn.name).toBe("fetch"); + } + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/getRequestBody.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/getRequestBody.test.ts new file mode 100644 index 00000000000..919604c2e12 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/getRequestBody.test.ts @@ -0,0 +1,77 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { getRequestBody } from "../../../src/core/fetcher/getRequestBody"; + +describe("Test getRequestBody", () => { + it("should return FormData as is in Node environment", async () => { + if (RUNTIME.type === "node") { + const formData = new (await import("formdata-node")).FormData(); + formData.append("key", "value"); + const result = await getRequestBody({ + body: formData, + type: "file", + }); + expect(result).toBe(formData); + } + }); + + it("should stringify body if not FormData in Node environment", async () => { + if (RUNTIME.type === "node") { + const body = { key: "value" }; + const result = await getRequestBody({ + body, + type: "json", + }); + expect(result).toBe('{"key":"value"}'); + } + }); + + it("should return FormData in browser environment", async () => { + if (RUNTIME.type === "browser") { + const formData = new (await import("form-data")).default(); + formData.append("key", "value"); + const result = await getRequestBody({ + body: formData, + type: "file", + }); + expect(result).toBe(formData); + } + }); + + it("should stringify body if not FormData in browser environment", async () => { + if (RUNTIME.type === "browser") { + const body = { key: "value" }; + const result = await getRequestBody({ + body, + type: "json", + }); + expect(result).toBe('{"key":"value"}'); + } + }); + + it("should return the Uint8Array", async () => { + const input = new Uint8Array([1, 2, 3]); + const result = await getRequestBody({ + body: input, + type: "bytes", + }); + expect(result).toBe(input); + }); + + it("should return the input for content-type 'application/x-www-form-urlencoded'", async () => { + const input = "key=value&another=param"; + const result = await getRequestBody({ + body: input, + type: "other", + }); + expect(result).toBe(input); + }); + + it("should JSON stringify objects", async () => { + const input = { key: "value" }; + const result = await getRequestBody({ + body: input, + type: "json", + }); + expect(result).toBe('{"key":"value"}'); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/getResponseBody.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/getResponseBody.test.ts new file mode 100644 index 00000000000..1030c517ced --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/getResponseBody.test.ts @@ -0,0 +1,64 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { getResponseBody } from "../../../src/core/fetcher/getResponseBody"; +import { chooseStreamWrapper } from "../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper"; + +describe("Test getResponseBody", () => { + it("should handle blob response type", async () => { + const mockBlob = new Blob(["test"], { type: "text/plain" }); + const mockResponse = new Response(mockBlob); + const result = await getResponseBody(mockResponse, "blob"); + // @ts-expect-error + expect(result.constructor.name).toBe("Blob"); + }); + + it("should handle sse response type", async () => { + if (RUNTIME.type === "node") { + const mockStream = new ReadableStream(); + const mockResponse = new Response(mockStream); + const result = await getResponseBody(mockResponse, "sse"); + expect(result).toBe(mockStream); + } + }); + + it("should handle streaming response type", async () => { + if (RUNTIME.type === "node") { + const mockStream = new ReadableStream(); + const mockResponse = new Response(mockStream); + const result = await getResponseBody(mockResponse, "streaming"); + // need to reinstantiate string as a result of locked state in Readable Stream after registration with Response + expect(JSON.stringify(result)).toBe(JSON.stringify(await chooseStreamWrapper(new ReadableStream()))); + } + }); + + it("should handle text response type", async () => { + const mockResponse = new Response("test text"); + const result = await getResponseBody(mockResponse, "text"); + expect(result).toBe("test text"); + }); + + it("should handle JSON response", async () => { + const mockJson = { key: "value" }; + const mockResponse = new Response(JSON.stringify(mockJson)); + const result = await getResponseBody(mockResponse); + expect(result).toEqual(mockJson); + }); + + it("should handle empty response", async () => { + const mockResponse = new Response(""); + const result = await getResponseBody(mockResponse); + expect(result).toBeUndefined(); + }); + + it("should handle non-JSON response", async () => { + const mockResponse = new Response("invalid json"); + const result = await getResponseBody(mockResponse); + expect(result).toEqual({ + ok: false, + error: { + reason: "non-json", + statusCode: 200, + rawBody: "invalid json", + }, + }); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/makeRequest.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/makeRequest.test.ts new file mode 100644 index 00000000000..be94ab45f10 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/makeRequest.test.ts @@ -0,0 +1,54 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { makeRequest } from "../../../src/core/fetcher/makeRequest"; + +describe("Test makeRequest", () => { + const mockPostUrl = "https://httpbin.org/post"; + const mockGetUrl = "https://httpbin.org/get"; + const mockHeaders = { "Content-Type": "application/json" }; + const mockBody = JSON.stringify({ key: "value" }); + + let mockFetch: jest.Mock; + + beforeEach(() => { + mockFetch = jest.fn(); + mockFetch.mockResolvedValue(new Response(JSON.stringify({ test: "successful" }), { status: 200 })); + }); + + it("should handle POST request correctly", async () => { + const response = await makeRequest(mockFetch, mockPostUrl, "POST", mockHeaders, mockBody); + const responseBody = await response.json(); + expect(responseBody).toEqual({ test: "successful" }); + expect(mockFetch).toHaveBeenCalledTimes(1); + const [calledUrl, calledOptions] = mockFetch.mock.calls[0]; + expect(calledUrl).toBe(mockPostUrl); + expect(calledOptions).toEqual( + expect.objectContaining({ + method: "POST", + headers: mockHeaders, + body: mockBody, + credentials: undefined, + }) + ); + expect(calledOptions.signal).toBeDefined(); + expect(calledOptions.signal).toBeInstanceOf(AbortSignal); + }); + + it("should handle GET request correctly", async () => { + const response = await makeRequest(mockFetch, mockGetUrl, "GET", mockHeaders, undefined); + const responseBody = await response.json(); + expect(responseBody).toEqual({ test: "successful" }); + expect(mockFetch).toHaveBeenCalledTimes(1); + const [calledUrl, calledOptions] = mockFetch.mock.calls[0]; + expect(calledUrl).toBe(mockGetUrl); + expect(calledOptions).toEqual( + expect.objectContaining({ + method: "GET", + headers: mockHeaders, + body: undefined, + credentials: undefined, + }) + ); + expect(calledOptions.signal).toBeDefined(); + expect(calledOptions.signal).toBeInstanceOf(AbortSignal); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/requestWithRetries.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/requestWithRetries.test.ts new file mode 100644 index 00000000000..6f77f093edf --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/requestWithRetries.test.ts @@ -0,0 +1,133 @@ +import { RUNTIME } from "../../../src/core/runtime"; +import { requestWithRetries } from "../../../src/core/fetcher/requestWithRetries"; + +describe("requestWithRetries", () => { + let mockFetch: jest.Mock; + let originalMathRandom: typeof Math.random; + let setTimeoutSpy: jest.SpyInstance; + + beforeEach(() => { + mockFetch = jest.fn(); + originalMathRandom = Math.random; + + // Mock Math.random for consistent jitter + Math.random = jest.fn(() => 0.5); + + jest.useFakeTimers({ doNotFake: ["nextTick"] }); + }); + + afterEach(() => { + Math.random = originalMathRandom; + jest.clearAllMocks(); + jest.clearAllTimers(); + }); + + it("should retry on retryable status codes", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + process.nextTick(callback); + return null as any; + }); + + const retryableStatuses = [408, 409, 429, 500, 502]; + let callCount = 0; + + mockFetch.mockImplementation(async () => { + if (callCount < retryableStatuses.length) { + return new Response("", { status: retryableStatuses[callCount++] }); + } + return new Response("", { status: 200 }); + }); + + const responsePromise = requestWithRetries(() => mockFetch(), retryableStatuses.length); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(retryableStatuses.length + 1); + expect(response.status).toBe(200); + }); + + it("should respect maxRetries limit", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + process.nextTick(callback); + return null as any; + }); + + const maxRetries = 2; + mockFetch.mockResolvedValue(new Response("", { status: 500 })); + + const responsePromise = requestWithRetries(() => mockFetch(), maxRetries); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(maxRetries + 1); + expect(response.status).toBe(500); + }); + + it("should not retry on success status codes", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + process.nextTick(callback); + return null as any; + }); + + const successStatuses = [200, 201, 202]; + + for (const status of successStatuses) { + mockFetch.mockReset(); + setTimeoutSpy.mockClear(); + mockFetch.mockResolvedValueOnce(new Response("", { status })); + + const responsePromise = requestWithRetries(() => mockFetch(), 3); + await jest.runAllTimersAsync(); + await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(1); + expect(setTimeoutSpy).not.toHaveBeenCalled(); + } + }); + + it("should apply correct exponential backoff with jitter", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + process.nextTick(callback); + return null as any; + }); + + mockFetch.mockResolvedValue(new Response("", { status: 500 })); + const maxRetries = 3; + const expectedDelays = [1000, 2000, 4000]; + + const responsePromise = requestWithRetries(() => mockFetch(), maxRetries); + await jest.runAllTimersAsync(); + await responsePromise; + + // Verify setTimeout calls + expect(setTimeoutSpy).toHaveBeenCalledTimes(expectedDelays.length); + + expectedDelays.forEach((delay, index) => { + expect(setTimeoutSpy).toHaveBeenNthCalledWith(index + 1, expect.any(Function), delay); + }); + + expect(mockFetch).toHaveBeenCalledTimes(maxRetries + 1); + }); + + it("should handle concurrent retries independently", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback) => { + process.nextTick(callback); + return null as any; + }); + + mockFetch + .mockResolvedValueOnce(new Response("", { status: 500 })) + .mockResolvedValueOnce(new Response("", { status: 500 })) + .mockResolvedValueOnce(new Response("", { status: 200 })) + .mockResolvedValueOnce(new Response("", { status: 200 })); + + const promise1 = requestWithRetries(() => mockFetch(), 1); + const promise2 = requestWithRetries(() => mockFetch(), 1); + + await jest.runAllTimersAsync(); + const [response1, response2] = await Promise.all([promise1, promise2]); + + expect(response1.status).toBe(200); + expect(response2.status).toBe(200); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/signals.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/signals.test.ts new file mode 100644 index 00000000000..9cabfa07447 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/signals.test.ts @@ -0,0 +1,69 @@ +import { anySignal, getTimeoutSignal } from "../../../src/core/fetcher/signals"; + +describe("Test getTimeoutSignal", () => { + beforeEach(() => { + jest.useFakeTimers(); + }); + + afterEach(() => { + jest.useRealTimers(); + }); + + it("should return an object with signal and abortId", () => { + const { signal, abortId } = getTimeoutSignal(1000); + + expect(signal).toBeDefined(); + expect(abortId).toBeDefined(); + expect(signal).toBeInstanceOf(AbortSignal); + expect(signal.aborted).toBe(false); + }); + + it("should create a signal that aborts after the specified timeout", () => { + const timeoutMs = 5000; + const { signal } = getTimeoutSignal(timeoutMs); + + expect(signal.aborted).toBe(false); + + jest.advanceTimersByTime(timeoutMs - 1); + expect(signal.aborted).toBe(false); + + jest.advanceTimersByTime(1); + expect(signal.aborted).toBe(true); + }); +}); + +describe("Test anySignal", () => { + it("should return an AbortSignal", () => { + const signal = anySignal(new AbortController().signal); + expect(signal).toBeInstanceOf(AbortSignal); + }); + + it("should abort when any of the input signals is aborted", () => { + const controller1 = new AbortController(); + const controller2 = new AbortController(); + const signal = anySignal(controller1.signal, controller2.signal); + + expect(signal.aborted).toBe(false); + controller1.abort(); + expect(signal.aborted).toBe(true); + }); + + it("should handle an array of signals", () => { + const controller1 = new AbortController(); + const controller2 = new AbortController(); + const signal = anySignal([controller1.signal, controller2.signal]); + + expect(signal.aborted).toBe(false); + controller2.abort(); + expect(signal.aborted).toBe(true); + }); + + it("should abort immediately if one of the input signals is already aborted", () => { + const controller1 = new AbortController(); + const controller2 = new AbortController(); + controller1.abort(); + + const signal = anySignal(controller1.signal, controller2.signal); + expect(signal.aborted).toBe(true); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts new file mode 100644 index 00000000000..1dc9be0cc0e --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/Node18UniversalStreamWrapper.test.ts @@ -0,0 +1,178 @@ +import { Node18UniversalStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper"; + +describe("Node18UniversalStreamWrapper", () => { + it("should set encoding to utf-8", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const setEncodingSpy = jest.spyOn(stream, "setEncoding"); + + stream.setEncoding("utf-8"); + + expect(setEncodingSpy).toHaveBeenCalledWith("utf-8"); + }); + + it("should register an event listener for readable", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const onSpy = jest.spyOn(stream, "on"); + + stream.on("readable", () => {}); + + expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function)); + }); + + it("should remove an event listener for data", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const offSpy = jest.spyOn(stream, "off"); + + const fn = () => {}; + stream.on("data", fn); + stream.off("data", fn); + + expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function)); + }); + + it("should write to dest when calling pipe to writable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + const dest = new WritableStream({ + write(chunk) { + expect(chunk).toEqual(new TextEncoder().encode("test")); + }, + }); + + stream.pipe(dest); + }); + + it("should write to dest when calling pipe to node writable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + const dest = new (await import("readable-stream")).Writable({ + write(chunk, encoding, callback) { + expect(chunk.toString()).toEqual("test"); + callback(); + }, + }); + + stream.pipe(dest); + }); + + it("should write nothing when calling pipe and unpipe", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + const buffer: Uint8Array[] = []; + const dest = new WritableStream({ + write(chunk) { + buffer.push(chunk); + }, + }); + + stream.pipe(dest); + stream.unpipe(dest); + expect(buffer).toEqual([]); + }); + + it("should destroy the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const destroySpy = jest.spyOn(stream, "destroy"); + + stream.destroy(); + + expect(destroySpy).toHaveBeenCalled(); + }); + + it("should pause and resume the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new Node18UniversalStreamWrapper(rawStream); + const pauseSpy = jest.spyOn(stream, "pause"); + const resumeSpy = jest.spyOn(stream, "resume"); + + expect(stream.isPaused).toBe(false); + stream.pause(); + expect(stream.isPaused).toBe(true); + stream.resume(); + + expect(pauseSpy).toHaveBeenCalled(); + expect(resumeSpy).toHaveBeenCalled(); + }); + + it("should read the stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + }); + + it("should read the stream as text", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + + const data = await stream.text(); + + expect(data).toEqual("testtest"); + }); + + it("should read the stream as json", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode(JSON.stringify({ test: "test" }))); + controller.close(); + }, + }); + const stream = new Node18UniversalStreamWrapper(rawStream); + + const data = await stream.json(); + + expect(data).toEqual({ test: "test" }); + }); + + it("should allow use with async iteratable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + let data = ""; + const stream = new Node18UniversalStreamWrapper(rawStream); + for await (const chunk of stream) { + data += new TextDecoder().decode(chunk); + } + + expect(data).toEqual("testtest"); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts new file mode 100644 index 00000000000..0c99d3b2655 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/NodePre18StreamWrapper.test.ts @@ -0,0 +1,124 @@ +import { NodePre18StreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/NodePre18StreamWrapper"; + +describe("NodePre18StreamWrapper", () => { + it("should set encoding to utf-8", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const setEncodingSpy = jest.spyOn(stream, "setEncoding"); + + stream.setEncoding("utf-8"); + + expect(setEncodingSpy).toHaveBeenCalledWith("utf-8"); + }); + + it("should register an event listener for readable", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const onSpy = jest.spyOn(stream, "on"); + + stream.on("readable", () => {}); + + expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function)); + }); + + it("should remove an event listener for data", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const offSpy = jest.spyOn(stream, "off"); + + const fn = () => {}; + stream.on("data", fn); + stream.off("data", fn); + + expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function)); + }); + + it("should write to dest when calling pipe to node writable stream", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const dest = new (await import("readable-stream")).Writable({ + write(chunk, encoding, callback) { + expect(chunk.toString()).toEqual("test"); + callback(); + }, + }); + + stream.pipe(dest); + }); + + it("should write nothing when calling pipe and unpipe", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const buffer: Uint8Array[] = []; + const dest = new (await import("readable-stream")).Writable({ + write(chunk, encoding, callback) { + buffer.push(chunk); + callback(); + }, + }); + stream.pipe(dest); + stream.unpipe(); + + expect(buffer).toEqual([]); + }); + + it("should destroy the stream", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const destroySpy = jest.spyOn(stream, "destroy"); + + stream.destroy(); + + expect(destroySpy).toHaveBeenCalledWith(); + }); + + it("should pause the stream and resume", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + const pauseSpy = jest.spyOn(stream, "pause"); + + stream.pause(); + expect(stream.isPaused).toBe(true); + stream.resume(); + expect(stream.isPaused).toBe(false); + + expect(pauseSpy).toHaveBeenCalledWith(); + }); + + it("should read the stream", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + + expect(await stream.read()).toEqual("test"); + expect(await stream.read()).toEqual("test"); + }); + + it("should read the stream as text", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + const stream = new NodePre18StreamWrapper(rawStream); + + const data = await stream.text(); + + expect(data).toEqual("testtest"); + }); + + it("should read the stream as json", async () => { + const rawStream = (await import("readable-stream")).Readable.from([JSON.stringify({ test: "test" })]); + const stream = new NodePre18StreamWrapper(rawStream); + + const data = await stream.json(); + + expect(data).toEqual({ test: "test" }); + }); + + it("should allow use with async iteratable stream", async () => { + const rawStream = (await import("readable-stream")).Readable.from(["test", "test"]); + let data = ""; + const stream = new NodePre18StreamWrapper(rawStream); + for await (const chunk of stream) { + data += chunk; + } + + expect(data).toEqual("testtest"); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts new file mode 100644 index 00000000000..1d171ce6c67 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/UndiciStreamWrapper.test.ts @@ -0,0 +1,153 @@ +import { UndiciStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/UndiciStreamWrapper"; + +describe("UndiciStreamWrapper", () => { + it("should set encoding to utf-8", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const setEncodingSpy = jest.spyOn(stream, "setEncoding"); + + stream.setEncoding("utf-8"); + + expect(setEncodingSpy).toHaveBeenCalledWith("utf-8"); + }); + + it("should register an event listener for readable", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const onSpy = jest.spyOn(stream, "on"); + + stream.on("readable", () => {}); + + expect(onSpy).toHaveBeenCalledWith("readable", expect.any(Function)); + }); + + it("should remove an event listener for data", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const offSpy = jest.spyOn(stream, "off"); + + const fn = () => {}; + stream.on("data", fn); + stream.off("data", fn); + + expect(offSpy).toHaveBeenCalledWith("data", expect.any(Function)); + }); + + it("should write to dest when calling pipe to writable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + const dest = new WritableStream({ + write(chunk) { + expect(chunk).toEqual(new TextEncoder().encode("test")); + }, + }); + + stream.pipe(dest); + }); + + it("should write nothing when calling pipe and unpipe", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const buffer: Uint8Array[] = []; + const dest = new WritableStream({ + write(chunk) { + buffer.push(chunk); + }, + }); + stream.pipe(dest); + stream.unpipe(dest); + + expect(buffer).toEqual([]); + }); + + it("should destroy the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const destroySpy = jest.spyOn(stream, "destroy"); + + stream.destroy(); + + expect(destroySpy).toHaveBeenCalled(); + }); + + it("should pause and resume the stream", async () => { + const rawStream = new ReadableStream(); + const stream = new UndiciStreamWrapper(rawStream); + const pauseSpy = jest.spyOn(stream, "pause"); + const resumeSpy = jest.spyOn(stream, "resume"); + + expect(stream.isPaused).toBe(false); + stream.pause(); + expect(stream.isPaused).toBe(true); + stream.resume(); + + expect(pauseSpy).toHaveBeenCalled(); + expect(resumeSpy).toHaveBeenCalled(); + }); + + it("should read the stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + expect(await stream.read()).toEqual(new TextEncoder().encode("test")); + }); + + it("should read the stream as text", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + + const data = await stream.text(); + + expect(data).toEqual("testtest"); + }); + + it("should read the stream as json", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode(JSON.stringify({ test: "test" }))); + controller.close(); + }, + }); + const stream = new UndiciStreamWrapper(rawStream); + + const data = await stream.json(); + + expect(data).toEqual({ test: "test" }); + }); + + it("should allow use with async iteratable stream", async () => { + const rawStream = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode("test")); + controller.enqueue(new TextEncoder().encode("test")); + controller.close(); + }, + }); + let data = ""; + const stream = new UndiciStreamWrapper(rawStream); + for await (const chunk of stream) { + data += new TextDecoder().decode(chunk); + } + + expect(data).toEqual("testtest"); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts new file mode 100644 index 00000000000..17cf37a2f7f --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/chooseStreamWrapper.test.ts @@ -0,0 +1,43 @@ +import { RUNTIME } from "../../../../src/core/runtime"; +import { chooseStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/chooseStreamWrapper"; +import { Node18UniversalStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper"; +import { NodePre18StreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/NodePre18StreamWrapper"; +import { UndiciStreamWrapper } from "../../../../src/core/fetcher/stream-wrappers/UndiciStreamWrapper"; + +describe("chooseStreamWrapper", () => { + beforeEach(() => { + RUNTIME.type = "unknown"; + RUNTIME.parsedVersion = 0; + }); + + it('should return a Node18UniversalStreamWrapper when RUNTIME.type is "node" and RUNTIME.parsedVersion is not null and RUNTIME.parsedVersion is greater than or equal to 18', async () => { + const expected = new Node18UniversalStreamWrapper(new ReadableStream()); + RUNTIME.type = "node"; + RUNTIME.parsedVersion = 18; + + const result = await chooseStreamWrapper(new ReadableStream()); + + expect(JSON.stringify(result)).toBe(JSON.stringify(expected)); + }); + + it('should return a NodePre18StreamWrapper when RUNTIME.type is "node" and RUNTIME.parsedVersion is not null and RUNTIME.parsedVersion is less than 18', async () => { + const stream = await import("readable-stream"); + const expected = new NodePre18StreamWrapper(new stream.Readable()); + + RUNTIME.type = "node"; + RUNTIME.parsedVersion = 16; + + const result = await chooseStreamWrapper(new stream.Readable()); + + expect(JSON.stringify(result)).toEqual(JSON.stringify(expected)); + }); + + it('should return a Undici when RUNTIME.type is not "node"', async () => { + const expected = new UndiciStreamWrapper(new ReadableStream()); + RUNTIME.type = "browser"; + + const result = await chooseStreamWrapper(new ReadableStream()); + + expect(JSON.stringify(result)).toEqual(JSON.stringify(expected)); + }); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/webpack.test.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/webpack.test.ts new file mode 100644 index 00000000000..557db6dc4ef --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/stream-wrappers/webpack.test.ts @@ -0,0 +1,38 @@ +import webpack from "webpack"; + +describe("test env compatibility", () => { + test("webpack", () => { + return new Promise((resolve, reject) => { + webpack( + { + mode: "production", + entry: "./src/index.ts", + module: { + rules: [ + { + test: /\.tsx?$/, + use: "ts-loader", + exclude: /node_modules/, + }, + ], + }, + resolve: { + extensions: [".tsx", ".ts", ".js"], + }, + }, + (err, stats) => { + try { + expect(err).toBe(null); + if (stats?.hasErrors()) { + console.log(stats?.toString()); + } + expect(stats?.hasErrors()).toBe(false); + resolve(); + } catch (error) { + reject(error); + } + } + ); + }); + }, 60_000); +}); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/test-file.txt b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/test-file.txt new file mode 100644 index 00000000000..c66d471e359 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/unit/fetcher/test-file.txt @@ -0,0 +1 @@ +This is a test file! diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tsconfig.json b/seed/ts-sdk/ts-inline-types/no-inline/tsconfig.json new file mode 100644 index 00000000000..538c94fe015 --- /dev/null +++ b/seed/ts-sdk/ts-inline-types/no-inline/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "extendedDiagnostics": true, + "strict": true, + "target": "ES6", + "module": "CommonJS", + "moduleResolution": "node", + "esModuleInterop": true, + "skipLibCheck": true, + "declaration": true, + "outDir": "dist", + "rootDir": "src", + "baseUrl": "src" + }, + "include": ["src"], + "exclude": [] +} diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts index 2889e6278b9..2ea9f06ad57 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedUndiscriminatedUnionsClient { } export class SeedUndiscriminatedUnionsClient { - constructor(protected readonly _options: SeedUndiscriminatedUnionsClient.Options) {} - protected _union: Union | undefined; + constructor(protected readonly _options: SeedUndiscriminatedUnionsClient.Options) {} + public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts index 90f84c1ff15..e40980b26f7 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts @@ -3,7 +3,6 @@ */ export type KeyType = "name" | "value"; - export const KeyType = { Name: "name", Value: "value", diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts index 2889e6278b9..2ea9f06ad57 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedUndiscriminatedUnionsClient { } export class SeedUndiscriminatedUnionsClient { - constructor(protected readonly _options: SeedUndiscriminatedUnionsClient.Options) {} - protected _union: Union | undefined; + constructor(protected readonly _options: SeedUndiscriminatedUnionsClient.Options) {} + public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts index 90f84c1ff15..e40980b26f7 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts @@ -3,7 +3,6 @@ */ export type KeyType = "name" | "value"; - export const KeyType = { Name: "name", Value: "value", diff --git a/seed/ts-sdk/unions/src/Client.ts b/seed/ts-sdk/unions/src/Client.ts index fcec22ebc30..dd5a1d445f6 100644 --- a/seed/ts-sdk/unions/src/Client.ts +++ b/seed/ts-sdk/unions/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedUnionsClient { } export class SeedUnionsClient { - constructor(protected readonly _options: SeedUnionsClient.Options) {} - protected _union: Union | undefined; + constructor(protected readonly _options: SeedUnionsClient.Options) {} + public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/unions/src/api/resources/types/types/Union.ts b/seed/ts-sdk/unions/src/api/resources/types/types/Union.ts index 1215df193a6..fec56bcc719 100644 --- a/seed/ts-sdk/unions/src/api/resources/types/types/Union.ts +++ b/seed/ts-sdk/unions/src/api/resources/types/types/Union.ts @@ -9,13 +9,13 @@ import * as SeedUnions from "../../../index"; */ export type Union = SeedUnions.Union.Foo | SeedUnions.Union.Bar; -export declare namespace Union { - interface Foo { +export namespace Union { + export interface Foo { type: "foo"; foo: SeedUnions.Foo; } - interface Bar { + export interface Bar { type: "bar"; bar: SeedUnions.Bar; } diff --git a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithBaseProperties.ts b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithBaseProperties.ts index c70f3054c60..3933d4aa9af 100644 --- a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithBaseProperties.ts +++ b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithBaseProperties.ts @@ -9,18 +9,18 @@ export type UnionWithBaseProperties = | SeedUnions.UnionWithBaseProperties.String | SeedUnions.UnionWithBaseProperties.Foo; -export declare namespace UnionWithBaseProperties { - interface Integer extends _Base { +export namespace UnionWithBaseProperties { + export interface Integer extends _Base { type: "integer"; value: number; } - interface String extends _Base { + export interface String extends _Base { type: "string"; value: string; } - interface Foo extends SeedUnions.Foo, _Base { + export interface Foo extends SeedUnions.Foo, _Base { type: "foo"; } diff --git a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithDiscriminant.ts b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithDiscriminant.ts index a5f1174798a..0d5b2c23e7c 100644 --- a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithDiscriminant.ts +++ b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithDiscriminant.ts @@ -9,13 +9,13 @@ export type UnionWithDiscriminant = * This is a Foo field. */ SeedUnions.UnionWithDiscriminant.Foo | SeedUnions.UnionWithDiscriminant.Bar; -export declare namespace UnionWithDiscriminant { - interface Foo { +export namespace UnionWithDiscriminant { + export interface Foo { type: "foo"; foo: SeedUnions.Foo; } - interface Bar { + export interface Bar { type: "bar"; bar: SeedUnions.Bar; } diff --git a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithLiteral.ts b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithLiteral.ts index 673303d649d..525d54b9031 100644 --- a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithLiteral.ts +++ b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithLiteral.ts @@ -6,8 +6,8 @@ import * as SeedUnions from "../../../index"; export type UnionWithLiteral = SeedUnions.UnionWithLiteral.Fern; -export declare namespace UnionWithLiteral { - interface Fern extends _Base { +export namespace UnionWithLiteral { + export interface Fern extends _Base { type: "fern"; value: "fern"; } diff --git a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithOptionalTime.ts b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithOptionalTime.ts index d5e2ea06176..2bfb3525ca8 100644 --- a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithOptionalTime.ts +++ b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithOptionalTime.ts @@ -6,13 +6,13 @@ import * as SeedUnions from "../../../index"; export type UnionWithOptionalTime = SeedUnions.UnionWithOptionalTime.Date_ | SeedUnions.UnionWithOptionalTime.Dateimte; -export declare namespace UnionWithOptionalTime { - interface Date_ { +export namespace UnionWithOptionalTime { + export interface Date_ { type: "date"; value?: string; } - interface Dateimte { + export interface Dateimte { type: "dateimte"; value?: Date; } diff --git a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithPrimitive.ts b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithPrimitive.ts index a5d0519e952..014c915649f 100644 --- a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithPrimitive.ts +++ b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithPrimitive.ts @@ -6,13 +6,13 @@ import * as SeedUnions from "../../../index"; export type UnionWithPrimitive = SeedUnions.UnionWithPrimitive.Integer | SeedUnions.UnionWithPrimitive.String; -export declare namespace UnionWithPrimitive { - interface Integer { +export namespace UnionWithPrimitive { + export interface Integer { type: "integer"; value: number; } - interface String { + export interface String { type: "string"; value: string; } diff --git a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithSingleElement.ts b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithSingleElement.ts index d5e0f9631ac..4be05880cb1 100644 --- a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithSingleElement.ts +++ b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithSingleElement.ts @@ -6,8 +6,8 @@ import * as SeedUnions from "../../../index"; export type UnionWithSingleElement = SeedUnions.UnionWithSingleElement.Foo; -export declare namespace UnionWithSingleElement { - interface Foo extends SeedUnions.Foo { +export namespace UnionWithSingleElement { + export interface Foo extends SeedUnions.Foo { type: "foo"; } } diff --git a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithTime.ts b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithTime.ts index 210ef6fef03..dd937debe01 100644 --- a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithTime.ts +++ b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithTime.ts @@ -9,18 +9,18 @@ export type UnionWithTime = | SeedUnions.UnionWithTime.Date_ | SeedUnions.UnionWithTime.Datetime; -export declare namespace UnionWithTime { - interface Value { +export namespace UnionWithTime { + export interface Value { type: "value"; value: number; } - interface Date_ { + export interface Date_ { type: "date"; value: string; } - interface Datetime { + export interface Datetime { type: "datetime"; value: Date; } diff --git a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithUnknown.ts b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithUnknown.ts index e05d672181a..59972746956 100644 --- a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithUnknown.ts +++ b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithUnknown.ts @@ -6,12 +6,12 @@ import * as SeedUnions from "../../../index"; export type UnionWithUnknown = SeedUnions.UnionWithUnknown.Foo | SeedUnions.UnionWithUnknown.Unknown; -export declare namespace UnionWithUnknown { - interface Foo extends SeedUnions.Foo { +export namespace UnionWithUnknown { + export interface Foo extends SeedUnions.Foo { type: "foo"; } - interface Unknown { + export interface Unknown { type: "unknown"; } } diff --git a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithoutKey.ts b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithoutKey.ts index 037fb65ab12..b4918e2526f 100644 --- a/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithoutKey.ts +++ b/seed/ts-sdk/unions/src/api/resources/types/types/UnionWithoutKey.ts @@ -10,12 +10,12 @@ export type UnionWithoutKey = * This is a bar field. */ | SeedUnions.UnionWithoutKey.Bar; -export declare namespace UnionWithoutKey { - interface Foo extends SeedUnions.Foo { +export namespace UnionWithoutKey { + export interface Foo extends SeedUnions.Foo { type: "foo"; } - interface Bar extends SeedUnions.Bar { + export interface Bar extends SeedUnions.Bar { type: "bar"; } } diff --git a/seed/ts-sdk/unions/src/api/resources/union/types/Shape.ts b/seed/ts-sdk/unions/src/api/resources/union/types/Shape.ts index 95d573a7a36..d46544c5c5d 100644 --- a/seed/ts-sdk/unions/src/api/resources/union/types/Shape.ts +++ b/seed/ts-sdk/unions/src/api/resources/union/types/Shape.ts @@ -6,12 +6,12 @@ import * as SeedUnions from "../../../index"; export type Shape = SeedUnions.Shape.Circle | SeedUnions.Shape.Square; -export declare namespace Shape { - interface Circle extends SeedUnions.Circle, _Base { +export namespace Shape { + export interface Circle extends SeedUnions.Circle, _Base { type: "circle"; } - interface Square extends SeedUnions.Square, _Base { + export interface Square extends SeedUnions.Square, _Base { type: "square"; } diff --git a/seed/ts-sdk/unknown/no-custom-config/src/Client.ts b/seed/ts-sdk/unknown/no-custom-config/src/Client.ts index 5643ebbfd88..a2b8cb10302 100644 --- a/seed/ts-sdk/unknown/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/unknown/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedUnknownAsAnyClient { } export class SeedUnknownAsAnyClient { - constructor(protected readonly _options: SeedUnknownAsAnyClient.Options) {} - protected _unknown: Unknown | undefined; + constructor(protected readonly _options: SeedUnknownAsAnyClient.Options) {} + public get unknown(): Unknown { return (this._unknown ??= new Unknown(this._options)); } diff --git a/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts b/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts index 5643ebbfd88..a2b8cb10302 100644 --- a/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts +++ b/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedUnknownAsAnyClient { } export class SeedUnknownAsAnyClient { - constructor(protected readonly _options: SeedUnknownAsAnyClient.Options) {} - protected _unknown: Unknown | undefined; + constructor(protected readonly _options: SeedUnknownAsAnyClient.Options) {} + public get unknown(): Unknown { return (this._unknown ??= new Unknown(this._options)); } diff --git a/seed/ts-sdk/validation/src/api/types/Shape.ts b/seed/ts-sdk/validation/src/api/types/Shape.ts index 0d256b8b1c4..d80208737b9 100644 --- a/seed/ts-sdk/validation/src/api/types/Shape.ts +++ b/seed/ts-sdk/validation/src/api/types/Shape.ts @@ -3,7 +3,6 @@ */ export type Shape = "SQUARE" | "CIRCLE" | "TRIANGLE"; - export const Shape = { Square: "SQUARE", Circle: "CIRCLE", diff --git a/seed/ts-sdk/variables/src/Client.ts b/seed/ts-sdk/variables/src/Client.ts index 807156edd09..347bde94942 100644 --- a/seed/ts-sdk/variables/src/Client.ts +++ b/seed/ts-sdk/variables/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedVariablesClient { } export class SeedVariablesClient { - constructor(protected readonly _options: SeedVariablesClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedVariablesClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/version-no-default/src/Client.ts b/seed/ts-sdk/version-no-default/src/Client.ts index 9ca004ffd1a..d920fc35b56 100644 --- a/seed/ts-sdk/version-no-default/src/Client.ts +++ b/seed/ts-sdk/version-no-default/src/Client.ts @@ -27,10 +27,10 @@ export declare namespace SeedVersionClient { } export class SeedVersionClient { - constructor(protected readonly _options: SeedVersionClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedVersionClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/version/src/Client.ts b/seed/ts-sdk/version/src/Client.ts index de3a2acb811..fcdcc08adc6 100644 --- a/seed/ts-sdk/version/src/Client.ts +++ b/seed/ts-sdk/version/src/Client.ts @@ -27,10 +27,10 @@ export declare namespace SeedVersionClient { } export class SeedVersionClient { - constructor(protected readonly _options: SeedVersionClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedVersionClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/test-definitions-openapi/fern/apis/inline-schema-reference/openapi.yml b/test-definitions-openapi/fern/apis/inline-schema-reference/openapi.yml deleted file mode 100644 index 6defb379eb1..00000000000 --- a/test-definitions-openapi/fern/apis/inline-schema-reference/openapi.yml +++ /dev/null @@ -1,116 +0,0 @@ -openapi: 3.0.0 -info: - title: Sample API - version: 1.0.0 -paths: - /example: - get: - summary: Get Example - responses: - "200": - description: Successful response - content: - application/json: - schema: - oneOf: - - $ref: "#/components/schemas/Schema1" - - $ref: "#/components/schemas/Schema2" - /root: - post: - requestBody: - content: - application/json: - schema: - type: object - properties: - foo: - type: string - bar: - type: object - properties: - foo: - type: string - inner_bar: - type: object - properties: - foo: - type: string - bar: - type: string - responses: - "200": - description: Successful response - content: - application/json: - schema: - type: object - properties: - foo: - type: string - bar: - type: object - properties: - foo: - type: string - inner_bar: - type: object - properties: - foo: - type: string - bar: - type: string - -components: - responses: - NotFound: - description: Resource not found - content: - application/json: - schema: - type: object - properties: - message: - type: string - schemas: - Schema1: - type: object - properties: - id: - type: integer - name: - type: string - Schema2: - type: object - properties: - email: - type: string - age: - type: integer - testEnum: - type: string - enum: - - test1 - - test2 - - test3 - testDiscriminatedUnion: - discriminator: - propertyName: objectType - oneOf: - - type: object - properties: - objectType: - type: string - - type: object - properties: - objectType: - type: string - testUnion: - oneOf: - - type: object - properties: - a: - type: string - - type: object - properties: - b: - type: string diff --git a/test-definitions-openapi/fern/apis/inline-schema-reference/generators.yml b/test-definitions-openapi/fern/apis/ts-inline-schema-reference/generators.yml similarity index 100% rename from test-definitions-openapi/fern/apis/inline-schema-reference/generators.yml rename to test-definitions-openapi/fern/apis/ts-inline-schema-reference/generators.yml diff --git a/test-definitions-openapi/fern/apis/ts-inline-schema-reference/openapi.yml b/test-definitions-openapi/fern/apis/ts-inline-schema-reference/openapi.yml new file mode 100644 index 00000000000..fc2b8681d14 --- /dev/null +++ b/test-definitions-openapi/fern/apis/ts-inline-schema-reference/openapi.yml @@ -0,0 +1,135 @@ +openapi: 3.0.0 +info: + title: Sample API + version: 1.0.0 +paths: + /example: + get: + summary: Get Example + responses: + "200": + description: Successful response + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/Schema1" + - $ref: "#/components/schemas/Schema2" + /root: + post: + requestBody: + content: + application/json: + schema: + type: object + properties: + foo: + type: string + bar: + type: object + properties: + foo: + type: string + inner_bar: + type: object + properties: + foo: + type: string + bar: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: object + properties: + foo: + type: string + bar: + type: object + properties: + foo: + type: string + inner_bar: + type: object + properties: + foo: + type: string + bar: + type: string + +components: + responses: + NotFound: + description: Resource not found + content: + application/json: + schema: + type: object + properties: + message: + type: string + schemas: + Schema1: + type: object + properties: + id: + type: integer + name: + type: string + inline_union_map: + type: object + additionalProperties: + anyOf: + - type: string + nullable: true + - type: number + - type: boolean + - type: array + Schema2: + type: object + properties: + email: + type: string + age: + type: integer + testEnum: + type: string + enum: + - test1 + - test2 + - test3 + testDiscriminatedUnion: + discriminator: + propertyName: objectType + oneOf: + - type: object + properties: + objectType: + type: string + - type: object + properties: + objectType: + type: string + testUnion: + oneOf: + - type: object + properties: + a: + type: string + - type: object + properties: + b: + type: string + + RootUnionMap: + type: object + additionalProperties: + anyOf: + - type: string + nullable: true + - type: number + - type: boolean + - type: array diff --git a/test-definitions/fern/apis/inline-types/definition/__package__.yml b/test-definitions/fern/apis/inline-types/definition/__package__.yml deleted file mode 100644 index a2a0cbfac7c..00000000000 --- a/test-definitions/fern/apis/inline-types/definition/__package__.yml +++ /dev/null @@ -1,61 +0,0 @@ -service: - base-path: /root - auth: false - endpoints: - getRoot: - path: /root - method: POST - request: - body: - properties: - bar: InlineType1 - foo: string - content-type: application/json - name: PostRootRequest - response: RootType1 - -types: - RootType1: - properties: - foo: string - bar: InlineType1 - - InlineType1: - inline: true - properties: - foo: string - bar: - type: NestedInlineType1 - - InlineType2: - inline: true - properties: - baz: string - - NestedInlineType1: - inline: true - properties: - foo: string - bar: string - myEnum: InlineEnum - - InlinedDiscriminatedUnion1: - inline: true - union: - type1: InlineType1 - type2: InlineType2 - - InlinedUndiscriminatedUnion1: - inline: true - discriminated: false - union: - - type: InlineType1 - - type: InlineType2 - - InlineEnum: - inline: true - enum: - - SUNNY - - CLOUDY - - RAINING - - SNOWING diff --git a/test-definitions/fern/apis/inline-types/definition/api.yml b/test-definitions/fern/apis/inline-types/definition/api.yml deleted file mode 100644 index a82930c145b..00000000000 --- a/test-definitions/fern/apis/inline-types/definition/api.yml +++ /dev/null @@ -1 +0,0 @@ -name: object diff --git a/test-definitions/fern/apis/inline-types/generators.yml b/test-definitions/fern/apis/inline-types/generators.yml deleted file mode 100644 index 0967ef424bc..00000000000 --- a/test-definitions/fern/apis/inline-types/generators.yml +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test-definitions/fern/apis/java-custom-package-prefix/definition/api.yml b/test-definitions/fern/apis/java-custom-package-prefix/definition/api.yml new file mode 100644 index 00000000000..c437dc0ab29 --- /dev/null +++ b/test-definitions/fern/apis/java-custom-package-prefix/definition/api.yml @@ -0,0 +1,4 @@ +name: api +error-discrimination: + strategy: status-code +auth: bearer diff --git a/test-definitions/fern/apis/java-custom-package-prefix/definition/imdb.yml b/test-definitions/fern/apis/java-custom-package-prefix/definition/imdb.yml new file mode 100644 index 00000000000..4f013d969e8 --- /dev/null +++ b/test-definitions/fern/apis/java-custom-package-prefix/definition/imdb.yml @@ -0,0 +1,42 @@ +types: + MovieId: string + + Movie: + properties: + id: MovieId + title: string + rating: + type: double + docs: The rating scale is one to five stars + + CreateMovieRequest: + properties: + title: string + rating: double + +service: + auth: false + base-path: /movies + endpoints: + createMovie: + docs: Add a movie to the database + method: POST + path: /create-movie + request: CreateMovieRequest + response: + type: MovieId + status-code: 201 + + getMovie: + method: GET + path: /{movieId} + path-parameters: + movieId: MovieId + response: Movie + errors: + - MovieDoesNotExistError + +errors: + MovieDoesNotExistError: + status-code: 404 + type: MovieId diff --git a/seed/go-model/inline-types/.mock/generators.yml b/test-definitions/fern/apis/java-custom-package-prefix/generators.yml similarity index 100% rename from seed/go-model/inline-types/.mock/generators.yml rename to test-definitions/fern/apis/java-custom-package-prefix/generators.yml diff --git a/test-definitions/fern/apis/ts-inline-types/definition/__package__.yml b/test-definitions/fern/apis/ts-inline-types/definition/__package__.yml new file mode 100644 index 00000000000..af14bf356cd --- /dev/null +++ b/test-definitions/fern/apis/ts-inline-types/definition/__package__.yml @@ -0,0 +1,365 @@ +service: + base-path: /root + auth: false + endpoints: + getRoot: + path: /root + method: POST + request: + body: + properties: + bar: RequestTypeInlineType1 + foo: string + content-type: application/json + name: PostRootRequest + response: RootType1 + getDiscriminatedUnion: + path: /discriminated-union + method: POST + request: + body: + properties: + bar: DiscriminatedUnion1 + foo: string + content-type: application/json + name: GetDiscriminatedUnionRequest + getUndiscriminatedUnion: + path: /undiscriminated-union + method: POST + request: + body: + properties: + bar: UndiscriminatedUnion1 + foo: string + content-type: application/json + name: GetUndiscriminatedUnionRequest + +types: + # this is also the type that would be produced by + AliasMapInline: map + AliasSetInline: set + AliasListInline: list + + AliasInlineValue: + inline: true + properties: + foo: string + bar: string + + RequestTypeInlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + + RootType1: + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: RootType1InlineType1 + docs: lorem ipsum + fooMap: + type: map + docs: lorem ipsum + fooList: + type: list + docs: lorem ipsum + fooSet: + type: set + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1FooMapValue: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1FooListItem: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1FooSetItem: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: RootType1InlineType1NestedInlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + RootType1InlineType1NestedInlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: string + docs: lorem ipsum + myEnum: + type: InlineEnum1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1: + inline: true + docs: lorem ipsum + union: + type1: + type: DiscriminatedUnion1InlineType1 + docs: lorem ipsum + type2: + type: DiscriminatedUnion1InlineType2 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: DiscriminatedUnion1InlineType1InlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1InlineType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + DiscriminatedUnion1InlineType2: + inline: true + docs: lorem ipsum + properties: + baz: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1: + inline: true + docs: lorem ipsum + discriminated: false + union: + - type: UndiscriminatedUnion1InlineType1 + docs: lorem ipsum + - type: UndiscriminatedUnion1InlineType2 + docs: lorem ipsum + - type: UndiscriminatedUnion1DiscriminatedUnion1 + docs: lorem ipsum + - type: UndiscriminatedUnion1DiscriminatedUnion1 + docs: lorem ipsum + - type: UndiscriminatedUnion1InlineEnum1 + docs: lorem ipsum + - type: UserId + docs: lorem ipsum + - type: list + docs: lorem ipsum + - type: set + docs: lorem ipsum + - type: map + docs: lorem ipsum + - type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: UndiscriminatedUnion1InlineType1InlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineType2: + inline: true + docs: lorem ipsum + properties: + baz: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + InlineEnum1: + inline: true + docs: lorem ipsum + enum: + - SUNNY + - CLOUDY + - RAINING + - SNOWING + + UndiscriminatedUnion1DiscriminatedUnion1: + inline: true + docs: lorem ipsum + union: + type1: + type: UndiscriminatedUnion1DiscriminatedUnion1InlineType1 + docs: lorem ipsum + type2: + type: UndiscriminatedUnion1DiscriminatedUnion1InlineType2 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1DiscriminatedUnion1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + bar: + type: UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1 + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1DiscriminatedUnion1InlineType2: + inline: true + docs: lorem ipsum + properties: + baz: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineEnum1: + inline: true + docs: lorem ipsum + enum: + - SUNNY + - CLOUDY + - RAINING + - SNOWING + + UserId: + type: string + docs: lorem ipsum + + UndiscriminatedUnion1InlineListItem1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineSetItem1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + UndiscriminatedUnion1InlineMapItem1: + inline: true + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum + ref: + type: ReferenceType + docs: lorem ipsum + + ReferenceType: + docs: lorem ipsum + properties: + foo: + type: string + docs: lorem ipsum diff --git a/seed/fastapi/inline-types/.mock/definition/api.yml b/test-definitions/fern/apis/ts-inline-types/definition/api.yml similarity index 100% rename from seed/fastapi/inline-types/.mock/definition/api.yml rename to test-definitions/fern/apis/ts-inline-types/definition/api.yml diff --git a/seed/go-sdk/inline-types/.mock/generators.yml b/test-definitions/fern/apis/ts-inline-types/generators.yml similarity index 100% rename from seed/go-sdk/inline-types/.mock/generators.yml rename to test-definitions/fern/apis/ts-inline-types/generators.yml