PHPackages                             apimatic-moizgillani/swagger-petstore-3-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. apimatic-moizgillani/swagger-petstore-3-sdk

ActiveLibrary[API Development](/categories/api)

apimatic-moizgillani/swagger-petstore-3-sdk
===========================================

This is a sample Pet Store Server based on the OpenAPI 3.0 specification.

1.1.0(1y ago)01MITPHPPHP ^7.2 || ^8.0

Since May 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/moizgillani/swagger-petstore-3-0-php-sdk)[ Packagist](https://packagist.org/packages/apimatic-moizgillani/swagger-petstore-3-sdk)[ Docs](https://apimaticpetstore.pages.dev/#/php/pet-store-api)[ RSS](/packages/apimatic-moizgillani-swagger-petstore-3-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Getting Started with Swagger Petstore - OpenAPI 3.0
===================================================

[](#getting-started-with-swagger-petstore---openapi-30)

Introduction
------------

[](#introduction)

This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at . In the third iteration of the pet store, we've switched to the design first approach! You can now help us improve the API whether it's by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in OAS3.

*If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!*

Some useful links:

- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)

Find out more about Swagger:

Install the Package
-------------------

[](#install-the-package)

Run the following command to install the package and automatically add the dependency to your composer.json file:

```
composer require "apimatic-moizgillani/swagger-petstore-3-sdk:1.1.0"
```

Or add it to the composer.json file manually as given below:

```
"require": {
    "apimatic-moizgillani/swagger-petstore-3-sdk": "1.1.0"
}
```

You can also view the package at:

Test the SDK
------------

[](#test-the-sdk)

Unit tests in this SDK can be run using PHPUnit.

1. First install the dependencies using composer including the `require-dev` dependencies.
2. Run `vendor\bin\phpunit --verbose` from commandline to execute tests. If you have installed PHPUnit globally, run tests using `phpunit --verbose` instead.

You can change the PHPUnit test configuration in the `phpunit.xml` file.

Initialize the API Client
-------------------------

[](#initialize-the-api-client)

***Note:*** Documentation for the client can be found [here.](https://www.github.com/moizgillani/swagger-petstore-3-0-php-sdk/tree/1.1.0/doc/client.md)

The following parameters are configurable for the API Client:

ParameterTypeDescription`timeout``int`Timeout for API calls in seconds.
*Default*: `0``enableRetries``bool`Whether to enable retries and backoff feature.
*Default*: `false``numberOfRetries``int`The number of retries to make.
*Default*: `0``retryInterval``float`The retry time interval between the endpoint calls.
*Default*: `1``backOffFactor``float`Exponential backoff factor to increase interval between retries.
*Default*: `2``maximumRetryWaitTime``int`The maximum wait time in seconds for overall retrying requests.
*Default*: `0``retryOnTimeout``bool`Whether to retry on request timeout.
*Default*: `true``httpStatusCodesToRetry``array`Http status codes to retry against.
*Default*: `408, 413, 429, 500, 502, 503, 504, 521, 522, 524``httpMethodsToRetry``array`Http methods to retry against.
*Default*: `'GET', 'PUT'``customHeaderAuthenticationCredentials`[`CustomHeaderAuthenticationCredentials`](https://www.github.com/moizgillani/swagger-petstore-3-0-php-sdk/tree/1.1.0/doc/auth/custom-header-signature.md)The Credentials Setter for Custom Header SignatureThe API client can be initialized as follows:

```
$client = SwaggerPetstoreOpenAPI30ClientBuilder::init()
    ->customHeaderAuthenticationCredentials(
        CustomHeaderAuthenticationCredentialsBuilder::init(
            'api_key'
        )
    )
    ->build();
```

Authorization
-------------

[](#authorization)

This API uses the following authentication schemes.

- [`api_key (Custom Header Signature)`](https://www.github.com/moizgillani/swagger-petstore-3-0-php-sdk/tree/1.1.0/doc/auth/custom-header-signature.md)

List of APIs
------------

[](#list-of-apis)

- [Pet](https://www.github.com/moizgillani/swagger-petstore-3-0-php-sdk/tree/1.1.0/doc/controllers/pet.md)
- [Store](https://www.github.com/moizgillani/swagger-petstore-3-0-php-sdk/tree/1.1.0/doc/controllers/store.md)
- [User](https://www.github.com/moizgillani/swagger-petstore-3-0-php-sdk/tree/1.1.0/doc/controllers/user.md)

Classes Documentation
---------------------

[](#classes-documentation)

- [Utility Classes](https://www.github.com/moizgillani/swagger-petstore-3-0-php-sdk/tree/1.1.0/doc/utility-classes.md)
- [ApiException](https://www.github.com/moizgillani/swagger-petstore-3-0-php-sdk/tree/1.1.0/doc/api-exception.md)
- [HttpRequest](https://www.github.com/moizgillani/swagger-petstore-3-0-php-sdk/tree/1.1.0/doc/http-request.md)
- [HttpResponse](https://www.github.com/moizgillani/swagger-petstore-3-0-php-sdk/tree/1.1.0/doc/http-response.md)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~238 days

Total

3

Last Release

602d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c64524a7cd44831921bbc164062fb9f417b5a3e0419b0d130ce05243d68a166?d=identicon)[moizgillani](/maintainers/moizgillani)

---

Top Contributors

[![moizgillani](https://avatars.githubusercontent.com/u/38466692?v=4)](https://github.com/moizgillani "moizgillani (3 commits)")

---

Tags

swaggeropenapiapimaticpetstore

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/apimatic-moizgillani-swagger-petstore-3-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/apimatic-moizgillani-swagger-petstore-3-sdk/health.svg)](https://phpackages.com/packages/apimatic-moizgillani-swagger-petstore-3-sdk)
```

###  Alternatives

[swagger-api/swagger-ui

 Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

28.7k45.4M99](/packages/swagger-api-swagger-ui)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[square/square

Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.

793.4M21](/packages/square-square)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.4M12](/packages/jolicode-slack-php-api)[darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

3372.3M3](/packages/darkaonline-swagger-lume)[goldspecdigital/oooas

An object oriented approach to generating OpenAPI specs, implemented in PHP.

2322.8M25](/packages/goldspecdigital-oooas)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
