-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify resolving implicit connections (3.1.1) #3823
Conversation
This clarifies how to handle resolving implicit (non-URI-based) connections in multi-document OpenAPI Descriptions. While the behavior is implementation-defined overall, two approaches are RECOMMENDED for tool developers and OAD authors: one that is best suited for sharing components among OADs, and one that is compatible with pre-3.1 parsing approaches and is convenient for breaking a monolithic document up purely for author convenience. Note that the term "complete OpenAPI document" has been defined in another change pending approval on the 3.0.4 branch.
Some of what this said about the Discriminator Object is better handled in that Object's section, which is being revised in another PR.
Some servers/discriminator text that should have been removed in the previous commit was accidentally left in. Several non-essential recommendations have been removed.
If we want to do this sort of thing it is probably best discussed separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more explanation
Also fix an incorrect section anchor.
@ralfhandl I've updated the text in several places (it's a separate commit so you can look at the individual diff) - please let me know if that makes things more clear. I appreciate your attention to detail here, because if the text confuses anyone on the TSC it will definitely confuse other readers who have much less context! |
Co-authored-by: Ralf Handl <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good clarification!
Every time I try to reference this section in another PR I type "implicit" instead of "indirect" so let's just go with that. Let's also treat `operationId` uniformly, because it fits better with how we parse documents, and the only thing this changes is in the only-the-entry-document-has-an-OpenAPI-object case, where it incorporates Path Item Objects in the entry document that are otherwise un-referenced. It seems likely that one would only include Path Item Objects in the entry document's components if one expected them to be used.
@ralfhandl I made some other minor updates, again as a separate commit. |
Co-authored-by: Ralf Handl <[email protected]>
These were left out but have the same problems as Security Requirements.
I've converted this back to a draft because I realized I forgot tags, added them in the most recent commit, and then rethought the whole thing to have a single approach rather than two different ways to organize things. Here is the alternative PR: |
I prefer the alternative proposal in #3856. |
@handrews , @ralfhandl The language in #3856 is less confusing AFAIK (As a spec author (and trying to take a pragmatic approach)). |
Alternative: Clarify resolving implicit connections (3.1.1- alternative to #3823)
Closing as we accepted #3856 instead 🎉 |
NOTE: See PR #3856 for an alternative approach that may be simpler.
Fixes:
This clarifies how to handle resolving implicit (non-URI-based) connections in multi-document OpenAPI Descriptions.
While the behavior is implementation-defined overall, two approaches are RECOMMENDED for tool developers and OAD authors: one that is best suited for sharing components among OADs, and one that is compatible with pre-3.1 parsing approaches and is convenient for breaking a monolithic document up purely for author convenience.
Note that the term "complete OpenAPI document" has been defined in another change (PR #3820) pending approval on the 3.0.4 branch. Also, some relevant Discriminator Object guidance around
mapping
with relative URI references is being added in #3822, also pending for 3.0.4.Tthis will get backported to 3.0.4, but without the full-document part; the backport will be easy once we've agreed on the 3.1 approach.
Reviewer Questions
operationId
could resolve either from all Operation Objects in all documents in the OAD, or only from those reachable via the entry document'spaths
orwebhooks
fieldspaths
orwebhooks
" approach might make sense, the only thing this changes is if a Path Item Object in Components has an Operation Object with anoperationId
targetd by a Link Object, but that Path Item Obejct is not part ofpaths
; it seems unlikely that the intent would be to exclude that Path Item Object and its Operation Objects as they are in the entry document