-
Notifications
You must be signed in to change notification settings - Fork 9.1k
v3.2: Refactor and streamline OpenAPI Description Structure sections #4918
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
Conversation
* Remove "OpenAPI Description" and "OpenAPI Document" section headings and reorder those paragraphs and the intro "OpenAPI Description Structure" paragraph to define the terms inline * Switch Appendixes F and G * F->G stays as-is, with base URI examples * G->F is expanded to a more general "Parsing and Resolution Guidance" section * Move several pieces of "Parsing Documents" to Appendix G * How to parse complete documents as the intro section * A "Warnings Regarding Fragmentary Parsing" section * Move "Structural Interoperability" under Appendix G and rename it to "Conflicts Between Field Types and Reference Contexts" * Move most of "Resolving Implicit Connections to Appendix G and rename it "Guidance Regarding Implicit Connections" * Put the original Section F implicit connection examples as a "Implicit Connection Resolution Examples" subsection Minimal adjustments were made to links to keep the build functional.
A lot of what was here is no longer needed, and other things can be said better either because of the new arrangement or because I thought of better wording since I first wrote things.
Note that despite my care to not overlap any changes, git
can't understand changes to adjacent lines and wants this to conflict with PR #4915. Please approve and merge that first, and let me fix the conflict because there will not be any changes to these commits.
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.
This is definitely easier to read!
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.
Lowercase "document" seems more in line with the surrounding text which only capitalizes OpenAPI Documents.
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.
@ralfhandl It should be "OpenAPI Documents." Lower-case "document" is not correct (I would prefer not to address non-OpenAPI/JSON Schema Document "documents" at all as I thin it would be less confusing at this point, but I think I already lost that debate),
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.
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.
Looks good. 👍
I left a few minor suggestions which are hopefully uncontroversial but happy to discuss if there is any concern.
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.
The "by having" wording here makes it sound (to me anyway) like this is all that is needed to conform to the OpenAPI spec. How about:
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.
@mikekistler I'm not sure I agree with this rewording, I'll think on it.
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.
Squeeze out extra space.
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.
I have two concerns with this new text:
- I think an OAD may include documents that are not OpenAPI Documents (e.g. JSON Schema documents), and these also need to be parsed in the manner described, so "OpenAPI Document" should just be "document".
- The beginning of this sentence talks about reference targets, but then says "including ..." things that are not reference targets but instead are keywords that affect how reference targets are identified.
Here's a suggested change to address these concerns:
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.
- I'll add "JSON Schema Documents" or similar. Lower-case "document" is too permissive as it allows thing that are neither OpenAPI Documents nor JSON Schema Documents.
- Yeah that line got munged, I'll either accept this suggestion later or (after reading the context) reword it in some other way. I'd like to get away from having too many lists of keywords that we need to keep up-to-date scattered all over.
@mikekistler @ralfhandl I'll wait to act on suggestions until after PR #4913 is merged so I can resolve conflicts.
Please review carefully, as there's more going on here than in the other reorg PRs.
These sections had gotten rather bloated, plus moving them under the OpenAPI Object changes how it all reads. These two commits first move things (with as few changes as possible) and then make significant edits to the results for conciseness and readability. None of the changes are intended to change any actual requirements.
While there are a lot of changes, there are also a lot of unchanged blocks, including the former Appendixes F and G which are now in reversed order and (in one case) a subsection of the new appendix. Here are
git diff --color-moved=dimmed-zebra
diffs which make that a lot more clear (but are not good for detailed reviewing).1st commit message:
headings and reorder those paragraphs and the intro
"OpenAPI Description Structure" paragraph to define the terms inline
2nd commit message:
A lot of what was here is no longer needed, and other things can
be said better either because of the new arrangement or because
I thought of better wording since I first wrote things.