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

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

Linku API Documentation Bundle

This bundle can be used to modify OpenAPI documentation generated by API-Platform.

Support Matrix

This bundle supports:

Symfony 6 is no longer supported.

Installation

You can add this bundle to your project using composer require linku/api-documentation-bundle. Make sure your project already meets the support matrix above before installing.

Symfony Flex should automatically add the bundle to the list of used bundles in your project. If not, add Linku\ApiDocumentationBundle\LinkuApiDocumentationBundle::class => ['all' => true], to the config/bundles.php file.

For now, you need to manually add a config/packages/linku_api_documentation.yaml file and put the configuration for your project there. An example configuration can be found at the end of this file.

You also need to add the following route:

Optionally, you can add a prefix: to prefix all paths generated. This should be the same prefix as used by API-Platform in their routes.

Development And Verification

Run the project checks in your project container with:

Sections

Within the sections configuration, you can define a list of available sections. The identifier used in the list can also be used to define sections on individual API-Platform resources or endpoints.

Each section has a prefix (URI path prefix) and a title.

Using the original /docs route will show the section defined as default in default_section. You can view documentation for other sections using /{section_prefix}/docs.

Default usage

By default, all endpoints with a custom defined path that start with the prefix of a section, will be added to that section. For example, a section with prefix: 'customer_portal' will automatically contain all endpoints with custom paths starting with /customer_portal/.

Resource based

Within the API-Platform configuration, you can add a sections array to the resource attributes. All endpoints within this resource will then be added to the sections with those identifiers.

YAML Example:

Endpoint based

Within the API-Platform configuration, you can add a sections array to an endpoint definition. That endpoint will then be added to the sections with those identifiers.

YAML Example:

Removal

Out-of-the-box, API-Platform does not allow you to remove query parameters or responses without having to manually define all the remaining ones. As you can only add or overwrite items, but not remove them entirely. This bundle supplies some help to remove responses and parameters from generated documentation.

Parameters

To remove a parameter, the endpoint path and method are required. As well as the name of the parameter. These can be added to the linku_api_documentation.removal.parameters list.

Request bodies

To remove a request body, the endpoint path and method are required. These can be added to the linku_api_documentation.removal.request_bodies list.

Responses

To remove a response, the endpoint path and method are required. As well as the statusCode of the response. These can be added to the linku_api_documentation.removal.responses list.

Configuration Example


All versions of api-documentation-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
api-platform/metadata Version ^4.3
api-platform/openapi Version ^4.3
symfony/config Version ^7.4|^8.0
symfony/dependency-injection Version ^7.4|^8.0
symfony/http-foundation Version ^7.4|^8.0
symfony/http-kernel Version ^7.4|^8.0
symfony/routing Version ^7.4|^8.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 linku/api-documentation-bundle contains the following files

Loading the files please wait ...