api-platform/schema-generator
CLI tool from API Platform that generates PHP class models from vocabularies like Schema.org and ActivityStreams, or from OpenAPI specs. Quickly scaffold types and properties into a ready-to-use PHP codebase for APIs and domain models.
Adopt When:
Look Elsewhere If:
updateFiles: false config)."This tool cuts API development time by 70% for standardized data models by auto-generating PHP classes from industry vocabularies like Schema.org (SEO) and OpenAPI (API contracts). For example, a product catalog API that previously took 2 weeks to model can now be scaffolded in hours—reducing costs and accelerating time-to-market. It’s a force multiplier for teams building semantic web apps, headless CMS backends, or multi-format APIs (REST/GraphQL/JSON:LD). The MIT license and API Platform backing ensure long-term viability."
*"Schema Generator lets you trade manual DRY violations for zero-boilerplate PHP classes from Schema.org/OpenAPI. Key wins:
php bin/console schema:generate) generates typed entities, Doctrine mappings, and API Platform attributes (e.g., @ApiResource, @Security).@ORM\Column overrides).Product entity from Schema.org in 5 minutes instead of 2 hours—with built-in SEO metadata and API endpoints.Trade-offs:
composer require api/schema-generator && php bin/console schema:generate --vocabulary=schema.org/Product."*How can I help you explore Laravel packages today?