Download the PHP package vuryss/dokky without Composer
On this page you can find all versions of the php package vuryss/dokky. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package dokky
Short Description OpenAPI 3.1 documentation generator for PHP
License MIT
Informations about the package dokky
DOKKY
Empower APIs with Seamless Documentation Precision
Overview
Dokky is a powerful developer tool designed to streamline the process of generating OpenAPI 3.1 documentation for PHP projects.
It lets you parse PHP classes and their properties, automatically generating the necessary OpenAPI schema definitions.
Purpose
To be used inside frameworks for automatic generation of API Documentation (similar to API Platform).
Features
- Provides OpenAPI class abstractions for easy manipulation of OpenAPI structures via PHP objects.
- Provides attributes for decorating classes and properties indicating how they should be represented in OpenAPI.
- Supports Symfony serializer and validator attributes for seamless integration.
- Generates OpenAPI Schemas based on PHP Classes and their properties. Correctly parses PHP Types and type annotations.
Symfony Compatibility
Dokky supports Symfony 7.4 LTS and Symfony 8.x.
For local validation inside the project container:
The default local development flow should use composer deps:highest, while CI runs both the lowest and highest supported dependency sets to verify the compatibility matrix.
composer deps:lowest only moves the Symfony dependency family to its lowest supported versions, while composer deps:highest refreshes the full dependency graph to the newest allowed versions.
Example usage:
Overwriting single property's schema
Array schema handling
Array type can usually be declared in several ways, here are the two supported cases:
- List of elements of given type. Represented as JSON array type. Must be sequentially indexed array.
array<Type>array<int, Type>Type[]list<Type>iterable<Type>
Example JSON structure:
- Associative array of given type. Represented as JSON object type. JSON objects always have string keys, even if they are integers in PHP.
array<string, Type>
Example JSON structure:
Even with non-sequential integer keys, still JSON object:
Considering nullable properties as not-required
Sometimes, to be consistent with serializers, which can skip null values, you might want to consider nullable properties as not-required. In this case, you can use a configuration option to switch the required property behavior.
This can be done by passing a configuration object to the class schema generator like this:
Full documentation example
Using Named Schemas
In some cases, you might want to define a specific name for a schema in the components section, rather than relying on the auto-generated name based on the class. You can achieve this using the getNamedSchemaReference method:
Retrieving full list of used classes
For debugging purposes, you might need the full list of classes used in the OpenAPI schema. Also, if you like to apply some caching based on whether any of the classes changed, you can use this method to get the list of classes used in the OpenAPI schema.
All versions of dokky with dependencies
symfony/property-info Version ^7.4.1 || ^8.0
phpstan/phpdoc-parser Version ^2.3.2
phpdocumentor/reflection-docblock Version ^6.0