Skip to content

chore: bump kin-openapi #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/gptscript-ai/go-gptscript

go 1.22.2

require github.com/getkin/kin-openapi v0.123.0
require github.com/getkin/kin-openapi v0.124.0

require (
github.com/go-openapi/jsonpointer v0.20.2 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/getkin/kin-openapi v0.123.0 h1:zIik0mRwFNLyvtXK274Q6ut+dPh6nlxBp0x7mNrPhs8=
github.com/getkin/kin-openapi v0.123.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM=
github.com/getkin/kin-openapi v0.124.0 h1:VSFNMB9C9rTKBnQ/fpyDU8ytMTr4dWI9QovSKj9kz/M=
github.com/getkin/kin-openapi v0.124.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM=
github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q=
github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs=
github.com/go-openapi/swag v0.22.8 h1:/9RjDSQ0vbFR+NyjGMkFTsA1IA0fmhKSThmfGZjicbw=
Expand Down
8 changes: 4 additions & 4 deletions gptscript_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,12 @@ func TestFmt(t *testing.T) {
Instructions: "#!/bin/bash\necho hello there",
},
Arguments: &openapi3.Schema{
Type: "object",
Type: &openapi3.Types{"object"},
Properties: map[string]*openapi3.SchemaRef{
"input": {
Value: &openapi3.Schema{
Description: "The string input to echo",
Type: "string",
Type: &openapi3.Types{"string"},
},
},
},
Expand Down Expand Up @@ -495,12 +495,12 @@ func TestFmtWithTextNode(t *testing.T) {
Name: "echo",
},
Arguments: &openapi3.Schema{
Type: "object",
Type: &openapi3.Types{"object"},
Properties: map[string]*openapi3.SchemaRef{
"input": {
Value: &openapi3.Schema{
Description: "The string input to echo",
Type: "string",
Type: &openapi3.Types{"string"},
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ type ToolDef struct {

func ObjectSchema(kv ...string) *openapi3.Schema {
s := &openapi3.Schema{
Type: "object",
Type: &openapi3.Types{"object"},
Properties: openapi3.Schemas{},
}
for i, v := range kv {
if i%2 == 1 {
s.Properties[kv[i-1]] = &openapi3.SchemaRef{
Value: &openapi3.Schema{
Description: v,
Type: "string",
Type: &openapi3.Types{"string"},
},
}
}
Expand Down