From 869d5dfeed3e0c9df488aea945be24ac77a907b2 Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Sun, 3 Apr 2022 14:36:26 +0200 Subject: [PATCH] testing: compare graphs using graph tools (#528) --- openapi2conv/issue187_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi2conv/issue187_test.go b/openapi2conv/issue187_test.go index 1c113b708..a7016893a 100644 --- a/openapi2conv/issue187_test.go +++ b/openapi2conv/issue187_test.go @@ -103,7 +103,7 @@ func TestIssue187(t *testing.T) { spec3, err := json.Marshal(doc3) require.NoError(t, err) const expected = `{"components":{"schemas":{"model.ProductSearchAttributeRequest":{"properties":{"filterField":{"type":"string"},"filterKey":{"type":"string"},"type":{"type":"string"},"values":{"$ref":"#/components/schemas/model.ProductSearchAttributeValueRequest"}},"title":"model.ProductSearchAttributeRequest","type":"object"},"model.ProductSearchAttributeValueRequest":{"properties":{"imageUrl":{"type":"string"},"text":{"type":"string"}},"title":"model.ProductSearchAttributeValueRequest","type":"object"}}},"info":{"contact":{"email":"test@test.com","name":"Test"},"description":"Test Golang Application","title":"Test","version":"1.0"},"openapi":"3.0.3","paths":{"/me":{"get":{"operationId":"someTest","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ProductSearchAttributeRequest"}}},"description":"successful operation"}},"summary":"Some test","tags":["probe"]}}}}` - require.Equal(t, string(spec3), expected) + require.JSONEq(t, string(spec3), expected) err = doc3.Validate(context.Background()) require.NoError(t, err)