Download the PHP package dealroadshow/kodegen without Composer
On this page you can find all versions of the php package dealroadshow/kodegen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dealroadshow/kodegen
More information about dealroadshow/kodegen
Files in dealroadshow/kodegen
Package kodegen
Short Description Generates PHP classes from json schema, including Kubernetes json schema
License MIT
Informations about the package kodegen
Dealroadshow Kodegen
This project provides cli to generate PHP classes for Kubernetes API objects. It uses official Kubernetes API json schema in order to generate classes for all API objects that corresponding Kubernetes version provides.
Installation
The recommended way to install Kodegen is Composer.
Install kodegen
cli globally and use it anywhere, as long as Composer
vendor/bin
directory is in your PATH
.
Usually this dir is $HOME/.composer/vendor/bin
.
Usage
For generic json schemas
In order to generate PHP code from generic json schema, just run the following command:
It will guide you through the generation process interactively.
For Kubernetes json schema
At first you want to determine the latest API versions for chosen Kubernetes version. For example, the latest json schema version for Kubernetes v1.20 is v1.20.10. In order to get this versions, run command:
The output of this command may look like follows:
After that you may use this json to retrieve Kubernetes json schema:
The command above will let you chose one on Kubernetes versions, defined in DEALROADSHOW_KODEGEN_JSON_SCHEMA_VERSIONS
env variable.
When you have your Kubernetes json schema, you can generate PHP classes from it:
This command will guide you through the generation process interactively.
All versions of kodegen with dependencies
ext-ctype Version *
ext-iconv Version *
ext-json Version *
guzzlehttp/psr7 Version ^2.0
knplabs/github-api Version ^3.0@dev
nette/php-generator Version ^3.5
symfony/console Version >=5.2
symfony/dotenv Version >=5.2
symfony/flex Version ^1.11
symfony/framework-bundle Version >=5.2
symfony/http-client Version >=5.2
symfony/maker-bundle Version ^1.20
symfony/yaml Version >=5.2