Open bastijnv opened 4 years ago
Testing with removing the file altogether results in a non-clickable reference in the authentication_provider. Maybe it is best to accept the "enum" as top-level item:
export const setOfTopLevelItems = new Set(['class', 'interface', 'module', 'type alias', 'enum']);
This will correctly generate the file authentication_type.yml
with the childs and references.
Thank you @bastijnv for reporting this issue. Can you please share the version of type2docfx you're using?
Sorry for the late reply. Missed your reply in my inbox.
I'm on version 0.10.3 (latest). Note that I also cloned this repo to play around for a fix.
@bastijnv can you please try typedoc
v0.15.0 to generate the api.json and try it again?
I was already using TypeDoc 0.17.0-3 for their library mode. Since this is above v0.15.0 I assume that the issue is still occuring.
Let me know if you want me to downgrade to v0.15.0 to try.
@bastijnv Yeah, it would be great if you can downgrade to v0.15.0 to have a try.
tested on v0.15.0 and latest official release v0.15.6. There the file authentication_type.yml
is not generated. Only from v0.17.x the file seems to be generated (introducing the issue).
I am having this issue also with TypeDoc 0.17.6, type2docfx 0.10.3, DocFX 2.52.0. The module YAML includes the enum(s) in the children collection, but not in the references collection or the items collection.
Yes, looks there's something changed in latest version of TypeDoc, and type2docfx need to be updated to support it.
latest TypeDoc seems to have solved this problem
type2docfx does not properly handle files that only export enums. A file is generated with as child the the enum but no references. DocFX build fails on these files.
To reproduce you can extract the
AuthenticationType
from authentication_provide.ts in a separate file and change authentication_provide.ts to the following:Now run:
typedoc --json api.json azure-iot-sdk-node/common/core/src --module commonjs --includeDeclarations --ignoreCompilerErrors --excludeExternals
type2docfx api.json yml
This generates a yml file named
authentication_type.yml
which contains the following:If you use that as the YML input to DocFX (
docfx docfx.json --serve
) you will get the following error during build:I think the solution is to simply not generate the file
authentication_type.yml
as it is not required.