diff --git a/src/lib/code-sample/go.ts b/src/lib/code-sample/go.ts index 3a7d202..19517f3 100644 --- a/src/lib/code-sample/go.ts +++ b/src/lib/code-sample/go.ts @@ -2,7 +2,6 @@ import { pascalCase } from 'change-case' import type { Json, NonNullJson } from 'lib/json.js' -import { createJsonResponse } from './json.js' import type { CodeSampleDefinition, Context } from './schema.js' const defaultGoPackageName = 'api' @@ -10,7 +9,7 @@ const goPackageBasePath = 'github.com/seamapi/go' export const createGoRequest = ( { request }: CodeSampleDefinition, - context: Context, + _context: Context, ): string => { const isReqWithParams = Object.keys(request.parameters).length !== 0 const goPackageName = getGoPackageName(request.path) @@ -21,8 +20,7 @@ export const createGoRequest = ( }) const requestStructName = getRequestStructName(request.path) - const formattedArgs = formatGoArgs(request.parameters, { - ...context, + const formattedArgs = formatGoRequestArgs(request.parameters, { goPackageName, requestStructName, }) @@ -86,20 +84,27 @@ const getRequestStructName = (path: string): string => { const removeUntilSecondSlash = (str: string): string => str.replace(/^\/[^/]*/, '') -interface GoContext extends Context { +interface GoContext { goPackageName: string requestStructName: string } -const formatGoArgs = (jsonParams: NonNullJson, context: GoContext): string => +const formatGoRequestArgs = ( + jsonParams: NonNullJson, + context: GoContext, +): string => Object.entries(jsonParams as Record) .map(([paramKey, paramValue]) => { - const formattedValue = formatGoValue(paramKey, paramValue, context) + const formattedValue = formatGoRequestArgValue( + paramKey, + paramValue, + context, + ) return `${pascalCase(paramKey)}: ${formattedValue}` }) .join(', ') -const formatGoValue = ( +const formatGoRequestArgValue = ( key: string, value: Json, context: GoContext, @@ -113,17 +118,17 @@ const formatGoValue = ( return `${defaultGoPackageName}.Float64(${value})` if (Array.isArray(value)) { - return formatGoArray(key, value, context) + return formatGoRequestArrayValue(key, value, context) } if (typeof value === 'object') { - return formatGoObject(key, value, context) + return formatGoRequestObjectValue(key, value, context) } throw new Error(`Unsupported type: ${typeof value}`) } -const formatGoArray = ( +const formatGoRequestArrayValue = ( key: string, value: Json[], context: GoContext, @@ -134,7 +139,9 @@ const formatGoArray = ( return 'nil' } - const formattedItems = value.map((v) => formatGoValue(key, v, context)) + const formattedItems = value.map((v) => + formatGoRequestArgValue(key, v, context), + ) const item = value[0] if (item == null) { throw new Error(`Null value in response array for '${key}'`) @@ -163,7 +170,7 @@ const getPrimitiveTypeName = (value: string | number | boolean): string => { } } -const formatGoObject = ( +const formatGoRequestObjectValue = ( key: string, value: Record, context: GoContext, @@ -175,7 +182,7 @@ const formatGoObject = ( const formattedEntries = Object.entries(value) .map( ([objKey, val]) => - `${pascalCase(objKey)}: ${formatGoValue(objKey, val, context)}`, + `${pascalCase(objKey)}: ${formatGoRequestArgValue(objKey, val, context)}`, ) .join(', ') @@ -184,4 +191,183 @@ const formatGoObject = ( return `${goPackageName}.${pascalCase(`${requestStructName} ${key}`)}{${formattedEntries}}` } -export const createGoResponse = createJsonResponse +export const createGoResponse = ( + { response, title }: CodeSampleDefinition, + context: Context, +): string => { + const { endpoint } = context + + if (endpoint.response.responseType === 'void') return 'nil' + + const { responseKey, resourceType } = endpoint.response + const responseValue = response?.body?.[responseKey] + + if (responseValue == null) { + throw new Error(`Missing ${responseKey} for '${title}'`) + } + + const responseResourceGoStructName = pascalCase(resourceType) + + return Array.isArray(responseValue) + ? formatGoArrayResponse(responseValue, responseResourceGoStructName, title) + : formatGoResponse(responseValue, responseResourceGoStructName) +} + +const formatGoArrayResponse = ( + responseArray: Json[], + responseResourceGoStructName: string, + title: string, +): string => { + const formattedItems = responseArray + .map((v) => { + if (v == null) { + throw new Error(`Null value in response array for '${title}'`) + } + return formatGoResponse(v, responseResourceGoStructName) + }) + .join(', ') + + return `[]${defaultGoPackageName}.${responseResourceGoStructName}{${formattedItems}}` +} + +const formatGoResponse = ( + responseParams: NonNullJson, + responseResourceGoStructName: string, +): string => { + const params = formatGoResponseParams( + responseParams, + responseResourceGoStructName, + ) + return `${defaultGoPackageName}.${responseResourceGoStructName}{${params}}` +} + +const formatGoResponseParams = ( + jsonParams: NonNullJson, + responseResourceGoStructName: string, +): string => + Object.entries(jsonParams as Record) + .map(([paramKey, paramValue]) => { + const formattedValue = formatGoResponseParamValue( + { + key: paramKey, + value: paramValue, + propertyChain: [], + }, + responseResourceGoStructName, + ) + return `${pascalCase(paramKey)}: ${formattedValue}` + }) + .join(', ') + +const formatGoResponseParamValue = ( + { + key, + value, + propertyChain, + }: { key: string; value: Json; propertyChain: string[] }, + responseResourceGoStructName: string, +): string => { + if (value === null) return 'nil' + if (typeof value === 'boolean') return value.toString() + if (typeof value === 'number') return value.toString() + if (typeof value === 'string') return `"${value}"` + + if (Array.isArray(value)) { + return formatGoResponseArrayValue( + { key, value, propertyChain }, + responseResourceGoStructName, + ) + } + + if (typeof value === 'object') { + return formatGoResponseObjectValue( + { key, value, propertyChain }, + responseResourceGoStructName, + ) + } + + throw new Error(`Unsupported type: ${typeof value}`) +} + +const formatGoResponseArrayValue = ( + { + key, + value, + propertyChain, + }: { key: string; value: Json[]; propertyChain: string[] }, + responseResourceGoStructName: string, +): string => { + if (value.length === 0) { + return 'nil' + } + + const rawItem = value[0] + if (rawItem == null) { + throw new Error(`Null value in response array for '${key}'`) + } + + const updatedPropertyChain = [...propertyChain, key] + + const formattedItems = value.map((v) => + formatGoResponseParamValue( + { key, value: v, propertyChain: updatedPropertyChain }, + responseResourceGoStructName, + ), + ) + + if (isPrimitiveValue(rawItem)) { + const arrayType = getPrimitiveTypeName(rawItem) + + return `[]${arrayType}{${formattedItems.join(', ')}}` + } else { + const structName = getStructName( + updatedPropertyChain, + responseResourceGoStructName, + ) + + return `[]${structName}{${formattedItems.join(', ')}}` + } +} + +const formatGoResponseObjectValue = ( + { + key, + value, + propertyChain, + }: { key: string; value: Record; propertyChain: string[] }, + responseResourceGoStructName: string, +): string => { + if (Object.keys(value).length === 0) { + return 'struct{}{}' + } + + const updatedPropertyChain = [...propertyChain, key] + const structName = getStructName( + updatedPropertyChain, + responseResourceGoStructName, + ) + + const formattedEntries = Object.entries(value) + .map(([objKey, val]) => { + const formattedValue = formatGoResponseParamValue( + { + key: objKey, + value: val, + propertyChain: updatedPropertyChain, + }, + responseResourceGoStructName, + ) + return `${pascalCase(objKey)}: ${formattedValue}` + }) + .join(', ') + + return `${defaultGoPackageName}.${structName}{${formattedEntries}}` +} + +const getStructName = ( + propertyChain: string[], + responseResourceGoStructName: string, +): string => { + const fullPropertyChain = [responseResourceGoStructName, ...propertyChain] + return pascalCase(fullPropertyChain.join('_')) +} diff --git a/test/fixtures/types/code-sample-definitions.ts b/test/fixtures/types/code-sample-definitions.ts index fa74597..044b909 100644 --- a/test/fixtures/types/code-sample-definitions.ts +++ b/test/fixtures/types/code-sample-definitions.ts @@ -17,6 +17,9 @@ export default [ number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, array_prop: ['foo', 'bar'], }, diff --git a/test/snapshots/blueprint.test.ts.md b/test/snapshots/blueprint.test.ts.md index c9b23d5..0595c3c 100644 --- a/test/snapshots/blueprint.test.ts.md +++ b/test/snapshots/blueprint.test.ts.md @@ -136,14 +136,14 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: 'api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}', response_syntax: 'json', title: 'Go', }, javascript: { request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'JavaScript', }, @@ -151,28 +151,28 @@ Generated by [AVA](https://avajs.dev). request: `foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', - response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]', + response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]', response_syntax: 'php', title: 'PHP', }, python: { request: 'seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'python', - response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])', + response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])', response_syntax: 'python', title: 'Python', }, ruby: { request: 'seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'ruby', - response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}', + response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}', response_syntax: 'ruby', title: 'Ruby', }, seam_cli: { request: 'seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"', request_syntax: 'bash', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'Seam CLI', }, @@ -197,6 +197,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -235,14 +238,14 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: 'api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}', response_syntax: 'json', title: 'Go', }, javascript: { request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'JavaScript', }, @@ -250,28 +253,28 @@ Generated by [AVA](https://avajs.dev). request: `foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', - response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]', + response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]', response_syntax: 'php', title: 'PHP', }, python: { request: 'seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'python', - response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])', + response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])', response_syntax: 'python', title: 'Python', }, ruby: { request: 'seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'ruby', - response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}', + response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}', response_syntax: 'ruby', title: 'Ruby', }, seam_cli: { request: 'seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"', request_syntax: 'bash', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'Seam CLI', }, @@ -296,6 +299,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -334,7 +340,7 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', - response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', + response: '[]api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}', response_syntax: 'json', title: 'Go', }, @@ -437,7 +443,7 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', - response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', + response: '[]api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}', response_syntax: 'json', title: 'Go', }, @@ -540,14 +546,14 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: 'api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}', response_syntax: 'json', title: 'Go', }, javascript: { request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'JavaScript', }, @@ -555,28 +561,28 @@ Generated by [AVA](https://avajs.dev). request: `foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', - response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]', + response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]', response_syntax: 'php', title: 'PHP', }, python: { request: 'seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'python', - response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])', + response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])', response_syntax: 'python', title: 'Python', }, ruby: { request: 'seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'ruby', - response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}', + response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}', response_syntax: 'ruby', title: 'Ruby', }, seam_cli: { request: 'seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"', request_syntax: 'bash', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'Seam CLI', }, @@ -601,6 +607,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -639,14 +648,14 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: 'api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}', response_syntax: 'json', title: 'Go', }, javascript: { request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'JavaScript', }, @@ -654,28 +663,28 @@ Generated by [AVA](https://avajs.dev). request: `foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', - response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]', + response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]', response_syntax: 'php', title: 'PHP', }, python: { request: 'seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'python', - response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])', + response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])', response_syntax: 'python', title: 'Python', }, ruby: { request: 'seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'ruby', - response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}', + response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}', response_syntax: 'ruby', title: 'Ruby', }, seam_cli: { request: 'seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"', request_syntax: 'bash', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'Seam CLI', }, @@ -700,6 +709,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -738,7 +750,7 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', - response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', + response: '[]api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}', response_syntax: 'json', title: 'Go', }, @@ -841,7 +853,7 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', - response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', + response: '[]api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}', response_syntax: 'json', title: 'Go', }, @@ -944,14 +956,14 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: 'api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}', response_syntax: 'json', title: 'Go', }, javascript: { request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'JavaScript', }, @@ -959,28 +971,28 @@ Generated by [AVA](https://avajs.dev). request: `foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', - response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]', + response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]', response_syntax: 'php', title: 'PHP', }, python: { request: 'seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'python', - response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])', + response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])', response_syntax: 'python', title: 'Python', }, ruby: { request: 'seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'ruby', - response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}', + response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}', response_syntax: 'ruby', title: 'Ruby', }, seam_cli: { request: 'seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"', request_syntax: 'bash', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'Seam CLI', }, @@ -1005,6 +1017,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -1043,14 +1058,14 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: 'api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}', response_syntax: 'json', title: 'Go', }, javascript: { request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'JavaScript', }, @@ -1058,28 +1073,28 @@ Generated by [AVA](https://avajs.dev). request: `foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', - response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]', + response: '["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]', response_syntax: 'php', title: 'PHP', }, python: { request: 'seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'python', - response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])', + response: 'Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])', response_syntax: 'python', title: 'Python', }, ruby: { request: 'seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")', request_syntax: 'ruby', - response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}', + response: '{"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}', response_syntax: 'ruby', title: 'Ruby', }, seam_cli: { request: 'seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"', request_syntax: 'bash', - response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', + response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}', response_syntax: 'json', title: 'Seam CLI', }, @@ -1104,6 +1119,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -1142,7 +1160,7 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', - response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', + response: '[]api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}', response_syntax: 'json', title: 'Go', }, @@ -1245,7 +1263,7 @@ Generated by [AVA](https://avajs.dev). ␊ client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', - response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', + response: '[]api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}', response_syntax: 'json', title: 'Go', }, @@ -1356,7 +1374,7 @@ Generated by [AVA](https://avajs.dev). go: { request: 'client.Transport.Air.Planes.List(context.Background())', request_syntax: 'go', - response: '[{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]', + response: '[]api.Plane{api.Plane{PlaneId: "9d3163f9-9185-40d3-a0ce-a03d3c7ce402", Name: "Woosh"}}', response_syntax: 'json', title: 'Go', }, @@ -1444,7 +1462,7 @@ Generated by [AVA](https://avajs.dev). go: { request: 'client.Transport.Air.Planes.List(context.Background())', request_syntax: 'go', - response: '[{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]', + response: '[]api.Plane{api.Plane{PlaneId: "9d3163f9-9185-40d3-a0ce-a03d3c7ce402", Name: "Woosh"}}', response_syntax: 'json', title: 'Go', }, @@ -1532,7 +1550,7 @@ Generated by [AVA](https://avajs.dev). go: { request: 'client.Transport.Air.Planes.List(context.Background())', request_syntax: 'go', - response: '[{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]', + response: '[]api.Plane{api.Plane{PlaneId: "9d3163f9-9185-40d3-a0ce-a03d3c7ce402", Name: "Woosh"}}', response_syntax: 'json', title: 'Go', }, @@ -1634,7 +1652,7 @@ Generated by [AVA](https://avajs.dev). go: { request: 'client.Deprecated.Undocumented.Endpoint(context.Background())', request_syntax: 'go', - response: '{}', + response: 'nil', response_syntax: 'json', title: 'Go', }, @@ -1713,7 +1731,7 @@ Generated by [AVA](https://avajs.dev). go: { request: 'client.Deprecated.Undocumented.Endpoint(context.Background())', request_syntax: 'go', - response: '{}', + response: 'nil', response_syntax: 'json', title: 'Go', }, @@ -1792,7 +1810,7 @@ Generated by [AVA](https://avajs.dev). go: { request: 'client.Deprecated.Undocumented.Endpoint(context.Background())', request_syntax: 'go', - response: '{}', + response: 'nil', response_syntax: 'json', title: 'Go', }, @@ -2014,7 +2032,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}`, response_syntax: 'json', title: 'Go', }, @@ -2023,7 +2041,7 @@ Generated by [AVA](https://avajs.dev). await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'JavaScript', }, @@ -2033,7 +2051,7 @@ Generated by [AVA](https://avajs.dev). $seam->foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', response: `// php␊ - ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]`, + ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]`, response_syntax: 'php', title: 'PHP', }, @@ -2042,7 +2060,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'python', response: `// python␊ - Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])`, + Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])`, response_syntax: 'python', title: 'Python', }, @@ -2051,7 +2069,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'ruby', response: `// ruby␊ - {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}`, + {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}`, response_syntax: 'ruby', title: 'Ruby', }, @@ -2060,7 +2078,7 @@ Generated by [AVA](https://avajs.dev). seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"`, request_syntax: 'bash', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'Seam CLI', }, @@ -2085,6 +2103,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -2125,7 +2146,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}`, response_syntax: 'json', title: 'Go', }, @@ -2134,7 +2155,7 @@ Generated by [AVA](https://avajs.dev). await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'JavaScript', }, @@ -2144,7 +2165,7 @@ Generated by [AVA](https://avajs.dev). $seam->foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', response: `// php␊ - ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]`, + ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]`, response_syntax: 'php', title: 'PHP', }, @@ -2153,7 +2174,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'python', response: `// python␊ - Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])`, + Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])`, response_syntax: 'python', title: 'Python', }, @@ -2162,7 +2183,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'ruby', response: `// ruby␊ - {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}`, + {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}`, response_syntax: 'ruby', title: 'Ruby', }, @@ -2171,7 +2192,7 @@ Generated by [AVA](https://avajs.dev). seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"`, request_syntax: 'bash', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'Seam CLI', }, @@ -2196,6 +2217,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -2236,7 +2260,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', response: `// json␊ - [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, + []api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}`, response_syntax: 'json', title: 'Go', }, @@ -2351,7 +2375,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', response: `// json␊ - [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, + []api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}`, response_syntax: 'json', title: 'Go', }, @@ -2466,7 +2490,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}`, response_syntax: 'json', title: 'Go', }, @@ -2475,7 +2499,7 @@ Generated by [AVA](https://avajs.dev). await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'JavaScript', }, @@ -2485,7 +2509,7 @@ Generated by [AVA](https://avajs.dev). $seam->foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', response: `// php␊ - ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]`, + ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]`, response_syntax: 'php', title: 'PHP', }, @@ -2494,7 +2518,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'python', response: `// python␊ - Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])`, + Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])`, response_syntax: 'python', title: 'Python', }, @@ -2503,7 +2527,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'ruby', response: `// ruby␊ - {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}`, + {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}`, response_syntax: 'ruby', title: 'Ruby', }, @@ -2512,7 +2536,7 @@ Generated by [AVA](https://avajs.dev). seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"`, request_syntax: 'bash', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'Seam CLI', }, @@ -2537,6 +2561,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -2577,7 +2604,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}`, response_syntax: 'json', title: 'Go', }, @@ -2586,7 +2613,7 @@ Generated by [AVA](https://avajs.dev). await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'JavaScript', }, @@ -2596,7 +2623,7 @@ Generated by [AVA](https://avajs.dev). $seam->foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', response: `// php␊ - ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]`, + ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]`, response_syntax: 'php', title: 'PHP', }, @@ -2605,7 +2632,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'python', response: `// python␊ - Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])`, + Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])`, response_syntax: 'python', title: 'Python', }, @@ -2614,7 +2641,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'ruby', response: `// ruby␊ - {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}`, + {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}`, response_syntax: 'ruby', title: 'Ruby', }, @@ -2623,7 +2650,7 @@ Generated by [AVA](https://avajs.dev). seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"`, request_syntax: 'bash', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'Seam CLI', }, @@ -2648,6 +2675,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -2688,7 +2718,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', response: `// json␊ - [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, + []api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}`, response_syntax: 'json', title: 'Go', }, @@ -2803,7 +2833,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', response: `// json␊ - [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, + []api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}`, response_syntax: 'json', title: 'Go', }, @@ -2918,7 +2948,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}`, response_syntax: 'json', title: 'Go', }, @@ -2927,7 +2957,7 @@ Generated by [AVA](https://avajs.dev). await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'JavaScript', }, @@ -2937,7 +2967,7 @@ Generated by [AVA](https://avajs.dev). $seam->foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', response: `// php␊ - ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]`, + ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]`, response_syntax: 'php', title: 'PHP', }, @@ -2946,7 +2976,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'python', response: `// python␊ - Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])`, + Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])`, response_syntax: 'python', title: 'Python', }, @@ -2955,7 +2985,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'ruby', response: `// ruby␊ - {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}`, + {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}`, response_syntax: 'ruby', title: 'Ruby', }, @@ -2964,7 +2994,7 @@ Generated by [AVA](https://avajs.dev). seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"`, request_syntax: 'bash', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'Seam CLI', }, @@ -2989,6 +3019,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -3029,7 +3062,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.Get(context.Background(), api.FoosGetRequest(FooId: api.String("8d7e0b3a-b889-49a7-9164-4b71a0506a33")))`, request_syntax: 'go', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar", NestedObjectProp: api.FooObjectPropNestedObjectProp{Foo: "bar"}}, ArrayProp: []string{"foo", "bar"}}`, response_syntax: 'json', title: 'Go', }, @@ -3038,7 +3071,7 @@ Generated by [AVA](https://avajs.dev). await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'JavaScript', }, @@ -3048,7 +3081,7 @@ Generated by [AVA](https://avajs.dev). $seam->foos->get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'php', response: `// php␊ - ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar"],"array_prop" => ["foo", "bar"]]`, + ["foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => null,"number_prop" => 10,"object_prop" => ["foo" => "bar", "nested_object_prop" => ["foo" => "bar"]],"array_prop" => ["foo", "bar"]]`, response_syntax: 'php', title: 'PHP', }, @@ -3057,7 +3090,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'python', response: `// python␊ - Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar"}, array_prop=["foo","bar"])`, + Foo(foo_id="8d7e0b3a-b889-49a7-9164-4b71a0506a33", name="Best foo", nullable_prop=None, number_prop=10, object_prop={"foo":"bar","nested_object_prop":{"foo":"bar"}}, array_prop=["foo","bar"])`, response_syntax: 'python', title: 'Python', }, @@ -3066,7 +3099,7 @@ Generated by [AVA](https://avajs.dev). seam.foos.get(foo_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")`, request_syntax: 'ruby', response: `// ruby␊ - {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar"},"array_prop" => ["foo","bar"]}`, + {"foo_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33","name" => "Best foo","nullable_prop" => nil,"number_prop" => 10,"object_prop" => {"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop" => ["foo","bar"]}`, response_syntax: 'ruby', title: 'Ruby', }, @@ -3075,7 +3108,7 @@ Generated by [AVA](https://avajs.dev). seam foos get --foo_id "8d7e0b3a-b889-49a7-9164-4b71a0506a33"`, request_syntax: 'bash', response: `// json␊ - {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, + {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar","nested_object_prop":{"foo":"bar"}},"array_prop":["foo","bar"]}`, response_syntax: 'json', title: 'Seam CLI', }, @@ -3100,6 +3133,9 @@ Generated by [AVA](https://avajs.dev). number_prop: 10, object_prop: { foo: 'bar', + nested_object_prop: { + foo: 'bar', + }, }, }, }, @@ -3140,7 +3176,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', response: `// json␊ - [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, + []api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}`, response_syntax: 'json', title: 'Go', }, @@ -3255,7 +3291,7 @@ Generated by [AVA](https://avajs.dev). client.Foos.List(context.Background(), api.FoosListRequest(ObjectProp: api.FoosListRequestObjectProp{Foo: api.String("bar")}))`, request_syntax: 'go', response: `// json␊ - [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, + []api.Foo{api.Foo{FooId: "8d7e0b3a-b889-49a7-9164-4b71a0506a33", Name: "Best foo", NullableProp: nil, NumberProp: 10, ObjectProp: api.FooObjectProp{Foo: "bar"}, ArrayProp: []string{"foo", "bar"}}}`, response_syntax: 'json', title: 'Go', }, @@ -3378,7 +3414,7 @@ Generated by [AVA](https://avajs.dev). client.Transport.Air.Planes.List(context.Background())`, request_syntax: 'go', response: `// json␊ - [{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]`, + []api.Plane{api.Plane{PlaneId: "9d3163f9-9185-40d3-a0ce-a03d3c7ce402", Name: "Woosh"}}`, response_syntax: 'json', title: 'Go', }, @@ -3478,7 +3514,7 @@ Generated by [AVA](https://avajs.dev). client.Transport.Air.Planes.List(context.Background())`, request_syntax: 'go', response: `// json␊ - [{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]`, + []api.Plane{api.Plane{PlaneId: "9d3163f9-9185-40d3-a0ce-a03d3c7ce402", Name: "Woosh"}}`, response_syntax: 'json', title: 'Go', }, @@ -3578,7 +3614,7 @@ Generated by [AVA](https://avajs.dev). client.Transport.Air.Planes.List(context.Background())`, request_syntax: 'go', response: `// json␊ - [{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]`, + []api.Plane{api.Plane{PlaneId: "9d3163f9-9185-40d3-a0ce-a03d3c7ce402", Name: "Woosh"}}`, response_syntax: 'json', title: 'Go', }, @@ -3692,7 +3728,7 @@ Generated by [AVA](https://avajs.dev). client.Deprecated.Undocumented.Endpoint(context.Background())`, request_syntax: 'go', response: `// json␊ - {}`, + nil`, response_syntax: 'json', title: 'Go', }, @@ -3783,7 +3819,7 @@ Generated by [AVA](https://avajs.dev). client.Deprecated.Undocumented.Endpoint(context.Background())`, request_syntax: 'go', response: `// json␊ - {}`, + nil`, response_syntax: 'json', title: 'Go', }, @@ -3874,7 +3910,7 @@ Generated by [AVA](https://avajs.dev). client.Deprecated.Undocumented.Endpoint(context.Background())`, request_syntax: 'go', response: `// json␊ - {}`, + nil`, response_syntax: 'json', title: 'Go', }, diff --git a/test/snapshots/blueprint.test.ts.snap b/test/snapshots/blueprint.test.ts.snap index c1569c5..ef2e63e 100644 Binary files a/test/snapshots/blueprint.test.ts.snap and b/test/snapshots/blueprint.test.ts.snap differ