ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

[Ballerina to OpenAPI] Support REGEX Patterns which Include `$` Literal Character in String Constraints #5048

Open SachinAkash01 opened 1 year ago

SachinAkash01 commented 1 year ago

Description: In Ballerina, when adding REGEX patterns for String constraints, there is a bug that causes a compilation error when using a valid REGEX pattern \${1,2} like this. So when mapping Ballerina constraints to OpenAPI specification, we consider all the patterns which has ${ in them as invalid patterns or patterns which might contain interpolation in them.

When the related issue is fixed, it will be required to improve the Ballerina to OpenAPI tool only to check interpolations in the REGEX patterns and not to check all the characters with ${.

Related Issues: #41492

See Also: 1546#discussion_r1361705294

SasinduDilshara commented 1 year ago

The similar issue is happening to the ${2} situation as well.