Allow to override basePath for file lookup

This commit is contained in:
Dmitry
2023-03-16 06:17:59 +01:00
committed by Dave Shanley
parent 9004d57197
commit 634d675eef
2 changed files with 194 additions and 184 deletions

View File

@@ -15,6 +15,10 @@ type DocumentConfiguration struct {
// Schema must be set to "http/https".
BaseURL *url.URL
// If resolving locally, the BasePath will be the root from which relative references will be resolved from.
// It usually location of the root specification.
BasePath string // set the Base Path for resolving relative references if the spec is exploded.
// AllowFileReferences will allow the index to locate relative file references. This is disabled by default.
AllowFileReferences bool