laravel-api-response-builder

Builds nice, normalized and easy to consume REST JSON responses for Laravel powered APIs.

MIT License

Downloads
308.1K
Stars
721
Committers
9

Bot releases are hidden (Show)

laravel-api-response-builder -

Published by MarcinOrlowski over 6 years ago

  • Documentation updated
laravel-api-response-builder -

Published by MarcinOrlowski over 6 years ago

  • Fixed version in composer.json file
laravel-api-response-builder -

Published by MarcinOrlowski over 6 years ago

  • Updated tests to run on PHP 5.6 too
  • Corrected docs
laravel-api-response-builder -

Published by MarcinOrlowski almost 7 years ago

  • Corrected docs
laravel-api-response-builder -

Published by MarcinOrlowski about 7 years ago

  • Fixed version in composer.json file
  • [RB-70] Added support for Laravel 5.5's auto-discovery feature
laravel-api-response-builder -

Published by MarcinOrlowski about 7 years ago

  • Corrected docs
  • Fixed version in composer.json file
  • [RB-70] Added support for Laravel 5.5's auto-discovery feature
laravel-api-response-builder -

Published by MarcinOrlowski about 7 years ago

  • Added support for Laravel 5.5's auto-discovery feature
laravel-api-response-builder -

Published by MarcinOrlowski over 7 years ago

  • Enforced HTTP code for error messages fits 400-499 range
  • validateResponseStructure() deprecated in favor of assertValidResponse()
  • Moved Orchestra's getPackageProviders() out of TestingHelpers trait
laravel-api-response-builder -

Published by MarcinOrlowski over 7 years ago

  • TestingHelpers trait's validateResponseStructure() method is now public
  • [RB-64] Fixed Exception Handler generated HTTP code being out of allowed range in some cases
  • [RB-65] Exception Handler Helper now deals with messages using non-UTF8 or broken encoding
  • Exception Handler's trace data is now properly placed into trace leaf
laravel-api-response-builder -

Published by MarcinOrlowski over 7 years ago

  • BACKWARD INCOMPATIBILE CHANGES
  • [RB-59] Added option to remap response JSON keys to user provided values
  • [RB-54] Debug data no longer pollutes data leaf. Instead, it adds debug dictionary to root data structure.
  • [RB-37] Added support for Laravel 5.3+ unauthenticated() in Exception Handler. See new config keys defails
  • [RB-47] Exception Handler now supports FormRequests and returns all messages in ResponseBuilder::KEY_MESSAGES
  • Uncaught HttpResponse::HTTP_UNAUTHORIZED exception is now handled same way authentication_exception is
  • [RB-56] Added configurable key for debug trace added to returned JSON response (if enabled)
  • Added traits to help testing your config and ApiCodes with ease. See Unit Testing your ApiCodes docs for details
  • ApiCodeBase class is now named BaseApiCodes
  • [RB-35] ExceptionHandlerHelper is now covered by tests
laravel-api-response-builder -

Published by MarcinOrlowski over 7 years ago

  • [RB-49] Fixed artisan vendor:publish not publishing config file correctly
laravel-api-response-builder -

Published by MarcinOrlowski over 7 years ago

  • [RB-42] Default value of encoding_options include JSON_UNESCAPED_UNICODE to prevent unicode escaping
  • [RB-41] Updated documentation
laravel-api-response-builder -

Published by MarcinOrlowski over 7 years ago

  • BACKWARD INCOMPATIBILE CHANGES
  • [RB-17] success() now allows to return API code as well
  • Corrected default config file containing faulty and unneeded use entries
  • [RB-20] Renamed ErrorCode class to ApiCodeBase
  • ApiCodeBase's getMinCode() and getMaxCode() are now public
  • Improved error messages to be even more informative
  • All exceptions thrown due to misconfiguration have CONFIG: message prefix now
  • Renamed error_code param to api_code in all the method signatures
  • :api_code is now code placeholder in strings (:error_code is no longer supported)
  • Default HTTP codes are now declared as constants DEFAULT_HTTP_CODE_xxx if you need to know them
  • ApiCodeBase::getMap() now ensures map config entry of expected array type
  • [RB-26] Added successWithCode() method
laravel-api-response-builder -

Published by MarcinOrlowski over 7 years ago

  • Updated composer.json to list laravel/framework among requirements
laravel-api-response-builder -

Published by MarcinOrlowski over 7 years ago

  • [RB-31] Fixed incorrect exception message thrown in case of incomplete classes config mapping (@dragonfire1119)
laravel-api-response-builder -

Published by MarcinOrlowski over 7 years ago

  • No changes. v3.0.2 was incorrectly released
laravel-api-response-builder -

Published by MarcinOrlowski over 7 years ago

  • [RB-38] Added encoding_options to control data-to-json conversion.
  • [RB-38] Added optional encoding options args to all methods accepting data argument
  • [RB-34] Added option to control ExceptionHandeler behavior on debug builds
  • ExceptionHandler's debug is now added as debug node to make it more clear where it comes from