How aldin-sxr/flight-php-swagger works
This repository is a FlightPHP API starter bundled with OpenAPI documentation and request logging. Its principal workflow starts at the web entry point, loads application routes and models, then lets Flight dispatch API requests; the sample POST route validates request data and returns JSON. Separate branches provide a root documentation page, OpenAPI setup, and HTTP logging. The sample configuration is a template; the referenced config/config.php is absent from this tree, so its runtime wiring cannot be confirmed here.
Main entry points: FlightSetup.php Flight setup · autoload.php Project loader · index.php API entry · SampleRoute.php Sample endpoints
Components 13
Application runtime
- API entry
index.php - Project loader
autoload.php - Flight framework
- Config template
config/config.sample.php
API and validation
- Sample endpoints
app/routes/SampleRoute.php - Sample schemas
app/models/SampleModel.php - Flight setup
app/routes/FlightSetup.php - Model validator
app/utils/Validator.php
OpenAPI documentation
- Swagger setup
docs/swagger.php - Docs site
docs
Request logging
- HTTP logger
- Request log
logs
Other components
- API client
Connections 15
- API client → API entry: sends request
README.md - API entry → Project loader: loads
index.php - API entry → Flight framework: starts
index.php - Project loader → Sample endpoints: loads routes
autoload.php - Project loader → Sample schemas: loads models
autoload.php - Project loader → Swagger setup: loads
autoload.php - Sample endpoints → Flight framework: registers routes
app/routes/SampleRoute.php - Flight setup → Flight framework: configures
app/routes/FlightSetup.php - Sample endpoints → Sample schemas: validates against
app/routes/SampleRoute.php - Flight setup → Model validator: delegates validation
app/routes/FlightSetup.php - Model validator → Sample schemas: scans annotations
app/utils/Validator.php - Flight setup → HTTP logger: configures logging
app/routes/FlightSetup.php - Flight setup → Request log: sets log destination
app/routes/FlightSetup.php - Flight setup → Docs site: renders root page
app/routes/FlightSetup.php - Config template → Swagger setup: documents configuration
README.md