-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Required to the Schema for rendering. (#3)
The `Required` option does not seem to be rendering for a property. I am not sure if this is intentional or not. This PR adds the support for it to be rendered out with `required` being defaulted to true. This allows `required` properties to be marked as such.
- Loading branch information
1 parent
e6f63d6
commit eb8f29a
Showing
18 changed files
with
147 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,27 +27,31 @@ public function testUserSignedUp(): void | |
'description' => 'Name of the user', | ||
'example' => 'John', | ||
'format' => 'string', | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'email', | ||
'type' => 'string', | ||
'description' => 'Email of the user', | ||
'format' => 'email', | ||
'example' => '[email protected]', | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'age', | ||
'type' => 'integer', | ||
'description' => 'Age of the user', | ||
'format' => 'int32', | ||
'example' => '18', | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'isCitizen', | ||
'type' => 'boolean', | ||
'description' => 'Is user a citizen', | ||
'format' => 'boolean', | ||
'example' => 'true', | ||
'required' => true, | ||
], | ||
], | ||
]; | ||
|
@@ -70,34 +74,39 @@ public function testProductCreated(): void | |
'type' => 'integer', | ||
'format' => null, | ||
'example' => null, | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'amount', | ||
'description' => '', | ||
'type' => 'number', | ||
'format' => null, | ||
'example' => null, | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'currency', | ||
'description' => '', | ||
'type' => 'string', | ||
'format' => null, | ||
'example' => null, | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'isPaid', | ||
'description' => '', | ||
'type' => 'boolean', | ||
'format' => null, | ||
'example' => null, | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'createdAt', | ||
'description' => '', | ||
'type' => 'string', | ||
'format' => 'date-time', | ||
'example' => null, | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'week', | ||
|
@@ -106,19 +115,22 @@ public function testProductCreated(): void | |
'enum' => [1, 2, 3, 4, 5, 6, 7], | ||
'format' => null, | ||
'example' => null, | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'payment', | ||
'description' => '', | ||
'type' => 'object', | ||
'items' => [], | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'products', | ||
'description' => '', | ||
'type' => 'array', | ||
'format' => null, | ||
'example' => null, | ||
'required' => true, | ||
], | ||
[ | ||
'name' => 'tags', | ||
|
@@ -127,6 +139,7 @@ public function testProductCreated(): void | |
'format' => null, | ||
'example' => null, | ||
'itemsType' => 'string', | ||
'required' => true, | ||
], | ||
], | ||
]; | ||
|
Oops, something went wrong.