-
Notifications
You must be signed in to change notification settings - Fork 45
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
Removing the body
from possible values of the in
Attribute in ParameterObject
#281
Comments
@leidenheit thanks for raising. Unfortunately we missed removing As you'll see in the Parameter Object description, it's mentioned that there are only 4 possible values for the The expectation is that a body would be supplied using the Request Body Object which is leverage as by a Steps |
The Arazzo Specification 1.0.0 allows
body
as a valid value for thein
attribute in ParameterObject. However, this usage is inconsistent with modern API design practices and specifications such as OpenAPI, where the request body is handled separately from parameters. This proposal suggests removingbody
as an allowable value forin
in theParameterObject
.Current State
The
in
attribute of theParameterObject
allows several values, includingquery
,header
,path
,cookie
, andbody
.Problem
Allowing
body
as a value forin
duplicates the responsibility of specifying a request body, which is already handled via the requestBody object.OpenAPI Specification 3.x and beyond do not support
body
as part of the parameter location (in
). Instead, all request body content is managed viarequestBody
.Mixing parameters and request body definitions can lead to confusion in tooling, validation, and developer understanding.
Proposed Solution
body
from the enum ofParameterObject.in
The body value should be removed as a valid option from the
in
attribute in theParameterObject
. The valid values forin
would then be limited to:query
header
path
cookie
requestBody
for all request body contentFor parameters intended to be part of the body, developers should use the
requestBody
property instead of including them in parameters.Modify the definition of
in
in theParameterObject
to reflect this change:Benefits
This change ensures better compatibility and consistency with OpenAPI practices.
Separating body content from parameters makes workflows easier to understand and maintain.
The text was updated successfully, but these errors were encountered: