Skip to content

Commit

Permalink
Merge pull request #1605 from ConductionNL/feature/assert-null
Browse files Browse the repository at this point in the history
Assert null for version & reference
  • Loading branch information
WilcoLouwerse authored Jan 11, 2024
2 parents 5e52d7e + 9b52c30 commit 8754efb
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/src/Entity/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,17 @@ class Action
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $reference;
private ?string $reference;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,17 @@ class Application
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true, options={"default": null})
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/CollectionEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,17 @@ class CollectionEntity
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true, options={"default": null})
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/Cronjob.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,17 @@ class Cronjob
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true, options={"default": null})
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,17 @@ class Endpoint
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,17 @@ class Entity
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true, options={"default": null})
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,17 @@ class Gateway
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true, options={"default": null})
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/Mapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,17 @@ class Mapping
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true, options={"default": null})
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,17 @@ class Organization
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true, options={"default": null})
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/SecurityGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,17 @@ class SecurityGroup
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true, options={"default": null})
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,17 @@ class Template
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down
4 changes: 4 additions & 0 deletions api/src/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,17 @@ class User implements PasswordAuthenticatedUserInterface
/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, nullable=true, options={"default": null})
*/
private ?string $reference = null;

/**
* @Groups({"read", "write"})
*
* @Assert\NotNull
*
* @ORM\Column(type="string", length=255, options={"default": "0.0.0"})
*/
private string $version = '0.0.0';
Expand Down

0 comments on commit 8754efb

Please sign in to comment.