-
-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible approach to support schemas nested in non-schema docs #360
Conversation
@@ -55,11 +55,15 @@ public void Evaluate(EvaluationContext context) | |||
if (scopeRoot == null) | |||
throw new Exception("This shouldn't happen"); | |||
|
|||
if (scopeRoot.RecursiveAnchor == null) continue; | |||
if (scopeRoot is not JsonSchema schemaRoot) | |||
throw new Exception("Does OpenAPI use anchors?"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this is entire relevant here since $recursiveRef
is exclusively 2019-09.
Maggie and I discussed this today. This looks like an approach that would work for us. We will do some more investigation on our side. |
…penapidoc to test
0248599
to
5dd8f86
Compare
I think this is going to be a good addition to the library, so I'm going to go ahead and incorporate it into the beta. |
Resolves #355
Relates to microsoft/OpenAPI.NET#795
There are some comments in the code, but basically the
SchemaRegistry
now tracksIBaseDocument
s instead of justJsonSchema
s. TheOpenApiDoc
(or whatever it'll be called) will need to:IBaseDocument
It's a bit hacked together right now, but it works.