Skip to content

DoclerLabs/api-client-base

Repository files navigation

OpenAPI SDK generator - API Client Base

This library provides the base classes and interfaces for the generated clients made by api-client-generator.

Latest Stable Version License Build Status Coverage Status

Description

Base classes of the generated client are:

  • ClientFactory - responsible for creating the client object with all of the necessary dependencies.
  • Client - main class containing all of the methods needed to send API requests according to specification.
  • Request - encapsulates incoming request parameters.
  • RequestMapper - translates the request parameters suitable for the base Guzzle client.
  • ResponseHandler - decides the appropriate response based on the returned response status code (specific exception on the error status code).
  • ResponseMapperRegistry - simple container for the response mappers.
  • ResponseMapper - maps raw response into the easy-to-use schema objects.
  • Schema - entity objects within the scope of the client (e.g. Post).

This base client repository provides the static, reusable parts of this client structure: RequestMapper, ResponseHandler, Exceptions, etc.

Development

Setup

composer install

Testing

vendor/bin/phpunit

See test reports in test-reports directory.

Contributing

Create a branch and open PR.

All notable changes to this project are documented in the CHANGELOG.md file, it must be maintained.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

About

The base library for api-client-generator.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages