Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion tools/raml2html/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.4",
"symfony/console": "^4.2",
"raml-org/raml-php-parser": "dev-master",
"twig/twig": "^2.0",
Expand Down
4 changes: 2 additions & 2 deletions tools/raml2html/src/Twig/Extension/RenderExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function getExamplesTabs(array $responseBodies): array
/** @var \Raml\Body $body */
foreach ($responseBodies as $body) {

if (!empty($body->getExample())) {
if (!empty($body->getExamples())) {
$tabs[] = $this->getSchemaFormat($body->getMediaType());
}
}
Expand All @@ -85,7 +85,7 @@ public function getExamplesBody(array $responseBodies): array
foreach ($responseBodies as $body) {
$schemaFormat = $this->getSchemaFormat($body->getMediaType());

if (!empty($body->getExample())) {
if (!empty($body->getExamples())) {
$examples[$schemaFormat][] = $body->getExample();
}
}
Expand Down