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

Update Hydra JsonSchema context property possible types #4223

Merged
merged 4 commits into from
Apr 27, 2021
Merged

Update Hydra JsonSchema context property possible types #4223

merged 4 commits into from
Apr 27, 2021

Conversation

llupa
Copy link
Contributor

@llupa llupa commented Apr 15, 2021

Q A
Branch? 2.6
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #4222
License MIT

JsonSchema assertion will always fail for API Resources that have an output class defined.

@llupa
Copy link
Contributor Author

llupa commented Apr 15, 2021

I got lost in the test classes! Can someone show me where is the best place to add a test for this?

@alanpoulain
Copy link
Member

SchemaFactoryTest is a good start for the tests.

@llupa llupa marked this pull request as draft April 16, 2021 12:17
@llupa
Copy link
Contributor Author

llupa commented Apr 16, 2021

@alanpoulain Hello. I updated the PR. I saw that this: ContextBuilderTest is checking that the body of an anon. class normalization has an 'object' @context.

I was thinking to add an integration test where I assert the schema for both a resource class and an anon. class, but I am not sure how to use the fake Models in tests 🤔

@llupa llupa marked this pull request as ready for review April 16, 2021 16:49
@judmir
Copy link

judmir commented Apr 23, 2021

We have the exact same issue at our project. Would be really great if this PR can be merged.

@alanpoulain
Copy link
Member

I've added an integration test in ApiTestCaseTest (I think it's the best place to do so).

@alanpoulain alanpoulain merged commit 13112d3 into api-platform:2.6 Apr 27, 2021
@alanpoulain
Copy link
Member

Thank you @llupa.

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

3 participants