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

Resolve 1904 #1905

Merged
merged 8 commits into from
Dec 25, 2023
Merged

Conversation

blast-hardcheese
Copy link
Member

@blast-hardcheese blast-hardcheese commented Dec 25, 2023

Resolve #1904

oneOf, when used in properties, emits broken code.

This PR unfortunately ran into an issue with PropMeta, wherein ModelResolver has no way to distinguish between guardrail-generated models and just other types that exist on the JVM. I worked around this by testing whether the type is leading with the fully-qualified to the wrapping class.

Relying on tests to keep this working for now, until a ModelResolver refactor.

@blast-hardcheese blast-hardcheese added bug Unexpected behaviour for functionality that either was intended to work, or has worked in the past minor Bump minor version and removed minor Bump minor version labels Dec 25, 2023
@blast-hardcheese blast-hardcheese merged commit 9e64878 into guardrail-dev:master Dec 25, 2023
28 checks passed
@blast-hardcheese blast-hardcheese deleted the resolve-1904 branch December 25, 2023 17:00
blast-hardcheese added a commit to blast-hardcheese/guardrail that referenced this pull request Dec 26, 2023
blast-hardcheese added a commit to blast-hardcheese/guardrail that referenced this pull request Dec 26, 2023
blast-hardcheese added a commit to blast-hardcheese/guardrail that referenced this pull request Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behaviour for functionality that either was intended to work, or has worked in the past minor Bump minor version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oneOf object property results in uncompilable code
1 participant