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
Sorry for the delay!
I've done a new release for v13 (13.1.0), which contains some changes to the way the swagger is generated.
Let me know if updating fixes the issue!
Also I did workaround for it (just add empty models like this):
// ReSharper disable AllusingMicrosoft.OpenApi.Models;usingSwashbuckle.AspNetCore.SwaggerGen;namespace[your_namespace];// Ignore namespublicclassIApiContentModel{}publicclassIApiElementModel{}publicclassIApiContentResponseModel{}publicclassMissedSchemasDocumentFilter:IDocumentFilter{publicvoidApply(OpenApiDocumentswaggerDoc,DocumentFilterContextcontext){varmissedTypes=newList<Type>(){typeof(IApiContentModel),typeof(IApiElementModel),typeof(IApiContentResponseModel),};foreach(varmissedTypeinmissedTypes){varschema=context.SchemaGenerator.GenerateSchema(missedType,context.SchemaRepository);// Use the class name as the schema IDvarschemaId=missedType.Name;// Add the schema to the components section with the custom schema IDif(!swaggerDoc.Components.Schemas.ContainsKey(schemaId)){swaggerDoc.Components.Schemas[schemaId]=schema;}}}}
Which version of the package are you using?
13.0.0
Which Umbraco version are you using? For example: 12.2.0 - don't just write v12
13.3.2
Bug summary
Missed schemas:
IApiContentModel
IApiElementModel
IApiContentResponseModel
Steps to reproduce
Go to swagger and call GET /umbraco/delivery/api/v2/content/item/{path} with any path.
I see issue, that type is missing:
Expected result / actual result
Expected: no missing schemas
Actual: few schemas are missing
The text was updated successfully, but these errors were encountered: