You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
used the search to make sure that a similar issue hasn't already been submit
Expected Behavior
/** * @pattern ^(?!-)[A-Za-z0-9-]+([\-\.]{1}[a-z0-9]+)*\.[A-Za-z]{2,6}$ Should be valid site domain. */exporttypeDomain=string;exporttypeDomainRecord=Record<Domain,string>;interfaceRequestBody{record: DomainRecord;siteDomain: Domain;}
Current Behavior
siteDomain has regex @pattern enforced. record does not.
Possible Solution
Steps to Reproduce
Implement simple controller with above typing
import{Body,Controller,Post,Route,SuccessResponse}from'tsoa';/** * @pattern ^(?!-)[A-Za-z0-9-]+([\-\.]{1}[a-z0-9]+)*\.[A-Za-z]{2,6}$ Should be valid site domain. */typeDomain=string;typeDomainRecord=Record<Domain,string>;interfaceReproBody{record: DomainRecord;siteDomain: Domain;}
@Route('/v0.1/repro')exportclassReproControllerextendsController{
@Post('/')
@SuccessResponse('200')publicasyncreadPage(@Body()requestBody: ReproBody){returnrequestBody;}}
Send REST Client request and confirm validation error is as expected
Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
Current Behavior
siteDomain
has regex@pattern
enforced.record
does not.Possible Solution
Steps to Reproduce
record
as expectedContext (Environment)
Version of the library: 6.2.1
Version of NodeJS: 20.13.0
Detailed Description
Possibly related to #1515, #1531 and #1612
Breaking change?
The text was updated successfully, but these errors were encountered: