Skip to content
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

fix(cts): improve oneOf matching with enum #1964

Merged
merged 1 commit into from
Aug 31, 2023
Merged

fix(cts): improve oneOf matching with enum #1964

merged 1 commit into from
Aug 31, 2023

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Aug 31, 2023

🧭 What and Why

🎟 JIRA Ticket: DI-1384

Fix oneOf matching for EventItem, by checking that the enum string is allowed.
It uses the tests cases added and removed in #1647.

Also clean up unused lambdas.

@millotp millotp requested a review from a team as a code owner August 31, 2023 13:26
@millotp millotp requested review from aallam and morganleroi August 31, 2023 13:26
@millotp millotp self-assigned this Aug 31, 2023
@netlify
Copy link

netlify bot commented Aug 31, 2023

Deploy Preview for api-clients-automation ready!

Name Link
🔨 Latest commit 1dcf54b
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/64f09509eedd80000811363e
😎 Deploy Preview https://deploy-preview-1964--api-clients-automation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines -88 to -90
lambdas.put("escapeReserved", new EscapeDartLambda());
lambdas.put("escapeDollarSign", new EscapeDollarSignLambda());
lambdas.put("lowerCamelCase", new LowerCamelCaseLambda());
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know the use case for those lambdas @aallam ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember some of them where used for dart, but I can't find the usage anymore! maybe got refactored away!

@algolia-bot
Copy link
Collaborator

algolia-bot commented Aug 31, 2023

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INSANE

there's so many cases where this will allow us to write more tests

@millotp
Copy link
Collaborator Author

millotp commented Aug 31, 2023

yes this is like a discriminator, but automatic 😀

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GGG!!

(just realized PHP tests are not formatted, that's weird)

@millotp
Copy link
Collaborator Author

millotp commented Aug 31, 2023

yeah I'm not sure why I'll try to make it work in another PR

@millotp millotp merged commit 3a77ba3 into main Aug 31, 2023
@millotp millotp deleted the fix/oneof-enum branch August 31, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants