Download the PHP package fusonic/api-documentation-bundle without Composer

On this page you can find all versions of the php package fusonic/api-documentation-bundle. 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 api-documentation-bundle

fusonic-api-documentation-bundle

License Latest Version Total Downloads php 8.2+

About

This bundle makes generating documentation of your (json) API routes easier. It provides a custom route annotation that can parse the input and output model of a route to generate documentation definitions for NelmioApiDocBundle. If you are using type hints for the input and output it can be detected automatically, see Usage on how to do this.

With just NelmioApiDocBundle you will often find yourself writing many annotations with a repetitive pattern. With this bundle common annotation combinations are bundled into one single route attribute.

This bundle can work well together with the http-kernel-bundle.

Install

Use composer to install the bundle from packagist.

Requirements:

In case Symfony did not add the bundle to the bundle configuration, add the following (by default located in config/bundles.php):

Next you need to configure NelmioApiDocBundle.

There is one optional configuration for this bundle:

Usage

Different examples can be found in the tests.

Example route with automatic type detection

If you have some kind of response listener that allows you to return objects directly from your controller then you can use the automatic output detection based on the return type or return annotation.

If you return an array or a generic type, you can set the return type (e.g.: SomeType[] or `SomeGeneric). The only requirement here is that you can only have one return type. Multiple return types are not supported.

Example route with manual input/output

If you do not support argument resolving and returning objects directly you can define the input and output classes manually.

You can also specify builtin types for the output, for example string:

If your manually defined output is a collection, you can set outputIsCollection: true in addition to the output:

Contributing

This is a subtree split of fusonic/php-extensions repository. Please create your pull requests there.


All versions of api-documentation-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
nelmio/api-doc-bundle Version ^4.29
symfony/config Version ^5.4 || ^6.0 || ^7.0
symfony/dependency-injection Version ^5.4 || ^6.0 || ^7.0
symfony/dom-crawler Version ^5.4 || ^6.0 || ^7.0
symfony/property-info Version ^5.4 || ^6.0 || ^7.0
symfony/routing Version ^5.4 || ^6.0 || ^7.0
zircote/swagger-php Version ^4.7
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 fusonic/api-documentation-bundle contains the following files

Loading the files please wait ....