Skip to content
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

feat: Add documentation to schema #237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

duncanbeevers
Copy link

@duncanbeevers duncanbeevers commented Jul 8, 2023

👑 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.

  • Scan documentation markdown for sections corresponding to the entries in the OpenAPI schema's definitions
  • Add description fields for schema definitions from scanned documentation
  • Add description fields the properties of simple definitions
Screen.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.

@CLAassistant
Copy link

CLAassistant commented Jul 8, 2023

CLA assistant check
All committers have signed the CLA.

@ak1394
Copy link
Collaborator

ak1394 commented Jul 17, 2023

Thanks for the PR, it's very much appreciated! I'll update the PR once we reviewed it.

@duncanbeevers
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants