spryker/api-platform 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

spryker/api-platform

最新稳定版本:0.1.0

Composer 安装命令:

composer require spryker/api-platform

包简介

ApiPlatform module

README 文档

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

统计信息

  • 总下载量: 643
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2025-12-04