You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 9, 2021. It is now read-only.
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.
// Copyright (c) Microsoft. All rights reserved.// Licensed under the MIT license. See LICENSE file in the project root for full license information.import{TransportConfig}from'./authorization';import{Callback}from'./promise_utils';import{AuthenticationType}from'./authentication_type'/** * Interface that must be implemented by objects that are used to provide credentials to the transports used by the device client * to authenticate with an Azure IoT hub instance. */exportinterfaceAuthenticationProvider{type: AuthenticationType;getDeviceCredentials(callback: Callback<TransportConfig>): void;getDeviceCredentials(): Promise<TransportConfig>;setTokenRenewalValues?(tokenValidTimeInSeconds: number,tokenRenewalMarginInSeconds: number): void;}
If you use that as the YML input to DocFX (docfx docfx.json --serve) you will get the following error during build:
[20-03-31 07:37:29.731]Error:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UniversalReferenceDocumentProcessor.Save](yml/authentication_type.yml)Can't find azure-iot-common.authentication_type.AuthenticationType in items or references
[20-03-31 07:37:36.069]Info:[BuildCommand]Completed building documents in 11749.1673 milliseconds.
[20-03-31 07:37:36.073]Info:[BuildCommand]Completed Scope:BuildCommand in 12034.604 milliseconds.
[20-03-31 07:37:36.074]Error:Can't find azure-iot-common.authentication_type.AuthenticationType in items or references
I think the solution is to simply not generate the file authentication_type.yml as it is not required.
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
AuthenticationTypefrom 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 --excludeExternalstype2docfx api.json ymlThis generates a yml file named
authentication_type.ymlwhich 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.ymlas it is not required.