Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.
Closed
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
skip Swagger model properties when input_filter fields are incorrectl…
…y defined.
  • Loading branch information
abacaphiliac committed Feb 22, 2017
commit fc9665621173f29af5856c75c5b5f565b649132f
4 changes: 4 additions & 0 deletions src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace ZF\Apigility\Documentation\Swagger;

use ZF\Apigility\Documentation\Field;
use ZF\Apigility\Documentation\Service as BaseService;

class Service extends BaseService
Expand Down Expand Up @@ -156,6 +157,9 @@ public function toArray()

$requiredProperties = $properties = [];
foreach ($fields as $field) {
if (!$field instanceof Field) {
continue;
}
$properties[$field->getName()] = [
'type' => method_exists($field, 'getFieldType') ? $field->getFieldType() : 'string',
'dataType' => method_exists($field, 'getFieldType') ? $field->getFieldType() : 'string',
Expand Down