It is possible to define a body parameter in Path Item Object in 2.0. Is this behavior deprecated in 3.0 ? ( since we can only define Parameter Object at PathItem.parameters in 3.0, but we don't have a PathItem.requestBody field )
Correct. You will need to define a reusable requestBody in the components section and $ref it to get an similar experience.
A bit of rationale for not having a requestBody defined on path item level.
Inside a path item, there can be several operation objects for different HTTP methods.
So there is normally no point in defining a shared requestBody for different methods. (As @darrelmiller said, if you have usecases where it happens, you can define it in components and then refer to it from the operations, with just two lines of overhead for each operation.)
Thanks for sharing design insight. I'm a tool developer and I'm trying to figure out what's supported in 2.0 (although not a reasonable use case) now might be deprecated in 3.0.
Most helpful comment
A bit of rationale for not having a requestBody defined on path item level.
Inside a path item, there can be several operation objects for different HTTP methods.
So there is normally no point in defining a shared requestBody for different methods. (As @darrelmiller said, if you have usecases where it happens, you can define it in components and then refer to it from the operations, with just two lines of overhead for each operation.)