-
Notifications
You must be signed in to change notification settings - Fork 73
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
External links in the openAPI output #2748
Comments
Agreeing to 1. Regarding 2., let's continue discussing this in #2758 (comment) where we proposed a way to embed different kind of links in the Markdown text. |
I've created #2925 for the first step, so that the unhelpful links aren't included in the OpenAPI output. I still think there's value to having something equivalent to @doc_id (the URLs would ideally be pulled from the same table.csv) but specific to the API docs purposes rather than the client purposes. |
I've created #3028 to implement a separate |
🚀 Feature Proposal
IMO we need to potentially change the handing of the
docId
anddocURL
in the OpenAPI generator (or split off a separate modifier for API docs purposes and leave the others for client purposes).Motivation
There are currently
docUrl
anddocId
properties in the specification, which in the OpenAPI output are included as externalDocs. However, per the comments in#714, those properties are used by the clients to link to the documentation and so don't serve the need to link from the documentation to some other site. From a docs point of view, it's essentially a circular, self-referential link.
My proposal is therefore:
docURL
anddocID
values in the OpenAPI output, since they're used for client-specific purposes and those purposes don't align with documentation needs.externalDocs
or some such property to the specifications to enable us to explicitly add external links to the openAPI output.Or, if the clients do not use those
docURL
anddocID
values, the solution might be to just stop filling them in automatically (presumably from the rest spec files). Then they could be set explicitly to a useful value when needed.NOTE: Bump.sh, which we use to publish our API documentation, currently doesn't support
externalDocs
, so that is being pursued as an enhancement request.Example
I didn't see any examples where the
docId
ordocURL
were explicitly added to the specs, but I see them in the output/schema, for example:... which then generates the following OpenAPI output:
It seems to me the proposed new property could be implemented the same way (except with the optional inclusion of a description) and ultimately output in the OpenAPI document like this:
The text was updated successfully, but these errors were encountered: