Skip to content

Commit

Permalink
Discovery client
Browse files Browse the repository at this point in the history
  • Loading branch information
reinkrul committed Sep 13, 2024
1 parent 78adad7 commit adff851
Show file tree
Hide file tree
Showing 6 changed files with 1,110 additions and 102 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Contains:

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

## Development
Expand Down
8 changes: 8 additions & 0 deletions nuts/discovery/bug.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package discovery

// 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{}
// When regenerating code, you need to alter it to map[string]interface{}
// This function is there to make sure compilation fails if it's map[string]string
var _ = SearchPresentationsParams{
Query: &map[string]interface{}{},
}
3 changes: 3 additions & 0 deletions nuts/discovery/codegen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//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

package discovery
6 changes: 6 additions & 0 deletions nuts/discovery/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package: discovery
generate:
models: true
client: true
import-mapping:
"../common/ssi_types.yaml": "github.com/nuts-foundation/go-nuts-client/nuts/common"
Loading

0 comments on commit adff851

Please sign in to comment.