feat: Add documentation to schema#237
Open
duncanbeevers wants to merge 1 commit into42Crunch:masterfrom
Open
Conversation
Collaborator
|
Thanks for the PR, it's very much appreciated! I'll update the PR once we reviewed it. |
Author
|
I chatted with the OpenAPI TDC today about the role of documentation in the JSONSchema document. There were no concrete outcomes to this discussion, but the group seemed generally receptive to bringing the Markdown-based Spec document, and the JSONSchema document into closer agreement. Historically, while the Markdown document has remained "frozen", the JSONSchema document derived from that Spec has been free to change to better-match that Spec. This implies that adding inline documentation to the schema should be possible, even for legacy versions of the Spec. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👑 Inline Documentation
This is a stab at what it might be like solving #128 (Inline Documentation)
I only attempted this using a small 3.0.2 schema and the Markdown documentation from OpenAPI-Specification 3.0.0.
The tooltips only match the abstract OpenAPI definition schema, and Markdown is rendered poorly.
definitionsdescriptionfields for schemadefinitionsfrom scanned documentationdescriptionfields the properties of simpledefinitionsScreen.Recording.2023-07-07.at.11.11.38.PM.mov
There are lots of brittle pieces here, and the markdown-in-tooltip is not ideal, but maybe this is a way we can provide a nicer developer experience without needing buy-in from OAI.