question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] typescript-angular enumNameSuffix not implemented

See original GitHub issue

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs
  • What’s the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

At the typescript-angular generator is the option enumNameSuffix defined but it isn´t implemented yet. Thus the modelFileSuffix is used instead of enumNameSuffix.

Exemple: export enum Color { Red = 'red' }

Expected (by default): export enum ColorEnum { Red = 'red' }

actual output vs expected output: https://github.com/OpenAPITools/openapi-generator/issues/10957#issuecomment-986559280

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dbrilscommented, Feb 7, 2022

It would also be nice to have an enumNamePrefix (much like modelNamePrefix), but only targetted at enums. Because I would like to prefix my interfaces with I and enumerations with E.

0reactions
UteHauscommented, Dec 6, 2021

If you use “modelSuffix” with the value Dto and the value of “enumNameSuffix” is null, the following results for your example:

export enum MyValuesDto
       value = 'value'
      value2 = 'value2'

expected result would be :

export enum MyValues
       value = 'value'
      value2 = 'value2'
Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation for the typescript-angular Generator
Whether to ensure parameter names are unique in an operation (rename parameters that are not). true. enumNameSuffix, Suffix that will be appended to...
Read more >
openapi-generator -l typescript-angular not working
I am issues while generating angular code run using the openapi-generator for language typescript-angular any idea ...
Read more >
docs/generators/typescript-angular.md - GitLab
Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found