Download the PHP package maxbeckers/php-openapi-generator without Composer

On this page you can find all versions of the php package maxbeckers/php-openapi-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-openapi-generator

PHP OpenAPI Generator

PHP Version Tests

Generate strongly typed PHP 8.2+ models, server contracts, and API clients directly from OpenAPI 3.x specs.

This package is designed for teams that want generated code to feel like hand-written application code: explicit types, predictable method signatures, and minimal runtime magic.

Why This Project

Features

Requirements

Installation

Because this package is a Composer plugin, allow it in composer.json:

The CLI binary is available at vendor/bin/openapi-gen.

Quick Start

1) Create php-openapi-generator.php

2) Generate code

3) Choose a practical quickstart path

Server quickstart (Symfony or Laravel)

Then:

  1. Generate code with vendor/bin/openapi-gen
  2. Implement generated *ApiInterface methods
  3. Keep generated controllers/routes as thin transport glue

Client quickstart (typed API consumers)

Then:

  1. Generate code with vendor/bin/openapi-gen
  2. Inject *ApiClient into your services
  3. Use generated DTOs for request/response mapping

4) Optional overrides from CLI

What Gets Generated

Models are always generated.

Server target (GenerationTarget::Server)

Optional: set $config->frameworkVersion when server framework major versions require different generated glue.

Client target (GenerationTarget::Client)

Adapters:

Optional: set $config->httpClientVersion when adapter major versions require different generated transport code.

Recommended Workflow

  1. Keep your OpenAPI spec in source control.
  2. Regenerate code when the spec changes.
  3. Implement generated server interfaces or inject generated clients.
  4. Decide as a team whether to commit generated code or regenerate in CI.

Examples

Documentation

Development

License

MIT - see LICENSE.


Issues and feedback: github.com/maxbeckers/php-openapi-generator/issues


Built with ❤️ for PHP developers


All versions of php-openapi-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
composer-plugin-api Version ^2.0
maxbeckers/php-yaml-parser Version ^0.6.0
twig/twig Version ^3.0
symfony/console Version ^7.0|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package maxbeckers/php-openapi-generator contains the following files

Loading the files please wait ...