Skip to content

Commit 71106d2

Browse files
authored
fix(api): declare columns and binary downloads the document omitted (#941)
Six persisted columns carried @column and class-validator decorators but no @ApiProperty, so they were absent from the document entirely and the generated client could not send or read them: scan organizerId, which the event check-in endpoint requires, so check-in was impossible from a typed client registration shareAddressMlh, shareAddressSponsors, shareEmailMlh finance amount inventory reason The two resume downloads declared StreamableFile as their response type. That is a Nest transport wrapper rather than a response shape, and it leaked into the document as an empty object, so the generated client typed a zip archive as an object with no properties. Both routes already set a Content-Type header; the document now matches, and StreamableFile is gone from components.schemas. GET /users/resumes application/zip GET /users/{id}/resume application/pdf Found by auditing every @column against its @ApiProperty, and by tracing why the sponsor scanner could not build a check-in payload. No runtime change.
1 parent 7d2a5c6 commit 71106d2

13 files changed

Lines changed: 74 additions & 46 deletions

File tree

‎openapi.json‎

Lines changed: 30 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/api-client/src/generated/model/createScanEntity.ts‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/api-client/src/generated/model/createUserScanEntity.ts‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/api-client/src/generated/model/index.ts‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/api-client/src/generated/model/scanEntity.ts‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/api-client/src/generated/model/streamableFile.ts‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎packages/api-client/src/generated/users/users.ts‎

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/entities/finance.entity.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ export class Finance extends Entity {
254254
},
255255
{ each: true },
256256
)
257+
@ApiProperty()
257258
@Column({ type: "number" })
258259
amount: number;
259260

‎src/entities/inventory-movement.entity.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export class InventoryMovement extends Entity {
112112
"repair",
113113
"other",
114114
])
115+
@ApiProperty()
115116
@Column({ type: "string" })
116117
reason:
117118
| "checkout"

‎src/entities/registration.entity.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export class Registration extends Entity {
137137
nullable: true,
138138
default: false,
139139
})
140+
@ApiProperty()
140141
@IsOptional()
141142
@IsBoolean()
142143
@Type(() => Boolean)
@@ -149,6 +150,7 @@ export class Registration extends Entity {
149150
nullable: true,
150151
default: false,
151152
})
153+
@ApiProperty()
152154
@IsOptional()
153155
@IsBoolean()
154156
@Type(() => Boolean)
@@ -161,6 +163,7 @@ export class Registration extends Entity {
161163
nullable: true,
162164
default: false,
163165
})
166+
@ApiProperty()
164167
@IsOptional()
165168
@IsBoolean()
166169
@Type(() => Boolean)

0 commit comments

Comments
 (0)