Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Jan 28, 2024
1 parent 6629db0 commit c2bc467
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/Generator/Markup/resource/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const client = new Client()
client.get(name: string, type: string, startIndex: number, float: number, boolean: boolean, date: string, datetime: string): EntryCollection
client.create(name: string, type: string, payload: EntryCreate): EntryMessage throws EntryMessage
client.update(name: string, type: string, payload: EntryUpdate): EntryMessage
client.delete(name: string, type: string): EntryMessage
client.delete(name: string, type: string): void
client.patch(name: string, type: string, payload: EntryPatch): EntryMessage


Expand Down
2 changes: 1 addition & 1 deletion tests/Generator/Markup/resource/html.htm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="psx-operation" data-method="GET" data-path="/foo/:name/:type"><h1 class="psx-operation-id">get</h1><div class="psx-operation-path">GET /foo/:name/:type</div><div class="psx-operation-description">Returns a collection</div><div class="psx-operation-request"><h2>Request</h2><table><colgroup><col width="40%" /><col width="40%" /><col width="20%" /></colgroup><thead><tr><th>Name</th><th>Type</th><th>Location</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>path</td></tr><tr><td>type</td><td>String</td><td>path</td></tr><tr><td>startIndex</td><td>Integer</td><td>query</td></tr><tr><td>float</td><td>Number</td><td>query</td></tr><tr><td>boolean</td><td>Boolean</td><td>query</td></tr><tr><td>date</td><td>Date</td><td>query</td></tr><tr><td>datetime</td><td>DateTime</td><td>query</td></tr></tbody></table></div><div class="psx-operation-response"><h2>Response</h2><table><colgroup><col width="40%" /><col width="60%" /></colgroup><thead><tr><th>Status-Code</th><th>Type</th></tr></thead><tbody><tr><td>200</td><td>EntryCollection</td></tr></tbody></table></div></div>
<div class="psx-operation" data-method="POST" data-path="/foo/:name/:type"><h1 class="psx-operation-id">create</h1><div class="psx-operation-path">POST /foo/:name/:type</div><div class="psx-operation-request"><h2>Request</h2><table><colgroup><col width="40%" /><col width="40%" /><col width="20%" /></colgroup><thead><tr><th>Name</th><th>Type</th><th>Location</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>path</td></tr><tr><td>type</td><td>String</td><td>path</td></tr><tr><td>payload</td><td>EntryCreate</td><td>body</td></tr></tbody></table></div><div class="psx-operation-response"><h2>Response</h2><table><colgroup><col width="40%" /><col width="60%" /></colgroup><thead><tr><th>Status-Code</th><th>Type</th></tr></thead><tbody><tr><td>201</td><td>EntryMessage</td></tr><tr><td>400</td><td>EntryMessage</td></tr><tr><td>500</td><td>EntryMessage</td></tr></tbody></table></div></div>
<div class="psx-operation" data-method="PUT" data-path="/foo/:name/:type"><h1 class="psx-operation-id">update</h1><div class="psx-operation-path">PUT /foo/:name/:type</div><div class="psx-operation-request"><h2>Request</h2><table><colgroup><col width="40%" /><col width="40%" /><col width="20%" /></colgroup><thead><tr><th>Name</th><th>Type</th><th>Location</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>path</td></tr><tr><td>type</td><td>String</td><td>path</td></tr><tr><td>payload</td><td>EntryUpdate</td><td>body</td></tr></tbody></table></div><div class="psx-operation-response"><h2>Response</h2><table><colgroup><col width="40%" /><col width="60%" /></colgroup><thead><tr><th>Status-Code</th><th>Type</th></tr></thead><tbody><tr><td>200</td><td>EntryMessage</td></tr></tbody></table></div></div>
<div class="psx-operation" data-method="DELETE" data-path="/foo/:name/:type"><h1 class="psx-operation-id">delete</h1><div class="psx-operation-path">DELETE /foo/:name/:type</div><div class="psx-operation-request"><h2>Request</h2><table><colgroup><col width="40%" /><col width="40%" /><col width="20%" /></colgroup><thead><tr><th>Name</th><th>Type</th><th>Location</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>path</td></tr><tr><td>type</td><td>String</td><td>path</td></tr></tbody></table></div><div class="psx-operation-response"><h2>Response</h2><table><colgroup><col width="40%" /><col width="60%" /></colgroup><thead><tr><th>Status-Code</th><th>Type</th></tr></thead><tbody><tr><td>200</td><td>EntryMessage</td></tr></tbody></table></div></div>
<div class="psx-operation" data-method="DELETE" data-path="/foo/:name/:type"><h1 class="psx-operation-id">delete</h1><div class="psx-operation-path">DELETE /foo/:name/:type</div><div class="psx-operation-request"><h2>Request</h2><table><colgroup><col width="40%" /><col width="40%" /><col width="20%" /></colgroup><thead><tr><th>Name</th><th>Type</th><th>Location</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>path</td></tr><tr><td>type</td><td>String</td><td>path</td></tr></tbody></table></div><div class="psx-operation-response"><h2>Response</h2><table><colgroup><col width="40%" /><col width="60%" /></colgroup><thead><tr><th>Status-Code</th><th>Type</th></tr></thead><tbody></tbody></table></div></div>
<div class="psx-operation" data-method="PATCH" data-path="/foo/:name/:type"><h1 class="psx-operation-id">patch</h1><div class="psx-operation-path">PATCH /foo/:name/:type</div><div class="psx-operation-request"><h2>Request</h2><table><colgroup><col width="40%" /><col width="40%" /><col width="20%" /></colgroup><thead><tr><th>Name</th><th>Type</th><th>Location</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>path</td></tr><tr><td>type</td><td>String</td><td>path</td></tr><tr><td>payload</td><td>EntryPatch</td><td>body</td></tr></tbody></table></div><div class="psx-operation-response"><h2>Response</h2><table><colgroup><col width="40%" /><col width="60%" /></colgroup><thead><tr><th>Status-Code</th><th>Type</th></tr></thead><tbody><tr><td>200</td><td>EntryMessage</td></tr></tbody></table></div></div>

<div id="EntryCollection" class="psx-object psx-struct"><h4><a class="psx-type-link" data-name="EntryCollection">EntryCollection</a></h4><pre class="psx-object-json"><span class="psx-object-json-pun">{</span>
Expand Down
2 changes: 1 addition & 1 deletion tests/Generator/Markup/resource/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

## Response

<table><colgroup><col width="40%" /><col width="60%" /></colgroup><thead><tr><th>Status-Code</th><th>Type</th></tr></thead><tbody><tr><td>200</td><td>EntryMessage</td></tr></tbody></table>
<table><colgroup><col width="40%" /><col width="60%" /></colgroup><thead><tr><th>Status-Code</th><th>Type</th></tr></thead><tbody></tbody></table>

# patch
`PATCH /foo/:name/:type`
Expand Down
2 changes: 1 addition & 1 deletion tests/Generator/Spec/resource/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
}
},
"responses": {
"200": {
"204": {
"description": "",
"content": {
"application/json": {
Expand Down
12 changes: 6 additions & 6 deletions tests/Generator/Spec/resource/typeapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"operations": {
"get": {
"path": "\/foo\/:name\/:type",
"path": "/foo/:name/:type",
"method": "GET",
"return": {
"code": 200,
Expand Down Expand Up @@ -77,7 +77,7 @@
"tags": []
},
"create": {
"path": "\/foo\/:name\/:type",
"path": "/foo/:name/:type",
"method": "POST",
"return": {
"code": 201,
Expand Down Expand Up @@ -126,7 +126,7 @@
"tags": []
},
"update": {
"path": "\/foo\/:name\/:type",
"path": "/foo/:name/:type",
"method": "PUT",
"return": {
"code": 200,
Expand Down Expand Up @@ -162,10 +162,10 @@
"tags": []
},
"delete": {
"path": "\/foo\/:name\/:type",
"path": "/foo/:name/:type",
"method": "DELETE",
"return": {
"code": 200,
"code": 204,
"schema": {
"$ref": "EntryMessage"
}
Expand Down Expand Up @@ -198,7 +198,7 @@
"tags": []
},
"patch": {
"path": "\/foo\/:name\/:type",
"path": "/foo/:name/:type",
"method": "PATCH",
"return": {
"code": 200,
Expand Down

0 comments on commit c2bc467

Please sign in to comment.