Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pure.RelationalSchema.Storage.Abstractions.OpenAPI.Schema

OpenAPI document transformer for the Pure ecosystem — corrects auto-generated schemas for Pure.RelationalSchema.Storage.Abstractions types.

.NET build & test NuGet License: MIT

Overview

Pure.RelationalSchema.Storage.Abstractions.OpenAPI.Schema provides an IOpenApiDocumentTransformer that replaces the ASP.NET Core–generated component schemas for ICell, IRow, IStoredTableDataSet, and IStoredSchemaDataSet with schemas that match how those types actually serialize to JSON.

ASP.NET Core's built-in OpenAPI reflection cannot resolve the true JSON shape of these interface-based types. This transformer runs as a post-processing step and overwrites the relevant entries in document.Components.Schemas.

API

Type Kind Description
StorageDataDocumentTransformer sealed class Implements IOpenApiDocumentTransformer. Replaces generated schemas for ICell, IRow, IStoredTableDataSet, and IStoredSchemaDataSet with their actual JSON representation.

Schema corrections applied

Component Corrected JSON shape
ICell { "Value": "<string>" }
IRow [{ "Column": IColumn, "Cell": ICell }, ...]
IStoredTableDataSet { "TableSchema": ITable, "Rows": IRow[] }
IStoredSchemaDataSet { "Schema": ISchema, "Datasets": IStoredTableDataSet[] }

Target Frameworks

  • .NET 10

Installation

dotnet add package Pure.RelationalSchema.Storage.Abstractions.OpenAPI.Schema

Usage

Register the transformer when configuring OpenAPI in your ASP.NET Core app:

builder.Services.AddOpenApi(options =>
{
    options.AddDocumentTransformer<StorageDataDocumentTransformer>();
});

About

OpenAPI document transformer for Pure — corrects auto-generated schemas for ICell, IRow, IStoredTableDataSet, and IStoredSchemaDataSet.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from kudima03/Pure.Template