Registry milestone: mesh-sdk (issue 1966) #167
@@ -148,6 +148,7 @@ func checkComposeAnswer(a ComposeCandidateAnswer) error {
|
||||
func strictDecode(data []byte, v any, what string) error {
|
||||
d := json.NewDecoder(bytes.NewReader(data))
|
||||
d.DisallowUnknownFields()
|
||||
d.UseNumber() // a number in an object the contract leaves open (the composition input) keeps its digits as written
|
||||
if err := d.Decode(v); err != nil {
|
||||
return fmt.Errorf("delivery: %s does not fit its shape: %w", what, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user