Fixed rendering bug with .Schema() being called again.

Should have known better, almost there with accuracy now.

Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
Dave Shanley
2022-11-20 18:11:38 -05:00
parent ddf772270e
commit 2ee3123bfe
2 changed files with 4 additions and 2 deletions

View File

@@ -76,7 +76,7 @@ func (r *Response) Hash() [32]byte {
f = append(f, r.Description.Value) f = append(f, r.Description.Value)
} }
if !r.Schema.IsEmpty() { if !r.Schema.IsEmpty() {
f = append(f, low.GenerateHashString(r.Schema.Value.Schema())) f = append(f, low.GenerateHashString(r.Schema.Value))
} }
if !r.Examples.IsEmpty() { if !r.Examples.IsEmpty() {
for k := range r.Examples.Value.Values { for k := range r.Examples.Value.Values {

View File

@@ -160,6 +160,8 @@ func CompareResponse(l, r any) *ResponseChanges {
CheckProperties(props) CheckProperties(props)
rc.Changes = changes rc.Changes = changes
if rc.TotalChanges() <= 0 {
return nil
}
return rc return rc
} }