Tuned some glitches with v3 doc creation.

all covered now

Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2023-10-31 15:31:19 -04:00
parent b37b9a2fb9
commit 8f3f568e5f
7 changed files with 334 additions and 278 deletions

View File

@@ -4,9 +4,9 @@
package datamodel
import (
"github.com/pb33f/libopenapi/utils"
"io/fs"
"log/slog"
"net/http"
"net/url"
"os"
)
@@ -28,7 +28,7 @@ type DocumentConfiguration struct {
// will not be used, as there will be nothing to use it against.
//
// Resolves [#132]: https://github.com/pb33f/libopenapi/issues/132
RemoteURLHandler func(url string) (*http.Response, error)
RemoteURLHandler utils.RemoteURLHandler
// If resolving locally, the BasePath will be the root from which relative references will be resolved from.
// It's usually the location of the root specification.
@@ -103,13 +103,3 @@ func NewDocumentConfiguration() *DocumentConfiguration {
})),
}
}
// Deprecated: use NewDocumentConfiguration instead.
func NewOpenDocumentConfiguration() *DocumentConfiguration {
return NewDocumentConfiguration()
}
// Deprecated: use NewDocumentConfiguration instead.
func NewClosedDocumentConfiguration() *DocumentConfiguration {
return NewDocumentConfiguration()
}