Skip to content

Commit

Permalink
chore(main): check if schema exists
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodparkes committed Nov 21, 2024
1 parent c328539 commit 881bd00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Methods/PapiMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,10 @@ public static function getSchemaArrayFromSpecObject(?SpecBaseObject $object)
if ($object !== null) {
$schema = [];
if (isset($object->content['application/json'])) {
$schema = $object->content['application/json']->getSerializableData()->schema;
$serialized_data = $object->content['application/json']->getSerializableData();
if (isset($serialized_data->schema)) {
$schema = $serialized_data->schema;
}
}
return PapiMethods::objectToArray($schema);
} else {
Expand Down

0 comments on commit 881bd00

Please sign in to comment.