3
0

upd(codegen): keep readme indentation

This commit is contained in:
Tit Petric
2018-11-25 13:04:48 +01:00
parent 6d5b0070b2
commit 6c2d11c050
4 changed files with 17 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
<?php
$cleanUp = function($contents) {
$lines = array_map("trim", explode("\n", $contents));
$lines = array_map("rtrim", explode("\n", $contents));
$empty = true;
foreach ($lines as $k => $v) {
if ($v === "") {

View File

@@ -1,7 +1,7 @@
<?php
$cleanUp = function($contents) {
$lines = array_map("trim", explode("\n", $contents));
$lines = array_map("rtrim", explode("\n", $contents));
$empty = true;
foreach ($lines as $k => $v) {
if ($v === "") {

View File

@@ -1,7 +1,7 @@
<?php
$cleanUp = function($contents) {
$lines = array_map("trim", explode("\n", $contents));
$lines = array_map("rtrim", explode("\n", $contents));
$empty = true;
foreach ($lines as $k => $v) {
if ($v === "") {

View File

@@ -4,26 +4,26 @@
{api.description}
{foreach $api.apis as $name => $call}
## {call.title}
## {call.title}
{call.description}
{call.description}
#### Method
#### Method
| URI | Protocol | Method | Authentication |
| --- | -------- | ------ | -------------- |
| `{api.path}{call.path}` | {if $api.protocol}{api.protocol}{else}HTTP/S{/if} | {call.method} | {eval echo implode(", ", $api.authentication)} |
| URI | Protocol | Method | Authentication |
| --- | -------- | ------ | -------------- |
| `{api.path}{call.path}` | {if $api.protocol}{api.protocol}{else}HTTP/S{/if} | {call.method} | {eval echo implode(", ", $api.authentication)} |
#### Request parameters
#### Request parameters
| Parameter | Type | Method | Description | Default | Required? |
| --------- | ---- | ------ | ----------- | ------- | --------- |
{foreach $call.parameters as $method => $params}
{foreach $params as $param}
| {param.name} | {param.type} | {method|toupper} | {param.title} | {if empty($param.default)}N/A{else}{param.default}{/if}
| Parameter | Type | Method | Description | Default | Required? |
| --------- | ---- | ------ | ----------- | ------- | --------- |
{foreach $call.parameters as $method => $params}
{foreach $params as $param}
| {param.name} | {param.type} | {method|toupper} | {param.title} | {if empty($param.default)}N/A{else}{param.default}{/if}
{if $param.values}<br><br>Values:<br><br><ul>{foreach $param.values as $value}<li>`{value}`</li>{/foreach}{/if} | {if $param.required}YES{else}NO{/if} |
{/foreach}
{/foreach}
{/foreach}
{/foreach}
{/foreach}