Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Oct 11, 2024
1 parent cfd6355 commit 8c03116
Show file tree
Hide file tree
Showing 30 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion tests/Generator/Client/resource/typescript/Entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class Entry {
export interface Entry {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
*/

import {Entry} from "./Entry";
export class EntryCollection {
export interface EntryCollection {
entry?: Array<Entry>
}
2 changes: 1 addition & 1 deletion tests/Generator/Client/resource/typescript/EntryCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryCreate {
export interface EntryCreate {
id?: number
userId?: number
title?: string
Expand Down
2 changes: 1 addition & 1 deletion tests/Generator/Client/resource/typescript/EntryDelete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryDelete {
export interface EntryDelete {
id?: number
userId?: number
title?: string
Expand Down
2 changes: 1 addition & 1 deletion tests/Generator/Client/resource/typescript/EntryMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryMessage {
export interface EntryMessage {
success?: boolean
message?: string
}
2 changes: 1 addition & 1 deletion tests/Generator/Client/resource/typescript/EntryPatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryPatch {
export interface EntryPatch {
id?: number
userId?: number
title?: string
Expand Down
2 changes: 1 addition & 1 deletion tests/Generator/Client/resource/typescript/EntryUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryUpdate {
export interface EntryUpdate {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class Entry {
export interface Entry {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
*/

import {Entry} from "./Entry";
export class EntryCollection {
export interface EntryCollection {
entry?: Array<Entry>
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryCreate {
export interface EntryCreate {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

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

import {MyType} from "./../foo/MyType";
export class MySchema {
export interface MySchema {
foo?: MyType
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
*/

import {TestObject} from "./TestObject";
export class TestMapObject extends Map<string, TestObject> {
export interface TestMapObject extends Record<string, TestObject> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
* {@link https://sdkgen.app}
*/

export class TestMapScalar extends Map<string, string> {
export interface TestMapScalar extends Record<string, string> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class TestObject {
export interface TestObject {
id?: number
name?: string
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import {TestObject} from "./TestObject";
import {TestMapScalar} from "./TestMapScalar";
import {TestMapObject} from "./TestMapObject";
export class TestRequest {
export interface TestRequest {
int?: number
float?: number
string?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import {TestMapScalar} from "./TestMapScalar";
import {TestRequest} from "./TestRequest";
export class TestResponse {
export interface TestResponse {
args?: TestMapScalar
data?: string
files?: TestMapScalar
Expand Down
14 changes: 7 additions & 7 deletions tests/Generator/Markup/resource/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,44 @@ client.delete(name: string, type: string): void
client.patch(name: string, type: string, payload: Array<EntryPatch>): Array<EntryMessage> throws EntryMessage, Array<EntryMessage>


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

export class Entry {
interface Entry {
id?: number
userId?: number
title?: string
date?: string
}

export class EntryMessage {
interface EntryMessage {
success?: boolean
message?: string
}

export class EntryCreate {
interface EntryCreate {
id?: number
userId?: number
title?: string
date?: string
}

export class EntryUpdate {
interface EntryUpdate {
id?: number
userId?: number
title?: string
date?: string
}

export class EntryDelete {
interface EntryDelete {
id?: number
userId?: number
title?: string
date?: string
}

export class EntryPatch {
interface EntryPatch {
id?: number
userId?: number
title?: string
Expand Down
8 changes: 4 additions & 4 deletions tests/Generator/Markup/resource/client_collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ client.bar().find(foo: string): EntryCollection
client.bar().put(payload: EntryCreate): EntryMessage


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

export class Entry {
interface Entry {
id?: number
userId?: number
title?: string
date?: string
}

export class EntryMessage {
interface EntryMessage {
success?: boolean
message?: string
}

export class EntryCreate {
interface EntryCreate {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class Entry {
export interface Entry {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
*/

import {Entry} from "./Entry";
export class EntryCollection {
export interface EntryCollection {
entry?: Array<Entry>
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryCreate {
export interface EntryCreate {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryDelete {
export interface EntryDelete {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryMessage {
export interface EntryMessage {
success?: boolean
message?: string
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryPatch {
export interface EntryPatch {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryUpdate {
export interface EntryUpdate {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class Entry {
export interface Entry {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
*/

import {Entry} from "./Entry";
export class EntryCollection {
export interface EntryCollection {
entry?: Array<Entry>
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryCreate {
export interface EntryCreate {
id?: number
userId?: number
title?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* {@link https://sdkgen.app}
*/

export class EntryMessage {
export interface EntryMessage {
success?: boolean
message?: string
}

0 comments on commit 8c03116

Please sign in to comment.