- local
- Support for Extbase models.
- Configuration with classes, properties and methods annotations.
- Build-in filters: boolean, numeric, order, range and text (partial, match against and exact strategies).
- Build-in pagination.
- Support for TypoLinks and image processing.
- Configurable routing.
- Responses in Hydra/JSON-LD format.
- Serialization contexts - customizable output depending on routing.
- Easy customizable serialization handlers and subscribers.
- Support for all features of JMSSerializer.
Installation by composer is recommended. In your Composer based TYPO3 project root, just do composer require sourcebroker/t3api
.
- Open main Template record and add "T3api" in tab "Includes" -> field "Include static (from extensions)"
- Add route enhancer to your site
config.yaml
file.
routeEnhancers:
T3api:
type: T3apiResourceEnhancer
- Configure routes for your Extbase model using PHP annotations:
/**
* @SourceBroker\T3api\Annotation\ApiResource(
* collectionOperations={
* "get"={
* "path"="/articles",
* },
* },
* itemOperations={
* "get"={
* "path"="/articles/{id}",
* }
* },
* )
*/
class Article extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
}
- Done! Try your API endpoints at https://example.com/_api/articles and https://example.com/_api/articles/1
To check more configuration options see t3apinews - an example integration of t3api for well known news extension.
T3api | TYPO3 | PHP | Support/Development |
---|---|---|---|
0.1.x | 9.x | 7.2 - 7.3 | Features, Bugfixes, Security Updates |
T3api uses semantic versioning which basically means for you, that:
- bugfix updates (e.g. 1.0.0 => 1.0.1) just includes small bugfixes or security relevant stuff without breaking changes.
- minor updates (e.g. 1.0.0 => 1.1.0) includes new features and smaller tasks without breaking changes.
- major updates (e.g. 1.0.0 => 2.0.0) breaking changes wich can be refactorings, features or bugfixes.