Download the PHP package paysera/util-raml-code-generator without Composer

On this page you can find all versions of the php package paysera/util-raml-code-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 util-raml-code-generator

util-raml-code-generator

Latest Version Build Status

util-raml-code-generator generates code packages from specified RAML definition. Currently this utility can:

Requirements

Installation

Table of contents

  1. RAML structure
    1. api.raml
    2. types/category.raml
    3. types/category-result.raml
    4. traits/category-filter.raml
  2. Custom annotations
    1. (generator_method_name_override)
  3. Generate and publish clients
    1. config.json format
  4. Generate Javascript REST client
    1. File tree
    2. src/entity/Category.js
    3. src/entity/CategoryFilter.js
    4. src/entity/CategoryResult.js
    5. src/service/createClient.js
    6. src/service/CategoryClient.js
  5. Generate PHP REST client
    1. File tree
    2. src/CategoryClient.php
    3. src/ClientFactory.php
    4. src/Entity/Category.php
    5. src/Entity/CategoryFilter.php
    6. src/Entity/CategoryResult.php
  6. Generate Symfony Bundle

RAML structure

Lets have following RAML structure:

With following contents:

raml/category/api.raml

raml/category/types/category.raml

raml/category/traits/category-filter.raml

raml/category/types/category-result.raml

Custom annotations

(generator_method_name_override)

Use this to override method name (for any generated client or bundle).

For example:

Generate and publish clients

  1. Run bin/console release:clients {path_to_config}.
    • path_to_config path to config.json file.

This command will

  1. clone repository
  2. generate clients from raml
  3. update changelog
  4. show you the difference between current and generated files
  5. generate dist files for javascript
  6. create a commit
  7. push commit
  8. create tag

config.json format

Generate Javascript REST client

  1. Run bin/console js-generator:package {path_to_raml} {output_dir} {client_name} --library_name={library_name}.
    • path_to_raml path to raml file.
    • output_dir directory where to put generated files.
    • client_name is the name of your main javascript client.
    • library_name is optional name for generated library, i.e. @paysera/some-api-client
  2. Check the dumped output to {output_dir} directory.

Javascript client file tree

In output_dir you should expect these files generated:

With following contents of services and entities src directory:

src/entity/Category.js

src/entity/CategoryFilter.js

src/entity/CategoryResult.js

src/service/createClient.js

src/service/CategoryClient.js

Generate PHP REST client

  1. Run bin/console php-generator:rest-client {path_to_raml} {output_dir} {namespace} --library_name={library_name}.
    • path_to_raml path to raml file.
    • output_dir directory where to put generated files.
    • namespace is the namespace of Client.
    • library_name is optional name for generated library, i.e. paysera/lib-some-api-client
  2. Check the dumped output to {output_dir} directory.

PHP Client file tree

In output_dir you should expect these files generated:

With following contents of src directory:

src/CategoryClient.php

src/ClientFactory.php

src/Entity/Category.php

src/Entity/CategoryFilter.php

src/Entity/CategoryResult.php

Generate Symfony Bundle

  1. Run bin/console php-generator:symfony-bundle {path_to_raml} {output_dir} {namespace}.
    • path_to_raml path to raml file.
    • output_dir directory where to put generated files.
    • namespace is the namespace of your Symfony Bundle.
  2. Check the dumped output to {output_dir} directory.

In output_dir you should expect these files generated:

With following contents:

CategoryPermissions.php

VendorCategoryApiBundle.php

Controller/CategoryApiController.php

DependencyInjection/Configuration.php

DependencyInjection/VendorCategoryApiExtension.php

Entity/Category.php

Entity/CategoryFilter.php

Normalizer/CategoryNormalizer.php

Normalizer/CategoryFilterNormalizer.php

Repository/CategoryRepository.php

Service/CategoryManager.php

Voter/CategoryScopeVoter.php


All versions of util-raml-code-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
ext-sqlite3 Version *
doctrine/dbal Version ^2.7
doctrine/inflector Version ^1.1
fig/http-message-util Version ^1.0
incenteev/composer-parameter-handler Version ^2.0
padraic/phar-updater Version ^1.0
paysera/lib-changelog-parser Version ^1.1.2
paysera/lib-dependency-injection Version ^1.0
raml-org/raml-php-parser Version ^4.5
sebastian/diff Version ^2.0
sensio/distribution-bundle Version ^5.0.19
sensio/framework-extra-bundle Version ^5.1.6
symfony/monolog-bundle Version ^3.1.0
symfony/polyfill-apcu Version ^1.0
symfony/symfony Version ^3.4.35
twig/twig Version ^2.12
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 paysera/util-raml-code-generator contains the following files

Loading the files please wait ....