Skip to content

OpenAPI documentation via SwaggerBake #20

Description

@jamisonbryant

Summary

Include SwaggerBake as a dev dependency with base configuration for automatic OpenAPI documentation generation.

Changes

  • Add config/swagger_bake.php -- plugin config pointing to the API route prefix
  • Add config/swagger.yml -- base OpenAPI 3.0 spec skeleton with info section, server URLs, and a reusable Exception schema
  • Load plugin in development mode in Application.php
  • Swagger UI available at a dev-only route (e.g., /api/swagger)

New dependency (dev)

  • cnizzardini/cakephp-swagger-bake

Motivation

SwaggerBake auto-generates OpenAPI paths from CakePHP routes, entity schemas from table columns, and supports PHP 8 attributes for customization. Interactive API docs out of the box with minimal configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions