feat: typed enums#241
Conversation
dd6ffb6 to
099671f
Compare
50c2c06 to
96a920e
Compare
f5acdf5 to
35a0253
Compare
|
@deepmap-marcinr, could you, please, share what do you plan with this PR? This generator is used in the InfluxDB Client Go to generate client stubs from the InfluxDB server very complex swagger. As there are many enums, these changes are necessary. This generator even fails on this swagger due to changes in #181 without this PR. It is becoming harder and harder to maintain this PR due to its complex changes to schema processing. Maybe, in order to don't break generated interfaces and make this PR better to merge, this could be done by a cmd option? |
|
I'd like to merge this, but I'm going to break people, that's the part that is difficult to deal with right now. My plan is to make a V2 version of this library which pulls in a number of breaking changes, but more importantly, we're going to version the templates separately from the tool itself, to make future changes easier. However, it's going to take me a while to get there. I'm leaning towards merging this end explaining what happened in release notes. |
|
Thanks for merging this, @deepmap-marcinr |
|
This may be a weird question on a long closed issue but I don't believe this actually type checks the enums, since |
* fix(model): Copying servers from path definition to operation definition * feat(enums): Adding support for enums in all positions
* fix(model): Copying servers from path definition to operation definition * feat(enums): Adding support for enums in all positions
This PR adds support for generating typed enum constants for enums in all places. It replaces #181 and properly fixes #54.
There is also a small fix for propagating the
serversproperty declared locally on the operation.