asyncapi-react icon indicating copy to clipboard operation
asyncapi-react copied to clipboard

Regular expressions in pattern fields are not evaluated correctly

Open febus982 opened this issue 1 year ago • 8 comments

Description

Unicode characters supported by the /u regex flag are not parsed correctly (i.e. \u{6FFFE})

Additional context: I am implementing a solution that uses CloudEvents message format. The CloudEvent spec defines a specific set of allowed characters. One of the rules is excluding unicode non-characters.

I am using Faststream + Pydantic models, this means the Rust regex implementation is used to evaluate the regex (which doesn't support backtracking). The only way to have a validation regex which is both compatible with Rust and the ECMA format is to specify such characters with this format \u{6FFFE}.

The attached file is a valid spec, except for the fact that the validation of the examples fails due to such characters not being validated.

Expected result

Regex containing unicode characters to be evaluated correctly (or a way to disable validation on examples perhaps?)

Actual result

Validation stops the rendering

Steps to reproduce

Render this file (i.e. in https://studio.asyncapi.com/) asyncapi.json

Troubleshooting

febus982 avatar Oct 06 '24 18:10 febus982

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

github-actions[bot] avatar Oct 06 '24 18:10 github-actions[bot]

Hey can you assign me this issue , also I'm a new contributor so would be great if you can help me figure out things about the codebase and show how the things around here works

atharvagarwal avatar Nov 07 '24 07:11 atharvagarwal

@atharvagarwal Thanks for showing interest in this! Issues aren’t typically assigned here, so feel free to directly open a PR to fix the problem.

It looks like this issue is actually related to asyncapi/parser-js. You might want to check that repository for a potential fix.

catosaurusrex2003 avatar Nov 07 '24 08:11 catosaurusrex2003

I would like to work on this issue.

Jaishree2310 avatar Jan 04 '25 06:01 Jaishree2310

Feel free to open a PR, if you have a fix

AceTheCreator avatar Mar 09 '25 12:03 AceTheCreator

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jul 08 '25 00:07 github-actions[bot]

@atharvagarwal / @Jaishree2310 Is any of you working on this issue?

febus982 avatar Jul 09 '25 10:07 febus982

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Nov 08 '25 00:11 github-actions[bot]

@fmvilas Please assign this issue to me. I'm interested in fixing this issue. Thank you!

Aditya-twd avatar Dec 16 '25 20:12 Aditya-twd