File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 13
13
use cebe \openapi \json \JsonReference ;
14
14
use cebe \openapi \spec \Reference ;
15
15
use cebe \openapi \spec \Type ;
16
+ use \JsonSerializable ;
16
17
17
18
/**
18
19
* Base class for all spec objects.
19
20
*
20
21
* Implements property management and validation basics.
21
22
*
22
23
*/
23
- abstract class SpecBaseObject implements SpecObjectInterface, DocumentContextInterface
24
+ abstract class SpecBaseObject implements SpecObjectInterface, DocumentContextInterface, JsonSerializable
24
25
{
25
26
private $ _properties = [];
26
27
private $ _errors = [];
@@ -525,4 +526,8 @@ public function getExtensions(): array
525
526
}
526
527
return $ extensions ;
527
528
}
529
+
530
+ public function jsonSerialize () {
531
+ return $ this ->getSerializableData ();
532
+ }
528
533
}
Original file line number Diff line number Diff line change 9
9
10
10
use cebe \openapi \exceptions \TypeErrorException ;
11
11
use cebe \openapi \SpecBaseObject ;
12
- use \JsonSerializable ;
13
12
14
13
/**
15
14
* This is the root document object of the OpenAPI document.
26
25
* @property ExternalDocumentation|null $externalDocs
27
26
*
28
27
*/
29
- class OpenApi extends SpecBaseObject implements JsonSerializable
28
+ class OpenApi extends SpecBaseObject
30
29
{
31
30
/**
32
31
* @return array array of attributes available in this object.
@@ -80,8 +79,4 @@ public function performValidation()
80
79
$ this ->addError ('Unsupported openapi version: ' . $ this ->openapi );
81
80
}
82
81
}
83
-
84
- public function jsonSerialize () {
85
- return $ this ->getSerializableData ();
86
- }
87
82
}
You can’t perform that action at this time.
0 commit comments