/** * @param Action $action */ private function writeFormattedResponses(Action $action) { foreach ($action->getPossibleResponses() as $response) { $this->apiBlueprint .= '+ Response ' . $response['code'] . self::EMPTY_ROW; if ($response['code'] == 200) { $this->apiBlueprint .= $this->getFormattedCodeBlock($action->getResponseDescription()) . self::EMPTY_ROW; } } }
private function createActions() { foreach ($this->operations as $operation) { $action = new Action($operation); if ($action->allowsChangingEntity()) { $action->setBodyProperties(array_filter($this->service->getFields('input_filter'), function ($field) { return $field->isRequired(); })); } $this->actions[] = $action; } }