Skip to content
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

Serdes Does Not Work for Items in Request Parameters in Array #873

Open
j-bellavista-flexidao opened this issue Nov 9, 2023 · 1 comment

Comments

@j-bellavista-flexidao
Copy link

Describe the bug
Serialization and deserialization seem to not be doing anything for request parameters that are inside an array. While individual string parameters with a custom formats work correctly, arrays containing strings with a custom format do not.

Actual behavior
For the array parameter, the strings within it are not being serialized or deserialized according to the custom format format specified in the schema.

Expected behavior
The expected behavior is that both individual string parameters and arrays of strings with a custom format should be serialized and deserialized correctly, following the custom format rules defined in the schema.

Examples and context
This example works:

parameters:
  - name: time
    in: query
    required: true
    schema:
        type: string
        format: custom-date

This one doesn't:

parameters:
  - name: times
    in: query
    required: true
    explode: false
    schema:
        type: array
        items:
            type: string
            format: custom-date
@j-bellavista-flexidao
Copy link
Author

It looks like this bug is similar to what was reported in issue #699. I checked out the fix that went in with PR #704 and thought it would cover this, but I'm still seeing the problem. I'm not super familiar with the codebase, but when I peeked at schema.preprocessor.ts, it struck me that the function doesn't seem to extract params from arrays. Maybe that’s the culprit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant