Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <github@jessfraz.com>
  • Loading branch information
jessfraz committed Jan 6, 2024
1 parent 278988e commit c69456a
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 211 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.2.30
v0.2.31
4 changes: 2 additions & 2 deletions client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions cmd/paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ func (data *Data) generateMethod(doc *openapi3.T, method string, pathName string

if typeName == "string" {
arg.ToString = arg.Name
} else if typeName == "bool" {
arg.ToString = fmt.Sprintf("strconv.FormatBool(%s)", arg.Name)
} else if typeName == "int" {
arg.ToString = fmt.Sprintf("strconv.Itoa(%s)", arg.Name)
} else if typeName == "float64" {
Expand Down
34 changes: 3 additions & 31 deletions examples_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ require (
github.com/perimeterx/marshmallow v1.1.4 // indirect
go4.org/intern v0.0.0-20211027215823-ae77deb06f29 // indirect
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
18 changes: 1 addition & 17 deletions kittycad.go.patch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
"op": "add",
"path": "/paths/~1/get/x-go"
},
{
"value": {
"example": "// GetAiPluginManifest: Get AI plugin manifest.\n// \n// GetAiPluginManifest: Get AI plugin manifest.\nfunc ExampleMetaService_GetAiPluginManifest() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Meta.GetAiPluginManifest()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.GetAiPluginManifest"
},
"op": "add",
"path": "/paths/~1.well-known~1ai-plugin.json/get/x-go"
},
{
"value": {
"example": "// Getdata: Get the metadata about our currently running server.\n// \n// This includes information on any of our other distributed systems it is connected to.\n// You must be a Zoo employee to perform this request.\n// \n// Getdata: Get the metadata about our currently running server.\n// This includes information on any of our other distributed systems it is connected to.\n// You must be a Zoo employee to perform this request.\nfunc ExampleMetaService_Getdata() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Meta.Getdata()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
Expand Down Expand Up @@ -255,14 +247,6 @@
"op": "add",
"path": "/paths/~1oauth2~1provider~1{provider}~1consent/get/x-go"
},
{
"value": {
"example": "// GetOpenaiSchema: Get AI plugin OpenAPI schema.\n// \n// This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be \u003c 300 chars.\n// \n// GetOpenaiSchema: Get AI plugin OpenAPI schema.\n// This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be \u003c 300 chars.\nfunc ExampleMetaService_GetOpenaiSchema() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Meta.GetOpenaiSchema(); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.GetOpenaiSchema"
},
"op": "add",
"path": "/paths/~1openai~1openapi.json/get/x-go"
},
{
"value": {
"example": "// Ping: Return pong.\n// \n// Ping: Return pong.\nfunc ExampleMetaService_Ping() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Meta.Ping()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
Expand Down Expand Up @@ -553,7 +537,7 @@
},
{
"value": {
"example": "// ListTextToCadModelsForUser: List text-to-CAD models you've generated.\n// \n// This will always return the STEP file contents as well as the format the user originally requested.\n// This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\n// The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.\n// \n// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// ListTextToCadModelsForUser: List text-to-CAD models you've generated.\n// This will always return the STEP file contents as well as the format the user originally requested.\n// This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\n// The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.\n//\n// Parameters\n//\n// - `limit`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAiService_ListTextToCadModelsForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Ai.ListTextToCadModelsForUser(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
"example": "// ListTextToCadModelsForUser: List text-to-CAD models you've generated.\n// \n// This will always return the STEP file contents as well as the format the user originally requested.\n// This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\n// The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.\n// \n// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \t- `noModels`\n// \n// ListTextToCadModelsForUser: List text-to-CAD models you've generated.\n// This will always return the STEP file contents as well as the format the user originally requested.\n// This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\n// The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.\n//\n// Parameters\n//\n// - `limit`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\n//\n// - `noModels`\nfunc ExampleAiService_ListTextToCadModelsForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Ai.ListTextToCadModelsForUser(123, \"some-string\", \"\", true)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#AiService.ListTextToCadModelsForUser"
},
"op": "add",
Expand Down
73 changes: 4 additions & 69 deletions paths.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c69456a

Please sign in to comment.