mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
endpoints created for profession and civility for use in vue component
This commit is contained in:
parent
c2dec360b1
commit
bf9469d538
@ -559,6 +559,20 @@ class ChillMainExtension extends Extension implements
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'class' => \Chill\MainBundle\Entity\Civility::class,
|
||||||
|
'name' => 'civility',
|
||||||
|
'base_path' => '/api/1.0/main/civility',
|
||||||
|
'base_role' => 'ROLE_USER',
|
||||||
|
'actions' => [
|
||||||
|
'_index' => [
|
||||||
|
'methods' => [
|
||||||
|
Request::METHOD_GET => true,
|
||||||
|
Request::METHOD_HEAD => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ class Civility
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="boolean")
|
* @ORM\Column(type="boolean")
|
||||||
|
* @Serializer\Groups({"read"})
|
||||||
*/
|
*/
|
||||||
private bool $active = true;
|
private bool $active = true;
|
||||||
|
|
||||||
|
@ -781,6 +781,16 @@ paths:
|
|||||||
description: "accepted"
|
description: "accepted"
|
||||||
403:
|
403:
|
||||||
description: "unauthorized"
|
description: "unauthorized"
|
||||||
|
/1.0/main/civility.json:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- civility
|
||||||
|
summary: Return all civility types
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: "ok"
|
||||||
|
401:
|
||||||
|
description: "Unauthorized"
|
||||||
/1.0/main/user-job.json:
|
/1.0/main/user-job.json:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
@ -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")
|
* @ORM\Column(type="boolean")
|
||||||
|
* @Serializer\Groups({"read"})
|
||||||
*/
|
*/
|
||||||
private bool $active = true;
|
private bool $active = true;
|
||||||
|
|
||||||
@ -30,13 +31,13 @@ class ThirdPartyProfession
|
|||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\GeneratedValue
|
* @ORM\GeneratedValue
|
||||||
* @ORM\Column(type="integer")
|
* @ORM\Column(type="integer")
|
||||||
* @Serializer\Groups({"docgen:read"})
|
* @Serializer\Groups({"docgen:read", "read"})
|
||||||
*/
|
*/
|
||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="json")
|
* @ORM\Column(type="json")
|
||||||
* @Serializer\Groups({"docgen:read"})
|
* @Serializer\Groups({"docgen:read", "read"})
|
||||||
*/
|
*/
|
||||||
private array $name = [];
|
private array $name = [];
|
||||||
|
|
||||||
|
@ -110,3 +110,14 @@ paths:
|
|||||||
description: "OK"
|
description: "OK"
|
||||||
422:
|
422:
|
||||||
description: "Object with validation errors"
|
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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user