Replies: 1 comment
-
So it looks like this is actually due to a bug in NJsonSchema, first reported back in 2018. It's the call to JsonSchema.FromJsonAsync that is throwing the exception. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an API project that uses FastEndpoints, which uses NSwag for OpenAPI schema generation. I have one DTO type for which I already have a JSON schema, and I would like to just plug that in instead of allowing the schema to be inferred automatically.
The schema I have looks like this:
The expression type includes some recursive refs to itself.
I do not know how NSwag and FastEndpoints work together, so I'm not sure how much of this is even related directly to NSwag, but this is what I have tried:
The problem is that I get an exception saying
InvalidOperationException: Could not resolve the path '#/definitions/expression'
. Presumably, the definitions part of my document is not being copied into the spec, but I very much out of my depth here. What can I do to ensure that my existing schema is fully incorporated into the spec as if the DTO had just been analyzed?Beta Was this translation helpful? Give feedback.
All reactions