Add naming convention conversion for schema property names
#2.381 geöffnet am 19. Sept. 2025
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
}
}
}
}
}