Commit Graph

10 Commits

Author SHA1 Message Date
Tristan Cartledge
74c7a3f632 fix: improves the ability to get all inline schemas and identify inline object schemas (#154)
* fix: improves the ability to get all inline schemas and identify inline object schemas

* fix

* fix

* fix

* fix
2023-08-22 06:40:00 -04:00
Dave Shanley
f7ab737f0a Updated index to count schemas, even if they are refs.
This was brought up in chat, that the expectation is that all schemas are included, refs or not. This update fixes that for the index and adds in a new individual property to count just the references `GetAllReferenceSchemas `

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-08-09 07:40:24 -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
cb5f2da4d3 Fixed race conditions in index #91
Different race conditions popped up at different times, depending on how complex the nesting of indexes was. After running tests with `-race` I've knocked out all the concurrency issues being reported and now there are no race conditions reported by the tests. This should knock out all known race conditions with some targeted mutex locks.

Non breaking change.
2023-03-08 09:26:10 -05:00
Dave Shanley
0f2ac08567 Fixed async isues with index #91
The index runs async everywhere, it's kinda impossible to know which path with resolve first, so testing is hard. Sometimes a race condition is hit, well, it was. Now that map has a mutex on it.

Also fully fixed handling files with relative links. A basepath property has been added to the index configuration to allow a local root to be set when resolving files.

Added a full checkout test for digital ocean so that full remote and full local testing is performed.
2023-03-06 13:18:28 -05:00
Dave Shanley
6d384b2732 updated: a fix for #50
properties are now checked as part of the inline schemas. paths updated also to ensure correctness.
2023-02-27 11:05:18 -05:00
Dave Shanley
4a378de02e Fix: bug in index with description handling.
Issue for description being incorrectly picked up, is because index was collecting all descriptions, even if they were labels on schemas as reported in https://github.com/daveshanley/vacuum/issues/239
2023-02-27 11:05:18 -05:00
Dave Shanley
e6626fe22e Support for relative links now in place #73
Tests all passing, runs super fast, pulls in every single DigitalOcean spec and parses it. There may be some issues deeper down in the models, but for now high level tests all pass.
2023-02-22 09:14:27 -05:00
Dave Shanley
e19b7d2bf1 Working through fix #73
Quite a bit of surgery required.
2023-02-22 09:14:27 -05:00
Dave Shanley
1df5f44e6f Working through fix-73 and v0.6.0 2023-02-22 09:14:27 -05:00