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

Add support for request body path parameters in v2 #922

Merged
merged 7 commits into from
Jul 4, 2022
Merged

Conversation

darrelmiller
Copy link
Member

@darrelmiller darrelmiller commented Jul 4, 2022

see #885

  • Added support for reading parameters "in: body"
  • Added support for reading parameters "in: formdata"

@darrelmiller
Copy link
Member Author

I decided not to implement writing re-used request bodies as path parameters in V2 for the following reasons:

  • The behaviour would be inconsistent between re-used request bodies and reused parameters
  • OpenAPI v3 doesn't support setting the requestBody at the path level and therefore it is a best practice to not use this in V2.
  • An OpenAPI that was read that had identical request bodies across operations would not promote to path parameters, which would lead to inconsistent behaviour depending on how the DOM is constructed.

This means that the way it is currently implemented, we can successfully read request bodies as Path Parameters from V2 documents but they will be converted into operation parameters during the read.

@darrelmiller darrelmiller marked this pull request as ready for review July 4, 2022 17:49
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

  • changelog entry in the CSproj

@darrelmiller
Copy link
Member Author

  • changelog entry in the CSproj

I would rather use the release notes in the CSProj to point to the release notes on GitHub than worry about updating this file with a description of every change.

@baywet
Copy link
Member

baywet commented Jul 4, 2022

  • changelog entry in the CSproj

I would rather use the release notes in the CSProj to point to the release notes on GitHub than worry about updating this file with a description of every change.

Then may I suggest to log a new issue and have somebody on the team take care of that?

@darrelmiller
Copy link
Member Author

  • changelog entry in the CSproj

I would rather use the release notes in the CSProj to point to the release notes on GitHub than worry about updating this file with a description of every change.

Then may I suggest to log a new issue and have somebody on the team take care of that?

Done #923

@darrelmiller darrelmiller merged commit 05b9baf into vnext Jul 4, 2022
@darrelmiller darrelmiller deleted the issues/885 branch July 4, 2022 19:58
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.

3 participants