-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPEN API web validation with query parameter using string Enum fails with exception #1875
Comments
Can you try to create a full reproducer? |
The issue can be reproduced with attached test. io.vertx.json.schema.NoSyncValidationException: Trying to execute validateSync() for a Validator in asynchronous state |
@pantinor the test you provided is passing to me 😄 Let me try to play around it |
Ahhhhh i see now. This might be already solved with #1816. Can you try to use 4.0.3-SNAPSHOT in your project to check if you see the problem? |
Sorry I don't have 4.,0.3 snapshot. Can you try it on your end? |
Yes that issue you referenced indeed looks like it will address the issue. I would say close this ticket if it works now with 4.0.3! |
Cool! Reopen if you need it |
Questions
Do not use this issue tracker to ask questions, instead use one of these channels. Questions will likely be closed without notice.
Version
4.0.2
Context
Observing a web validation parameter YAML parsing issue when using an ENUM with a query param like below.
Web validation fails on the request.
Debugging down into it seems to stop at the validator.getDefault line 43 ParameterProcessorImpl.
I tried removing the Reference and putting the enum inline into the parameter with a default value, but still the same 500 error is thrown.
Expectation is that a string enum may be used with a open api based query parameter without encountering a 500 rejection or NoSyncValidationException.
in: query
required: false
schema:
$ref: '#/components/schemas/MatchingAlgorithm'
MatchingAlgorithm:
type: string
enum:
- BEST
- EXACT
- STARTS_WITH
throw new NoSyncValidationException("Trying to execute validateSync() for a Validator in asynchronous state", this);
Do you have a reproducer?
If we think there is a bug to fix and it is not user error, I can make a reproducer. Currently can only reproduce in in house tests.
Steps to reproduce
Extra
The text was updated successfully, but these errors were encountered: