Skip to content

Commit

Permalink
feat(nodebuilder/node | api): Version the API (celestiaorg#1901)
Browse files Browse the repository at this point in the history
Introduce a version string to the API

Resolves celestiaorg#1345
  • Loading branch information
renaynay authored Mar 23, 2023
1 parent da26804 commit 258b465
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/docgen/openrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

const (
APIVersion = "v0.0.1"
APIVersion = "v0.1.0"
APIDescription = "The Celestia Node API is the collection of RPC methods that " +
"can be used to interact with the services provided by Celestia Data Availability Nodes."
APIName = "Celestia Node API"
Expand Down
7 changes: 4 additions & 3 deletions nodebuilder/node/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (

"github.com/filecoin-project/go-jsonrpc/auth"
logging "github.com/ipfs/go-log/v2"

"github.com/celestiaorg/celestia-node/api/docgen"
)

type module struct {
Expand All @@ -27,9 +29,8 @@ type Info struct {

func (m *module) Info(context.Context) (Info, error) {
return Info{
Type: m.tp,
// TODO @renaynay @distractedm1nd: Implement versioning in API and way to extract that into this
// struct
Type: m.tp,
APIVersion: docgen.APIVersion,
}, nil
}

Expand Down

0 comments on commit 258b465

Please sign in to comment.