PHPackages                             ovrflo/api-platform-typescript-generator-bundle - 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. ovrflo/api-platform-typescript-generator-bundle

ActiveSymfony-bundle[API Development](/categories/api)

ovrflo/api-platform-typescript-generator-bundle
===============================================

A Symfony bundle to generate TypeScript types for your API Platform project. It can generate models, endpoints, routes and a bit more.

0105PHP

Since Dec 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ovrflo/api-platform-typescript-generator-bundle)[ Packagist](https://packagist.org/packages/ovrflo/api-platform-typescript-generator-bundle)[ RSS](/packages/ovrflo-api-platform-typescript-generator-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Description
-----------

[](#description)

This bundle exposes a command to generate typescript interfaces for your API platform resources. It can generate interfaces for models, enums, API endpoints, app routes and more.

Why?
----

[](#why)

When bootstrapping a new project with API platform, I found myself writing a lot of boilerplate code to get the frontend to work with the API. Looking for a solution for generating glue code for the frontend, I couldn't find anything to express the breadth of metadata that API platform exposes. Another factor was the fact that existing solutions tend to be focused on boostraping the project, with limited use after that.

This bundle aims to generate the glue code for the frontend, and keep it up to date with the API platform metadata while you develop your app.

Installation
------------

[](#installation)

```
composer require --dev ovrflo/api-platform-typescript-generator-bundle:dev-main
```

Then, add to `config/bundles.php`:

```
return [
    // ...
    Ovrflo\ApiPlatformTypescriptGeneratorBundle\OvrfloApiPlatformTypescriptGeneratorBundle::class => ['dev' => true],
];
```

Configuration
-------------

[](#configuration)

```
# config/packages/ovrflo_api_platform_typescript_generator.yaml
when@dev:
    ovrflo_api_platform_typescript_generator:
        output_dir: '%kernel.project_dir%/assets/api'
        model_metadata:
            namespaces: ['App\Entity']
```

Usage
-----

[](#usage)

```
bin/console ovrflo:api-platform:typescript:generate
# or the watcher (requires nodejs and chokidar)
node ./vendor/.bin/generate_api_types_watch.js
```

The generated endpoint files also rely on an `ApiMethods.ts` file existing in your project and exporting a few functions that are used to make the API calls.

```
Output
---
When running the command, it will generate a bunch of files in the `config.output_dir` (default `assets/api`) directory.

```bash
/interfaces/ApiTypes.ts # common interfaces for API platform
/interfaces/Enum.ts # enum types
/interfaces/.ts # interfaces for the different entities discovered
/endpoint/.ts
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/97dae30b9c9e4594cfe79d3fadb8f409ae9ec0d169af2628cd2475c464649080?d=identicon)[ovrflo](/maintainers/ovrflo)

---

Top Contributors

[![ovrflo](https://avatars.githubusercontent.com/u/4866936?v=4)](https://github.com/ovrflo "ovrflo (25 commits)")

### Embed Badge

![Health badge](/badges/ovrflo-api-platform-typescript-generator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ovrflo-api-platform-typescript-generator-bundle/health.svg)](https://phpackages.com/packages/ovrflo-api-platform-typescript-generator-bundle)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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