docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
additionalProperties object specified via $ref is rendered with the ref's name in the description
Describe the bug
$ cat Downloads.yaml
type: object
properties:
dnclient:
type: object
properties:
latest:
description: Download links for the latest DNClient version
$ref: './DownloadsDNClientLinks.yaml'
additionalProperties:
$ref: './DownloadsDNClientLinks.yaml'
$ cat DownloadsDNClientLinks.yaml
type: object
description: Download links for a given DNClient version
properties:
linux-amd64:
type: string
linux-arm64:
type: string
macos-universal:
type: string
macos-universal-dmg:
type: string
windows-amd64:
type: string
windows-arm64:
type: string
additionalProperties:
x-additionalPropertiesName: os-platform
type: string
Expected behavior
Current behavior
Possible solution
Adding the file name of the $ref is confusing as a docs consumer, as it has no relevance to me. It's simply an implementation detail of how the OpenAPI spec is defined. The hardcoded property doesn't show the $ref, but additionalProperties does. My preference is to remove the $ref name from the output.
Steps to reproduce
Build docs using specs listed above.
Screenshots
See above.
Context
n/a
Your Environment
- Version used: docusaurus 2.4.0 & docusaurus-plugin-openapi-docs 2.0.0-beta.2
- Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3): node.js 18.7.0
- Operating System and version (desktop or mobile): Linux
:tada: Thanks for opening your first issue here! Welcome to the community!