xml-doc-description-sanitization

Decode JSON-escaped API descriptions and inject them into XML documentation comments.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenAPI-generated response descriptions often arrive JSON-escaped (for example \uXXXX or \n). This skill ensures those descriptions are decoded and safely embedded into XML documentation comments without losing readability.

Core Features & Use Cases

  • Decode JSON-style escape sequences before inserting text into XML docs.
  • Escape XML-reserved characters (&, <, >) to maintain valid XML structure.
  • Apply sanitization only to API-sourced descriptions, leaving hardcoded XML markup intact.

Quick Start

Run the XML doc sanitizer on your generated OpenAPI descriptions to decode JSON escapes and produce valid XML comments.

Frequently Asked Questions about xml-doc-description-sanitization

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

FAQPage Schema
How do I fix JSON-escaped Unicode characters in OpenAPI generated XML documentation?

To fix JSON-escaped Unicode in OpenAPI generated XML documentation, you must decode JSON escape sequences like \uXXXX before injecting the text. This process ensures API descriptions are safely embedded into XML comments without losing readability.

What is the best way to escape XML-reserved characters in API descriptions?

The best way to escape XML-reserved characters in API descriptions is to apply a sanitization filter that converts symbols like &, <, and > into valid XML entities. This maintains valid XML structure while preserving the original text meaning.

How does XML doc sanitization handle intentional XML markup in OpenAPI descriptions?

XML doc sanitization handles intentional markup by applying decoding and escaping exclusively to API-sourced descriptions. It includes safeguards to avoid altering hardcoded XML markup, ensuring intentional tags remain intact during the sanitization process.

Can I preserve Unicode characters when generating code from OpenAPI definitions?

Yes, you can preserve Unicode characters when generating code from OpenAPI definitions by decoding JSON-style escape sequences before inserting the text into XML documentation comments. This prevents character loss during the code generation workflow.

Why do my XML documentation comments break when using OpenAPI response descriptions?

Your XML documentation comments break because OpenAPI response descriptions often arrive JSON-escaped with characters like \n or \uXXXX. If these are not decoded and XML-reserved characters are not escaped, the resulting XML structure becomes invalid.