Skip to content

Preserve module metadata for custom route groups - #6

Merged
PANiXiDA merged 1 commit into
mainfrom
feature/custom-group-module-metadata
Aug 2, 2026
Merged

Preserve module metadata for custom route groups#6
PANiXiDA merged 1 commit into
mainfrom
feature/custom-group-module-metadata

Conversation

@PANiXiDA

@PANiXiDA PANiXiDA commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

What changed

  • attach registered HttpModule metadata in the custom RouteGroupBuilder overload;
  • cover custom root route groups with a regression unit test;
  • document custom root route mapping for endpoints such as /connect/*.

Why

Module OpenAPI documents filter endpoints by HttpModule metadata. Custom route groups did not receive that metadata, so OAuth endpoints mapped under /connect disappeared from the Identity document.

Verification

  • dotnet restore PANiXiDA.Core.Presentation.Http.slnx
  • dotnet format PANiXiDA.Core.Presentation.Http.slnx --verify-no-changes --no-restore
  • dotnet build PANiXiDA.Core.Presentation.Http.slnx --configuration Release --no-restore
  • CI run: format, unit tests, report aggregation, and the 100% line coverage threshold passed

Compatibility

  • migrations: none;
  • public API signatures: unchanged;
  • configuration changes: none;
  • breaking changes: none.

@PANiXiDA
PANiXiDA marked this pull request as ready for review August 2, 2026 12:38
@PANiXiDA
PANiXiDA merged commit 18e8e92 into main Aug 2, 2026
6 checks passed
@PANiXiDA
PANiXiDA deleted the feature/custom-group-module-metadata branch August 2, 2026 12:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84eba0967a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

IServiceProvider serviceProvider)
where TGroup : IEndpointGroup
{
var moduleRegistry = serviceProvider.GetService<HttpModuleRegistry>();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate the service provider before dereferencing it

When serviceProvider is null, this newly added lookup throws NullReferenceException; for a group with no endpoint implementations, such as OtherEndpointGroup, the previous implementation never touched the provider and returned normally, while groups with endpoints delegated validation to ActivatorUtilities. Add an explicit ArgumentNullException.ThrowIfNull(serviceProvider) so this public argument fails deterministically rather than silently changing exception behavior.

AGENTS.md reference: AGENTS.md:L37-L37

Useful? React with 👍 / 👎.

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

Successfully merging this pull request may close these issues.

2 participants