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.

AllOf with enum generates code

See original GitHub issue

What are the steps to reproduce this issue?

  1. Schema containing enum and allOf image image

  2. Generate types

What happens?

Generated code is invalid

image

What were you expecting to happen?

export const SourceFileStatus = FileStatusEnum; should be added after the closing bracket of an interface, not in front of it.

Like this: image

Any other comments?

For enum definition without allOf the generated code is correct

Such as: image

What versions are you using?

  • Operating System: Linux (Ubuntu 21.10)
  • Package Version:6.6.4
  • OpenApi v3

Hope everything is clear, if not just tag me. I will happly add any additional information:)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
anymaniaxcommented, Apr 2, 2022

Fixed with 6.7.0

1reaction
anymaniaxcommented, Mar 9, 2022

Should be fixed in the next version

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Java] Client Code Generation: Allof and Enum Inheritance
Hi,. we have some issues generating a java client when allof/ref and enums are involved. Sadly we need the allof and we can...
Read more >
java.util.EnumSet.allOf java code examples - Tabnine
Creates an enum set filled with all the enum elements of the specified elementType. Popular methods of EnumSet. of. Creates an enum set...
Read more >
EnumSet allof() Method in Java - GeeksforGeeks
allOf (Class elementType ) in Java is used to create an enum set that will be used to contain all of the elements...
Read more >
Filling a List With All Enum Values in Java | Baeldung
Therefore, we can use the ArrayList() constructor and the filled EnumSet to construct a List object.
Read more >
Enum.values() vs EnumSet.allOf( ). Which one is more ...
allOf and it looks very efficient, especially for enums with less than 64 values. Basically all sets share the single array of all...
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