-
Notifications
You must be signed in to change notification settings - Fork 136
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
(fix): handle allow-mulitple
query parameter validation
#3561
Conversation
rawType = rawType.startsWith("optional") | ||
? `optional<list<${rawType}>>` | ||
: `list<${rawType}>`; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tracking that this is weird
}); | ||
|
||
const expectedViolations: ValidationViolation[] = []; | ||
expect(violations).toEqual(expectedViolations); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the goal was to get this test case to pass which works
"endpoints", | ||
"get", | ||
{ | ||
arrayIndex: 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lines 180-195 are incorrect, ideally the diff should be 0 here
Goal
allow-multiple
query parameters should support list examples.Approach
Validating examples in Fern is pretty complex. So the way I approached this was to validate the query param as a list and as a non-list. If there are no errors in one of the two cases, then
fern check
passes.If there are errors, then we list them for the
non-list
case.