OpenAPITools / OpenAPITools/openapi-generator

[BUG] Interface Naming oriented by filename

Open
#23,701 0 comments 2 reactions 1 assignee View on GitHub

@kay-schecker is already working on this.

Since Apr 17, 2026.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Hi maintainers,
I noticed a change in the filename resolution behavior and would like to report a potentia issue / regression.

Problem

Previously, when generating output, the configured output path or expected naming with attribute title was used consistently.
Now it seems that the filename is suddenly preferred, which changes the generated interface-name of our Angular-model unexpectedly.

Expected Behavior

The generated should continue to use the explicity title from the yaml.

Example

answer-with-foobar.yml

with
title: Answer

openapi.yml contains:

components:
  schemas:
    Answer:
      $ref: './components/schemas/answer-with-foobar.yml'

generates from bundled openapi.yaml

schemas:
  answer-with-foobar:
    title: Answer
    ....

the following:
answer-with-foobar.ts -> export interface AnswerWithFoobar { ...

Environment

"@openapitools/openapi-generator-cli": "^2.31.1",
"@redocly/cli": "^2.11.1",
generator-cli: 7.21.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.