jolicode / slack-php-api

:hash: PHP Slack Client based on the official OpenAPI specification
https://jolicode.github.io/slack-php-api/
MIT License
222 stars 56 forks source link

FIX - #28 - change int type priority parameters to string #32

Closed egulhan closed 5 years ago

egulhan commented 5 years ago

change int type priority parameters to string

damienalexandre commented 5 years ago

Actually the priority is a float, so we could change the specification from "integer" to "number" and get the proper value in PHP.

    [97]=>
    object(JoliCode\Slack\Api\Model\ObjsIm)#2219 (8) {
      ["created":protected]=>
      int(1555058655)
      ["id":protected]=>
      string(9) "XXX"
      ["isIm":protected]=>
      bool(true)
      ["isOrgShared":protected]=>
      bool(false)
      ["isUserDeleted":protected]=>
      bool(false)
      ["priority":protected]=>
      float(0.041146295041152)
      ["user":protected]=>
      string(9) "XXX"
      ["storage":"ArrayObject":private]=>
      array(0) {
      }
    }
damienalexandre commented 5 years ago

Also you must follow our guide to provide patches when contributing. https://github.com/jolicode/slack-php-api/blob/master/doc/updating-sdk.md

I'm doing another PR with the fix. Thank a lot for taking the time to report and fix this issue.