mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
All tests pass! logs of tests fixed and tuning API for high level
Document configuration has been simplified, no more need for AllowRemote stuff in the document configuration, it’s assumed by setting the baseURL or the basePath. Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/pb33f/libopenapi/datamodel/low"
|
||||
"github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
"github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
@@ -27,8 +28,8 @@ func TestCompareItems(t *testing.T) {
|
||||
var rDoc v2.Items
|
||||
_ = low.BuildModel(lNode.Content[0], &lDoc)
|
||||
_ = low.BuildModel(rNode.Content[0], &rDoc)
|
||||
_ = lDoc.Build(nil, lNode.Content[0], nil)
|
||||
_ = rDoc.Build(nil, rNode.Content[0], nil)
|
||||
_ = lDoc.Build(context.Background(), nil, lNode.Content[0], nil)
|
||||
_ = rDoc.Build(context.Background(), nil, rNode.Content[0], nil)
|
||||
|
||||
// compare.
|
||||
changes := CompareItems(&lDoc, &rDoc)
|
||||
@@ -58,8 +59,8 @@ items:
|
||||
var rDoc v2.Items
|
||||
_ = low.BuildModel(lNode.Content[0], &lDoc)
|
||||
_ = low.BuildModel(rNode.Content[0], &rDoc)
|
||||
_ = lDoc.Build(nil, lNode.Content[0], nil)
|
||||
_ = rDoc.Build(nil, rNode.Content[0], nil)
|
||||
_ = lDoc.Build(context.Background(), nil, lNode.Content[0], nil)
|
||||
_ = rDoc.Build(context.Background(), nil, rNode.Content[0], nil)
|
||||
|
||||
// compare.
|
||||
changes := CompareItems(&lDoc, &rDoc)
|
||||
@@ -88,8 +89,8 @@ items:
|
||||
var rDoc v2.Items
|
||||
_ = low.BuildModel(lNode.Content[0], &lDoc)
|
||||
_ = low.BuildModel(rNode.Content[0], &rDoc)
|
||||
_ = lDoc.Build(nil, lNode.Content[0], nil)
|
||||
_ = rDoc.Build(nil, rNode.Content[0], nil)
|
||||
_ = lDoc.Build(context.Background(), nil, lNode.Content[0], nil)
|
||||
_ = rDoc.Build(context.Background(), nil, rNode.Content[0], nil)
|
||||
|
||||
// compare.
|
||||
changes := CompareItems(&lDoc, &rDoc)
|
||||
@@ -118,8 +119,8 @@ items:
|
||||
var rDoc v2.Items
|
||||
_ = low.BuildModel(lNode.Content[0], &lDoc)
|
||||
_ = low.BuildModel(rNode.Content[0], &rDoc)
|
||||
_ = lDoc.Build(nil, lNode.Content[0], nil)
|
||||
_ = rDoc.Build(nil, rNode.Content[0], nil)
|
||||
_ = lDoc.Build(context.Background(), nil, lNode.Content[0], nil)
|
||||
_ = rDoc.Build(context.Background(), nil, rNode.Content[0], nil)
|
||||
|
||||
// compare.
|
||||
changes := CompareItems(&rDoc, &lDoc)
|
||||
|
||||
Reference in New Issue
Block a user