Skip to content

Commit

Permalink
Merge pull request #11 from dizzyfool/master
Browse files Browse the repository at this point in the history
Migrate to meta-schema v2
  • Loading branch information
sergeyfast authored May 18, 2022
2 parents bacec56 + 35e1b2e commit 9324bad
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 359 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/vmkteam/rpcgen/v2
go 1.15

require (
github.com/vmkteam/meta-schema v1.15.3
github.com/vmkteam/meta-schema/v2 v2.0.1
github.com/vmkteam/zenrpc v1.1.1
github.com/vmkteam/zenrpc/v2 v2.2.6
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/thoas/go-funk v0.6.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q=
github.com/vmkteam/meta-schema v1.15.3 h1:0HdUDsM9Qs+h+zxWYnDBs8OxgzQxOYcx0smj/KuQPUQ=
github.com/vmkteam/meta-schema v1.15.3/go.mod h1:RlP1hqjr2Ghap0sfjpfOJhubwmaSUGFLtgM+LHVQBfU=
github.com/vmkteam/meta-schema/v2 v2.0.1 h1:7eoImKpnCs2wiCcBB8AUCtfVVhGa6L6DDqihutFlE1I=
github.com/vmkteam/meta-schema/v2 v2.0.1/go.mod h1:GQzU4Rid0Q9dDIz/OeSDyL/aB/QG7tD0gOUt5nQ4JMk=
github.com/vmkteam/zenrpc v1.1.1 h1:WmModRVCwgs7XEkeJcVvmDOwEtAQk0TuYV91wdpAaCw=
github.com/vmkteam/zenrpc v1.1.1/go.mod h1:x3fCkb9HHOpqwqC7TKXf8pyXWdPxEt2Zrndl50YxexM=
github.com/vmkteam/zenrpc/v2 v2.2.6 h1:KaHNZE3HzIQbQXRM57fcsDxIxkQC3A3Ifc0/o4yddLU=
Expand Down
2 changes: 1 addition & 1 deletion openrpc/openrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package openrpc
import (
"encoding/json"

openrpc "github.com/vmkteam/meta-schema"
openrpc "github.com/vmkteam/meta-schema/v2"
"github.com/vmkteam/zenrpc/v2/smd"
)

Expand Down
10 changes: 10 additions & 0 deletions openrpc/openrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,14 @@ func TestGenerateOpenRPCSchema(t *testing.T) {
if !bytes.Equal(generated, testData) {
t.Fatalf("bad generator output")
}

// second run
generated, err = cl.Generate()
if err != nil {
t.Fatalf("generate openrpc client: %v", err)
}

if !bytes.Equal(generated, testData) {
t.Fatalf("bad generator output")
}
}
Loading

0 comments on commit 9324bad

Please sign in to comment.