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(jsonapi): exit loop when relationship class is found #6320

Merged
merged 1 commit into from Apr 18, 2024

Conversation

GwendolenLynch
Copy link
Contributor

Q A
Branch? main
License MIT

When using the model I describe in #6212 (comment), the $className variable is overwritten by null when an additional (3rd +) type is in the union.

@soyuka
Copy link
Member

soyuka commented Apr 18, 2024

shouldn't we use all the types? I mean in your example it should be one of Species (ref/iri), null, int right?

@GwendolenLynch
Copy link
Contributor Author

Fair call. Updated.

@soyuka
Copy link
Member

soyuka commented Apr 18, 2024

Do you think you can add a test? I usually add a fixture then uses the JsonSchemaGenerateCommandTest to add a functional test

@GwendolenLynch
Copy link
Contributor Author

GwendolenLynch commented Apr 18, 2024

Tests added. The core remaining issue remaining in #6212 isn't in the schema factory so I just extended the tests I added in #6223.

@soyuka soyuka merged commit 97c8ae2 into api-platform:main Apr 18, 2024
73 of 76 checks passed
@soyuka
Copy link
Member

soyuka commented Apr 18, 2024

nice thanks!

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.

None yet

2 participants