Skip to content

Enable module-specific OpenAPI documents - #19

Merged
PANiXiDA merged 6 commits into
developmentfrom
feature/update-presentation-http
Aug 2, 2026
Merged

Enable module-specific OpenAPI documents#19
PANiXiDA merged 6 commits into
developmentfrom
feature/update-presentation-http

Conversation

@PANiXiDA

@PANiXiDA PANiXiDA commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Updated PANiXiDA.Core.Presentation.Http from 2.0.5-preview to stable 2.0.6.
  • Registered the Identity and Compendium presentation assemblies as separate HTTP modules.
  • Added HttpModules configuration for the identity and compendium OpenAPI documents and Scalar titles.
  • Extracted HTTP service and pipeline setup to Configurations/HttpConfiguration.cs.
  • Moved module registration extensions to Configurations/Modules.
  • Reduced Program.cs to application composition and middleware orchestration.
  • Added an architecture convention that requires every discovered module to have <Module>ModuleConfiguration in Configurations/Modules.
  • Added architecture conventions requiring each root configuration options class to have a registered IValidateOptions<TOptions> validator in the same directory and to use ValidateOnStart().
  • Added EditorConfig rules that place System imports first and separate import groups, then applied the resulting mechanical using formatting.
  • Fixed the Identity functional-test event bus fake to observe its required cancellation token.

Why

The API currently exposes all module endpoints in one OpenAPI document. The stable HTTP package now supports module-specific documents, so Scalar can provide separate Identity and Compendium sources while assembly registration remains type-safe.

Keeping host and module configuration outside Program.cs makes the composition root consistent. The architecture tests now enforce module configuration placement and fail-fast validation for strongly typed application configuration. Import ordering is enforced by the existing .NET formatting CI job.

Verification

  • GitHub CI run: passed.
  • All 10 test projects passed.
  • Architecture tests: 108 passed, 0 failed, 0 skipped.
  • Formatting verification: passed.
  • Aggregated test reports, coverage generation, and the coverage threshold passed.
  • Local .NET tests were not run by request.
  • NuGet restore resolves PANiXiDA.Core.Presentation.Http 2.0.6.

Compatibility

  • Migrations: none.
  • Contract changes: OpenAPI is now exposed as identity and compendium documents instead of one combined module document.
  • Configuration changes: adds the required HttpModules entries to the host configuration.
  • Breaking changes: no application endpoint contract changes.

@PANiXiDA
PANiXiDA marked this pull request as ready for review August 2, 2026 11:35

@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: 298b671ac3

ℹ️ 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".

Comment on lines +189 to +193
var optionsRegistrations = registrations
.Where(registration => string.Equals(
registration.OptionsTypeName,
optionsType.Name,
StringComparison.Ordinal))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Match registrations with fully qualified option types

When different modules declare options classes with the same simple name, this comparison credits every AddOptions<T>() occurrence to all of them because OptionsRegistration stores only type.Name. For example, registering ModuleA.SmtpOptions with ValidateOnStart() makes an unregistered ModuleB.SmtpOptions pass this check; the validator-registration check has the same simple-name collision. Preserve assembly/namespace-qualified type identity, ideally by resolving syntax with a semantic model, so the new convention cannot silently miss unvalidated options.

Useful? React with 👍 / 👎.

@PANiXiDA
PANiXiDA merged commit 6e659ab into development Aug 2, 2026
18 checks passed
@PANiXiDA
PANiXiDA deleted the feature/update-presentation-http branch August 2, 2026 11:40
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