From c9155f7ef3c8e396eb736551ad0d923d8c06ce2b Mon Sep 17 00:00:00 2001 From: quobix Date: Mon, 8 Jul 2024 10:24:40 -0400 Subject: [PATCH] Updated docs for `NewDocument` fixed issue #297 --- document.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/document.go b/document.go index 5164247..7fe190b 100644 --- a/document.go +++ b/document.go @@ -127,12 +127,11 @@ type DocumentModel[T v2high.Swagger | v3high.Document] struct { // After creating a Document, the option to build a model becomes available, in either V2 or V3 flavors. The models // are about 70% different between Swagger and OpenAPI 3, which is why two different models are available. // -// This function will automatically follow (meaning load) any file or remote references that are found anywhere. -// Which means recursively also, like a spider, it will follow every reference found, local or remote. +// This function will NOT automatically follow (meaning load) any file or remote references that are found. // -// If this isn't the behavior you want, or that you feel this is a potential security risk, -// then you can use the NewDocumentWithConfiguration() function instead, which allows you to set a configuration that -// will allow you to control if file or remote references are allowed. +// If this isn't the behavior you want, then you can use the NewDocumentWithConfiguration() function instead, which allows you to set a configuration that +// will allow you to control if file or remote references are allowed. In particular the `AllowFileReferences` and `FollowRemoteReferences` +// properties. func NewDocument(specByteArray []byte) (Document, error) { return NewDocumentWithTypeCheck(specByteArray, false) }