eclipse / microprofile-open-api

Microprofile open api
Apache License 2.0
132 stars 82 forks source link

Add PathItem#setOperation(HttpMethod, Operation) #433

Closed jmini closed 4 years ago

jmini commented 4 years ago

Fixes #432

MikeEdgar commented 4 years ago

+1

Thoughts on adding an associated accessor/getter?

jmini commented 4 years ago

Thoughts on adding an associated accessor/getter?

We already have following methods on PathItem:

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).

MikeEdgar commented 4 years ago

@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 Maps in the API).

jmini commented 4 years ago

Any opinion if this can be merged for 2.0 ?

MikeEdgar commented 4 years ago

I am not opposed to including this with 2.0.