Open amckinney opened 6 hours ago
This updates Go's DynamicSnippetsGenerator so that it supports file upload snippets, and considers both the inlineFileProperties and inlinePathParameters configuration options.
DynamicSnippetsGenerator
inlineFileProperties
inlinePathParameters
For example, given the following request:
{ endpoint: { method: "POST", path: "/just-file-with-query-params" }, auth: undefined, pathParameters: undefined, queryParameters: { integer: 42, maybeString: "exists" }, headers: undefined, requestBody: { file: "Hello, world!" } }
The corresponding Go snippet with inlineFileProperties is shown below:
package example import ( context "context" acme "github.com/acme/acme-go" client "github.com/acme/acme-go/client" strings "strings" ) func do() { client := client.NewClient() client.Service.JustFileWithQueryParams( context.TODO(), &acme.JustFileWithQueryParamsRequet{ Integer: 42, MaybeString: acme.String( "exists", ), File: strings.NewReader( "Hello, world!", ), }, ) }
🌿 Preview your docs: https://fern-preview-99ff8e8e-461e-4abd-b6ad-8f1edd22cb78.docs.buildwithfern.com/learn
This updates Go's
DynamicSnippetsGenerator
so that it supports file upload snippets, and considers both theinlineFileProperties
andinlinePathParameters
configuration options.For example, given the following request:
The corresponding Go snippet with
inlineFileProperties
is shown below: