Closed jmini closed 4 years ago
+1
Thoughts on adding an associated accessor/getter?
Thoughts on adding an associated accessor/getter?
We already have following methods on PathItem
:
getGET()
getPOST()
getPUT()
getDELETE()
So getOperation(HttpMethod.GET)
would be the same as getGET()
and so on?
As explained in #432, the goal of the proposed PathItem#setOperation(HttpMethod, Operation)
in this PR is to be a contra-part of PathItem#getOperations()
(when you iterate over the entries of this map).
@jmini - I see your point. I was thinking that the Map
returned by getOperations
might be mutable (the JavaDoc is silent about its mutability, unlike other Map
s in the API).
Any opinion if this can be merged for 2.0
?
I am not opposed to including this with 2.0
.
Fixes #432