要解决this question我想我需要为我的api生成一个客户端sdk。
我已安装Autorest并正在尝试命令
AutoRest -mynamespace mytrack.Client -CodeGenerator CSharp -Modeler
Swagger -Input swagger.json -PackageName mytrack.client -AddCredentials true
结果
AutoRest code generation utility [version: 2.0.4262; node: v10.1.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
(node:9764) ExperimentalWarning: The fs.promises API is experimental
ERROR: Schema violation: Object didn't pass validation for format email:
- file:///C:/dev/autoresttest/swagger.json:1:156 ($.info.contact.email)
FATAL: swagger-document/individual/schema-validator - FAILED
FATAL: Error: [OperationAbortedException] Error occurred. Exiting.
Process() cancelled due to exception : [OperationAbortedException] Error occurred. Exiting.
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)
(node:9764) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 10)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 11)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 12)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 13)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 14)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 15)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 16)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 17)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 18)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 19)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 20)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 21)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 22)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 23)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 24)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 25)
(node:9764) UnhandledPromiseRejectionWarning: Error: [OperationAbortedException] Error occurred. Exiting.
at C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 26)
(node:9764) UnhandledPromiseRejectionWarning: TypeError: volume[member].bind is not a function
at patchFilesystem (C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:277:43)
at C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:281:18
at Object.global.staticloader.undo (C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:163:7)
at process.exit.n [as exit] (C:\Users\kirst\AppData\Roaming\npm\node_modules\autorest\dist\static-loader.js:170:27)
at main (C:\Users\kirst\.autorest\@microsoft.azure_autorest-core@2.0.4279\node_modules\@microsoft.azure\autorest-core\dist\app.js:514:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 27)
Shutting Down
答案 0 :(得分:0)
我已将电子邮件从SwaggerDoc中的Swagger Contact信息集中删除