build(server): the response-contract exempt marker only excuses a handler that writes through @Res()

A response-contract-exempt comment counted any handler as covered, whatever it returned, so one comment line let a JSON handler past the ratchet. The marker now counts only on a handler taking @Res() or @Next(). The five vacay holiday proxies return the provider's JSON, so they lose their markers and are counted again until they declare a schema.
This commit is contained in:
Maurice
2026-10-10 19:54:20 +02:00
parent 8187a423e2
commit ef68c62d80
5 changed files with 41 additions and 10 deletions
+5 -5
View File
@@ -360,28 +360,28 @@ export class VacayController {
return { success: true };
}
// response-contract-exempt: passes the holiday provider's answer through as it came; its shape is the provider's.
// No contract yet: passes the holiday provider's answer through as it came, so its shape is the provider's.
@Get('holidays/countries')
async holidayCountries() {
const result = await this.vacay.getCountries();
return result.data;
}
// response-contract-exempt: passes the holiday provider's answer through as it came; its shape is the provider's.
// No contract yet: passes the holiday provider's answer through as it came, so its shape is the provider's.
@Get('holidays/:year/:country')
async holidays(@Param('year') year: string, @Param('country') country: string) {
const result = await this.vacay.getHolidays(year, country);
return result.data;
}
// response-contract-exempt: passes the holiday provider's answer through as it came; its shape is the provider's.
// No contract yet: passes the holiday provider's answer through as it came, so its shape is the provider's.
@Get('school-holidays/regions/:country')
async schoolHolidayRegions(@Param('country') country: string) {
const result = await this.vacay.getSchoolHolidayRegions(country, country.toUpperCase() === 'DE' ? 'DE' : 'EN');
return result.data;
}
// response-contract-exempt: passes the holiday provider's answer through as it came; its shape is the provider's.
// No contract yet: passes the holiday provider's answer through as it came, so its shape is the provider's.
@Get('school-holidays/:year/:country')
async schoolHolidaysForCountry(
@Param('year') year: string,
@@ -391,7 +391,7 @@ export class VacayController {
return this.schoolHolidays(year, country, undefined, group);
}
// response-contract-exempt: passes the holiday provider's answer through as it came; its shape is the provider's.
// No contract yet: passes the holiday provider's answer through as it came, so its shape is the provider's.
@Get('school-holidays/:year/:country/:subdivision')
async schoolHolidaysForSubdivision(
@Param('year') year: string,