This Bundle provides a REST API to Puli resources as provided by the CmfResource component.
- Symfony 2.8+
- See also the
require
section of composer.json
Not yet.
- All Symfony CMF documentation - complete Symfony CMF reference
- Symfony CMF Website - introduction, live demo, support and community links
$ curl http://localhost:8000/api/phpcrodm_repo/foo | python -m json.tool
{
"_links": {
"self": {
"href": "/api/phpcrodm_repo/foo"
}
},
"children": {
"bar": {
"_links": {
"self": {
"href": "/api/phpcrodm_repo/foo/bar"
}
},
"children": [],
"document": {
"_links": {
"self": {
"href": "/path/to/this"
}
},
"body": "This is my second article",
"id": "/tests/cmf/articles/foo/bar",
"title": "Article 2"
},
"path": "/foo/bar",
"repo_path": "/foo/bar"
},
"boo": {
"_links": {
"self": {
"href": "/api/phpcrodm_repo/foo/boo"
}
},
"children": [],
"document": {
"_links": {
"self": {
"href": "/path/to/this"
}
},
"body": "This is my third article",
"id": "/tests/cmf/articles/foo/boo",
"title": "Article 2"
},
"path": "/foo/boo",
"repo_path": "/foo/boo"
}
},
"document": {
"_links": {
"self": {
"href": "/path/to/this"
}
},
"body": "This is my article",
"id": "/tests/cmf/articles/foo",
"title": "Article 1"
},
"path": "/foo",
"repo_path": "/foo"
}
Pull requests are welcome. Please see our CONTRIBUTING guide.
Unit and/or functional tests exist for this bundle. See the Testing documentation for a guide to running the tests.
Thanks to everyone who has contributed already.
- Setup database:
./vendor/symfony-cmf/testing/bin/travis/phpcr_odm_doctrine_dbal.sh
- Run server:
./vendor/symfony-cmf/testing/bin/server
- Run tests:
./vendor/bin/behat