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

Fix param examples incorrectly made into arrays #1465

Closed
wants to merge 1 commit into from

Conversation

pablo-redradix
Copy link

fixes #1464

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you written unit tests?
  • Have you written unit tests that cover the negative cases (i.e.: if bad data is submitted, does the library respond properly)?
  • This PR is associated with an existing issue?

Potential Problems With The Approach

It would be better to allow for multiple examples in methods having @BodyProp parameters, but the current solution to toss multiple examples into an array does not work as expected (it assumes that the example value of the prop is the array itself).

Multiple examples need to be addressed at the schema level rather than the prop level. This exceeds the scope of this bugfix.

Test plan

  • Two test were included to cover the case of multiple examples per @BodyProp. In both cases it is expected that examples after the first are ignored.
  • Two tests were commented out, on account of expecting erroneous behavior

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there pablo-redradix 👋

Thank you and congrats 🎉 for opening your first PR on this project.✨

We will review the following PR soon! 👀

@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Sep 12, 2023
@github-actions github-actions bot closed this Sep 17, 2023
@WoH WoH removed the Stale label Sep 17, 2023
@WoH WoH reopened this Sep 17, 2023
@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Oct 18, 2023
@github-actions github-actions bot closed this Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parameter examples are incorrectly made into single-ement arrays
2 participants