PHPackages                             swipegames/public-api - 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. swipegames/public-api

ActiveLibrary[API Development](/categories/api)

swipegames/public-api
=====================

Generated PHP types for Swipe Games Public API

v1.2.25(2d ago)0381proprietaryPHPPHP ^8.1CI passing

Since Mar 16Pushed 2d agoCompare

[ Source](https://github.com/SwipeGames/public-api)[ Packagist](https://packagist.org/packages/swipegames/public-api)[ RSS](/packages/swipegames-public-api/feed)WikiDiscussions main Synced today

READMEChangelog (9)DependenciesVersions (19)Used By (1)

Swipe Games Public API
======================

[](#swipe-games-public-api)

API documentation site, OpenAPI specs, and generated client packages for Swipe Games Public API.

- **Docs**: Built with [docusaurus-openapi-docs](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs)
- **API specs**: OpenAPI 3.0 YAML in `api/v1.0/`
- **Packages**: Go, TypeScript, and PHP types generated from the specs

Requirements
------------

[](#requirements)

- Node.js + Yarn
- Go
- Java 17 (`brew install --cask temurin@17`)

Quick Start
-----------

[](#quick-start)

```
# Install dependencies
yarn install

# Start docs locally
make up
```

Generated Packages
------------------

[](#generated-packages)

Types are generated from the OpenAPI specs and published as packages:

PackageRegistryInstall`@swipegames/public-api`[npm](https://www.npmjs.com/package/@swipegames/public-api)`npm install @swipegames/public-api``swipegames/public-api`[Packagist](https://packagist.org/packages/swipegames/public-api)`composer require swipegames/public-api`Go (services)GitHub`go get github.com/swipegames/public-api`Go (types only)GitHub`go get github.com/swipegames/public-api/api/v1.0/core/types`Commands
--------

[](#commands)

CommandDescription`make up`Start docs site locally`make gen-api`Regenerate all code (Go + TypeScript + PHP)`make gen-docs`Regenerate API documentation`make bump-version v=x.y.z`Bump version everywhere and regenerate`make build-node`Build the Node/TypeScript packageVersioning
----------

[](#versioning)

We use [semver](https://semver.org/). See `CLAUDE.md` for the full versioning workflow.

To bump the version:

```
make bump-version v=1.2.17
```

This updates all version locations (API specs, docusaurus config) and regenerates all code and docs.

CI/CD
-----

[](#cicd)

- **PR workflow**: Validates version bump, checks generated code is up-to-date, builds packages and docs
- **Deploy workflow** (on release): Publishes npm + Packagist packages, deploys docs to GitHub Pages

Customizations
--------------

[](#customizations)

This documentation includes custom components (swizzled from `docusaurus-theme-openapi-docs`) to enforce canonical JSON format in all code examples and request panels.

### Swizzled Components

[](#swizzled-components)

When upgrading `docusaurus-theme-openapi-docs`, these components may need to be reviewed and updated:

#### 1. `src/theme/ApiExplorer/CodeSnippets/index.tsx`

[](#1-srcthemeapiexplorercodesnippetsindextsx)

**Purpose:** Post-processes code snippets to ensure canonical JSON format

**Modifications:**

- Added `postProcessSnippet()` function that processes code snippets for each language:
    - **Python:** Adds `sort_keys=True` parameter to `json.dumps()` (for explicitness)
    - **cURL, C#, Go, PHP, Java, PowerShell, C, Objective-C, OCaml, R, Swift, Kotlin, Rust:** Compacts JSON (removes whitespace/newlines)
    - **Ruby:** Adds `{ sort_keys: true }` option to `JSON.dump()` (for explicitness)
    - **Node.js, JavaScript, Dart:** No changes needed
- Modified all `codegen.convert()` callbacks to call `postProcessSnippet()` before `setCodeText()`
- **Note:** Keys are already sorted by `ApiExplorerWrapper`, so we only compact (not re-sort)

**Dependencies:**

- `code-snippets-types.ts` - Copied from original theme
- `languages.ts` - Copied from original theme

#### 2. `src/theme/ApiExplorer/Body/index.tsx`

[](#2-srcthemeapiexplorerbodyindextsx)

**Purpose:** Displays compact canonical JSON in the interactive request panel

**Modifications:**

- Changed all `JSON.stringify(obj, null, 2)` calls to `JSON.stringify(obj)` to display compact canonical JSON instead of pretty-printed JSON
- Applies to: `jsonRequestBodyExample`, `example`, and `examples` bodies
- **Note:** Keys are already sorted by `ApiExplorerWrapper`, so we only remove whitespace

#### 3. `src/theme/ApiExplorer/index.js` (Wrapper)

[](#3-srcthemeapiexplorerindexjs-wrapper)

**Purpose:** Pre-sorts JSON keys before code generation

**Modifications:**

- Added `sortKeysCanonical()` function to recursively sort object keys
- Wraps `ApiExplorer` component and sorts `props.item.jsonRequestBodyExample` before passing to original component

### Why Canonical JSON?

[](#why-canonical-json)

The Swipe Games API requires canonical JSON format for signature generation:

- Keys must be **alphabetically sorted**
- No whitespace between elements
- Consistent formatting for HMAC-SHA256 signatures

See `/docs/authn.md` for detailed authentication documentation.

### Maintenance Notes

[](#maintenance-notes)

When updating `docusaurus-theme-openapi-docs`:

1. Check if swizzled components have breaking changes
2. Review modifications in the components listed above
3. Test code snippet generation for all languages
4. Verify request panel displays compact JSON
5. Run `yarn build` to ensure no compilation errors

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance99

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.9% 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 ~0 days

Total

12

Last Release

2d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c1feae566d4462fc5c6367f16aec24c8d6d7073f3431b8620862acbc038a1923?d=identicon)[swipegames](/maintainers/swipegames)

---

Top Contributors

[![sadensmol](https://avatars.githubusercontent.com/u/1025087?v=4)](https://github.com/sadensmol "sadensmol (41 commits)")[![Mirthis](https://avatars.githubusercontent.com/u/490732?v=4)](https://github.com/Mirthis "Mirthis (23 commits)")[![kvvit](https://avatars.githubusercontent.com/u/42875838?v=4)](https://github.com/kvvit "kvvit (5 commits)")[![leemp](https://avatars.githubusercontent.com/u/870457?v=4)](https://github.com/leemp "leemp (5 commits)")[![yalesha](https://avatars.githubusercontent.com/u/75245408?v=4)](https://github.com/yalesha "yalesha (4 commits)")[![swipegames-example-app[bot]](https://avatars.githubusercontent.com/u/186710058?v=4)](https://github.com/swipegames-example-app[bot] "swipegames-example-app[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/swipegames-public-api/health.svg)

```
[![Health](https://phpackages.com/badges/swipegames-public-api/health.svg)](https://phpackages.com/packages/swipegames-public-api)
```

###  Alternatives

[google/apiclient

Client library for Google APIs

9.8k186.9M875](/packages/google-apiclient)[stripe/stripe-php

Stripe PHP Library

4.0k139.3M411](/packages/stripe-stripe-php)[webonyx/graphql-php

A PHP port of GraphQL reference implementation

4.7k75.4M270](/packages/webonyx-graphql-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k90.6M248](/packages/twilio-sdk)[friendsofsymfony/jsrouting-bundle

A pretty nice way to expose your Symfony routing to client applications.

1.5k52.7M205](/packages/friendsofsymfony-jsrouting-bundle)[knplabs/github-api

GitHub API v3 client

2.2k15.3M170](/packages/knplabs-github-api)

PHPackages © 2026

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