Schema Transformers
Namespace: RA.Utilities.OpenApi.SchemaTransformers
While DocumentTransformers modify the entire OpenAPI document and OperationTransformers modify individual endpoints,
the classes in the RA.Utilities.OpenApi.SchemaTransformers namespace are even more granular.
They implement the IOpenApiSchemaTransformer interface,
which is designed to modify the generated schema for a specific data model (a C# Type) within your OpenAPI specification.
This allows for powerful, type-specific enhancements that enrich your API documentation automatically.
Based on the files, this namespace contains the following key transformers:
FluentValidationSchemaTransformer
This is a highly useful transformer that bridges the gap between your business logic's validation rules and your API documentation.
EnumXmlSchemaTransformer
This transformer addresses a common pain point with enums in API documentation: making their values understandable.
Its goal is to read the XML documentation comments you've written for your C# enum members and append them directly to the enum's schema description in the OpenAPI document.
📄️ EnumXmlSchemaTransformer
The EnumXmlSchemaTransformer is a utility designed to solve a common problem in API documentation: making enum types understandable to API consumers.
📄️ FluentValidationSchemaTransformer
The FluentValidationSchemaTransformer is a powerful utility that serves a single, clear purpose: to automatically enrich your OpenAPI (Swagger) documentation by translating your FluentValidation rules into schema constraints.