Skip to content

spryker-sdk/sync-api

Repository files navigation

SyncApi

Build Status Minimum PHP Version PHPStan

This library provides console commands to work with synchronous APIs.

Installation

  • composer require --dev spryker-sdk/sync-api

Usage

Run tests/checks

  • composer test - This will execute the tests.
  • composer cs-check - This will run CodeStyle checks.
  • composer cs-fix - This will fix fixable CodeStyles.
  • composer stan - This will run PHPStan checks.

Documentation

The following console commands are available:

  • vendor/bin/syncapi schema:openapi:create
  • vendor/bin/syncapi schema:openapi:validate
  • vendor/bin/syncapi code:openapi:generate

Adding an OpenAPI file

The vendor/bin/syncapi schema:openapi:create adds a minimal OpenAPI file.

Validating an OpenAPI file

The vendor/bin/syncapi schema:openapi:validate validates an OpenAPI file.

Create code from an existing OpenAPI

The vendor/bin/syncapi code:openapi:generate reads an existing OpenAPI file and creates code out of it.