Skip to content

Commit

Permalink
Merge pull request #9 from allegro/feature/identifiers-remove-assembl…
Browse files Browse the repository at this point in the history
…y-convention

Remove assembly naming convention from AddStronglyTypedIds
  • Loading branch information
aszczepanski-allegro authored Nov 15, 2022
2 parents 954fa74 + 61d2dda commit 3ae2bec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ namespace Allegro.Extensions.Identifiers.AspNetCore.Swagger;
/// </summary>
public static class StronglyTypedIdsSwaggerExtensions
{
private const string IdentifiersAssemblyNameSuffix = "Identifiers";

/// <summary>
/// Add swagger support for strongly typed identifiers
/// </summary>
Expand All @@ -23,7 +21,6 @@ public static IServiceCollection AddStronglyTypedIds(this IServiceCollection ser
services.Configure<SwaggerGenOptions>(options =>
{
var types = AppDomain.CurrentDomain.GetAssemblies()
.Where(x => x.FullName != null && x.FullName.Contains(IdentifiersAssemblyNameSuffix))
.SelectMany(x => x.GetTypes())
.Where(x => IsAssignableToGenericType(x, typeof(IStronglyTypedId<>)) && !x.IsInterface && !x.IsAbstract)
.ToList();
Expand Down
6 changes: 6 additions & 0 deletions src/Allegro.Extensions.Identifiers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2022-11-15

### Changed

* Updated AddStronglyTypedIds to remove assembly naming convention used for Swagger mapping configuration.

## [1.0.0] - 2022-05-26

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Allegro.Extensions.Identifiers/version.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionPrefix>1.1.0</VersionPrefix>
</PropertyGroup>
</Project>

0 comments on commit 3ae2bec

Please sign in to comment.