Giter Site home page Giter Site logo

autorest.powershell's Introduction

AutoRest PowerShell Generator


Using the released version of autorest.powershell

See Using AutoRest PowerShell for examples, etc.

Contributing

For instructions on cloning/building/etc, see Development

Contributor License Agreement Requirements

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.




# NOTES This file is really only used for local testing, where loading the individual plugins on the cmdline is terribly cumbersome.

Autorest plugin configuration

pipeline-model: v3
powershell: true
require: "$(this-folder)/powershell/readme.md"

autorest.powershell's People

Contributors

bethanyzhou avatar dcaro avatar dingmeng-xue avatar dolauli avatar erich-wang avatar fearthecowboy avatar georgend avatar isra-fel avatar jhendrixmsft avatar joshspicer avatar karthik-mut avatar markcowl avatar markwahl-msft avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar mikeevanslarah avatar miyanni avatar msftgits avatar nelsondaniel avatar norizc avatar olydis avatar peombwa avatar t-miroos avatar timayabi2020 avatar veryearly avatar vidai-msft avatar wyunchi-ms avatar yanaxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autorest.powershell's Issues

Noun -> prefix + subjectPrefix + subject

  • Update code model to include subjectPrefix and subject instead of noun.
  • Enable configuration of subjectPrefix and subject per cmdlet as well as globally.

Where:

COMMAND: 
  [VERB]-[NOUN]_[VARIANT]

NOUN: 
  [PREFIX][SUBJECT-PREFIX][SUBJECT]

PREFIX:
  is module-wide, defaults to 'Az' for Azure

SERVICE-NAME: 
  the service name of the module 

MODULE-NAME:
  [PREFIX]  ? 
     [PREFIX].[SERVICE-NAME] :
     [SERVICE-NAME]

SUBJECT-PREFIX:
  defaults to [SERVICE-NAME]

Miscellaneous Issues For Later

  • Default Parameter Set from config
  • Default Parameter Value (x-ms-default)
  • Configurable Force
  • Parameter Position
    • from configuration
    • default pattern
  • documentation on OAI level directives

PSSwagger Replacement?

In discovering that PSSwagger is no longer supported, and has instead been replaced by AutoRest, is there any support for a PSSWagger like tooling? Having auto-generated pscmdlets is great for the testing community. Any information is greatly appreciated!

Keep hitting this error in PSSwagger which lead me to discover it was moved to Autorest.

error CS1503: Argument 1: cannot
convert from 'System.Net.Http.HttpClient' to 'System.Net.Http.DelegatingHandler'

NoWait Support for Azure Generated Cmdlets

For cmdlets that perform a single, long-running operation, generate an optional parameter -NoWait for all parameter sets. This parameter should return on receiving the initial positive response to a long running operation call (modulo retries, etc.).

The returned object should be a common type (AsyncOperationResponse) which allows the user to determine in the future if the operation is still running, has succeeded, or is cancelled.
enum: ['Failed', 'Cancelled', 'InProgress', 'Error', 'Succeeded']

This could be implemented via a CheckStatus method, that would return a status as above, or a CheckStatusRequuesUri property, or similar mechanism, with the brains in the polling cmdlet.

PowerShell Generator - generated module doesn't import

A week ago, I went through @fearthecowboy's blog post to generate cmdlets for XKCD.

It worked beautifully.

I tried again today, against the same swagger.yml for XKCD, and the module now fails to import:

ipmo : The member 'FormatsToProcess' in the module manifest is not valid: Cannot find path '/Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/./XKCD.format.ps1xml' because it does not exist.. Verify that a valid value is specified for this field in the '/Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/XKCD.psd1' file.

That's when I diff-ed the generated output of last week vs today:

tyler ~/Code/PowerShell/AutoRest/XKCD
❯❯❯ gci ./generated


    Directory: /Users/tyler/Code/PowerShell/AutoRest/XKCD/generated

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----           3/28/19 11:10 AM                bin
d-----           3/28/19 11:10 AM                custom
d-----           3/28/19 11:10 AM                generated
d-----           3/28/19 11:10 AM                internal
d-----           3/28/19 11:10 AM                obj
------           3/28/19 11:10 AM          13478 license.txt
------           3/28/19 11:10 AM           1361 XKCD.csproj
------           3/28/19 11:10 AM            966 XKCD.nuspec
------           3/28/19 11:10 AM            609 XKCD.psd1
------           3/28/19 11:10 AM           1884 XKCD.psm1

tyler ~/Code/PowerShell/AutoRest/XKCD
❯❯❯ gci ./generated_old/


    Directory: /Users/tyler/Code/PowerShell/AutoRest/XKCD/generated_old

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----           3/21/19 10:21 AM                bin
d-----           3/21/19 10:05 AM                custom
d-----           3/21/19 10:21 AM                docs
d-----           3/21/19 10:05 AM                examples
d-----           3/21/19 10:21 AM                exports
d-----           3/21/19 10:05 AM                generated
d-----           3/21/19 10:21 AM                obj
d-----           3/21/19 10:05 AM                test
------           3/21/19 10:05 AM           3680 build-module.ps1
------           3/21/19 10:05 AM           1958 generate-help.ps1
------           3/21/19 10:05 AM           2558 how-to.md
------           3/21/19 10:05 AM          13478 license.txt
------           3/21/19 10:05 AM            165 pack-module.ps1
------           3/21/19 10:05 AM              8 readme.md
------           3/21/19 10:05 AM           1245 run-module.ps1
------           3/21/19 10:05 AM            899 test-module.ps1
------           3/21/19 10:05 AM           1361 XKCD.csproj
------           3/21/19 10:05 AM           2826 XKCD.format.ps1xml
------           3/21/19 10:05 AM            931 XKCD.nuspec
------           3/21/19 10:21 AM            667 XKCD.psd1
------           3/21/19 10:05 AM           1942 XKCD.psm1

It's significantly different. Seems like there might be a bug... but I haven't updated my autorest version at all - so maybe something updates when I ran the autorest command today?

I have a couple people in chat who have also experienced this issue.

Here is the debug output:

AutoRest code generation utility [version: 3.0.5166; node: v10.15.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Network Enabled: true
Starting @microsoft.azure/autorest-core from /Users/tyler/.autorest/@[email protected]
   Loading AutoRest core      '/Users/tyler/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (3.0.5390)
   Loading AutoRest extension '@microsoft.azure/autorest.powershell' (beta->1.0.293)
   Loading AutoRest extension '@microsoft.azure/autorest.remodeler' (beta->1.0.188)
   Loading AutoRest extension '@microsoft.azure/autorest.csharp-v2' (beta->1.0.200)
DEBUG: swagger-document/loader-swagger - START inputs = 0
DEBUG: openapi-document-override/md-override-loader-openapi - START inputs = 0
DEBUG: openapi-document/loader-openapi - START inputs = 0
DEBUG: swagger-document-override/md-override-loader-swagger - START inputs = 0
DEBUG: pipeline-emitter - START inputs = 0
DEBUG: configuration-emitter - START inputs = 0
DEBUG: Emitting 'pipeline' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/pipeline
DEBUG: Emitting 'configuration' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/configuration
DEBUG: pipeline-emitter - END
DEBUG: configuration-emitter - END
DEBUG: openapi-document-override/md-override-loader-openapi - END
DEBUG: swagger-document-override/md-override-loader-swagger - END
DEBUG: openapi-document/loader-openapi - END
DEBUG: openapi-document/individual/transform - SKIPPING
DEBUG: openapi-document/individual/schema-validator-openapi - SKIPPING
DEBUG: openapi-document/individual/identity - SKIPPING
DEBUG: openapi-document/transform-immediate - SKIPPING
DEBUG: swagger-document/loader-swagger - END
DEBUG: swagger-document/individual/transform - START inputs = 1
DEBUG: swagger-document/individual/transform - END
DEBUG: swagger-document/individual/schema-validator-swagger - START inputs = 1
DEBUG: swagger-document/individual/schema-validator-swagger - END
DEBUG: swagger-document/identity - START inputs = 1
DEBUG: swagger-document/individual/identity - START inputs = 1
DEBUG: swagger-document/identity - END
DEBUG: swagger-document/individual/identity - END
DEBUG: openapi-document/openapi-document-converter - START inputs = 1
DEBUG: openapi-document/openapi-document-converter - END
DEBUG: openapi-document/transform - START inputs = 1
DEBUG: openapi-document/transform - END
DEBUG: openapi-document/tree-shaker - START inputs = 1
DEBUG: openapi-document/tree-shaker - END
DEBUG: openapi-document/multi-api-merger - START inputs = 1
DEBUG: openapi-document/multi-api-merger - END
DEBUG: openapi-document/component-modifiers - START inputs = 1
DEBUG: openapi-document/component-modifiers - END
DEBUG: openapi-document/api-version-parameter-handler - START inputs = 1
DEBUG: openapi-document/api-version-parameter-handler - END
DEBUG: openapi-document/profile-filter - START inputs = 1
DEBUG: openapi-document/profile-filter - END
DEBUG: openapi-document/model-deduplicator - START inputs = 1
DEBUG: openapi-document/emitter - START inputs = 1
DEBUG: Emitting 'merged-oai3' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/merged%20oai3%20doc...
DEBUG: openapi-document/emitter - END
DEBUG: openapi-document/model-deduplicator - END
DEBUG: openapi-document/enum-deduplicator - START inputs = 1
DEBUG: openapi-document/enum-deduplicator - END
DEBUG: openapi-document/subset-reducer - START inputs = 1
DEBUG: openapi-document/subset-reducer - END
DEBUG: openapi-document/multi-api/identity - START inputs = 1
DEBUG: openapi-document/quick-check - START inputs = 1
DEBUG: openapi-document/multi-api/identity - END
DEBUG: openapi-document/quick-check - END
DEBUG: remodeler - START inputs = 1
DEBUG: openapi-document/multi-api/emitter - START inputs = 1
DEBUG: openapi-document/multi-api/emitter - END
DEBUG: remodeler - END
DEBUG: remodeler/emitter - START inputs = 1
DEBUG: tweakcodemodel - START inputs = 1
DEBUG: Emitting 'code-model-v3' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/code-model-v3
DEBUG: remodeler/emitter - END
DEBUG: tweakcodemodel - END
DEBUG: tweakcodemodelazure - START inputs = 1
DEBUG: tweakcodemodelazure - END
DEBUG: add-apiversion-constant - START inputs = 1
DEBUG: add-apiversion-constant - END
DEBUG: create-commands - START inputs = 1
DEBUG: detecting high level commands...
DEBUG: create-commands - END
DEBUG: structural-modifier - START inputs = 1
DEBUG: structural-modifier - END
DEBUG: create-virtual-properties - START inputs = 1
DEBUG: create-virtual-properties - END
DEBUG: csnamer - START inputs = 1
DEBUG: csnamer - END
DEBUG: psnamer - START inputs = 1
DEBUG: psnamer - END
DEBUG: cosmetic-modifier - START inputs = 1
DEBUG: cosmetic-modifier - END
DEBUG: add-azure-completers - START inputs = 1
DEBUG: llcsharp - START inputs = 1
DEBUG: add-azure-completers - END
DEBUG: powershell - START inputs = 1
DEBUG: llcsharp - END
DEBUG: powershell - END
DEBUG: default/emitter - START inputs = 167
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/api/Sample/API/XKCD.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/api/Sample/API/Models/Comic.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/api/Sample/API/Models/Comic.json.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Extensions.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Method.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/SerializationMode.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/UndeclaredResponseException.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/EventData.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/EventListener.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Events.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/ISendAsync.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Response.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/delegates.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/ConversionException.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Customizations/IJsonSerializable.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/IJsonConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/JsonType.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Helpers/Seperator.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Iso/IsoDate.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Customizations/JsonArray.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Helpers/TypeDetails.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/JsonConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Customizations/JsonBoolean.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Helpers/Extensions/TypeExtensions.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/BinaryConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Models/JsonMember.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Helpers/XHelper.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/JsonConverterAttribute.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Customizations/JsonNode.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/BooleanConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Models/JsonModel.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/JsonBoolean.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/Collections/JsonArray.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Parser/JsonParser.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/JsonConverterFactory.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Customizations/JsonNumber.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Serialization/JsonSerializer.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Parser/Exceptions/ParseException.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/DateTimeConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Writers/JsonWriter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Models/JsonModelCache.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/JsonDate.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/Collections/XImmutableArray.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Serialization/PropertyTransformation.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Parser/JsonToken.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/StringLikeConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Customizations/JsonObject.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/JsonNode.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/Collections/XList.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Serialization/SerializationOptions.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Parser/JsonTokenizer.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Customizations/JsonString.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/DecimalConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/JsonNumber.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/Collections/XNodeArray.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Parser/Location.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Customizations/XNodeArray.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/DoubleConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/JsonObject.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/Collections/XSet.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/EnumConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Parser/TokenReader.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/JsonString.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Parser/Readers/SourceReader.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/GuidConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/XBinary.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/HashSet%271Converter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Nodes/XNull.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/Int16Converter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/Int32Converter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/Int64Converter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/JsonArrayConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/JsonObjectConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/SingleConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/StringConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/TimeSpanConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/UInt16Converter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/UInt32Converter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/UInt64Converter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Conversions/Instances/UriConverter.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/Module.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/cmdlets/InvokeGetXkcdComicForToday_ComicForToday.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/api-extensions/Models/Comic.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/cmdlets/InvokeGetXkcdComic_ComicComicId.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/api-extensions/Models/ComicTypeConverter.cs
DEBUG: Emitting 'source-file-other' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/.gitattributes
DEBUG: Emitting 'source-file-other' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/license.txt
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/AsyncCommandRuntime.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/AsyncJob.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/Debugging.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/EventDataExtensions.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/EventsExtensions.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/ExportProxyCmdlet.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/FormatTypes.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/GetScriptCmdlet.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/HttpPipeline.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/PsAttributes.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/PsExtensions.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/PsHelpers.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/SetPsd1Export.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/XmlExtensions.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/ExportTestStub.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/HttpPipelineMocking.ps1
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/ExportFormatPs1xml.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/PsProxyTypes.cs
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/runtime/PsProxyOutputs.cs
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Accounts.format.ps1xml
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Accounts.generated.format.ps1xml
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Accounts.types.ps1xml
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/platyPS/0.13.1/platyPS.psd1
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/platyPS/0.13.1/Markdown.MAML.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Az.Accounts.psd1
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Az.Accounts.psm1
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/platyPS/0.13.1/platyPS.schema.md
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/platyPS/0.13.1/platyPS.psm1
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Hyak.Common.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/platyPS/0.13.1/YamlDotNet.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.Common.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.ApplicationInsights.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Authentication.ResourceManager.deps.json
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Authentication.deps.json
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Authentication.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Clients.Aks.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Clients.Authorization.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Clients.KeyVault.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.deps.json
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Storage.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Strategies.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Rest.ClientRuntime.Azure.Authentication.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Common.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Rest.ClientRuntime.Azure.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Rest.ClientRuntime.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/NetCoreAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PostImportScripts/LoadAuthenticators.ps1
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/Microsoft.Azure.PowerShell.Authenticators.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/StartupScripts/AzError.ps1
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/System.Buffers.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.WindowsAzure.Storage.DataMovement.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/NetCoreAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/System.Reflection.DispatchProxy.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/Microsoft.IdentityModel.Clients.ActiveDirectory.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/System.Net.Http.WinHttpHandler.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/System.Security.AccessControl.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/System.Security.Principal.Windows.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/System.Security.Permissions.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/System.ServiceModel.Primitives.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.WindowsAzure.Storage.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/Newtonsoft.Json.10.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Clients.Compute.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Clients.Network.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/PreloadAssemblies/System.Private.ServiceModel.dll
DEBUG: Emitting 'binary-file' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/generated/modules/Az.Accounts/1.4.1/Microsoft.Azure.PowerShell.Clients.Websites.dll
DEBUG: Emitting 'source-file-csharp' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/XKCD.csproj
DEBUG: Emitting 'source-file-powershell' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/XKCD.psd1
DEBUG: Emitting 'source-file-powershell' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/XKCD.psm1
DEBUG: Emitting 'source-file-powershell' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/custom/XKCD.custom.psm1
DEBUG: Emitting 'source-file-powershell' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/internal/XKCD.internal.psm1
DEBUG: Emitting 'source-file-other' at file:///Users/tyler/Code/PowerShell/AutoRest/XKCD/generated/XKCD.nuspec
DEBUG: default/emitter - END

Notes: Things to documents

How To use -HttpPipelineAppend and -HttpPipelinePrepend in the generated cmdlets:

# calling a cmdlet, you can use -HttpPipelineAppend to have the cmdlet call your code before making the remote call...

Get-Redis -HttpPipelineAppend { param($req, $callback, $next ) 
   Write-Host -fore white "Inserted my code in the http pipeline on the way to:`n $($req.RequestUri)."

   Write-Host -fore yellow "`n---------------------`n Before We Go!`n---------------------"


   Write-host -fore white "Request Headers:"; 
   $($req.Headers) |% { if ($_.Key -ne "Authorization") { Write-host -nonewline -fore cyan "   $($_.Key): "; Write-Host -fore green "$($_.Value)" } } 

   # call the next step in the Pipeline
   $responseTask = $next.SendAsync($req, $callback)

   # wait on the responseTask
   $response = $responseTask.Result

   # after the call...
   Write-Host -fore yellow "`n---------------------`nWe're back!`n---------------------"

   # Peek into the http response before it goes to the cmdlet for processing
   Write-host -fore white "Response Headers:"; 
   $($response.Headers) |% { Write-host -nonewline -fore cyan "   $($_.Key): "; Write-Host -fore green "$($_.Value)" } 

   
   # let the cmdlet finish it's job
   return $responseTask
}

SkipSSL flag

Can we get support for a SkipSSL flag? We are currently working on a version of this for Nutanix and some of the environments have self-signed, thanks!

Make default namespace name reflect standards and include service name

Right now, the default namespace is System.API. Because of this, every RP needs to provide a namespace to change this, and changing this is required (to avoid conflicts). To make this easier, we should simply have a standard namespace (such as Microsoft.Azure.PowerShell.Cmdlets) and then append the service name to it (so it would be Microsoft.Azure.PowerShell.Cmdlets.Compute for example). This way, we have consistency for free. And, if RPs really want to change it, they still can. We enforce this naming convention currently in Azure PowerShell.

Network: create-virtual-properties: Maximum call stack size exceeded

FATAL: RangeError: Maximum call stack size exceeded
C:\Users\miyanni\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\pipeline.js - FAILURE {}
Process() cancelled due to exception : Plugin create-virtual-properties reported failure. / Error: Plugin create-virtual-properties reported failure.
    at C:\Users\miyanni\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\plugins\external.js:26:19
  Error: Plugin create-virtual-properties reported failure.
input-file:
  - Microsoft.Network/stable/2018-12-01/applicationGateway.json
  - Microsoft.Network/stable/2018-12-01/applicationSecurityGroup.json
  - Microsoft.Network/stable/2018-12-01/availableDelegations.json
  - Microsoft.Network/stable/2018-12-01/azureFirewall.json
  - Microsoft.Network/stable/2018-12-01/azureFirewallFqdnTag.json
  - Microsoft.Network/stable/2018-12-01/checkDnsAvailability.json
  - Microsoft.Network/stable/2018-12-01/ddosCustomPolicy.json
  - Microsoft.Network/stable/2018-12-01/ddosProtectionPlan.json
  - Microsoft.Network/stable/2018-12-01/endpointService.json
  - Microsoft.Network/stable/2018-12-01/expressRouteCircuit.json
  - Microsoft.Network/stable/2018-12-01/expressRouteCrossConnection.json
  - Microsoft.Network/stable/2018-12-01/expressRouteGateway.json
  - Microsoft.Network/stable/2018-12-01/expressRoutePort.json
  - Microsoft.Network/stable/2018-12-01/interfaceEndpoint.json
  - Microsoft.Network/stable/2018-12-01/loadBalancer.json
  - Microsoft.Network/stable/2018-12-01/network.json
  - Microsoft.Network/stable/2018-12-01/networkInterface.json
  - Microsoft.Network/stable/2018-12-01/networkProfile.json
  - Microsoft.Network/stable/2018-12-01/networkSecurityGroup.json
  - Microsoft.Network/stable/2018-12-01/networkWatcher.json
  - Microsoft.Network/stable/2018-12-01/operation.json
  - Microsoft.Network/stable/2018-12-01/publicIpAddress.json
  - Microsoft.Network/stable/2018-12-01/publicIpPrefix.json
  - Microsoft.Network/stable/2018-12-01/routeFilter.json
  - Microsoft.Network/stable/2018-12-01/routeTable.json
  - Microsoft.Network/stable/2018-12-01/serviceCommunity.json
  - Microsoft.Network/stable/2018-12-01/serviceEndpointPolicy.json
  - Microsoft.Network/stable/2018-12-01/usage.json
  - Microsoft.Network/stable/2018-12-01/virtualNetwork.json
  - Microsoft.Network/stable/2018-12-01/virtualNetworkGateway.json
  - Microsoft.Network/stable/2018-12-01/virtualNetworkTap.json
  - Microsoft.Network/stable/2018-12-01/virtualWan.json
  - Microsoft.Network/stable/2018-12-01/vmssNetworkInterface.json
  - Microsoft.Network/stable/2018-12-01/vmssPublicIpAddress.json

Order parameters in CS file to have mandatory first, unless they are positional parameters

For example:

SubscriptionIdResourceGroupNameConfigStoreNameLocationTagsPropertiesEtc

New-AzAppConfigurationStore [-AsJob] -ConfigStoreName <String> [-DefaultProfile <PSObject>]
 -ResourceGroupName <String> -Location <String> [-Tag <Hashtable>] -SubscriptionId <String> [-WhatIf]
 [-Confirm] [<CommonParameters>]

This should be:

SubscriptionIdResourceGroupNameConfigStoreNameLocationTagsPropertiesEtc

New-AzAppConfigurationStore -ConfigStoreName <String> -ResourceGroupName <String> -Location <String> 
 -SubscriptionId <String> [-Tag <Hashtable>] [-DefaultProfile <PSObject>] [-AsJob] [-WhatIf]
 [-Confirm] [<CommonParameters>]

Declaration order is significant when generating documentation. If any of the parameters have Position defined, they should be ordered first based on position value.

codegenerator cannot generate code for a return object - how to debug

After I have generated a PowerShell module, my cmdlet fails with 'reference not set to an instance of an object'. After much digging, I found that the codegenerator cannot generate the right code for my return object:

await onOK(_response,null /* deserializeFromResponse doesn't support '-none-' C:\Users\Jos.Koelewijn\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest.csharp-v2\dist\schema\object.js*/);                       

My return object is defined in yaml as follows:

definitions:
  Model0:
    properties:
      system_id:
        type: integer
        format: Int32
      modules:
        type: integer
        format: Int32
      size_w:
        type: integer
        format: Int32
      current_power:
        type: integer
        format: Int32
      energy_today:
        type: integer
        format: Int32
      energy_lifetime:
        type: integer
        format: Int32
      summary_date:
        type: string
      source:
        type: string
      status:
        type: string
      operational_at:
        type: integer
        format: UnixTime
      last_report_at:
        type: integer
        format: UnixTime
      last_interval_end_at:
        type: integer
        format: UnixTime

no errors during code generation:

~\Desktop> autorest.cmd  --powershell --input-file=.\openapi.yaml
AutoRest code generation utility [version: 3.0.5155; node: v10.15.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      'C:\Users\Jos.Koelewijn\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest-core\dist' (3.0.5386)
   Loading AutoRest extension '@microsoft.azure/autorest.powershell' (beta->1.0.220)
   Loading AutoRest extension '@microsoft.azure/autorest.remodeler' (beta->1.0.144)
   Loading AutoRest extension '@microsoft.azure/autorest.csharp-v2' (beta->1.0.157)
--------------------------------------------------------------------

WARNING (UndefinedTypeWithSchema): The schema 'schemas:4' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    - oai3-subset-schema-reduced doc... ($)

I would love to find out how to troubleshoot this on my own, but i'll need some guidance.

Release Notes for pre-beta

BEFORE YOU BEGIN: IMPORTANT NOTES

There are a lot of what I consider to be "minor" issues in here. My priority at this point has been to get enough generated code in place to get the complete end-to-end scenarios functioning, and I can worry about the 'details' once we start thoroughly testing.

Modifing the generation is actually really really trivial for me, so I consider the vast majority of the rest of it 'pretty minor'

I have code that's not exposed where auth and other things are handled for generating support for Azure ARM resources, and that's not going help you.

If this doesn't work for for you

Don't panic; this is pre-beta, and it works great for certain scenarios, but they may not be yours

If you can't get it to work with your stuff

Wait till I get back from vacation. I can't really help before I get back.

If you try to use petstore.json for testing

You will be smacked with a newspaper, and I shall not give you a treat.

If you don't think the cmdlets are very good

I should remind you that Jeffrey Snover reviewed this and he thinks a bit different. You will have to wait till I get back for me to document why this works the way it does. Trust me when I say, I went to great lengths to design things a certain way, and everything has purpose and reason.

Caveats and known issues:

PLEASE IGNORE the errors like:

(they are actually harmless)

Error occurred in handler for 'ReadFile' in session 'session_5':
Error: Could not read 'obj/test.txt'.
    at QuickDataSource.ReadStrict (C:\Users\garretts\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest-core\dist\lib\data-store\data-store.js:26:19)
    at <anonymous>
Error occurred in handler for 'ReadFile' in session 'session_7':
Error: Could not read 'ContainerRegistryManagement.private.csproj'.
    at QuickDataSource.ReadStrict (C:\Users\garretts\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest-core\dist\lib\data-store\data-store.js:26:19)
    at <anonymous>

Bugs

  • there are a lot of little bugs. I haven't published my backlog yet.

WHAT IS MISSING FROM THIS BUILD

  • auth support
  • documentation and explinations.
  • field/class/property/method descriptions. Some are there, but I gotta go thru and do good pass everywhere.
  • Handlers for Retry/etc --
  • Persisting/editing names/parameters/etc for generated commands
  • use of proxy settings/etc
  • no support for streams, duration, or arrays at the root/base level of the request/response

Getting Started

Requires:


`npm install -g dotnet-sdk-2.0.0`

Usage

autorest --use="@microsoft.azure/autorest.incubator@preview" --powershell --output-folder=output-folder --input-file=path-or-url-to-swagger-file

sample run:

# run these from powershell core. 
# Windows Powershell is not ok. 
# The cmdlets can work in both, but be patient
 
autorest --use="@microsoft.azure/autorest.incubator@preview" --powershell --input-file=https://github.com/Azure/azure-rest-api-specs/blob/master/specification/redis/resource-manager/Microsoft.Cache/stable/2018-03-01/redis.json
--output-folder=./generated

# will generate the cmdlets into the output-folder
cd ./generated

# now we do one last step (build proxies and import the module)
./generate-proxies.ps1 -test

# Now you're in a new pwsh instance with the cmdlets
#example: 
get-operation -verbose -debug 

PLUGIN FAILURE: Cannot read property 'url' of undefined

Hello colleagues, trying this against my endpoint

PS C:\temp\TRSModule> autorest --use:c:\Repo\Github\Public\MSFT\autorest.powershell --input-file:.\swagger.json
AutoRest code generation utility [version: 3.0.5160; node: v10.15.3]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      'C:\Users\user\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest-core\dist' (3.0.5378)
   Loading local AutoRest extension 'autorest.powershell-testing' (c:\Repo\Github\Public\MSFT\autorest.powershell)
   Loading local AutoRest extension '@microsoft.azure/autorest.powershell' (c:/Repo/Github/Public/MSFT/autorest.powershell//extensions/powershell)
   Loading AutoRest extension '@microsoft.azure/autorest.remodeler' (beta->1.0.126)
   Loading AutoRest extension '@microsoft.azure/autorest.csharp-v2' (beta->1.0.137)
--------------------------------------------------------------------
C:\Repo\Github\Public\MSFT\autorest.powershell\extensions\csharp-v2\dist\plugin-llcsharp.js - {}
PLUGIN FAILURE: Cannot read property 'url' of undefined, TypeError: Cannot read property 'url' of undefined
    at new OperationMethod (C:\Repo\Github\Public\MSFT\autorest.powershell\extensions\csharp-v2\src\operation\method.ts:101:48)
    at new ApiClass (C:\Repo\Github\Public\MSFT\autorest.powershell\extensions\csharp-v2\src\operation\api-class.ts:30:31)
    at Project.init (C:\Repo\Github\Public\MSFT\autorest.powershell\extensions\csharp-v2\src\project.ts:68:5), {}
FATAL: TypeError: Cannot read property 'url' of undefined
C:\Users\user\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\pipeline.js - FAILURE {}
(node:6024) UnhandledPromiseRejectionWarning: Error: Plugin llcsharp reported failure.
    at C:\Users\user\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\plugins\external.js:26:19
(node:6024) 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: 31)
(node:6024) [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:6024) UnhandledPromiseRejectionWarning: Error: Plugin llcsharp reported failure.
    at C:\Users\user\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\plugins\external.js:26:19
(node:6024) 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: 32)
Process() cancelled due to exception : Plugin llcsharp reported failure. / Error: Plugin llcsharp reported failure.
    at C:\Users\user\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\plugins\external.js:26:19

what do i do to debug this in VS code (I'm new to node.js and all that "good stuff")

Thanks

Collapse parameter sets in documentation

So, we need a way to 'combine' parameter sets in documentation only.

ResourceGroupNameConfigStoreNameLocationTagsPropertiesExpanded

New-AzAppConfigurationStore [-AsJob] -ConfigStoreName <String> [-DefaultProfile <PSObject>]
 -ResourceGroupName <String> -Location <String> [-Tag <Hashtable>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

SubscriptionIdResourceGroupNameConfigStoreNameLocationTagsPropertiesEtc

New-AzAppConfigurationStore [-AsJob] -ConfigStoreName <String> [-DefaultProfile <PSObject>]
 -ResourceGroupName <String> -Location <String> [-Tag <Hashtable>] -SubscriptionId <String>
 [-WhatIf] [-Confirm] [<CommonParameters>]

The only difference between these two parameter sets is one has -SubscriptionId and one doesn't. So, this could be represented as a single parameter set:

ResourceGroupNameConfigStoreNameLocationTagsPropertiesExpanded

New-AzAppConfigurationStore [-AsJob] -ConfigStoreName <String> [-DefaultProfile <PSObject>]
 -ResourceGroupName <String> -Location <String> [-Tag <Hashtable>] [-SubscriptionId <String>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

Figure out a way if it is possible for us to do this. May involve generating script cmdlets that are only used for documentation generation.

skip-model-cmdlets does not remove variants that use model cmdlets

Basically, when you remove the Object cmdlets, then you have no way of making the objects that to to the variants that use those objects as parameters. So, for New-AzAppConfigurationStore, a variant exists with ConfigStoreCreationParameters. So, we'd need to detect that the type used as the parameter here was intended to be created by an Object cmdlet.

Parameter sets should separate piping and user input parameters

Description

Essentially the idea behind parameter sets is:

  • Always allow piping of complex objects in one parameter set group
    • The piped object may contain resource Id, parent resource Id, or resource Id + additional properties
    • Where appropriate (New, Set) Proeprties from the input object can be overridden with flattened parameters
    • In update cmdlets, only the identity from the inputobject is used - flattened parameters determine PATCHed properties
  • In the default parameter set group, provide identity parameters (RGName, ParentNames, Name) + flattened parameters

Top Level Resources

  • Get:
    • PS1: Allow piping an object containing resource id
    • PS2: Provide ResourceGroupName and Name (optional for list)
    • bonus: allow filter by name parameter
    • bonus: allow wildcards for name, rg
  • New:
    • All parameter sets include ResourceGroupName and Resource Name
    • Flattened parameter set (body properties as parameters)
    • InputObject parameter set [rgname + name optional]
    • (bonus): automatically create RG if it does not exist)
    • (bonus): make RG optional and use Name if not provided
  • Set:
    • InputObect (resource type, piping)
    • ResourceGroupName + Name + Flattened parameters
  • Update
    • InputObject (just needs resourceId, piping) + [optional] flattened parameters
    • RGName + Name + Flattened parameters
  • Remove
    • InputObject [just needs resourceId, piping]
    • RGName + Name

Child Resources

  • Get:
    • PS1: Allow piping an object containing parent resource id or resource id
    • PS2: Provide ResourceGroupName, pareentnames, and Name (optional for list)
  • New:
    • RGName + ParentNames + Name + Flattened parameter set (body properties as parameters)
    • Parent/InputObject (piping) parameter set + Flattened parameters
  • Set:
    • Parent/InputObect (piping) + Optional parameters
    • ResourceGroupName + Name + Flattened parameters
  • Update
    • Parent/InputObject (just requires resourceId, piped) + [optional] flattened parameters
    • RGName + Name + Flattened parameters
  • Remove
    • InputObject [just needs resourceId, piped]
    • RGName + Parent Names + Name

Fix Get-Help content for exports

So, I realized that this is necessary. Why? Because when you run Get-Help on the modules, it is running through the script files. This ends up creating parameters that are marked as DontShow in the help you see with Get-Help. So... we'd have to:
- Generate help using platyPS to make both md and -help.xml
- This would use the newest published platyPS with the -ExcludeDontShow flag
- Having the -help.xml, then we need to update the scripts themselves to externally link to that file
- Or, we always write this line into the scripts, even if the file isn't generated yet [preferred]

See comment below.

AsJob [LRO] broken

AsJob implementation is broken because the serialization for the cmldet needs to be rewritten (VirtualProperties broke this)

Don't generate proxy cmdlet for ListOperations in Azure by default

The specs generally have a ListOperations style call to get what operations are available in the API. This doesn't make sense to have a cmdlet for as there are built-in PowerShell cmdlets to get the cmdlets available for a module (Get-Command, etc.). We should allow someone to specify a configuration option if they want this cmdlet to be generated.

[PowerShell][Request] Allow for retry on certain failures

In AzureStack we have some operations on our operator side which can result in service migration. During this migration the client might see an error which results in a broken connection. For some operator operations we don't have a way to resume monitoring: update, repair node, etc.

We would like a way to provide customization so that if certain cmdlets see an exception it can wait some period of time and try again. Currently, the C# SDK has hard coded a similar solution that allows them to handle specific error codes for older APIs.

Do you think it could be possible to expose a set of Funcs (Func<HttpResonseMessage, bool>) for each operations, POST, GET, DELETE, etc... where given a specific HttpResponseMessage it would return true when the client should retry, false when it should fail?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.