diff --git a/composer.json b/composer.json index e2161b9..c6fd28a 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "nette/application" : "^2.3|^2.4", "nette/di" : "^2.3|^2.4", "latte/latte" : "^2.3|^2.4", - "ublaboo/api-router" : "~1.2" + "ublaboo/api-router" : ">=1.2.5" }, "require-dev": { "nette/tester" : "~1.6.1", diff --git a/src/templates/api_docu_matched.latte b/src/templates/api_docu_matched.latte index 6fa3cfb..b02e4f5 100644 --- a/src/templates/api_docu_matched.latte +++ b/src/templates/api_docu_matched.latte @@ -74,6 +74,22 @@ + {if !empty($route->getResponseCodes())} +
+ {foreach $route->getResponseCodes() as $code => $description}
+ {if is_string($description)}
+ {$code} ({$description})
+
+ {else}
+ {$description}
+
+ {/if}
+ {/foreach}
+
+ {foreach $route->getResponseCodes() as $code => $description}
+ {if is_string($description)}
+ {$code} ({$description})
+
+ {else}
+ {$description}
+
+ {/if}
+ {/foreach}
+
{json_encode($route->getExample(), JSON_PRETTY_PRINT)}