Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
src
test
.gitignore
README.md
composer.json
composer.lock
phpunit.xml

README.md

Laravel API Spec Generator

Rest API Spec generator with Laravel test

This Package overrides getJson(), putJson(), postJson(), deleteJson().

When you use those function, RestAPI specs are going to be generated.

Usage

Just use as base class for API-based test classes.

+use ApiSpec\ApiSpecTestCase;

class SomeTestCase extends ApiSpecTestCase
{

or

+use ApiSpec\ApiSpecOutput;

class SomeTestCase extends TestCase
{
+    use ApiSpecOutput;

    //...

    public function testSomething()
    {
+       $this->$isExportSpec = true;
        $this->getJson('/someone/status');
    }
}

Output

The output format is recognized on several IDE.

ex) PHPStorm, IntelliJ IDEA...(2017.3 EAP https://blog.jetbrains.com/phpstorm/2017/09/editor-based-rest-client/

You can’t perform that action at this time.