Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/SpecBaseObject.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,14 +13,15 @@
use cebe\openapi\json\JsonReference;
use cebe\openapi\spec\Reference;
use cebe\openapi\spec\Type;
use \JsonSerializable;

/**
* Base class for all spec objects.
*
* Implements property management and validation basics.
*
*/
abstract class SpecBaseObject implements SpecObjectInterface, DocumentContextInterface, RawSpecDataInterface
abstract class SpecBaseObject implements SpecObjectInterface, DocumentContextInterface, JsonSerializable, RawSpecDataInterface
{
private $_rawSpec;
private $_properties = [];
Expand DownExpand Up@@ -528,6 +529,10 @@ public function getExtensions(): array
return $extensions;
}

public function jsonSerialize() {
return $this->getSerializableData();
}

public function getRawSpecData(): array
{
return $this->_rawSpec;
Expand Down