OpenAPI.NET icon indicating copy to clipboard operation
OpenAPI.NET copied to clipboard

Make PathItem a referenceable object

Open darrelmiller opened this issue 8 years ago • 5 comments

Path items can be referenced but they are a special case for a couple of reasons.
a) they don't have a home in components b) the reference doesn't work like a normal JSON reference because peer properties in the target path item are not ignored, they are merged.

darrelmiller avatar Dec 05 '17 19:12 darrelmiller

Could you remind me where PathItem is referenced? Are we talking about the PathItem in the Callback object?

PerthCharern avatar Dec 06 '17 17:12 PerthCharern

@PerthCharern It is the first fixed field in a PathItem object https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#pathItemObject

darrelmiller avatar Dec 11 '17 14:12 darrelmiller

What do you think about the Operation object? Potentially, it can also be a referenceable object?

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#linkObject

The link object can refer to the Operation by its id.

PerthCharern avatar Dec 13 '17 00:12 PerthCharern

And yes, PathItem should also be handled.

PerthCharern avatar Dec 13 '17 00:12 PerthCharern

@PerthCharern That's an interesting thought. It certainly would help to prevent breakage when people rename Ids. Although we would need to decide what to do about the OperationRef vs OperationId situation. It also adds to my questions about what does it mean if you edit an instance that is an external reference.

darrelmiller avatar Dec 13 '17 15:12 darrelmiller