Skip to content

Commit

Permalink
Merge branch 'master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvdlinde authored Dec 10, 2019
2 parents 65e5ce1 + f81695d commit ba69f3c
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 51 deletions.
6 changes: 0 additions & 6 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@ $ helm del vtc-stag --purge --kubeconfig="api/helm/kubeconfig.yaml --namespace=s
$ helm del vtc-prod --purge --kubeconfig="api/helm/kubeconfig.yaml --namespace=prod"
```

or for the dev enviroments
$ helm install ./api/helm --name vtc-dev --kubeconfig="api/helm/kubeconfig.yaml"
$ helm upgrade vtc-dev ./api/helm --kubeconfig="api/helm/kubeconfig.yaml"
$ helm del vtc-dev --purge --kubeconfig="api/helm/kubeconfig.yaml"

Note that you can replace commonground with the namespace that you want to use (normally the name of your component).


## Making your app known on NLX
Expand Down
4 changes: 2 additions & 2 deletions api/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ php:
secret: ""

nginx:
repository: docker.io/conduction/vtc-nginx
repository: docker.io/conduction/protocomponent-nginx
tag: latest
pullPolicy: Always
replicaCount: 1
Expand Down
16 changes: 10 additions & 6 deletions api/public/schema/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
openapi: 3.0.2
info:
title: 'Proto Component'
title: 'Verzoek Type Catalogus'
version: V.0.1
description: |
API Details
- Component: Proto Component
- Reference: pc
- Component: Verzoek Type Catalogus
- Reference: vtc
- Enviroment: dev
- Version: V.0.1
- Repository: [online](https://github.com/ConductionNL/Proto-component-commonground) / [zip](https://github.com/ConductionNL/Proto-component-commonground/archive/master.zip)
- Docker Image: [online](https://hub.docker.com/repository/docker/conduction/pc-php)
- Repository: []() / [zip](/archive/master.zip)
- Datamodel: [postman](/schema/openapi.postman_collection) / [oas](/schema/openapi.yaml) / [pdf](/schema/datamodel.pdf) / [mwb](/schema/datamodel.mwb)
'Naast deze JSON rest API is er ook een [graphql](/graphql) interface beschikbaar.'
Naast deze JSON rest API is er ook een [graphql](/graphql) interface beschikbaar.
Voor het gebruik van deze applicatie is een JWT Token nodig, deze hangt altijd vast aan een applicatie, ofwel user. Geldige JWT Tokens worden aangemaakt bij het registreren van een applicatie en kennen een beperkte houdbaarheid.
JWT Tokens kunnen zowel worden verlengd, als opnieuw worden aangevraagd, dit aan de hand van de applicatie id en sleutel.
Let er bij het meegeven van JWT tokens op dat deze moet worden voorafgegaan door een Bearer en een spatie, onder de header Authorization. De volledig naam wordt daarmee: 'Authorization: Bearer [TOKEN]'.
paths:
/properties:
Expand Down
67 changes: 41 additions & 26 deletions api/src/Entity/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
class Property
{
/**
* @var UuidInterface The UUID identifier of this object
* @var UuidInterface $id The UUID identifier of this object
* @example e2984465-190a-4562-829e-a8cca81aa35d
*
* @Groups({"read"})
Expand All @@ -46,9 +46,10 @@ class Property
private $id;

/**
* @var RequestType The requestType that this property belongs to
* @var Object $requestType The requestType that this property belongs to
*
* @Assert\NotBlank
* @Assert\Valid
* @MaxDepth(1)
* @Groups({"read", "write"})
* @ORM\ManyToOne(targetEntity="App\Entity\RequestType", inversedBy="properties",cascade={"persist"})
Expand All @@ -59,24 +60,23 @@ class Property
/**
* @var string The title of this property
* @example My Property
*
* @Assert\NotBlank
* @Assert\Length(min = 15, max = 255)
* @Groups({"read", "write"})
* @ORM\Column(type="string", length=255)
*/
private $title;

/**
* @var string The name of the property as used in api calls, extracted from title on snake_case basis
/**
* @var string $name The name of the property as used in api calls, extracted from title on snake_case basis
* @example my_property
*
* @Assert\Length(min = 15, max = 255)
* @Groups({"read"})
*/
private $name;

/**
* @var string The type of this property
* @var string $type The type of this property
* @example string
*
* @Assert\NotBlank
Expand All @@ -88,9 +88,9 @@ class Property
private $type;

/**
* @var string The swagger type of the property as used in api calls
* @var string $type The swagger type of the property as used in api calls
* @example string
*
*
* @Assert\NotBlank
* @Assert\Length(max = 255)
* @Assert\Choice({"int32","int64","float","double","byte","binary","date","date-time","duration","password","boolean","string","uuid","uri","email","rsin","bag","bsn","iban","challenge","service","assent"})
Expand All @@ -100,8 +100,9 @@ class Property
private $format;

/**
* @var int *Can only be used in combination with type integer* Specifies a number where the value should be a multiple of, e.g. a multiple of 2 would validate 2,4 and 6 but would prevent 5
* @var string $multipleOf *Can only be used in combination with type integer* Specifies a number where the value should be a multiple of, e.g. a multiple of 2 would validate 2,4 and 6 but would prevent 5
* @example 2
*
*
* @Assert\Type("integer")
* @Groups({"read", "write"})
Expand All @@ -110,8 +111,9 @@ class Property
private $multipleOf;

/**
* @var int *Can only be used in combination with type integer* The maximum allowed value
* @example 2
* @var string $multipleOf *Can only be used in combination with type integer* The maximum allowed value
* @example 2
*
*
* @Assert\Type("integer")
* @Groups({"read", "write"})
Expand Down Expand Up @@ -140,9 +142,9 @@ class Property
private $minimum;

/**
*
* @var bool *Can only be used in combination with type integer* Defines if the minimum is exclusive, e.g. a exclusive minimum of 5 would invalidate 5 but validate 6
* @var string $exclusiveMinimum *Can only be used in combination with type integer* Defines if the minimum is exclusive, e.g. a exclusive minimum of 5 would invalidate 5 but validate 6
* @example true
*
*
* @Assert\Type("bool")
* @Groups({"read", "write"})
Expand All @@ -151,8 +153,9 @@ class Property
private $exclusiveMinimum;

/**
* @var int $maxLength The maximum amount of characters in the value
* @var string $maxLength The maximum amount of characters in the value
* @example 2
*
*
* @Assert\Type("integer")
* @Groups({"read", "write"})
Expand All @@ -171,8 +174,9 @@ class Property
private $minLength;

/**
* @var string A [regular expression](https://en.wikipedia.org/wiki/Regular_expression) that the value should comply to
* @example '[+-]?(\d+(\.\d+)?|\.\d+)([eE][+-]?\d+)?'
* @var string $pattern A [regular expression](https://en.wikipedia.org/wiki/Regular_expression) that the value should comply to
* @example [+-]?(\d+(\.\d+)?|\.\d+)([eE][+-]?\d+)?
*
*
* @Assert\Length(max = 255)
* @Groups({"read", "write"})
Expand All @@ -197,8 +201,9 @@ class Property
private $additionalItems;

/**
* @var int $maxItems *Can only be used in combination with type array* The maximum array length
* @var string $maxItems *Can only be used in combination with type array* The maximum array length
* @example 2
*
*
* @Assert\Type("integer")
* @Groups({"read", "write"})
Expand All @@ -207,8 +212,9 @@ class Property
private $maxItems;

/**
* @var int $minItems *Can only be used in combination with type array* The minimum allowed value
* @var string $minItems *Can only be used in combination with type array* The minimum allowed value
* @example 2
*
*
* @Assert\Type("integer")
* @Groups({"read", "write"})
Expand All @@ -227,8 +233,9 @@ class Property
private $uniqueItems;

/**
* @var int $maxProperties *Can only be used in combination with type integer* The maximum amount of properties an object should contain
* @var string $maxProperties *Can only be used in combination with type integer* The maximum amount of properties an object should contain
* @example 2
*
*
* @Assert\Type("integer")
* @Groups({"read", "write"})
Expand Down Expand Up @@ -281,29 +288,37 @@ class Property
private $object;

/**
* @var array An array of possible values, input is limited to this array
* @var array $enum An array of possible values, input is limited to this array
* @example ['first','second]
*
*
* @Groups({"read", "write"})
* @ORM\Column(type="array", nullable=true)
*/
private $enum = [];

/**
* @var array *mutually exclusive with using type* An array of possible types that an property should confirm to
* @var array $allOf *mutually exclusive with using type* An array of possible types that an property should confirm to
* @example ['string','boolean']
*
*
* @ORM\Column(type="array", nullable=true)
*/
private $allOf = [];

/**
* @var array *mutually exclusive with using type* An array of possible types that an property might confirm to
* @var array $anyOf *mutually exclusive with using type* An array of possible types that an property might confirm to
* @example ['string','boolean']
*
*
* @ORM\Column(type="array", nullable=true)
*/
private $anyOf = [];

/**
* @var array *mutually exclusive with using type* An array of possible types that an property must confirm to
* @var array $oneOf *mutually exclusive with using type* An array of possible types that an property must confirm to
* @example ['string','boolean']
*
*
* @ORM\Column(type="array", nullable=true)
*/
Expand Down Expand Up @@ -396,9 +411,9 @@ class Property
private $externalDoc;

/**
* @var string An example of the value that should be supplied
* @var string An example of the value that should be supplied
* @example My value
*
*
* @Assert\Length(max = 255)
* @Groups({"read", "write"})
* @ORM\Column(type="string", length=255, nullable=true)
Expand Down
18 changes: 8 additions & 10 deletions api/src/Entity/RequestType.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Ramsey\Uuid\Uuid;

/**
* @ApiResource(
* @ApiResource(
* normalizationContext={"groups"={"read"}, "enable_max_depth"=true},
* denormalizationContext={"groups"={"write"}, "enable_max_depth"=true},
* collectionOperations={
Expand All @@ -36,7 +36,7 @@
* "type" : "boolean"
* }
* }
* }
* }
* },
* "put",
* "delete"
Expand All @@ -62,7 +62,6 @@ class RequestType
/**
* @var string $sourceOrganization The RSIN of the organization that owns this process
* @example 002851234
*
* @Assert\NotNull
* @Assert\Length(
* min = 8,
Expand All @@ -77,7 +76,6 @@ class RequestType
/**
* @var string $name The name of this RequestType
* @example My RequestType
*
* @Assert\NotNull
* @Assert\Length(
* max = 255
Expand All @@ -90,7 +88,6 @@ class RequestType
/**
* @var string $description An short description of this RequestType
* @example This is the best request ever
*
* @Assert\Length(
* max = 2550
* )
Expand All @@ -103,20 +100,21 @@ class RequestType
* @Groups({"read", "write"})
* @MaxDepth(1)
* @ORM\OneToMany(targetEntity="App\Entity\Property", mappedBy="requestType", orphanRemoval=true, fetch="EAGER", cascade={"persist"})
* @Assert\Valid
*/
private $properties;

/**
* @var object $extends The requestType that this requestType extends
*
*
* @Groups({"write-requesttype"})
* @ORM\ManyToOne(targetEntity="App\Entity\RequestType", inversedBy="extendedBy", fetch="EAGER")
*/
private $extends;

/**
* @var object $extendedBy The requestTypes that extend this requestType
*
*
* @ORM\OneToMany(targetEntity="App\Entity\RequestType", mappedBy="extends")
*/
private $extendedBy;
Expand Down Expand Up @@ -146,7 +144,7 @@ public function getId(): Uuid
public function setId(Uuid $id): self
{
$this->id = $id;

return $this;
}

Expand Down Expand Up @@ -203,7 +201,7 @@ public function addProperty(Property $property): self

return $this;
}

/*
* Used for soft adding properties for the extension functionality
*/
Expand All @@ -212,7 +210,7 @@ public function extendProperty(Property $property): self
if (!$this->properties->contains($property)) {
$this->properties[] = $property;
}

return $this;
}

Expand Down

0 comments on commit ba69f3c

Please sign in to comment.