Skip to content

Commit

Permalink
Allows to serialize 'SitemapSource' derived types (#15571)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Mar 22, 2024
1 parent 54023f3 commit b91d350
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/OrchardCore.Modules/OrchardCore.Sitemaps/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public override void ConfigureServices(IServiceCollection services)
// Allows to serialize 'SitemapType' derived types.
services.AddJsonDerivedTypeInfo<Sitemap, SitemapType>();
services.AddJsonDerivedTypeInfo<SitemapIndex, SitemapType>();

// Allows to serialize 'SitemapSource' derived types.
services.AddJsonDerivedTypeInfo<ContentTypesSitemapSource, SitemapSource>();
services.AddJsonDerivedTypeInfo<CustomPathSitemapSource, SitemapSource>();
services.AddJsonDerivedTypeInfo<SitemapIndexSource, SitemapSource>();
}

public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
Expand Down

0 comments on commit b91d350

Please sign in to comment.