Skip to content

Add Multi-Language Fallbacks for x-api-wrapper (TypeScript, Kotlin, etc.) #7

@bsayli

Description

@bsayli

Summary

Provide no-op or minimal template fallbacks for non-Java generators (TypeScript, Kotlin, etc.)
to prevent duplicated wrapper models when x-api-wrapper is detected.

Details

The current Mustache partials correctly handle x-api-wrapper and x-api-wrapper-datatype for Java-based clients.
However, other generators that don’t understand these extensions (e.g. TypeScript, Kotlin) will revert
to generating full duplicate wrapper classes per endpoint.

Proposed Direction

  • Add lightweight fallback templates that safely ignore or minimize wrapper duplication.
  • Ensure the vendor extensions (x-api-wrapper, x-page) are harmless when used in multi-language setups.
  • Optionally provide language-specific hints or disable unsupported features at generation time.

Benefits

  • Enables consistent client generation across multiple languages.
  • Prevents “class explosion” in non-Java generators.
  • Makes the templates more portable and framework-agnostic.

Originated from community feedback on r/microservices.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions