Create Three Symfony Back Ends - Part #33 - Create Entities with API Platform's Schema Generator

preview_player
Показать описание
In the previous video we covered one way of generating an entity for use in your API Platform project. I'd say that approach would be fairly natural to you if you have any experience of Symfony 2, 3, or 4.

Another way might be to use the Symfony Maker bundle.

Manually defining an entity using either of these methods is possibly good enough. But the API Platform has a dedicated Schema Generator of its own to help us document our code in a way that works best with the API Platform setup.

I'd strongly recommend you check out the link above as there's only three short sections to read, and here we are only focusing on the 'how to', rather than the 'why'.

Technically the most specific match for what our data represents is a MusicAlbum. I haven't added enough properties to our basic Album representation to fully meet the Schema. Feel free to add more data, but it's not necessary to complete this tutorial.
Рекомендации по теме