Download the PHP package mlambley/swagception without Composer

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

Swagception

Validate your API against Swagger 2.0 using Codeception

How to Install

What is Swagger?

Swagger 2.0 (aka Open API 2.0) defines the structure of your API, including end points and the structure of input and output data. See their website for more information.

What is Swagception?

If you have an existing Swagger 2.0 specification, you can use it to validate your API using this tool. This tool is designed to work with Codeception. Specifically, it automates the generation of acceptance tests for your API. It will not validate your specification itself. It will only validate that your API matches your existing specification.

Why Swagception?

I could not find any API validator which uses Swagger and is designed specifically for Codeception. Also, this library aims to fully take into account the features of the Swagger 2.0 specification.

Acceptance test generation

The paths in your Swagger specification will look something like /api/entity/{entityID}/other/{otherID} How then do we generate an actual url using real entity ids which will produce a real response? By default, this library will do this using the enum and x-example fields. However, it is more useful to be able to specify your own ids. You can create a handler for each entity. Use annotations to link them to one or more paths. Then, all you need to do is tell the system where to find them.

Swagception extension

Now that you have some real data at your disposal, it's time to configure your codeception environment for Swagception. You only need to set up one extension. More information about codeception extensions is available here. Put the following in your codeception.yml or suite.yml file:

Cest structure

With the full functionality of Swagception enabled, it's time to link everything together in your Codeception cest. The recommended way is to feed the paths (end points) into a cest data provider. Your terminal will then output a line for each path.

Alternatively, you can loop through them in a single function.

Or, if you already have the json and the schema objects, you can call the validation method directly.

More settings

See more configuration options.

Issues?

Log a github issue. Your assistance is appreciated.


All versions of swagception with dependencies

PHP Build Version
Package Version
Requires codeception/codeception Version ^2.4 || ^3.0 || ^4.0
zeptech/annotations Version ^1.1
justinrainbow/json-schema Version ^5.2
guzzlehttp/guzzle Version ^6.3 || ^7.0
pimple/pimple Version ^3.2
codeception/module-asserts Version ^1.2
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 mlambley/swagception contains the following files

Loading the files please wait ....