Skip to content

[BUG] Interface Naming oriented by filename #1192

@AlfaCoder

Description

@AlfaCoder

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions