✨ Add ability to include namespace in schema type
feature-request
### Is your feature request related to a problem?
Not a bug, but a problem I'd like to solve 😄
### Describe the solution you'd like
I would like to be able to extend the schema types generated in the OpenAPI spec to include the full namespace. This is needed in the scenario when you are using the same model name, in two different APIs, but each model is different with different properties.
With `swashbuckle` I can do this as follows:
```cs
public static class OpenApiExt
{
public static void AddSwagger(this IServiceCollection services)
{
services.AddEndpointsApiExplorer();
services.AddSwaggerGen(setup =>
{
setup.SwaggerDoc("v1", new OpenApiInfo
{
Title = "Modular Monolith API",
Version = "v1",
});
// Needed to support nested types in the schema
setup.CustomSchemaIds(x => x.FullName?.Replace("+", ".", StringComparison.Ordinal));
});
}
}
```
1. Is there any way I can do this with your library?
2. If not, is it a feature you'd consider adding?
### Describe alternatives you've considered
Only solution so far is to use NSwag or Swashbuckle
1 条评论