{"id":13623966,"url":"https://github.com/leedavis81/drest","last_synced_at":"2026-04-09T14:01:24.407Z","repository":{"id":6843709,"uuid":"8092270","full_name":"leedavis81/drest","owner":"leedavis81","description":"Quickly and easily expose Doctrine entities as REST resource endpoints with the use of simple configuration with annotations, yaml, json or a PHP array.","archived":false,"fork":false,"pushed_at":"2017-05-11T10:05:01.000Z","size":1876,"stargazers_count":87,"open_issues_count":3,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-01T21:58:18.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://leedavis81.github.io/drest","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leedavis81.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-08T11:19:39.000Z","updated_at":"2024-06-14T16:41:09.000Z","dependencies_parsed_at":"2022-07-25T22:48:09.203Z","dependency_job_id":null,"html_url":"https://github.com/leedavis81/drest","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedavis81%2Fdrest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedavis81%2Fdrest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedavis81%2Fdrest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedavis81%2Fdrest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leedavis81","download_url":"https://codeload.github.com/leedavis81/drest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223684899,"owners_count":17185737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:01:37.406Z","updated_at":"2025-12-13T07:02:20.872Z","avatar_url":"https://github.com/leedavis81.png","language":"PHP","funding_links":[],"categories":[" REST API","Servers","目录","Table of Contents","PHP","REST和API","REST and API"],"sub_categories":["PHP","API","Library"],"readme":"Drest\n=====\n\n### Dress up doctrine entities and expose them as REST resources\n\n\n[![Build Status](https://travis-ci.org/leedavis81/drest.svg)](https://travis-ci.org/leedavis81/drest/settings)\n[![Code Coverage](https://scrutinizer-ci.com/g/leedavis81/drest/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/leedavis81/drest/?branch=master)\n[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/leedavis81/drest/badges/quality-score.png?s=54655af2afbd263417c9e80a4d6ee9664083b5c5)](https://scrutinizer-ci.com/g/leedavis81/drest/)\n[![Latest Stable Version](https://poser.pugx.org/leedavis81/drest/v/stable.png)](https://packagist.org/packages/leedavis81/drest)\n[![Total Downloads](https://poser.pugx.org/leedavis81/drest/downloads.png)](https://packagist.org/packages/leedavis81/drest)\n[![Dependency Status](https://www.versioneye.com/user/projects/5194ec66296d610002000343/badge.png)](https://www.versioneye.com/user/projects/5194ec66296d610002000343)\n[![HHVM Status](http://hhvm.h4cc.de/badge/leedavis81/drest.svg)](http://hhvm.h4cc.de/package/leedavis81/drest)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n\nThis library allows you to quickly annotate your doctrine entities into restful resources. It comes shipped with it's own internal router, and can be used standalone or alongside your existing framework stack. Routes are mapped to either a default or customised service action that takes care of handling requests.\n\nSetting up endpoints is as easy as adding in a simple annotation to an entity\n\n```php\n/* @Drest\\Resource(\n *    routes={\n *        @Drest\\Route(\n *            name=\"get_user\",\n *            route_pattern=\"/user/:id\",\n *            verbs={\"GET\"}\n * )})\n * @ORM\\Table(name=\"user\")\n * @ORM\\Entity\n */\nclass User\n{\n   .......\n}\n\n// hitting [GET] http://myapplication.com/user/123 may return:\n\n{\n  \"user\": {\n    \"name\": \"lee\",\n    \"email\": \"lee@somedomain.com\"\n    ... + other attributes set up to be exposed ...\n  }\n}\n```\n\n## Documentation\n\nCheck out how to use drest by [reading the documentation](http://leedavis81.github.io/drest/)\n\n## Features\n\n- Quickly annotate existing Doctrine entities to become a fully functional REST resource.\n\n- Utilises the internal router for matching resource route patterns.\n\n- Specify what data you want to expose from your entities (including relations), or let the client choose!\n\n- Generate data objects using exposable data for your API users to consume.\n\n- Comes shipped with both JSON and XML representations, or you can create your own.\n\n- Allows media type detection from your client requests, getting you one step close to RMM level 3.\n\n- Use it independently from your existing framework stack, or alongside it.\n\n- Allows extension points so you can configure requests to your specific needs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleedavis81%2Fdrest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleedavis81%2Fdrest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleedavis81%2Fdrest/lists"}