spryker/api-platform

ApiPlatform module

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

pkg:composer/spryker/api-platform

0.1.0 2025-12-04 11:50 UTC

This package is auto-updated.

Last update: 2025-12-04 15:01:53 UTC


README

Latest Stable Version Minimum PHP Version

Spryker API Platform Module

Use this module to integrate the API Platform into a Spryker project. A schema-based code generator for API Platform resources in Spryker applications. Define your API resources using YAML schemas and automatically generate PHP classes with full API Platform attribute support.

Overview

This module provides a developer-friendly way to define API Platform resources through declarative schema files, similar to Spryker's Transfer object pattern. Resources can be defined across core, feature, and project layers with automatic merging and validation.

Features

  • 📝 Schema-based Definition: Define resources using YAML
  • 🔄 Multi-layer Support: Core, Feature, and Project layer schemas
  • 🎯 ApiType Isolation: Separate configurations for Storefront, Backend, etc.
  • Comprehensive Validation: Post-merge validation with helpful errors
  • 🚀 Efficient Generation: Generator-based file discovery for memory efficiency
  • 💾 Smart Caching: Automatic cache invalidation based on file changes

Installation

composer require spryker/api-platform

Configuration

Default configuration (can be overridden in the bundle config: '%kernel.project_dir%/config/Symfony/{APPLICATION}/packages/spryker_api_platform.php'):

spryker_api_platform:
  source_directories:
    - src/Spryker
    - src/Pyz
  cache_dir: '%kernel.cache_dir%/api-generator'
  generated_dir: '%kernel.project_dir%/src/Generated/Api'
  debug: '%kernel.debug%'

Usage

# Generate all ApiTypes
docker/sdk glue api:generate

# Generate specific ApiType
docker/sdk glue api:generate Storefront

# Debug a resource
docker/sdk glue api:debug Customer --api-type=Storefront