Skip to content

Laravel service provider to call APIs based on their swagger specification.

License

Notifications You must be signed in to change notification settings

bedezign/laravel-openapi-consumer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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);
}

About

Laravel service provider to call APIs based on their swagger specification.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages