mnahkies / openapi-code-generator

A code generation tool for openapi 3 / 3.1 specifications written in typescript, primarily aimed at generating typescript clients and server stubs. Other target languages may be added in future.
https://openapi-code-generator.nahkies.co.nz/
MIT License
17 stars 2 forks source link

feat: support string validation #145

Closed mnahkies closed 5 months ago

mnahkies commented 5 months ago

adds support for the validation keywords defined for strings in https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#section-6.3

originally I tried to create /RegExp literals/ but this didn't work for the test harness with joi due to https://github.com/nodejs/node/issues/2503#issuecomment-133842814 and a reliance on pattern instanceof RegExp check that joi makes.