Skip to content
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

upgrade to nswag 14 cause errors #5000

Open
barnuri-cp opened this issue Oct 15, 2024 · 0 comments
Open

upgrade to nswag 14 cause errors #5000

barnuri-cp opened this issue Oct 15, 2024 · 0 comments

Comments

@barnuri-cp
Copy link

barnuri-cp commented Oct 15, 2024

after upgrading NSwag from 13 to 14 started to get error that cant generate the doc

 System.InvalidOperationException: Could not find the JSON path of a referenced schema: Manually referenced schemas must be added to the 'Definitions' of a parent schema.
   at NJsonSchema.JsonPathUtilities.GetJsonPaths(Object rootObject, IEnumerable`1 searchedObjects, IContractResolver contractResolver)
   at NJsonSchema.JsonSchemaReferenceUtilities.UpdateSchemaReferencePaths(Object rootObject, Boolean removeExternalReferences, IContractResolver contractResolver)
   at NJsonSchema.Infrastructure.JsonSchemaSerialization.ToJson(Object obj, SchemaType schemaType, IContractResolver contractResolver, Formatting formatting)
   at NSwag.OpenApiDocument.ToJson(SchemaType schemaType, Formatting formatting)
   at NSwag.OpenApiDocument.ToJson(SchemaType schemaType)
   at NSwag.OpenApiDocument.ToJson()
   at NSwag.AspNetCore.Middlewares.OpenApiDocumentMiddleware.GetDocumentAsync(HttpContext context)
   at NSwag.AspNetCore.Middlewares.OpenApiDocumentMiddleware.Invoke(HttpContext context)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant