orval-labs/orval

Add naming convention conversion for schema property names

Open

#2.381 geöffnet am 19. Sept. 2025

Auf GitHub ansehen
 (0 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)TypeScript (648 Forks)auto 404
enhancementhelp wanted

Repository-Metriken

Stars
 (6.272 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Hi everyone, this is a follow-up for the following discussion https://github.com/orval-labs/orval/discussions/218

Summary

Add a native support for converting schema field names from diffent conventions like snake_case to camelCase in generated TypeScript interfaces and types, similar to what openapi-generator provides.

Problem Description

Many APIs (especially those built with Python/FastAPI, Ruby on Rails, etc.) use snake_case naming conventions for their schema properties, but TypeScript/JavaScript codebases typically use camelCase. Currently, Orval users need to implement complex workarounds using mutators and transformers to achieve this conversion, which:

Proposed Solution

Building on the recent implementation of output.overrides.namingConvention.enum (added in #2125) we could have something like :

module.exports = {
  petstore: {
    output: {
      override: {
        namingConvention: {
          enum: 'camelCase', 
          properties: 'camelCase'      // New property
        }
      }
    }
  }
}

Contributor Guide