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.6.2(1mo ago)1601proprietaryPHPPHP ^8.1CI passing

Since Mar 16Pushed 3w 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 3w ago

READMEChangelog (10)DependenciesVersions (28)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 91% of packages

Maintenance94

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.1% 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 ~3 days

Total

20

Last Release

37d 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 (49 commits)")[![Mirthis](https://avatars.githubusercontent.com/u/490732?v=4)](https://github.com/Mirthis "Mirthis (23 commits)")[![leemp](https://avatars.githubusercontent.com/u/870457?v=4)](https://github.com/leemp "leemp (5 commits)")[![kvvit](https://avatars.githubusercontent.com/u/42875838?v=4)](https://github.com/kvvit "kvvit (5 commits)")[![yalesha](https://avatars.githubusercontent.com/u/75245408?v=4)](https://github.com/yalesha "yalesha (4 commits)")[![swipe-games-hermes-bot[bot]](https://avatars.githubusercontent.com/in/3738113?v=4)](https://github.com/swipe-games-hermes-bot[bot] "swipe-games-hermes-bot[bot] (2 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

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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