R
R
Romi2022-03-16 22:25:12
PHPUnit
Romi, 2022-03-16 22:25:12

How can you check the type and range of returned data inside assertJsonStructure()?

Let's say I want to check not only the names of the fields in the response using assertJsonStructure(), but also the types of values ​​that were returned, and also, possibly, the ranges of these values ​​(string length, etc.), in general, in fact, validate matching an OpenAPI schema in a test - how can I do that?

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Plisko, 2022-03-17
@AmdY

https://github.com/estahn/phpunit-json-assertions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question