Apicurio / apicurio-registry

An API/Schema registry - stores APIs and Schemas.
https://www.apicur.io/registry/
Apache License 2.0
587 stars 260 forks source link

Enable documentation tab for GraphQL and Avro #3115

Open ben5448 opened 1 year ago

ben5448 commented 1 year ago

Feature or Problem Description

Enable a documentation tab for all types of APIs. When an OpenAPI API is registered, the external_docs information block is examined and a documentation tab is added that displays the external content. When another API is registered, the documentation tab is not displayed and there doesn't appear to be an API to add it.

Proposed Solution

Most users have documentation about their APIs already created somewhere (Confluence, Sharepoint) that would add value to their Apicurio repository by clarifying the design and intended use of that API. The documentation that is displayed by default for OpenAPI APIs provides a great example of the value that could be provided for other types of APIs.

Additional Context

EricWittmann commented 1 year ago

Thanks for the feature request. We discussed this today and it's an intriguing idea. One idea we had was that users could optionally add a documentation URL as metadata to the artifact version. If that URL exists, then we could render it as a tab in the UI. There is potentially an attack vector that we need to consider. But I think if the documentation URL pointed to some Markdown, we could render it reasonably safely in the UI.

Is that the sort of approach that you think would make sense and add value @ben5448 ?

ben5448 commented 1 year ago

I think that would add a lot of value. Right now it feels like Apicurio is focused on just OpenAPI. This would make other APIs much closer in functionality.

EricWittmann commented 1 year ago

If we do this, I think it makes sense to rename the existing Documentation tab to API Documentation - then IF the documentation-url metadata is found on the version, we can render a new Documentation tab with the rendered markdown.

@Apicurio/developers thoughts?

forsberg commented 1 year ago

Perhaps a different feature, but I would like Avro schemas to be rendered under the Documentation tab as an expandable table with field name, type, default (if any) and the doc field.