Skip to content

Commit adff851

Browse files
committed
Discovery client
1 parent 78adad7 commit adff851

File tree

6 files changed

+1110
-102
lines changed

6 files changed

+1110
-102
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Contains:
44

55
- Generated clients to interact with the Nuts node's internal APIs
6+
- Discovery
7+
- Auth
68
- An OAuth2 client for interacting with Resource Servers that are secured using Nuts.
79

810
## Development

nuts/discovery/bug.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package discovery
2+
3+
// There's a bug in the code generator in which it generates a parameter with map[string]string, which should've been map[string]interface{}
4+
// When regenerating code, you need to alter it to map[string]interface{}
5+
// This function is there to make sure compilation fails if it's map[string]string
6+
var _ = SearchPresentationsParams{
7+
Query: &map[string]interface{}{},
8+
}

nuts/discovery/codegen.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -o generated.go --config=config.yaml https://nuts-node.readthedocs.io/en/latest/_static/discovery/v1.yaml
2+
3+
package discovery

nuts/discovery/config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package: discovery
2+
generate:
3+
models: true
4+
client: true
5+
import-mapping:
6+
"../common/ssi_types.yaml": "github.com/nuts-foundation/go-nuts-client/nuts/common"

0 commit comments

Comments
 (0)