php-swagger-test icon indicating copy to clipboard operation
php-swagger-test copied to clipboard

Allow custom requester + date match + use trait

Open pionl opened this issue 4 years ago • 3 comments

Hi again, thank you for your package! I've modified the source to support few things we are currently using:

  1. I'm unable to extend your class (Laravel TestCase) - I've added underlaying trait that will work the same
  2. Added support for date match (ISO format)
  3. I want to test our api schema without real HTTP connections - I've added ability to test Laravel kernel request -> https://github.com/pionl/laravel-swagger-test. A did not want to add any breaking changes and I've tried to minimize the implementation as possible.

I've not updated your documentation as my English is not so great, but do you want me to edit it?

Thank you for your time

pionl avatar Jun 15 '20 20:06 pionl

I've update the code based on feedback - thank you for your time.

pionl avatar Jun 16 '20 10:06 pionl

I think these features are great, however some of them already implemented in the new version.

The CustomRequester feature was implemented by using the PSR7 (Web Request and URI) implementation. These implementation allows you have any implementation you want.

As example of Custom implementation we have the ApiRequester that actually executes a request to the api and the MockRequester that emulates the request by calling the class directly.

The other features (trait and date validator) I believe it is a good idea.

byjg avatar Jul 05 '20 15:07 byjg

Ok guys, I'll split the implmentation, change the the laravel requester and etc and send a new PR. Thank you

pionl avatar Nov 11 '20 10:11 pionl