mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
endpoints created for profession and civility for use in vue component
This commit is contained in:
@@ -126,6 +126,21 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'class' => \Chill\ThirdPartyBundle\Entity\ThirdPartyProfession::class,
|
||||
// 'controller' => \Chill\MainBundle\Controller\ProfessionApiController::class,
|
||||
'name' => 'profession',
|
||||
'base_path' => '/api/1.0/thirdparty/professions',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'actions' => [
|
||||
'_index' => [
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@ class ThirdPartyProfession
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private bool $active = true;
|
||||
|
||||
@@ -30,13 +31,13 @@ class ThirdPartyProfession
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
* @Serializer\Groups({"docgen:read", "read"})
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
* @Serializer\Groups({"docgen:read", "read"})
|
||||
*/
|
||||
private array $name = [];
|
||||
|
||||
|
@@ -110,3 +110,14 @@ paths:
|
||||
description: "OK"
|
||||
422:
|
||||
description: "Object with validation errors"
|
||||
|
||||
/1.0/thirdparty/professions.json:
|
||||
get:
|
||||
tags:
|
||||
- thirdparty
|
||||
summary: Return all thirdparty professions
|
||||
responses:
|
||||
200:
|
||||
description: "ok"
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
|
Reference in New Issue
Block a user