Skip to content

Commit

Permalink
Update inline types test definition with an inline request body
Browse files Browse the repository at this point in the history
  • Loading branch information
Swimburger committed Nov 22, 2024
1 parent ddb3819 commit 7855829
Show file tree
Hide file tree
Showing 5 changed files with 755 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3649,13 +3649,24 @@ exports[`test definitions > inline-types 1`] = `
import (
context "context"
acme "github.com/acme/acme-go"
client "github.com/acme/acme-go/client"
)
func do() {
client := client.NewClient()
client.GetRoot(
context.TODO(),
&acme.PostRootRequest{
Bar: &acme.InlineType1{
Foo: "foo",
Bar: &acme.NestedInlineType1{
Foo: "foo",
Bar: "bar",
},
},
Foo: "foo",
},
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,13 +642,101 @@
}
},
"location": {
"method": "GET",
"method": "POST",
"path": "/root/root"
},
"request": {
"type": "body",
"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": [],
"body": null
"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"
}
}
]
}
},
"response": {
"type": "json"
Expand Down
Loading

0 comments on commit 7855829

Please sign in to comment.