Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Nov 3, 2024
1 parent 00644da commit 48c952b
Show file tree
Hide file tree
Showing 31 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/Generator/Client/resource/typescript/Entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface Entry {
title?: string
date?: string
}

2 changes: 2 additions & 0 deletions tests/Generator/Client/resource/typescript/EntryCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/

import {Entry} from "./Entry";

export interface EntryCollection {
entry?: Array<Entry>
}

1 change: 1 addition & 0 deletions tests/Generator/Client/resource/typescript/EntryCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface EntryCreate {
title?: string
date?: string
}

1 change: 1 addition & 0 deletions tests/Generator/Client/resource/typescript/EntryDelete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface EntryDelete {
title?: string
date?: string
}

1 change: 1 addition & 0 deletions tests/Generator/Client/resource/typescript/EntryMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export interface EntryMessage {
success?: boolean
message?: string
}

1 change: 1 addition & 0 deletions tests/Generator/Client/resource/typescript/EntryPatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface EntryPatch {
title?: string
date?: string
}

1 change: 1 addition & 0 deletions tests/Generator/Client/resource/typescript/EntryUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface EntryUpdate {
title?: string
date?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface Entry {
title?: string
date?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/

import {Entry} from "./Entry";

export interface EntryCollection {
entry?: Array<Entry>
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface EntryCreate {
title?: string
date?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export interface EntryMessage {
success?: boolean
message?: string
}

2 changes: 2 additions & 0 deletions tests/Generator/Client/resource/typescript_import/MySchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/

import {MyType} from "./../foo/MyType";

export interface MySchema {
foo?: MyType
}

Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
*/

import {TestObject} from "./TestObject";

export interface TestMapObject extends Record<string, TestObject> {
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@

export interface TestMapScalar extends Record<string, string> {
}

Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export interface TestObject {
id?: number
name?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import {TestObject} from "./TestObject";
import {TestMapScalar} from "./TestMapScalar";
import {TestMapObject} from "./TestMapObject";

export interface TestRequest {
int?: number
float?: number
Expand All @@ -20,3 +21,4 @@ export interface TestRequest {
mapObject?: TestMapObject
object?: TestObject
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import {TestMapScalar} from "./TestMapScalar";
import {TestRequest} from "./TestRequest";

export interface TestResponse {
args?: TestMapScalar
data?: string
Expand All @@ -14,3 +15,4 @@ export interface TestResponse {
json?: TestRequest
method?: string
}

2 changes: 2 additions & 0 deletions tests/Generator/Markup/resource/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ client.delete(name: string, type: string): void
client.patch(name: string, type: string, payload: Array<EntryPatch>): Array<EntryMessage> throws EntryMessage, Array<EntryMessage>



interface EntryCollection {
entry?: Array<Entry>
}
Expand Down Expand Up @@ -49,3 +50,4 @@ interface EntryPatch {
title?: string
date?: string
}

2 changes: 2 additions & 0 deletions tests/Generator/Markup/resource/client_collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ client.bar().find(foo: string): EntryCollection
client.bar().put(payload: EntryCreate): EntryMessage



interface EntryCollection {
entry?: Array<Entry>
}
Expand All @@ -29,3 +30,4 @@ interface EntryCreate {
title?: string
date?: string
}

7 changes: 7 additions & 0 deletions tests/Generator/Markup/resource/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,42 +64,49 @@
<span class="psx-object-json-key">"entry"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Array (Entry)</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-pun">}</span></pre><table class="table psx-object-properties"><colgroup><col width="30%" /><col width="70%" /></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><span class="psx-property-name ">entry</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Array (Entry)">Array (Entry)</a></span><br /><div class="psx-property-description"></div></td></tr></tbody></table></div>


<div id="Entry" class="psx-object psx-struct"><h4><a class="psx-type-link" data-name="Entry">Entry</a></h4><pre class="psx-object-json"><span class="psx-object-json-pun">{</span>
<span class="psx-object-json-key">"id"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Integer</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"userId"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Integer</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"title"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"date"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String (date-time)</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-pun">}</span></pre><table class="table psx-object-properties"><colgroup><col width="30%" /><col width="70%" /></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><span class="psx-property-name ">id</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Integer">Integer</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">userId</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Integer">Integer</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">title</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String">String</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">date</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String (date-time)">String (date-time)</a></span><br /><div class="psx-property-description"></div></td></tr></tbody></table></div>


<div id="EntryMessage" class="psx-object psx-struct"><h4><a class="psx-type-link" data-name="EntryMessage">EntryMessage</a></h4><pre class="psx-object-json"><span class="psx-object-json-pun">{</span>
<span class="psx-object-json-key">"success"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Boolean</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"message"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-pun">}</span></pre><table class="table psx-object-properties"><colgroup><col width="30%" /><col width="70%" /></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><span class="psx-property-name ">success</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Boolean">Boolean</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">message</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String">String</a></span><br /><div class="psx-property-description"></div></td></tr></tbody></table></div>


<div id="EntryCreate" class="psx-object psx-struct"><h4><a class="psx-type-link" data-name="EntryCreate">EntryCreate</a></h4><pre class="psx-object-json"><span class="psx-object-json-pun">{</span>
<span class="psx-object-json-key">"id"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Integer</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"userId"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Integer</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"title"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"date"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String (date-time)</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-pun">}</span></pre><table class="table psx-object-properties"><colgroup><col width="30%" /><col width="70%" /></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><span class="psx-property-name ">id</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Integer">Integer</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">userId</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Integer">Integer</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">title</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String">String</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">date</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String (date-time)">String (date-time)</a></span><br /><div class="psx-property-description"></div></td></tr></tbody></table></div>


<div id="EntryUpdate" class="psx-object psx-struct"><h4><a class="psx-type-link" data-name="EntryUpdate">EntryUpdate</a></h4><pre class="psx-object-json"><span class="psx-object-json-pun">{</span>
<span class="psx-object-json-key">"id"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Integer</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"userId"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Integer</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"title"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"date"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String (date-time)</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-pun">}</span></pre><table class="table psx-object-properties"><colgroup><col width="30%" /><col width="70%" /></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><span class="psx-property-name ">id</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Integer">Integer</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">userId</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Integer">Integer</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">title</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String">String</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">date</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String (date-time)">String (date-time)</a></span><br /><div class="psx-property-description"></div></td></tr></tbody></table></div>


<div id="EntryDelete" class="psx-object psx-struct"><h4><a class="psx-type-link" data-name="EntryDelete">EntryDelete</a></h4><pre class="psx-object-json"><span class="psx-object-json-pun">{</span>
<span class="psx-object-json-key">"id"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Integer</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"userId"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Integer</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"title"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"date"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String (date-time)</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-pun">}</span></pre><table class="table psx-object-properties"><colgroup><col width="30%" /><col width="70%" /></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><span class="psx-property-name ">id</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Integer">Integer</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">userId</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Integer">Integer</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">title</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String">String</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">date</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String (date-time)">String (date-time)</a></span><br /><div class="psx-property-description"></div></td></tr></tbody></table></div>


<div id="EntryPatch" class="psx-object psx-struct"><h4><a class="psx-type-link" data-name="EntryPatch">EntryPatch</a></h4><pre class="psx-object-json"><span class="psx-object-json-pun">{</span>
<span class="psx-object-json-key">"id"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Integer</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"userId"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">Integer</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"title"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-key">"date"</span><span class="psx-object-json-pun">: </span><span class="psx-property-type">String (date-time)</span><span class="psx-object-json-pun">,</span>
<span class="psx-object-json-pun">}</span></pre><table class="table psx-object-properties"><colgroup><col width="30%" /><col width="70%" /></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><span class="psx-property-name ">id</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Integer">Integer</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">userId</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="Integer">Integer</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">title</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String">String</a></span><br /><div class="psx-property-description"></div></td></tr><tr><td><span class="psx-property-name ">date</span></td><td><span class="psx-property-type"><a class="psx-type-link" data-name="String (date-time)">String (date-time)</a></span><br /><div class="psx-property-description"></div></td></tr></tbody></table></div>

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface Entry {
title?: string
date?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/

import {Entry} from "./Entry";

export interface EntryCollection {
entry?: Array<Entry>
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface EntryCreate {
title?: string
date?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface EntryDelete {
title?: string
date?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export interface EntryMessage {
success?: boolean
message?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface EntryPatch {
title?: string
date?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface EntryUpdate {
title?: string
date?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface Entry {
title?: string
date?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/

import {Entry} from "./Entry";

export interface EntryCollection {
entry?: Array<Entry>
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export interface EntryCreate {
title?: string
date?: string
}

Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export interface EntryMessage {
success?: boolean
message?: string
}

0 comments on commit 48c952b

Please sign in to comment.