upd(codegen): keep readme indentation
This commit is contained in:
@@ -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 === "") {
|
||||
|
||||
@@ -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 === "") {
|
||||
|
||||
@@ -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 === "") {
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user