Skip to content

Commit

Permalink
Switch to 'Result' instead of interface{} (#124)
Browse files Browse the repository at this point in the history
* Switch to 'Result' instead of interface{}

* Modify claim json

* fix tests
  • Loading branch information
sebrandon1 authored Jul 26, 2024
1 parent f89bd9c commit 568c3ed
Show file tree
Hide file tree
Showing 5 changed files with 128,571 additions and 341 deletions.
2 changes: 1 addition & 1 deletion override.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"claim",
"results"
],
"overrideType": "map[string]interface{}"
"overrideType": "map[string]Result"
}
]
}
6 changes: 3 additions & 3 deletions pkg/claim/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions pkg/claim/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ var testCases = map[string]*testCase{
"claim-invalid-bool-results": {
expectedMarshallJSONError: true,
},
// A little confusing; since we remap the "results" field, this interface{} value is not actually checked.
// This is a limitation of the JSON Schema go client generator, and is perfectly fine for this context.
"claim-invalid-non-result-result": {
expectedMarshallJSONError: false,
},
"invalid-json": {
expectedMarshallJSONError: true,
},
Expand Down
188 changes: 0 additions & 188 deletions pkg/claim/testdata/claim-invalid-non-result-result.json

This file was deleted.

Loading

0 comments on commit 568c3ed

Please sign in to comment.