schema-type-name-sanitization

Normalize malformed OpenAPI schema names into valid C# type identifiers.

413|64|Updated Feb 7, 2023
One-click install
npx skills add https://github.com/christianhelle/refitter --skill schema-type-name-sanitization
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: schema-type-name-sanitization
Source: https://github.com/christianhelle/refitter/tree/main/.squad/skills/schema-type-name-sanitization
Command: npx skills add https://github.com/christianhelle/refitter --skill schema-type-name-sanitization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Malformed OpenAPI schema names can collapse to empty generated C# type names, causing compilation failures and confusing errors in generated clients.

Core Features & Use Cases

  • Normalize trailing-dot and empty-tail OpenAPI keys to valid C# identifiers during code generation.
  • Prevent blank or duplicate type names by applying a safe, deterministic naming strategy that preserves existing valid names.
  • Integrate with OpenAPI-driven client generation workflows to produce consistent DTOs and interfaces.

Quick Start

Enable the normalization rule during OpenAPI processing to replace empty-tail names with stable identifiers.

Frequently Asked Questions about schema-type-name-sanitization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does OpenAPI code generation produce blank C# DTOs?▼

OpenAPI code generation produces blank C# DTOs when schema keys end with a trailing dot, causing the generated type names to collapse to empty strings and triggering compilation failures. This normalization mechanism repairs those empty-tail names to restore valid identifiers.

How do I fix empty type names during OpenAPI C# client generation?▼

To fix empty type names during OpenAPI C# client generation, apply a safe normalization rule that replaces empty-tail schema keys with stable, deterministic identifiers. This preserves existing valid names while preventing blank or duplicate class definitions during type generation.

What is OpenAPI schema name sanitization for C#?▼

OpenAPI schema name sanitization for C# is the process of resolving malformed schema definitions that collapse to empty generated type names. It implements a safe normalization mechanism that repairs empty-tail names while avoiding naming collisions during DTO generation.

Does schema name sanitization prevent duplicate type names in generated C# code?▼

Schema name sanitization prevents duplicate type names in generated C# code by applying a deterministic naming strategy. It ensures that repaired empty-tail names receive stable identifiers, avoiding naming collisions while preserving existing valid names during OpenAPI processing.

Can I integrate type name sanitization into existing OpenAPI client generation workflows?▼

You can integrate type name sanitization into existing OpenAPI client generation workflows by enabling the normalization rule during OpenAPI processing. This replaces empty-tail names with stable identifiers to produce consistent DTOs and interfaces without disrupting valid schema definitions.