mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-01 14:04:30 +02:00
Automatically detect the discriminator type of attachments and parameters based on the chosen element IRI
Related to issue #502
This commit is contained in:
parent
e843286ea7
commit
f3bea68011
26 changed files with 152 additions and 40 deletions
|
@ -22,7 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\Parts\Category;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\PriceInformations\Currency;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\Parts\Footprint;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\UserSystem\Group;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -42,7 +42,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\LabelSystem\LabelProfile;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\Parts\Manufacturer;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -22,9 +22,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\Parts\Manufacturer;
|
||||
use App\Entity\Parts\MeasurementUnit;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -23,14 +23,11 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use App\Serializer\TypeOverride\TypeOverridableSerializer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\PropertyInfo\Type;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer;
|
||||
|
||||
/**
|
||||
* A attachment attached to a part element.
|
||||
|
|
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\ProjectSystem\Project;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\Parts\StorageLocation;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\Parts\Supplier;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\UserSystem\User;
|
||||
use App\Serializer\OverrideClassDenormalizer;
|
||||
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue