Skip to content

Commit 1fe68e3

Browse files
committed
docs: improve api documentation
1 parent 026d935 commit 1fe68e3

2 files changed

Lines changed: 8 additions & 13 deletions

File tree

backend/src/common/decorators/swagger-api.decorator.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const userResponseExample = {
103103
username: 'joao',
104104
created_at: '2025-01-01T00:00:00.000Z',
105105
updated_at: '2025-01-01T00:00:00.000Z',
106-
deleted_at: null,
106+
collaborator: null,
107107
} as const;
108108

109109
export const collaboratorResponseExample = {
@@ -112,7 +112,6 @@ export const collaboratorResponseExample = {
112112
user_id: 'user-123',
113113
created_at: '2025-01-01T00:00:00.000Z',
114114
updated_at: '2025-01-01T00:00:00.000Z',
115-
deleted_at: null,
116115
user: userResponseExample,
117116
} as const;
118117

@@ -121,7 +120,6 @@ export const projectResponseExample = {
121120
name: 'Projeto XPTO',
122121
created_at: '2025-01-01T00:00:00.000Z',
123122
updated_at: '2025-01-01T00:00:00.000Z',
124-
deleted_at: null,
125123
tasks: [],
126124
} as const;
127125

@@ -132,7 +130,6 @@ export const taskResponseExample = {
132130
project_id: 'proj-123',
133131
created_at: '2025-01-01T00:00:00.000Z',
134132
updated_at: '2025-01-01T00:00:00.000Z',
135-
deleted_at: null,
136133
project: {
137134
id: 'proj-123',
138135
name: 'Projeto XPTO',
@@ -148,13 +145,6 @@ export const timeTrackerResponseExample = {
148145
collaborator_id: 'collab-123',
149146
created_at: '2025-01-01T00:00:00.000Z',
150147
updated_at: '2025-01-01T00:00:00.000Z',
151-
deleted_at: null,
152-
tasks: {
153-
id: 'task-123',
154-
name: 'Implementar autenticação',
155-
},
156-
collaborators: {
157-
id: 'collab-123',
158-
name: 'Maria Silva',
159-
},
148+
tasks: taskResponseExample,
149+
collaborators: collaboratorResponseExample,
160150
} as const;

backend/src/modules/time-trackers/dtos/create-time-tracker.dto.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ export class CreateTimeTrackerDto {
2323
@Type(() => Date)
2424
end_date: Date;
2525

26+
@ApiPropertyOptional({
27+
description: 'ID da TimeZone',
28+
example: 'America/Sao_Paulo',
29+
type: String,
30+
})
2631
@Exclude()
2732
timezone_id: string;
2833

0 commit comments

Comments
 (0)