Hexed.AspNetCore.OpenApi
0.21.0
dotnet add package Hexed.AspNetCore.OpenApi --version 0.21.0
NuGet\Install-Package Hexed.AspNetCore.OpenApi -Version 0.21.0
<PackageReference Include="Hexed.AspNetCore.OpenApi" Version="0.21.0" />
<PackageVersion Include="Hexed.AspNetCore.OpenApi" Version="0.21.0" />
<PackageReference Include="Hexed.AspNetCore.OpenApi" />
paket add Hexed.AspNetCore.OpenApi --version 0.21.0
#r "nuget: Hexed.AspNetCore.OpenApi, 0.21.0"
#:package Hexed.AspNetCore.OpenApi@0.21.0
#addin nuget:?package=Hexed.AspNetCore.OpenApi&version=0.21.0
#tool nuget:?package=Hexed.AspNetCore.OpenApi&version=0.21.0
Hexed
Become victim of your own insanity.
Hexed simply wires your dependencies together. Ward off the chaos that must come.
Getting started
Install the package:
dotnet add package Hexed
Define modules and their dependencies:
public sealed class MyModule : Use<MyDependency>;
public sealed class MyDependency : Module;
Load your module — dependencies are resolved and loaded automatically:
var modules = new Modules();
modules.Load<MyModule>();
Module dependencies
Each module defines its own dependencies. There are three ways of doing this.
Use<TModule>
Implement Use<TModule> if your module depends on the components configured by TModule, and needs no further configuration.
public sealed class SomeModule : Use<SomeOtherModule>;
Glob<TModule>
Implement Glob<TModule> if your module optionally depends on TModule, and you want to control whether it is loaded at runtime using the HEXED environment variable.
public sealed class SomeModule : Glob<SomeOtherModule>;
The HEXED environment variable accepts a semicolon-separated list of glob patterns matched against the full type name of each Glob<TModule> dependency:
export HEXED=Example.*;AnotherExample.*
Patterns prepended with ! act as exclusion rules — if any exclusion pattern matches, the module is not loaded regardless of inclusion matches.
export HEXED=Example.*;!Example.SomeModule
If HEXED is not set, all Glob<T> dependencies are loaded as normal.
Configure<TComponent>
Implement Configure<TComponent> if your module needs to configure TComponent directly.
If TComponent is a module, it is loaded first — similar to Use<TModule> — and then Configure is called with it passed in.
If TComponent is not a module, it is provided by the context you run your application in. For example, the Hexed.AspNetCore context provides IServiceCollection and WebApplicationBuilder. If no context provides the component, the Configure method is simply not called — which allows a single module to support multiple contexts.
public sealed class SomeModule :
Configure<SomeOtherModule>,
Configure<IServiceCollection>
{
public void Configure(SomeOtherModule module)
{
module.WithSomething();
}
public void Configure(IServiceCollection services)
{
services.AddSingleton<MyService>();
}
}
Native AOT
By default, Hexed uses a reflection-based descriptor to resolve module dependencies. The Hexed package ships with a source generator (Hexed.Analyzer) that generates a reflection-free descriptor at compile time and registers it automatically. Your entry point stays unchanged.
Compatibility
| Package | Native AOT |
|---|---|
Hexed |
✓ |
Hexed.AspNetCore |
✓ |
Hexed.AspNetCore.OpenApi |
✓ |
Hexed.Critter |
✓ |
Contexts
Depending on the framework you're running in, different components are available to Configure<TComponent>.
AspNetCore
Install the Hexed.AspNetCore package to use the ASP.NET Core context:
dotnet add package Hexed.AspNetCore
Use the Build() or RunAsync() method from this namespace on your module:
using Hexed.AspNetCore;
return await new MyModule().RunAsync();
Configurable components
The following components are supported (including their subclasses or interfaces):
Microsoft.AspNetCore.Builder.WebApplicationBuilderMicrosoft.AspNetCore.Builder.WebApplicationMicrosoft.Extensions.Configuration.IConfigurationMicrosoft.Extensions.DependencyInjection.IServiceCollectionSystem.IServiceProvider
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Hexed.AspNetCore (>= 0.21.0)
- Microsoft.AspNetCore.OpenApi (>= 10.0.5)
- Scalar.AspNetCore (>= 2.13.13)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.21.0 | 45 | 6/2/2026 |
| 0.20.0 | 50 | 6/2/2026 |
| 0.19.0 | 61 | 6/2/2026 |
| 0.18.0 | 91 | 6/1/2026 |
| 0.17.0 | 95 | 6/1/2026 |
| 0.16.0 | 89 | 6/1/2026 |
| 0.14.0 | 91 | 5/31/2026 |
| 0.13.0 | 92 | 5/31/2026 |
| 0.12.0 | 102 | 5/31/2026 |
| 0.11.0 | 92 | 5/30/2026 |
| 0.10.0 | 89 | 5/29/2026 |
| 0.9.0 | 89 | 5/29/2026 |
| 0.8.1 | 85 | 5/29/2026 |
| 0.7.0 | 87 | 5/29/2026 |
| 0.6.0 | 78 | 5/29/2026 |
| 0.5.0 | 105 | 5/29/2026 |
| 0.4.0 | 86 | 5/29/2026 |
| 0.3.0 | 99 | 5/29/2026 |
| 0.2.0 | 90 | 5/29/2026 |
0.21.0
- Use switch pattern matching for Configure dispatch
- Remove unused type parameter from Configure delegate
0.20.0
- Register constructed generic modules from any assembly
0.19.0
- Only generate metadata for modules in the current compilation
0.18.0
- Convert Metadata from interface/switch-case to per-module record + Registry
- Rewrite source generator to emit per-module Metadata in ModuleInitializer
- Register all test projects as analyzer consumers; make test module types public
0.17.0
- Replace ProjectReference with None item for CI-safe analyzer packaging
0.16.0
- Fix CI pack: remove DependsOnTargets=Build, add IsPackable to Example
0.15.0
- Bundle Hexed.Analyzer into Hexed NuGet package
0.14.0
- Glob: replace regex with O(n) span-based wildcard matcher
- Add Metadata.AssertValidModule default method, move validation out of Modules.Load
- Generator: pregenerate static readonly Type[] fields to avoid allocation on lookup
- Metadata: return Type[] instead of IEnumerable<Type>, cache in Reflection
0.13.0
- Filter open generic module definitions in source generator
- Fix InvokeConfigure NRE and unwrap TargetInvocationException
- Remove O(N²) reflection-based circular dependency check
- Remove unused Microsoft.Extensions.Configuration/DependencyInjection package references
- Rename ModuleWithConcrete test module; add ConfiguresViaConcreteType test
- Add Hexed.AspNetCore.Test project with Extensions tests
- Validate Glob/Use and Configure type argument incompatibility
- Fix deep circular dependency detection
- Suppress AOT warnings for intentional reflection fallback
- Enable Native AOT publishing for Example project
0.12.0
- Replace generic Exception with typed exception hierarchy
- Throw on Load(instance) after module is already registered
- Add tests covering remaining Modules code paths
- Enable centralized package version management via Directory.Packages.props
- Rename Descriptor to Metadata
- Improved readme
0.11.0
- Hide LICENSE.txt and README.md from per-project view via Visible=false; add LICENSE.txt to .slnx
- Add Solution Items folder to .slnx with shared props files
- Cache Inclusions/Exclusions as lazy properties in Glob
- Make Glob non-static, Modules owns its own Glob instance
0.10.0
- Add opencode agent configuration.
0.9.0
- Consolidated .csproj via shared props files.
- Bumped LangVersion from 12 to 14.
- Added IsAotCompatible to Hexed.AspNetCore.OpenApi.
- Renamed launch profile from http to Example.
- Added auto-tagging GitHub workflow step.
0.8.1
- Fixed duplicate pattern variable in generated InvokeConfigure.
0.8.0
- Fixed DescriptorGenerator.
0.7.0
- Improved descriptor.
0.6.0
- Support glob exclusions.
0.5.0
- Prettier class names in mermaid output.
0.4.0
- Allow injection of RunWebApplication delegate.
0.3.0
- Publish readme and license.
0.2.0
- Push packages.
0.1.0
- Initial version.