From 8c03116324cc4670adf44cb25eee4231f98aca1c Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Fri, 11 Oct 2024 20:49:31 +0200 Subject: [PATCH] fix tests --- .../Generator/Client/resource/typescript/Entry.ts | 2 +- .../Client/resource/typescript/EntryCollection.ts | 2 +- .../Client/resource/typescript/EntryCreate.ts | 2 +- .../Client/resource/typescript/EntryDelete.ts | 2 +- .../Client/resource/typescript/EntryMessage.ts | 2 +- .../Client/resource/typescript/EntryPatch.ts | 2 +- .../Client/resource/typescript/EntryUpdate.ts | 2 +- .../Client/resource/typescript_collection/Entry.ts | 2 +- .../typescript_collection/EntryCollection.ts | 2 +- .../resource/typescript_collection/EntryCreate.ts | 2 +- .../resource/typescript_collection/EntryMessage.ts | 2 +- .../Client/resource/typescript_import/MySchema.ts | 2 +- .../resource/typescript_test/TestMapObject.ts | 2 +- .../resource/typescript_test/TestMapScalar.ts | 2 +- .../Client/resource/typescript_test/TestObject.ts | 2 +- .../Client/resource/typescript_test/TestRequest.ts | 2 +- .../resource/typescript_test/TestResponse.ts | 2 +- tests/Generator/Markup/resource/client.md | 14 +++++++------- .../Generator/Markup/resource/client_collection.md | 8 ++++---- .../Server/resource/typescript/src/dto/Entry.ts | 2 +- .../resource/typescript/src/dto/EntryCollection.ts | 2 +- .../resource/typescript/src/dto/EntryCreate.ts | 2 +- .../resource/typescript/src/dto/EntryDelete.ts | 2 +- .../resource/typescript/src/dto/EntryMessage.ts | 2 +- .../resource/typescript/src/dto/EntryPatch.ts | 2 +- .../resource/typescript/src/dto/EntryUpdate.ts | 2 +- .../resource/typescript_complex/src/dto/Entry.ts | 2 +- .../typescript_complex/src/dto/EntryCollection.ts | 2 +- .../typescript_complex/src/dto/EntryCreate.ts | 2 +- .../typescript_complex/src/dto/EntryMessage.ts | 2 +- 30 files changed, 39 insertions(+), 39 deletions(-) diff --git a/tests/Generator/Client/resource/typescript/Entry.ts b/tests/Generator/Client/resource/typescript/Entry.ts index 9cd75dff..b50aaa0c 100644 --- a/tests/Generator/Client/resource/typescript/Entry.ts +++ b/tests/Generator/Client/resource/typescript/Entry.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class Entry { +export interface Entry { id?: number userId?: number title?: string diff --git a/tests/Generator/Client/resource/typescript/EntryCollection.ts b/tests/Generator/Client/resource/typescript/EntryCollection.ts index b7893c58..1f8e50b2 100644 --- a/tests/Generator/Client/resource/typescript/EntryCollection.ts +++ b/tests/Generator/Client/resource/typescript/EntryCollection.ts @@ -4,6 +4,6 @@ */ import {Entry} from "./Entry"; -export class EntryCollection { +export interface EntryCollection { entry?: Array } diff --git a/tests/Generator/Client/resource/typescript/EntryCreate.ts b/tests/Generator/Client/resource/typescript/EntryCreate.ts index ba35a582..a74a58c8 100644 --- a/tests/Generator/Client/resource/typescript/EntryCreate.ts +++ b/tests/Generator/Client/resource/typescript/EntryCreate.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryCreate { +export interface EntryCreate { id?: number userId?: number title?: string diff --git a/tests/Generator/Client/resource/typescript/EntryDelete.ts b/tests/Generator/Client/resource/typescript/EntryDelete.ts index 2b482038..6094cb69 100644 --- a/tests/Generator/Client/resource/typescript/EntryDelete.ts +++ b/tests/Generator/Client/resource/typescript/EntryDelete.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryDelete { +export interface EntryDelete { id?: number userId?: number title?: string diff --git a/tests/Generator/Client/resource/typescript/EntryMessage.ts b/tests/Generator/Client/resource/typescript/EntryMessage.ts index eecb5a7f..3c733c2b 100644 --- a/tests/Generator/Client/resource/typescript/EntryMessage.ts +++ b/tests/Generator/Client/resource/typescript/EntryMessage.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryMessage { +export interface EntryMessage { success?: boolean message?: string } diff --git a/tests/Generator/Client/resource/typescript/EntryPatch.ts b/tests/Generator/Client/resource/typescript/EntryPatch.ts index 8be65514..ff4e1528 100644 --- a/tests/Generator/Client/resource/typescript/EntryPatch.ts +++ b/tests/Generator/Client/resource/typescript/EntryPatch.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryPatch { +export interface EntryPatch { id?: number userId?: number title?: string diff --git a/tests/Generator/Client/resource/typescript/EntryUpdate.ts b/tests/Generator/Client/resource/typescript/EntryUpdate.ts index 92b88932..5c68b7e2 100644 --- a/tests/Generator/Client/resource/typescript/EntryUpdate.ts +++ b/tests/Generator/Client/resource/typescript/EntryUpdate.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryUpdate { +export interface EntryUpdate { id?: number userId?: number title?: string diff --git a/tests/Generator/Client/resource/typescript_collection/Entry.ts b/tests/Generator/Client/resource/typescript_collection/Entry.ts index 9cd75dff..b50aaa0c 100644 --- a/tests/Generator/Client/resource/typescript_collection/Entry.ts +++ b/tests/Generator/Client/resource/typescript_collection/Entry.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class Entry { +export interface Entry { id?: number userId?: number title?: string diff --git a/tests/Generator/Client/resource/typescript_collection/EntryCollection.ts b/tests/Generator/Client/resource/typescript_collection/EntryCollection.ts index b7893c58..1f8e50b2 100644 --- a/tests/Generator/Client/resource/typescript_collection/EntryCollection.ts +++ b/tests/Generator/Client/resource/typescript_collection/EntryCollection.ts @@ -4,6 +4,6 @@ */ import {Entry} from "./Entry"; -export class EntryCollection { +export interface EntryCollection { entry?: Array } diff --git a/tests/Generator/Client/resource/typescript_collection/EntryCreate.ts b/tests/Generator/Client/resource/typescript_collection/EntryCreate.ts index ba35a582..a74a58c8 100644 --- a/tests/Generator/Client/resource/typescript_collection/EntryCreate.ts +++ b/tests/Generator/Client/resource/typescript_collection/EntryCreate.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryCreate { +export interface EntryCreate { id?: number userId?: number title?: string diff --git a/tests/Generator/Client/resource/typescript_collection/EntryMessage.ts b/tests/Generator/Client/resource/typescript_collection/EntryMessage.ts index eecb5a7f..3c733c2b 100644 --- a/tests/Generator/Client/resource/typescript_collection/EntryMessage.ts +++ b/tests/Generator/Client/resource/typescript_collection/EntryMessage.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryMessage { +export interface EntryMessage { success?: boolean message?: string } diff --git a/tests/Generator/Client/resource/typescript_import/MySchema.ts b/tests/Generator/Client/resource/typescript_import/MySchema.ts index 6eb17444..f50ce9ca 100644 --- a/tests/Generator/Client/resource/typescript_import/MySchema.ts +++ b/tests/Generator/Client/resource/typescript_import/MySchema.ts @@ -4,6 +4,6 @@ */ import {MyType} from "./../foo/MyType"; -export class MySchema { +export interface MySchema { foo?: MyType } diff --git a/tests/Generator/Client/resource/typescript_test/TestMapObject.ts b/tests/Generator/Client/resource/typescript_test/TestMapObject.ts index 65f1c755..1176b424 100644 --- a/tests/Generator/Client/resource/typescript_test/TestMapObject.ts +++ b/tests/Generator/Client/resource/typescript_test/TestMapObject.ts @@ -4,5 +4,5 @@ */ import {TestObject} from "./TestObject"; -export class TestMapObject extends Map { +export interface TestMapObject extends Record { } diff --git a/tests/Generator/Client/resource/typescript_test/TestMapScalar.ts b/tests/Generator/Client/resource/typescript_test/TestMapScalar.ts index 0a449599..f8c59c72 100644 --- a/tests/Generator/Client/resource/typescript_test/TestMapScalar.ts +++ b/tests/Generator/Client/resource/typescript_test/TestMapScalar.ts @@ -3,5 +3,5 @@ * {@link https://sdkgen.app} */ -export class TestMapScalar extends Map { +export interface TestMapScalar extends Record { } diff --git a/tests/Generator/Client/resource/typescript_test/TestObject.ts b/tests/Generator/Client/resource/typescript_test/TestObject.ts index b0d90110..659d10f3 100644 --- a/tests/Generator/Client/resource/typescript_test/TestObject.ts +++ b/tests/Generator/Client/resource/typescript_test/TestObject.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class TestObject { +export interface TestObject { id?: number name?: string } diff --git a/tests/Generator/Client/resource/typescript_test/TestRequest.ts b/tests/Generator/Client/resource/typescript_test/TestRequest.ts index daea58e8..7c38e0c0 100644 --- a/tests/Generator/Client/resource/typescript_test/TestRequest.ts +++ b/tests/Generator/Client/resource/typescript_test/TestRequest.ts @@ -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 diff --git a/tests/Generator/Client/resource/typescript_test/TestResponse.ts b/tests/Generator/Client/resource/typescript_test/TestResponse.ts index 0a771954..f560e249 100644 --- a/tests/Generator/Client/resource/typescript_test/TestResponse.ts +++ b/tests/Generator/Client/resource/typescript_test/TestResponse.ts @@ -5,7 +5,7 @@ import {TestMapScalar} from "./TestMapScalar"; import {TestRequest} from "./TestRequest"; -export class TestResponse { +export interface TestResponse { args?: TestMapScalar data?: string files?: TestMapScalar diff --git a/tests/Generator/Markup/resource/client.md b/tests/Generator/Markup/resource/client.md index bc01d9d6..d6cd4ede 100644 --- a/tests/Generator/Markup/resource/client.md +++ b/tests/Generator/Markup/resource/client.md @@ -6,44 +6,44 @@ client.delete(name: string, type: string): void client.patch(name: string, type: string, payload: Array): Array throws EntryMessage, Array -export class EntryCollection { +interface EntryCollection { entry?: Array } -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 diff --git a/tests/Generator/Markup/resource/client_collection.md b/tests/Generator/Markup/resource/client_collection.md index 070c62ed..ccb2cb8d 100644 --- a/tests/Generator/Markup/resource/client_collection.md +++ b/tests/Generator/Markup/resource/client_collection.md @@ -7,23 +7,23 @@ client.bar().find(foo: string): EntryCollection client.bar().put(payload: EntryCreate): EntryMessage -export class EntryCollection { +interface EntryCollection { entry?: Array } -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 diff --git a/tests/Generator/Server/resource/typescript/src/dto/Entry.ts b/tests/Generator/Server/resource/typescript/src/dto/Entry.ts index 9cd75dff..b50aaa0c 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/Entry.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/Entry.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class Entry { +export interface Entry { id?: number userId?: number title?: string diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryCollection.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryCollection.ts index b7893c58..1f8e50b2 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryCollection.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryCollection.ts @@ -4,6 +4,6 @@ */ import {Entry} from "./Entry"; -export class EntryCollection { +export interface EntryCollection { entry?: Array } diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryCreate.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryCreate.ts index ba35a582..a74a58c8 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryCreate.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryCreate.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryCreate { +export interface EntryCreate { id?: number userId?: number title?: string diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryDelete.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryDelete.ts index 2b482038..6094cb69 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryDelete.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryDelete.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryDelete { +export interface EntryDelete { id?: number userId?: number title?: string diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryMessage.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryMessage.ts index eecb5a7f..3c733c2b 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryMessage.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryMessage.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryMessage { +export interface EntryMessage { success?: boolean message?: string } diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryPatch.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryPatch.ts index 8be65514..ff4e1528 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryPatch.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryPatch.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryPatch { +export interface EntryPatch { id?: number userId?: number title?: string diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryUpdate.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryUpdate.ts index 92b88932..5c68b7e2 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryUpdate.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryUpdate.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryUpdate { +export interface EntryUpdate { id?: number userId?: number title?: string diff --git a/tests/Generator/Server/resource/typescript_complex/src/dto/Entry.ts b/tests/Generator/Server/resource/typescript_complex/src/dto/Entry.ts index 9cd75dff..b50aaa0c 100644 --- a/tests/Generator/Server/resource/typescript_complex/src/dto/Entry.ts +++ b/tests/Generator/Server/resource/typescript_complex/src/dto/Entry.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class Entry { +export interface Entry { id?: number userId?: number title?: string diff --git a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCollection.ts b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCollection.ts index b7893c58..1f8e50b2 100644 --- a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCollection.ts +++ b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCollection.ts @@ -4,6 +4,6 @@ */ import {Entry} from "./Entry"; -export class EntryCollection { +export interface EntryCollection { entry?: Array } diff --git a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCreate.ts b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCreate.ts index ba35a582..a74a58c8 100644 --- a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCreate.ts +++ b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCreate.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryCreate { +export interface EntryCreate { id?: number userId?: number title?: string diff --git a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryMessage.ts b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryMessage.ts index eecb5a7f..3c733c2b 100644 --- a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryMessage.ts +++ b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryMessage.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export class EntryMessage { +export interface EntryMessage { success?: boolean message?: string }