Revision history for PAGI::FastAPI
0.0.5 2026-08-06
[ENHANCEMENT]
- The POST/PUT/PATCH request bodies can now be in the application/x-www-form-urlencoded
format instead of being restricted to JSON. The body parser examines
the Content-Type header; therefore, the charset suffix (such as ";charset=utf-8")
will be ignored.
Furthermore, the body parser will process url-encoded data in the
same manner as query string in which the body is decoded using
percent-/plus-decode algorithm. However, the same Type::Tiny
validation can be applied in either format and the handler will
receive a HashRef object as a result of a processed request
regardless of the sent format.
- It is backward compatible, i.e., if the Content-Type header is not
set or not recognised, the body will be processed in the same way
as before. In particular, the default behavior of parsing requests
is JSON parsing.
- Also the new feature was tested in t/10-form_urlencoded_body.t.
- The plugin is documented in the `body` configuration option as well
as in the ERROR HANDLING section. The decision to implement this
feature was influenced by the example provided on a
PAGI::FastAPI::Security page.
0.0.4 2026-08-05
[DOCUMENTATION]
- Included an AUTHENTICATION AND SECURITY part in the POD to highlight
the dependencies and components of middleware and provided information
about the new companion distribution called PAGI::FastAPI::Security
for the ready-to-use schemes related to HTTP Bearer, HTTP Basic,
API Key, and OAuth2 password-bearer.
- Added a Pluggable Authentication item in Key Features List.
- Added PAGI::FastAPI::Security and DBIx::Class::Async to SEE ALSO section.
- Mentioned in the SYNOPSIS the introduction about the functionality
of hand-rolled Bearer-token checks in this context and referring to
PAGI::FastAPI::Security for production use.
- Added a similar entry in README.md as well.
[EXAMPLE]
- Updated the example to demo authentication using PAGI::FastAPI::Security:
eg/dbic_async_integration.pl
0.0.3 2026-08-04
[EXAMPLE]
- Added integration demo script:
eg/integration_demo.pl
0.0.2 2026-08-04
[BUGFIX]
- Routes no longer consider metacharacters in their static paths
(like ".", "+", "?") as wildcards. Only placeholders {param}
are transformed into capture groups. Previously, it would allow
the route '/items.json/{id}' to match paths like '/itemsXjson/{id}'.
- The values of path parameters and query string parameters are now
appropriately decoded: '%XX' and '+' decoding is now done as it
should be according to the application/x-www-form-urlencoded rules.
Until now strings like 'John%20Doe' were sent to handlers unchanged.
- The request body reader no longer goes into an infinite loop when
the PAGI server sends a non-'http.request' event (for example
'http.disconnect') while transmitting POST/PUT/PATCH requests.
- When registering routes, the process now fails with a clear message
instead of just ignoring misconfiguration. For instance, absence
of a 'handler' property, 'dependencies' property not being a HashRef
or an ArrayRef is rejected immediately during route registration.
[TESTING]
- A new test was added in t/08-input_handling_and_registration.t
covering the above-mentioned aspects.
- A new test was added in t/09-external_async_resource_integration.t
to cover DBIx::Class::Async integration.
[EXAMPLE]
- Added additional DBIx::Class::Async integrated application:
eg/dbic_async_integration.pl
0.0.1 2026-08-03
- Initial CPAN release.
- Asynchronous routing engine built on top of PAGI ($scope, $receive, $send).
- Type-safe parameter & POST JSON body validation via Type::Tiny.
- Async Middleware pipeline support with built-in CORS helper (add_cors).
- FastAPI-style Dependency Injection system via PAGI::FastAPI::Depends.
- Integrated OpenAPI 3.1 schema (/openapi.json) and interactive Swagger UI (/docs).