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

[api-documenter] Links between packages are not rendered #3624

Closed
sranka opened this issue Sep 13, 2022 · 3 comments
Closed

[api-documenter] Links between packages are not rendered #3624

sranka opened this issue Sep 13, 2022 · 3 comments

Comments

@sranka
Copy link

sranka commented Sep 13, 2022

Summary

Having JSON files generated from monorepo packages, when I run api-documenter, the markdown output does not contain a lot of links between these monorepo packages.

Repro steps

git clone [email protected]:influxdata/influxdb-client-js.git
cd influxdb-client-js
yarn
yarn workspaces run apidoc:extract
yarn api-documenter markdown -i docs -o docs/dist

The generated markdown files are now missing a lot of links between monorepo packages, For example, open docs/dist/influxdb-client-apis.authorizationsapi._constructor_.md, it contains:

Parameter Type Description
influxDB InfluxDB an instance that knows how to communicate with InfluxDB server

Expected result:

The InfluxDB type should be a link.

Actual result:

The InfluxDB type is not a link. The associated api-extractor input file docs/influxdb-client-apis.api.json contains a reference

                {
                  "kind": "Reference",
                  "text": "InfluxDB",
                  "canonicalReference": "@influxdata/influxdb-client!~InfluxDB:class"
                }

@influxdata/influxdb-client!~InfluxDB:class is not present in docs/influxdb-client.api.json but @influxdata/influxdb-client!InfluxDB:class is!

Details

There are 1376 occurrences of the same pattern in the influxdb-client-js project. I created a script that repairs these references influxdata/influxdb-client-js#567 , changing !~ to ! in a reference is a workaround ... all links are then rendered properly in the markdown files.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/api-extractor version? 7.29.3
@microsoft/api-documenter version? 7.19.5
Operating system? Linux
Documentation target? Markdown
Would you consider contributing a PR? I does not seem simple to me, YES after an advice
TypeScript compiler version? 4.7 and 4.8
Node.js version (node -v)? 14, 16 - does not matter
@sranka sranka changed the title [api-documenter] Link between packages are not rendered [api-documenter] Links between packages are not rendered Sep 13, 2022
@sranka
Copy link
Author

sranka commented Sep 13, 2022

It is fixed since @microsoft/api-extractor:7.31.0.

@zelliott
Copy link
Contributor

@sranka Can we close this issue then?

@sranka
Copy link
Author

sranka commented Sep 14, 2022

I double-checked it.

@sranka sranka closed this as completed Sep 14, 2022
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

No branches or pull requests

2 participants