Skip to content

Commit

Permalink
Added missing property descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzondervan committed Jan 14, 2020
1 parent 85892d7 commit 11bf484
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 3 deletions.
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
21 changes: 21 additions & 0 deletions api/src/Entity/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ class Payment
private $id;

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

/**
* @var string The payment id of this payment
* @example 87782426a21cbd70fc9823cbe1e024fb25804c833743b41529a23ae94b3b1cc2
*
* @Assert\NotNull
* @Assert\Length(
* max = 255
Expand All @@ -64,16 +70,31 @@ 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 11bf484

Please sign in to comment.