You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fixesgo-openapi#94
* now expanded $ref are always contained in the resulting document.
All circular $ref that used to resolve to a remote $ref now resolve
as a json pointer inside the expanded document.
* schema IDs are removed from the expanded spec: schemas expanded from some schema ID reference
now refer to the new expanded root document.
* fixed circular ID resolution
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
* fixesgo-openapi#94
* now expanded $ref's are always contained in the resulting document.
All circular $ref that used to resolve to a remote $ref now resolve
as a json pointer inside the expanded document. Pointer resolution
prefers pointers to definitions.
* added additional test case for remote cyclical $ref, from azure API
* schema IDs are removed from the expanded spec: schemas expanded from some schema ID reference
now refer to the new expanded root document.
* circular IDs are resolved against the corresponding root document.
> NOTE(1): uncovered pre-existing issue with nested schema ID involving cyclical references.
> This case remains unsupported and is illustrated by test case: circular_test.go#L198 ("withID")
> NOTE(2): pre-existing issue with non-deterministic expansion remains unsolved,
> although the election of the replacing pointer inside the root document
> somewhat reduces the scope of this problem.
>
> This case remains illustrated by a minimal test case: circular_test.go#L46 ("minimal"),
> which expands correctly, but with changing results.
> NOTE(3): notice that expansion is still not an idempotent transform, in the presence
> of cyclical $ref's: another run on an expanded spec with remaining cyclical $ref
> will expand further down and detect again the cycle.
>
> The result remains functionally correct, as illustrated by test case: circular_test.go#L168 ("CircularID").
> Notice that this test case reproduces a validation fixture from jsonschema test (passed by go-openapi/validate).
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Let's make things official about this limitation:
Then the expanded result leaves some
$ref
items to the remote document with the cycle.This means the expanded result is not always self-contained.
At this moment, this is not blocking, and libraries such as go-openapi/validate or go-openapi/analysis still work with this.
The text was updated successfully, but these errors were encountered: