Skip to content

Commit

Permalink
Book ISBN is not nullable anymore
Browse files Browse the repository at this point in the history
Type went from 'string | null' to 'string',
this is a breaking change.
  • Loading branch information
Polo2 committed Oct 16, 2023
1 parent 5b9f449 commit 14fb146
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions api/src/Entity/Book.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class Book
#[ORM\Id, ORM\Column, ORM\GeneratedValue]
private ?int $id = null;

/** The ISBN of this book (or null if doesn't have one). */
#[ORM\Column(nullable: true)]
public ?string $isbn = null;
/** The ISBN of this book. */
#[ORM\Column]
public ?string $isbn = '';

/** The title of this book. */
#[ORM\Column]
Expand Down
6 changes: 2 additions & 4 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,7 @@
"type": "integer"
},
"isbn": {
"type": "string",
"nullable": true
"type": "string"
},
"title": {
"type": "string"
Expand Down Expand Up @@ -864,8 +863,7 @@
"type": "integer"
},
"isbn": {
"type": "string",
"nullable": true
"type": "string"
},
"title": {
"type": "string"
Expand Down

0 comments on commit 14fb146

Please sign in to comment.