core icon indicating copy to clipboard operation
core copied to clipboard

feat (ApiTestCase): Assert Item|collection JsonSchema with SerializerContext

Open GregoireHebert opened this issue 3 years ago • 5 comments

Q A
Branch? main
Tickets ~
License MIT
Doc PR #todo

When a JsonSchema needs to be tested over specific serialization context, one has to rewrite it's own methods. This allows to pass the serializationContext to create the right JsonSchema during testing.

GregoireHebert avatar Aug 02 '22 18:08 GregoireHebert

Shouldn't we get the right operation from the resource instead? By default it will take the serialization context from it.

alanpoulain avatar Aug 02 '22 19:08 alanpoulain

@alanpoulain That's already the case I reckon :) It's an addition to allow to force the context :)

GregoireHebert avatar Aug 02 '22 19:08 GregoireHebert

Yes you're right, sorry. Do you have a specific use case then?

alanpoulain avatar Aug 02 '22 19:08 alanpoulain

Dynamic groups for instance which cannot be extrapolated from the operation only.

GregoireHebert avatar Aug 02 '22 19:08 GregoireHebert

We should probably wait for 3.0 to be released to merge this then (it will be available in 3.1).

alanpoulain avatar Aug 04 '22 09:08 alanpoulain

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 04 '22 21:11 stale[bot]