2017 © Pedro Peláez
 

library swagger

A php library to manipulate Swagger specifications

image

exsyst/swagger

A php library to manipulate Swagger specifications

  • Friday, July 27, 2018
  • by EXSyst
  • Repository
  • 1 Watchers
  • 70 Stars
  • 458,596 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 16 Forks
  • 2 Open issues
  • 13 Versions
  • 68 % Grown

The README.md

Swagger

Build Status Scrutinizer Code Quality Code Coverage, (*1)

A php library to manipulate Swagger/Open API specifications., (*2)

Installation

composer require EXSyst/Swagger

Usage

Read an api.json file:, (*3)

$swagger = Swagger::fromFile('api.json');

// or

$swagger = new Swagger($array);

Collections

There are two major collections: Paths and Definitions. The API is similar for both:, (*4)

$paths = $swagger->getPaths();
$p = new Path('/user');

foreach ($paths as $path) {
    // adding
    $paths->add($a);

    // retrieving
    if ($paths->has('/user') || $paths->contains($p)) {
        $path = $paths->get('/user');
    }

    // removing
    $paths->remove('/user');
}

Models

There are a lot of models, e.g. the mentioned Path above. The API is well written, so it works with the auto-completion of your IDE. It is straight forward and uses the same naming scheme as the OpenAPI specification., (*5)

Contributing

Feel free to fork and submit a pull request (don't forget the tests) and I am happy to merge., (*6)

The Versions

27/07 2018

dev-master

9999999-dev

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

27/07 2018

v0.4.1

0.4.1.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

05/06 2018

dev-dev

dev-dev

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick
by Guilhem N.

03/02 2018

v0.4.0

0.4.0.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

19/12 2017

v0.3.2

0.3.2.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

11/10 2017

v0.3.1

0.3.1.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

25/07 2017

v0.3.0

0.3.0.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

25/06 2017

v0.2.4

0.2.4.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

30/12 2016

v0.2.3

0.2.3.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

18/11 2016

v0.2.2

0.2.2.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

01/08 2016

v0.2.1

0.2.1.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

01/08 2016

v0.2.0

0.2.0.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick

29/07 2016

v0.1.0

0.1.0.0

A php library to manipulate Swagger specifications

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Ener-Getick