Download the PHP package atoum/apiblueprint-extension without Composer

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

atoum/apiblueprint-extension Build Status

The candidates:

  1. atoum is a PHP test framework,
  2. API Blueprint is a high-level HTTP API description language.

The problem: API Blueprint is only a text file. Easy to read for human, but a machine can't do anything with it.

The solution: Compile API Blueprint files into executable tests. It works as any test written with the atoum API, and it works within the atoum ecosystem. Here is an overview of the workflow:

In more details, here is what happens:

  1. A finder iterates over .apib files,
  2. For each file, it is parsed into an intermediate representation,
  3. The intermediate representation is compiled to target “atoum tests”,
  4. The fresh tests are pushed in the test queue of atoum,
  5. atoum executes everything as usual.

The bonus: A very simple script is provided to render many API Blueprint files as a standalone HTML single-page file.

Installation and configuration

With Composer, to include this extension into your dependencies, you need to require atoum/apiblueprint-extension:

To enable the extension, the .atoum.php configuration file must be edited to add:

Configure the finder

Assuming the .apib files are located in the ./apiblueprints directory, the following code adds this directory to the API Blueprint finder, compiles everything to tests, and enqueue them:

Configure the location of JSON schemas when defined outside .apib files

API Blueprint uses JSON Schema to validate HTTP requests and responses when the message aims at being a valid JSON message.

We recommend to define JSON schemas outside the .apib files for several reasons:

To do so, one must go through these 2 steps:

  1. Mount a JSON schema directory with the help of the extension's configuration,
  2. Use {"$ref": "json-schema://<mount>/schema.json"} in the Schema section.

Example:

  1. In the .atoum.php file where the extension is configured:

  2. In the API Blueprint file:

    where test is the “mount point name”, and /api-foo/my-schema.json is a valid JSON schema file located at /path/to/schemas/api-foo/my-schema.json.

Testing

Before running the test suites, the development dependencies must be installed:

Then, to run all the test suites:

Compliance with the API Blueprint specification

This atoum extension implements the API Blueprint specification.

Language features Implemented?
Metadata section yes
API name & overview section yes
Resource group section yes
Resource section yes
Resource model section no (ignored)
Schema section yes
Action section yes
Request section yes
Response section yes
URI parameters section no (ignored)
Attributes section no (ignored)
Headers section yes
Body section yes
Data Structures section no (ignored)
Relation section no (ignored)

Any help is welcomed!

License

Please, see the LICENSE file. This project uses the same license than atoum.


All versions of apiblueprint-extension with dependencies

PHP Build Version
Package Version
Requires php Version >7.0
ext-curl Version *
ext-mbstring Version *
atoum/atoum Version ~3.2
hoa/ustring Version ~4.0
justinrainbow/json-schema Version ~5.2
league/commonmark Version ~0.16
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 atoum/apiblueprint-extension contains the following files

Loading the files please wait ....