Skip to content

Filtering out primitives from AnyOf #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
inomn opened this issue Nov 15, 2022 · 6 comments
Open

Filtering out primitives from AnyOf #459

inomn opened this issue Nov 15, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@inomn
Copy link

inomn commented Nov 15, 2022

Good day. In my project we have a case with anyOf string | object

image

The current implementation of anyOf parsing excludes all primitives, but I want to keep them.
Any ideas how it could be done?

p.s. on v10 worked well, generated origin: AddressCreationRequest | string;

Thanks.

@js2me
Copy link
Member

js2me commented Nov 15, 2022

Hi @inomn !
Thanks for this issue! Fix that soon

@js2me js2me self-assigned this Nov 15, 2022
@js2me js2me added the bug Something isn't working label Nov 15, 2022
@inomn
Copy link
Author

inomn commented Nov 16, 2022

@js2me hi, cool, thanks!

@js2me js2me mentioned this issue Nov 18, 2022
@inomn
Copy link
Author

inomn commented Dec 6, 2022

@js2me hi! any estimations on when this could be fixed?

@eysi09
Copy link

eysi09 commented Feb 11, 2023

Is this still being worked on?

I'm seeing the same issue and it's preventing me from upgrading.

eysi09 added a commit to garden-io/swagger-typescript-api that referenced this issue Mar 16, 2023
This commit adds two fixes needed for Garden's api-types package.

First:

Ensure that primitve values aren't stripped by setting
'ingoreTypes=[]'
see: acacode#459

Second:

Ensure union values are printed as T1 | T2 instead of T1 | T2 | (T1 & T2).
See acacode#341
and acacode#488
@inomn
Copy link
Author

inomn commented Jul 27, 2023

regression in 13.0.2

@inomn
Copy link
Author

inomn commented Oct 10, 2023

still the case in 13.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants