Download the PHP package zvonchuk/phalcon-openapi without Composer

On this page you can find all versions of the php package zvonchuk/phalcon-openapi. 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 phalcon-openapi

phalcon-openapi

Tests Latest Stable Version PHP Version PHPStan

Automatic OpenAPI 3.1 spec generation for Phalcon PHP applications.

Generates a complete OpenAPI spec by reading your routes, controllers, models, and DTOs — no annotations, no YAML, no manual work. Just write your code and get Swagger UI for free.

Why This Package

Annotation-based approach phalcon-openapi
Routes Duplicated in annotations Read from Phalcon Router automatically
Schemas Separate schema definitions Built from your existing DTOs and Models
Validation Documentation only Same attributes for docs AND runtime
Status codes Manual per-endpoint Convention-based (201, 204, 422, 404)
Setup Custom controller + HTML Two lines of code

Requirements

Installation

Quick Start

Two endpoints are registered automatically:

How It Works

The package automatically reads:

Convention-Based Inference

Zero annotations needed for standard CRUD:

The spec generator infers:

Attributes Reference

All attributes are optional — use only when conventions aren't enough.

Endpoint Attributes

Validation Attributes

Used for both runtime validation (via DtoValidator) and OpenAPI schema generation:

Attribute Validates OpenAPI Schema
#[Email] Valid email format format: email
#[StringLength(min: 1, max: 255)] String length bounds minLength, maxLength
#[Min(1)], #[Max(150)] Numeric range minimum, maximum
#[Enum(['a', 'b'])] Allowed values enum: ["a", "b"]
#[Url] Valid URL format: uri
#[NotBlank] Rejects whitespace-only minLength: 1
#[Format('date')] Date/datetime/uuid/uri format: date
#[Pattern('/regex/')] PCRE regex match pattern: regex

Nested DTOs and Typed Arrays

Nested objects are validated recursively with dot-notation error paths:

Validation errors for nested objects use dot-notation:

Security Configuration

Then annotate controllers or methods with #[ApiSecurity('bearerAuth')].

Base Controller

Extend ApiController for automatic JSON body parsing, DTO validation, and convenience helpers:

Configuration Options

Demo Application

See phalcon-openapi-demo for a complete working example with Docker and CRUD controllers.

Running Tests

License

MIT


All versions of phalcon-openapi with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-phalcon Version ^5.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 zvonchuk/phalcon-openapi contains the following files

Loading the files please wait ...