Skip to content

Commit

Permalink
support circular schema ref diff in text format
Browse files Browse the repository at this point in the history
  • Loading branch information
Reuven committed Jan 17, 2022
1 parent 6f30188 commit 93c3ae6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/circular1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ paths:
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/circular1'
components:
schemas:
circular1:
Expand Down
4 changes: 4 additions & 0 deletions data/circular2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ paths:
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/circular1'
components:
schemas:
circular1:
Expand Down
1 change: 1 addition & 0 deletions report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func (r *report) printSchema(d *diff.SchemaDiff) {

r.printConditional(d.SchemaAdded, "Schema added")
r.printConditional(d.SchemaDeleted, "Schema deleted")
r.printConditional(d.CircularRefDiff, "Schema circular referecnce changed")
r.printMessage(d.OneOfDiff, "Property 'OneOf' changed")
r.printMessage(d.AnyOfDiff, "Property 'AnyOf' changed")
r.printMessage(d.AllOfDiff, "Property 'AllOf' changed")
Expand Down

0 comments on commit 93c3ae6

Please sign in to comment.