Skip to content

Commit a8b8dd0

Browse files
committed
A few more minor adjustments
1 parent a2cb7a5 commit a8b8dd0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Annotations/AnnotationGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ protected function buildSchemaObjectArray(string $type, string $subType = '', st
526526
if ($this->shouldIncludeDefault($type, $default)) {
527527
$doubleQuote = '"';
528528
// Don't wrap with quotes for certain values
529-
if (in_array($default, ['{}', "{$doubleQuote}{$doubleQuote}"])) {
529+
if (in_array($default, ['{}', 'false', 'true', "{$doubleQuote}{$doubleQuote}"])) {
530530
$doubleQuote = '';
531531
}
532532
$schemaMap[] = "default={$doubleQuote}{$default}{$doubleQuote}";

Annotations/GlobalApiComponents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* additionalProperties=true,
6161
* @OA\Property(property="result", type="string", enum={"success"}, example="success"),
6262
* @OA\Property(property="message", type="string", example="ok"),
63-
* @OA\Property(property="code", type="integer", nullable=true, default=null)
63+
* @OA\Property(property="code", type="integer", example="200")
6464
* )
6565
*
6666
* Generic Error object
@@ -72,7 +72,7 @@
7272
* additionalProperties=true,
7373
* @OA\Property(property="result", type="string", enum={"error"}, example="error"),
7474
* @OA\Property(property="message", type="string", example="There was an error"),
75-
* @OA\Property(property="code", type="integer", nullable=true, default=null)
75+
* @OA\Property(property="code", type="integer")
7676
* )
7777
*
7878
* @OA\Schema(

0 commit comments

Comments
 (0)