guzzle / guzzle-services

Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.
MIT License
253 stars 78 forks source link

Allow to fix validation for parameters with a format #130

Closed bakura10 closed 7 years ago

bakura10 commented 7 years ago

Hi !

Some parameters may have a given type (example: string) in conjunction of a format (such as "date-time").

Currently, passing a DateTime for instance to such fields throw a validation error, because the format is done after validating it. As such conversion change the type of the value (DateTime => string), this PR ensures that this conversion is done before validating.

bakura10 commented 7 years ago

Never mind, I've been able to find a fix :).

Konafets commented 7 years ago

Can you rewrite the topic of the PR and add a description about the change?

bakura10 commented 7 years ago

Sure. Fixed! :)

Konafets commented 7 years ago

Thank you for your contribution!

bakura10 commented 7 years ago

Thanks a lot ! Possible to tag ? :p

Konafets commented 7 years ago

Sorry, I dont like to release any tiny change into a new version. You can require the "dev-develop" branch in your composer.json.

bakura10 commented 7 years ago

Sorry, I don’t like using untagged version in production :p.

I understand the rationale but I personally now tagged new version for every little bug fix, and it makes things much easier to handle (more smaller release so way easier to identify any regression, less issues as bug are fixed immediately…). I would strongly suggest you to go that way :). But you handle the package, do as you prefer :).