Skip to content

Commit

Permalink
testing: compare graphs using graph tools (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
fenollp authored Apr 3, 2022
1 parent 4ecabc1 commit 869d5df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openapi2conv/issue187_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":"[email protected]","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)
Expand Down

0 comments on commit 869d5df

Please sign in to comment.