Commit Graph

8 Commits

Author SHA1 Message Date
zak905
f7a6c9dbcc add additional test for covering file referece case 2023-07-28 16:42:31 -04:00
Zakaria Amine
6b0cae741c add unit tests 2023-07-28 16:42:31 -04:00
Dave Shanley
25d8de9b0e Added more support for YAML merge nodes, anchors and aliases
And added deeper support for Aliases. Also added in local file handling through renamed `FSHandler` configuration property for the index.

Also re-ran `go fmt`

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-07-16 11:45:18 -04:00
Dave Shanley
3b7cbacc44 Add support for custom io.FS remote handler in index #85
A new configuration option is available to the index, a `RemoteHandler` of type  `fs.FS`. If set, will be used as an override to all other remote fetching code.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-07-16 11:45:18 -04:00
Federico Bevione
572130c666 add test, fix RemoteURLHandler field name 2023-06-30 13:24:16 -04:00
Dave Shanley
f629c0ff58 fix for resolving looping relative references
In vacuum, a usecase was reported where an infinite loop occurred due to re-parsing the same reference over and over in a loop. It was re-creatable and it was because the loop happened before the index was ready.

This should be resolved now, at least for this use case. To be sure, I have included the specs as a new test.

https://github.com/daveshanley/vacuum/issues/268
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-05-16 17:03:02 -04:00
Dave Shanley
24d094ca7b Corrected remote document lookup behavior
When remote documents are requested and there is no way to know the base URL, the index will now try and determine the base path from the way the spec was loaded (if it comes in remote, we use the base URL of the spec)
2023-04-22 09:50:44 -04:00
Dave Shanley
c5e9dbc360 Bumping coverage on 0.6.0 2023-02-22 09:14:27 -05:00