Finally getting back to this.
I made some changes to our code to use SmallRye OpenAPI 2.0.8 to make sure I've got the latest and greatest.
I'm seeing the same problematic behavior with the same example code.
Stepping through the code, I see `@PathParam` processed first (not that it should matter), then the argument-level `@Parameter` annotation.
As the code processes the `@Parameter` annotation, `ParameterProcessor#getParameterContext` tries to find the pre-existing context for the parameter. To me there seemsto be one — with key `name: name, in: path` but the key passed to `getParameterContext` associated with the `@Parameter` annotation is `name: name, in: null`. That's OK on the surface, I think, but the code does not find the pre-existing context using any of the three attempts:
- in the map directly (this seems expected),
- using `haveSameAnnotatedTarget` in 1205:1211 (to me, this is a surprise), or
- the "last chance" check at the end of the method.
I'm guessing that the intent was that `haveSameAnnotatedTarget` would return `true` for this case, given that the pre-existing context entry created from the `@PathParam` and the context being created for the parameter-level `@Parameter` annotation would (to me, at least) have the same target.
I did not see that `MethodParameterInfo` implements `equals`, so it would inherit the implementation from `Object` which does a simple `==` comparison of the two object references. And, indeed, the code is comparing two different instances of `MethodParameterInfo` although they look to me to be referring to the same target.
If `haveSameAnnotatedTarget` returned `true` here, then I think the rest of the code would combine the information from the two annotations. As it is, I see two contexts in the processor's `params` collection where I'd expect to see a single, combined context for the parameter.
But maybe there's more to it that I'm missing.
I can't explain why you and I are getting different results unless maybe the order in which the `@PathParam` and `@Parameter` annotations are dealt with
does matter and for some reason our test runs process them in different orders.
Maybe if `MethodParameterInfo` overrode `equals` the order wouldn't matter (if in fact that's the problem). Maybe it should implement `equals` anyway?
If there's anything else I can try from here, please let me know. For the moment I'm not sure what I might be doing to cause the problem.
Thanks.