ts-class-to-openapi 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ export declare class Address {
2
+ street: string;
3
+ city: string;
4
+ country: string;
5
+ }
@@ -0,0 +1,7 @@
1
+ export declare class ArrayEntity {
2
+ basicArray: string[];
3
+ requiredArray: string[];
4
+ minSizeArray: string[];
5
+ maxSizeArray: string[];
6
+ boundedArray: string[];
7
+ }
@@ -0,0 +1,7 @@
1
+ export declare class BrokenEntity {
2
+ name: string;
3
+ parent?: BrokenEntity;
4
+ items?: any[];
5
+ undecoratedProperty?: string;
6
+ complexType?: Map<string, Set<number>>;
7
+ }
@@ -0,0 +1,16 @@
1
+ import { Address } from './address.entity.js';
2
+ export declare class CompleteEntity {
3
+ id: number;
4
+ name: string;
5
+ email: string;
6
+ active: boolean;
7
+ createdAt: Date;
8
+ price: number;
9
+ code: string;
10
+ shortCode: string;
11
+ tags: string[];
12
+ emails: string[];
13
+ numbers: number[];
14
+ address: Address;
15
+ profile: Partial<CompleteEntity>;
16
+ }
@@ -0,0 +1,11 @@
1
+ export declare class BaseDto<T> {
2
+ data: T;
3
+ }
4
+ export declare class UserData {
5
+ name: string;
6
+ id: number;
7
+ }
8
+ export declare class GenericEntity {
9
+ user: BaseDto<UserData>;
10
+ description: string;
11
+ }
@@ -0,0 +1,11 @@
1
+ export declare class OptionalPropertiesUser {
2
+ name: string;
3
+ nickname?: string;
4
+ email: string;
5
+ middleName?: string;
6
+ age: number;
7
+ score?: number;
8
+ requiredButOptionalSyntax?: string;
9
+ bio?: string;
10
+ username: string;
11
+ }
@@ -0,0 +1,19 @@
1
+ export declare class PlainUser {
2
+ id: number;
3
+ name: string;
4
+ email: string;
5
+ age: number;
6
+ isActive: boolean;
7
+ tags: string[];
8
+ createdAt: Date;
9
+ profile: UserProfile;
10
+ }
11
+ export declare class UserProfile {
12
+ bio: string;
13
+ avatar: string;
14
+ socialMedia: SocialMedia;
15
+ }
16
+ export declare class SocialMedia {
17
+ twitter: string;
18
+ github: string;
19
+ }
@@ -0,0 +1,5 @@
1
+ export declare class SimpleUser {
2
+ name: string;
3
+ email: string;
4
+ age: number;
5
+ }
@@ -0,0 +1,8 @@
1
+ declare class UploadFile {
2
+ }
3
+ export declare class DocumentUpload {
4
+ document: UploadFile;
5
+ attachments: UploadFile[];
6
+ avatar: UploadFile;
7
+ }
8
+ export {};
@@ -0,0 +1,4 @@
1
+ import './main.test';
2
+ import './integration.test';
3
+ import './plain.test';
4
+ import './optional-properties.test';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare class UserData {
2
+ email: string;
3
+ score: number;
4
+ status: string;
5
+ }
@@ -0,0 +1,11 @@
1
+ export declare class BaseDto<T> {
2
+ data: T;
3
+ }
4
+ export declare class UserData {
5
+ name: string;
6
+ id: number;
7
+ }
8
+ export declare class GenericEntity {
9
+ user: BaseDto<UserData>;
10
+ description: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ import { transform } from './transformer';
2
+ export { transform };