elysiajs / elysia-swagger

A plugin for Elysia to auto-generate Swagger page
MIT License
90 stars 46 forks source link

Schemas defined in model will only output as `string` after version 1.1.4 #155

Closed Huliiiiii closed 1 week ago

Huliiiiii commented 1 month ago

1.1.4

image

1.1.3

image

code


model({
  "auth::sign_up": t.Object({
    username: t.RegExp(/^(?!.*[\p{C}\p{Z}])[\p{L}\p{N}\p{S}_]{1,16}$/u),
    password: t.String({ minLength: 8, maxLength: 64 }),
  })
})

// 

{
  body: "auth::sign_up",
},