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

Added support for response code based multi example matching. #797

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

VShingala
Copy link
Member

@VShingala VShingala commented Jul 4, 2024

Overview

Certain tooling like NSwag generates examples for separate response code differently. i.e. Request body contains examples field with multiple response code values as keys and actual example as value. Meanwhile, relative responses will simply define example as actual example value.

Here's example definition generated by NSwag.

Since Our existing support (#792) only supports example matching based on examples key-matching, such definitions created collections with multiple examples that users might not find useful.

This PR adds support for collection generation from such definition to have response code based examples matching. More details is mentioned in code. And related tests has also been added.

Copy link

@theonly1me theonly1me left a comment

Choose a reason for hiding this comment

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

LGTM

@VShingala VShingala merged commit 0427866 into develop Jul 8, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants