Giter Site home page Giter Site logo

jhonnyl / dunglasapibundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from api-platform/core

0.0 2.0 0.0 1.2 MB

The Hypermedia REST API component of API Platform: JSON-LD and Hydra support, works with Symfony too

Home Page: https://api-platform.com

PHP 66.59% Gherkin 33.41%

dunglasapibundle's Introduction

DunglasApiBundle

DunglasApiBundle is an easy to use and powerful system to create hypermedia-driven REST APIs. It is a component of the Dunglas's API Platform framework and it can be used as a standalone bundle for the Symfony framework.

It embraces JSON for Linked Data (JSON-LD) and Hydra Core Vocabulary web standards.

Build a working and fully-featured CRUD API in minutes. Leverage the awesome features of the tool to develop complex and high performance API-first projects.

JSON-LD enabled Build Status SensioLabsInsight Dependency Status HHVM Status

Features

Here is the fully-featured REST API you'll get in minutes, I promise:

  • CRUD support through the API for Doctrine entities: list, GET, POST, PUT and DELETE
  • Hypermedia implementing JSON-LD
  • Machine-readable documentation of the API in the Hydra format, guessed from PHPDoc, Serializer, Validator and Doctrine ORM metadata
  • Human-readable Swagger-like documentation including a sandbox automatically generated thanks to the integration with NelmioApiDoc
  • Pagination (compliant with Hydra)
  • List filters (compliant with Hydra)
  • Validation using the Symfony Validator Component, with groups support
  • Errors serialization (compliant with Hydra)
  • Custom serialization using the Symfony Serializer Component, with groups support and the possibility to embed relations
  • Automatic routes registration
  • Automatic entrypoint generation giving access to all resources
  • \DateTime serialization and deserialization
  • FOSUserBundle integration (user management)
  • Easy installation thanks to API Platform

Everything is fully customizable through a powerful event system and strong OOP. This bundle is documented and tested with Behat (take a look at the features/ directory).

Screenshot of DunglasApiBundle integrated with NelmioApiDocBundle

Official documentation

  1. Getting Started
  2. Installing DunglasApiBundle
  3. Configuring the API
  4. Mapping the entities
  5. Registering the services
  6. NelmioApiDocBundle integration
  7. Operations
  8. Disabling operations
  9. Creating custom operations
  10. Data providers
  11. Creating a custom data provider
  12. Returning a paged collection
  13. Supporting filters
  14. Extending the Doctrine Data Provider
  15. Filters
  16. Search filter
  17. Date filter 1. Managing null values
  18. Order filter 1. Using a custom order query parameter name
  19. Enabling a filter for all properties of a resource
  20. Creating custom filters 1. Creating custom Doctrine ORM filters 2. Overriding extraction of properties from the request
  21. Serialization groups and relations
  22. Using serialization groups
  23. Annotations
  24. Embedding relations 1. Normalization 2. Denormalization
  25. Name conversion
  26. Entity identifier case
  27. Validation
  28. Using validation groups
  29. The event system
  30. Retrieving list
  31. Retrieving item
  32. Creating item
  33. Updating item
  34. Deleting item
  35. JSON-LD context builder
  36. Registering an event listener
  37. Resources
  38. Using a custom Resource class
  39. Controllers
  40. Using a custom controller
  41. FOSUserBundle integration
  42. Enable the FOSUser integration
  43. Creating a User entity with serialization groups
  44. Using external (JSON-LD) vocabularies
  45. Content negotiation
  46. Enabling several formats
  47. Registering a custom format in the Negotiation library
  48. Registering a custom serializer
  49. Creating a responder
  50. Security
  51. Performance
  52. Enabling the metadata cache
  53. AngularJS integration

Known issues

Usage with JMS Serializer

There is a small incompatibility issue when using this bundle with JMSSerializerBundle. To fix it, you have to prevent the JMSSerializerBundle to override the Symfony serializer service definition:

jms_serializer:
    enable_short_alias: false

Beware that this implies no longer using the JMS Serializer via the @serializer service but instead the @jms_serializer one.

Other resources

Filters

  • LoopBackApiBundle: provides a set of Doctrine ORM filters for more advanced query operations

Slides

Credits

DunglasApiBundle is part of the API Platform project. It is developed by Kévin Dunglas, Les-Tilleuls.coop and awesome contributors.

dunglasapibundle's People

Contributors

dunglas avatar sroze avatar theofidry avatar ogizanagi avatar iamluc avatar mlkiiwy avatar teohhanhui avatar jdeniau avatar pborreli avatar dupuchba avatar bayne avatar csarrazi avatar guilhemn avatar guillaumedoury avatar jeansebastienh avatar johnnypeck avatar jderusse avatar amenophis avatar f-jost avatar pvgnd avatar hshn avatar tomasvotruba avatar eko avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.