bedezign/laravel-openapi-consumer

Laravel component to load an OpenAPIY JSON file and assist in consuming the underlying API.
24 3
Install
composer require bedezign/laravel-openapi-consumer
PHP:>=5.6.0
License:BSD 3-Clause
Last Updated:Oct 4, 2016
Links: GitHub  ·  Packagist
Maintainer: Blizz

OpenAPI Consumer

PoC to see if it is possible to automatically consume an API that has an OpenAPI specification (pka Swagger).

At this point the library is written for laravel.

If you need to use it, simply create a Client instance with the correct configuration

$api = new \OpenAPI\Consumer\Client('json specification path', [<extra configuration>])

You can then call any operation from the API in a very simplistic way:

$call = $api->operationName->with(['api-data' => 'api-data-value'])->execute();
if ($call->statusCode == 200) {
    dd($call->json);
}

Related Packages

jeandormehl/openapi-gen

Generates OpenApi specification for Laravel, Lumen or Dingo using a configuratio...

525 6
darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

38,626,149 2,926
darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

2,430,302 330
noitran/opendox

OpenApi(Swagger) 3.0 package for Lumen 5.5+ and Laravel 5.5+ with REDOC UI and S...

14,519 22
miladnouri/opendox

OpenApi(Swagger) 3.0 package for Lumen 5.5+ and Laravel 5.5+ with REDOC UI and S...

710 0