orval-labs/orval

Add naming convention conversion for schema property names

Open

#2,381 opened on Sep 19, 2025

View on GitHub
 (0 comments) (3 reactions) (0 assignees)TypeScript (648 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (6,272 stars)
PR merge metrics
 (PR metrics pending)

Description

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