From a036f0c039432942b313ea879cd6bbad9590af1b Mon Sep 17 00:00:00 2001 From: Dave Shanley Date: Mon, 7 Nov 2022 08:13:16 -0500 Subject: [PATCH] Fixed document test No release required, no changes --- document_test.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/document_test.go b/document_test.go index d2dabfa..00a6f6b 100644 --- a/document_test.go +++ b/document_test.go @@ -361,11 +361,9 @@ info: // url: https://pb33f.io/license } -func TestDocument_Panic(t *testing.T) { +func TestDocument_Paths_As_Array(t *testing.T) { - // How to mutate values in an OpenAPI Specification, without re-ordering original content. - - // create very small, and useless spec that does nothing useful, except showcase this feature. + // paths can now be wrapped in an array. spec := `{ "openapi": "3.1.0", "paths": [ @@ -382,8 +380,6 @@ func TestDocument_Panic(t *testing.T) { if err != nil { panic(fmt.Sprintf("cannot create new document: %e", err)) } - - // because we know this is a v3 spec, we can build a ready to go model from it. - v3Model, errors := doc.BuildV3Model() - fmt.Print(v3Model, errors) + v3Model, _ := doc.BuildV3Model() + assert.NotNil(t, v3Model) }