Skip to content

Commit

Permalink
Merge pull request #14 from ConductionNL/dev-robert
Browse files Browse the repository at this point in the history
Added missing property descriptions
  • Loading branch information
rubenvdlinde committed Jan 14, 2020
2 parents 86e5751 + 1effc12 commit 747356a
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 3 deletions.
Binary file added api/public/schema/Datamodel_Modelio.zip
Binary file not shown.
42 changes: 40 additions & 2 deletions api/public/schema/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2211,12 +2211,16 @@ components:
url: 'http://schema.org/identifier'
type: string
paymentProvider:
description: 'The provider that handles the payment'
type: string
paymentId:
description: 'The payment id of this payment'
type: string
status:
description: 'The status of this payment'
type: string
invoice:
description: 'The invoice this payment relates to'
$ref: '#/components/schemas/Invoice-read'
required:
- paymentProvider
Expand All @@ -2231,12 +2235,16 @@ components:
- status
properties:
paymentProvider:
description: 'The provider that handles the payment'
type: string
paymentId:
description: 'The payment id of this payment'
type: string
status:
description: 'The status of this payment'
type: string
invoice:
description: 'The invoice this payment relates to'
$ref: '#/components/schemas/Invoice-write'
'Payment:jsonld-read':
type: object
Expand All @@ -2257,12 +2265,16 @@ components:
url: 'http://schema.org/identifier'
type: string
paymentProvider:
description: 'The provider that handles the payment'
type: string
paymentId:
description: 'The payment id of this payment'
type: string
status:
description: 'The status of this payment'
type: string
invoice:
description: 'The invoice this payment relates to'
$ref: '#/components/schemas/Invoice:jsonld-read'
required:
- paymentProvider
Expand All @@ -2286,12 +2298,16 @@ components:
readOnly: true
type: string
paymentProvider:
description: 'The provider that handles the payment'
type: string
paymentId:
description: 'The payment id of this payment'
type: string
status:
description: 'The status of this payment'
type: string
invoice:
description: 'The invoice this payment relates to'
$ref: '#/components/schemas/Invoice:jsonld-write'
definitions:
Invoice-read:
Expand Down Expand Up @@ -2502,25 +2518,47 @@ definitions:
example: e2984465-190a-4562-829e-a8cca81aa35d
format: uuid
paymentProvider:
description: 'The provider that handles the payment'
type: string
example: iDeal
maxLength: 255
paymentId:
description: 'The payment id of this payment'
type: string
example: 87782426a21cbd70fc9823cbe1e024fb25804c833743b41529a23ae94b3b1cc2
maxLength: 255
status:
description: 'The status of this payment'
type: string
example: open
maxLength: 255
invoice: []
invoice:
description: 'The invoice this payment relates to'
type: \Invoice
required:
- paymentProvider
- paymentId
- status
Payment-write:
properties:
paymentProvider:
description: 'The provider that handles the payment'
type: string
example: iDeal
maxLength: 255
paymentId:
description: 'The payment id of this payment'
type: string
example: 87782426a21cbd70fc9823cbe1e024fb25804c833743b41529a23ae94b3b1cc2
maxLength: 255
status:
description: 'The status of this payment'
type: string
example: open
maxLength: 255
invoice: []
invoice:
description: 'The invoice this payment relates to'
type: \Invoice
required:
- paymentProvider
- paymentId
Expand Down
2 changes: 1 addition & 1 deletion api/public/schema/publiccode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ url: "https://github.com/ConductionNL/Proto-component-commonground"
landingURL: "pc.zaakonline.nl"
isBasedOn: "https://github.com/ConductionNL/Proto-component-commonground.git"
softwareVersion: "V.0.1"
releaseDate: "2020-13-01"
releaseDate: "2020-14-01"
logo: pc.zaakonline.nl
monochromeLogo: img/logo-mono.svg

Expand Down
24 changes: 24 additions & 0 deletions api/src/Entity/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ class Payment
private $id;

/**
* @var string The provider that handles the payment
*
* @example iDeal
*
* @Assert\NotNull
* @Assert\Length(
* max = 255
Expand All @@ -52,6 +56,10 @@ class Payment
private $paymentProvider;

/**
* @var string The payment id of this payment
*
* @example 87782426a21cbd70fc9823cbe1e024fb25804c833743b41529a23ae94b3b1cc2
*
* @Assert\NotNull
* @Assert\Length(
* max = 255
Expand All @@ -62,16 +70,32 @@ class Payment
private $paymentId;

/**
* @var string The status of this payment
*
* @example open
*
* @Assert\NotNull
* @Assert\Length(
* max = 255
* )
* @Assert\Choice(
* {
* "open",
* "pending",
* "authorized",
* "expired",
* "failed",
* "paid"
* }
* )
* @Groups({"read", "write"})
* @ORM\Column(type="string", length=255)
*/
private $status;

/**
* @var Invoice The invoice this payment relates to
*
* @Groups({"read", "write"})
* @ORM\ManyToOne(targetEntity="App\Entity\Invoice", inversedBy="payments")
* @ORM\JoinColumn(nullable=false)
Expand Down

0 comments on commit 747356a

Please sign in to comment.