OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python

Overview

AutoRest

The AutoRest tool generates client libraries for accessing RESTful web services. Input to AutoRest is a spec that describes the REST API using the OpenAPI Specification format.

Release notes

Packages

Name Changelog Latest Next
Core functionality
autorest Changelog
@autorest/core Changelog
@autorest/modelerfour Changelog
Language generators
@autorest/csharp Changelog
@autorest/go Changelog
@autorest/java Changelog
@autorest/powershell Changelog
@autorest/python Changelog
@autorest/swift Changelog
@autorest/typescript Changelog
Internal packages
@autorest/codemodel Changelog
@autorest/common Changelog
@autorest/configuration Changelog
@autorest/extension-base Changelog
@azure-tools/extension Changelog
@azure-tools/codegen Changelog
@azure-tools/openapi Changelog
@azure-tools/deduplication Changelog
@azure-tools/datastore Changelog
@azure-tools/oai2-to-oai3 Changelog
@azure-tools/jsonschema Changelog

Support Policy

AutoRest is an open source tool -- if you need assistance, first check the documentation. If you find a bug or need some help, feel free to submit an issue

Getting Started using AutoRest image

View our docs readme as a starting point to find both general information and language-generator specific information

Contributing

Contributing guide

Check our internal developer docs to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Autorest.

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.

Comments
  • [.NET] AmbiguousMatchException on initializing ServiceClient class

    [.NET] AmbiguousMatchException on initializing ServiceClient class

    Hi guys.

    I have an issue with initializing my service client created by AutoRest and inherited from ServiceClient.

    It throws AmbiguousMatchException and it arises in ServiceClient class.

    [AmbiguousMatchException: Multiple custom attributes of the same type found.]
       System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) +122
       Microsoft.Rest.ServiceClient`1.get_FrameworkVersion() +103
       Microsoft.Rest.ServiceClient`1.SetDefaultUserAgentInfo() +177
       Microsoft.Rest.ServiceClient`1.SetUserAgent(String productName, String version) +50
       Microsoft.Rest.ServiceClient`1..ctor(DelegatingHandler[] handlers) +61
    
    

    It only appears on my Remote machine with Windows Server 2008 R2 Standart .NET Framework 4.6.1. Locally on Windows 10 Anniversary 4.6.2 Framework everything is ok.

    In Microsoft.Rest.ServiceClient I've found next part of code in ClientVersion property getter:

    try
              {
                AssemblyInformationalVersionAttribute customAttribute1 = assembly.GetCustomAttribute(typeof (AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute;
                this._clientVersion = customAttribute1 != null ? customAttribute1.InformationalVersion : (string) null;
                if (string.IsNullOrEmpty(this._clientVersion))
                {
                  AssemblyFileVersionAttribute customAttribute2 = assembly.GetCustomAttribute(typeof (AssemblyFileVersionAttribute)) as AssemblyFileVersionAttribute;
                  this._clientVersion = customAttribute2 != null ? customAttribute2.Version : (string) null;
                }
              }
              catch (AmbiguousMatchException ex)
              {
              }
    

    I think it is source of my problem but I don't understand why it occurs and to handle it. I see that current exception must be caught but I don't have any other ideas what else can be wrong.

    Guys, any ideas ?

    opened by OlehUdovytskyi 107
  • Support

    Support "multi" collectionFormat

    Please look at the collectionFormat definition and the set of valid values over here https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameter-object

    At bare minimum we need to support multi so that swagger petstore json http://petstore.swagger.io/v2/swagger.json can be run flawlessly for generating samples.

    Ruby Go PHP 
    opened by amarzavery 30
  • [Go] Add generator and acceptance tests

    [Go] Add generator and acceptance tests

    • Added beta version go generator
    • Added acceptance tests
      • boolean
      • integer
      • number (minus decimal)
      • string (minus base64url)
      • file and formdata tests
      • array (minus UnixTime)
      • dictionary (minus UnixTime)
      • date, datetime, datetimerfc1123
      • duration
      • complex (minus polymorphic and polyrecursice)
      • url
      • http
      • model-flattening
      • validation
      • required-optional
      • customBaseUri
    opened by garimakhulbe 29
  • Generate Managers and POMs for Azure SDK for Java

    Generate Managers and POMs for Azure SDK for Java

    Adds some templates to generate stub Manager classes. The generation of the Manager and POM is controlled by the RegenerateManager flag. Note that the path provided to Autorest in the Azure SDK for Java project has changed so that we can reasonably write the POM to the correct location.

    The ServiceName property is something that we just expect to work most of the time due to the convention for paths in Azure, as well as the fact that we expect each service we generate code for to have at least one method.

    opened by RikkiGibson 22
  • Follow-up for 653 Issue - Duplicate operationIds and underscore symbol - AutoRest has a bug around underscores

    Follow-up for 653 Issue - Duplicate operationIds and underscore symbol - AutoRest has a bug around underscores

    The issue #653 mentions an article about how to solve the problem with duplicate operationIds generated by Swashbuckle.

    Duplicate operationId is not only Swashbuckle fault, Autorest can't parse OperationId with more than one underscore correctly: so if your operationIds are :

    "operationId": "Debug_Get",
    "operationId": "Debug_GetByid",
    "operationId": "Debug_ReceiveCommandByjsonData",
    "operationId": "Debug_Get2Bymodel",
    

    Autorest will work fine.

    if you have some prefixed operationIds like (they are still unique though):

    "operationId": "V1_Debug_Get",
    "operationId": "V1_Debug_GetByid",
    "operationId": "V1_Debug_ReceiveCommandByjsonData",
    "operationId": "V1_Debug_Get2Bymodel",
    

    Autorest fails to interpert these operationIds correctly - you'll get a message

    error: [FATAL] Error generating client model: Found operation objects with duplicate operationId 'V1_Debug'. OperationId must be unique among all operations described in the API.

    It was mentioned by @VR-Architect in #651 that it was fixed in v.0.14, but I checked valid swagger.json with both v.0.15 and v.0.14 and they are both failing to parse operationid when it has more than one underscore.

    As soon as I update swagger definition to have operationId with just one underscore - it works fine.

    It seems like an issue in AutoRest operationId parsing.

    opened by centur 22
  • AutoRest shows almost no output after installing from npm

    AutoRest shows almost no output after installing from npm

    I'm having a problem using AutoRest installed from npm. Using the latest version (2.0.4215), the only console output I ever seem to get is the banner text. Downgrading to a previous version (2.0.4143) I now see console output.

    Here's a segmented image to show what I'm talking about: image

    #2686 Seems to be describing a similar (or the same) issue, but the issue was closed with the solution of reformatting. Reformatting isn't a feasible option for me and that's not really a solution anyway.

    I'm using npm 5.5.1 with node 9.2.0, running on Windows 7 64-bit

    opened by Inirit 21
  • `Client` suffix for Swagger title and Autorest

    `Client` suffix for Swagger title and Autorest

    Hi @amarzavery @fearthecowboy @markcowl

    I see that regularly now, new Swagger files remove the Client suffix from the title in Swagger (recently new Storage 2015-05-01, changed from StorageManagementClient to StorageManagement). I remember having a discussion with @amarzavery where he told me that this is a good behavor, since the Swagger file can describe also the server and is not client only. BUT Autorest might add Client to the main class name if not present.

    I wanted to check with you what you think about this. Since this is the only breaking change for the new Storage file in Python, I'd like to have your feeling before release it (if Autorest adds a Client suffix in the main class name if not present, this is not breaking). If generated clients should not have Client and have to follow strictly the title, (and the client should be named StorageManagement for the storage example), that's ok too (I saw the C# PR integrates the change, so it might be on purpose). Just tell me :)

    Thanks!

    FYI @annatisch

    opened by lmazuel 21
  • Error: Collision detected inserting into object: constructor

    Error: Collision detected inserting into object: constructor

    I keep getting the following error when using autorest with swagger json

    AutoRest code generation utility [cli version: 3.0.6187; node: v10.15.3, max-memory: 8192 gb] (C) 2018 Microsoft Corporation. https://aka.ms/autorest Network Enabled: true Starting @autorest/core from C:\[email protected][email protected] Loading AutoRest core 'C:\[email protected][email protected]\[email protected]\core\dist' (3.0.6237) Loading AutoRest extension '@microsoft.azure/autorest.csharp' (~2.3.79->2.3.82) Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.55->2.3.55) DEBUG [2.15 s]: swagger-document/loader-swagger - START inputs = 0 DEBUG [2.15 s]: openapi-document/loader-openapi - START inputs = 0 DEBUG [2.15 s]: pipeline-emitter - START inputs = 0 DEBUG [2.17 s]: configuration-emitter - START inputs = 0 DEBUG [2.23 s]: pipeline-emitter - END [0.08 s] DEBUG [2.23 s]: configuration-emitter - END [0.08 s] DEBUG [2.43 s]: swagger-document/loader-swagger - END [0.29 s] DEBUG [2.44 s]: swagger-document/individual/transform - SKIPPING DEBUG [2.44 s]: swagger-document/individual/schema-validator-swagger - SKIPPING DEBUG [2.44 s]: swagger-document/identity - SKIPPING DEBUG [2.44 s]: swagger-document/individual/identity - SKIPPING DEBUG [2.44 s]: openapi-document/openapi-document-converter - SKIPPING autorest-beta : C:\[email protected][email protected]\[email protected]\core\dist\lib\pipeline\pipeline.js - FAILURE {"exitCode":1} At line:1 char:1

    • autorest-beta --debug --version=3.0.6237 --input-file=BackendSwagger. ...
    •   + CategoryInfo          : NotSpecified: (C:\Users\.... {"exitCode":1}:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
      
      

    Process() cancelled due to exception : Collision detected inserting into object: constructor / Error: Collision detected inserting into object: constructor at Object.set (/node_modules/@azure-tools/datastore/dist/graph-builder.js:45:23) at RefProcessor.newObject (/node_modules/@azure-tools/datastore/dist/processor.js:40:24) at RefProcessor.process (C:\[email protected][email protected]\[email protected]\core\dist\lib\pipeline\plugins\ref-crawling.js:105:41) at process._tickCallback (internal/process/next_tick.js:68:7) Error: Collision detected inserting into object: constructor [2.58 s] Shutting Down. [2.59 s] Exiting.

    Packages:

    • Swashbuckle 5.0.0
    • Autorest 3.0.6237
    opened by Agne-ops 20
  • Method not found: 'Void Microsoft.Rest.ServiceClient`1..ctor(System.Net.Http.DelegatingHandler[])'.

    Method not found: 'Void Microsoft.Rest.ServiceClient`1..ctor(System.Net.Http.DelegatingHandler[])'.

    Hi,

    I'm developing a WPF application that uses an autorest generated client to communicate with an API. It was working correctly until today (VS2017)

    I'm getting the following error: Method not found: 'Void Microsoft.Rest.ServiceClient`1..ctor(System.Net.Http.DelegatingHandler[])'.

    I tried the following:

    • Rebuild and Clean the Project
    • Run autorest --reset and regenerate the client
    • Restart visual studio
    • Update to the lastest version of Microsoft.Rest.ClientRuntime (2.3.10)
    • Search in my hard drive and erase all old versios of ClientRuntime

    None of them worked, I'm just calling the constructor like this (ProjectAPI is the name of my API generated class): ProjectAPI api = new ProjectAPI (new Uri("http://localhost"));

    I searched in the repository but there are no issues related to this, anyone can help?

    Thanks a lot.

    opened by calvaradocl 20
  • Failed to install Autorest extension...

    Failed to install Autorest extension...

    When I try to generate csharp proxy I get the following error:

    Installing AutoRest extension '@microsoft.azure/autorest.csharp' (~2.1.0) Unable to install/use dotnet framework. (node:20816) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5):

    opened by srininz77 20
  • Added TypeScript support, generating .d.ts files alongside NodeJS JavaScript

    Added TypeScript support, generating .d.ts files alongside NodeJS JavaScript

    Here's the updated pull request for TypeScript support. Now the d.ts files are consolidated, so it'll generate at most 3 d.ts files: .d.ts, models/index.d.t.s, and operations/index.d.ts.

    d.ts generation is pretty harmless, but to disable, if that's desired for any reason, can do this: Change NodeJSCodeGenerator.DisableTypeScriptGeneration to true Don't include index.d.ts addition in ms-rest npm update (though, again, it's pretty harmless if included)

    opened by BretJohnson 20
  • Error: Plugin cadl-compiler reported failure.

    Error: Plugin cadl-compiler reported failure.

    autorest --cadl --input-file=.\main.cadl AutoRest code generation utility [cli version: 3.6.2; node: v19.3.0] (C) 2018 Microsoft Corporation. https://aka.ms/autorest info | Loading AutoRest core 'C:\Users\[email protected]@3.9.3\[email protected]\core\dist' (3.9.3) info | Loading AutoRest extension '@autorest/cadl' (latest->0.2.1) fatal | TypeError: createProgram is not a function fatal | Process() cancelled due to failure error | Error: Plugin cadl-compiler reported failure. error | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.

    autorest --list-available AutoRest code generation utility [cli version: 3.6.2; node: v19.3.0] (C) 2018 Microsoft Corporation. https://aka.ms/autorest Extension Name Version

    @autorest/core 3.9.3 @autorest/core 3.9.2 @autorest/core 3.9.1 @autorest/core 3.9.0 @autorest/core 3.8.4 @autorest/core 3.8.3 @autorest/core 3.8.2 @autorest/core 3.8.1 @autorest/core 3.8.0 @autorest/core 3.7.6

    autorest --info AutoRest code generation utility [cli version: 3.6.2; node: v19.3.0] (C) 2018 Microsoft Corporation. https://aka.ms/autorest

    Showing All Installed Extensions

    Type Extension Name Version Location extension @autorest/cadl 0.2.1 C:\Users\[email protected][email protected] core @autorest/core 3.9.3 C:\Users\[email protected][email protected] extension @autorest/csharp 3.0.0-beta.20221219.1 C:\Users\[email protected][email protected] extension @autorest/modelerfour 4.25.0 C:\Users\[email protected][email protected]

    autorest --cadl --input-file=.\main.cadl --verbose AutoRest code generation utility [cli version: 3.6.2; node: v19.3.0] (C) 2018 Microsoft Corporation. https://aka.ms/autorest info | Loading AutoRest core 'C:\Users\[email protected]@3.9.3\[email protected]\core\dist' (3.9.3) verbose | [0.91 s] No configuration found at 'file:///C:/Users/akshayranjan/source/repos/CSFI-Service/src/CSFIService/CSFIService.CADL/'. verbose | [0.93 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/default-configuration.md' verbose | [0.96 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/inspect.md' verbose | [0.98 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/directives.md' verbose | [0.99 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/pipeline.md' verbose | [1.00 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/loader-openapi.md' verbose | [1.02 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/miscellaneous.md' verbose | [1.04 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-powershell.md' verbose | [1.06 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-azureresourceschema.md' verbose | [1.08 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-csharp.md' verbose | [1.10 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-go.md' verbose | [1.13 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-java.md' verbose | [1.16 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-nodejs.md' verbose | [1.18 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-php.md' verbose | [1.21 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-python.md' verbose | [1.24 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-ruby.md' verbose | [1.27 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-typescript.md' verbose | [1.30 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-validators.md' verbose | [1.33 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-az.md' verbose | [1.37 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-terraform.md' verbose | [1.41 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-azure-functions.md' verbose | [1.48 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/graphs.md' verbose | [1.52 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/help-configuration.md' info | Loading AutoRest extension '@autorest/cadl' (latest->0.2.1) verbose | [1.69 s] Including extension configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/cadl/readme.md' verbose | [1.69 s] Including configuration file 'file:///C:/Users/akshayranjan/.autorest/@[email protected]/nodemodules/@autorest/cadl/readme.md' fatal | TypeError: createProgram is not a function fatal | Process() cancelled due to failure error | Error: Plugin cadl-compiler reported failure. error | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.

    question customer-reported 
    opened by onexay 1
  • Reusing of a definition in both responses and requests

    Reusing of a definition in both responses and requests

    Before asking the question:

    • [X] have you checked the faq, the documentation in the docs folder and couldn't find the information there
    • [X] have you checked existing issues for a similar question?

    I would like to add APIs for creating, reading, and updating an "Item". We would like to use the same contract (definition) of "Item" for the API responses, as well as the body payload in the create and update requests. The contract, however, has properties that cannot be modified (e.g., "ID"), as well as properties that should only be returned in responses, while others may be set or modified during instantiation (which depends on the type of request).

    There were several combinations that I tried, including "x-ms-mutability" which sounded promising, but the results weren't as expected. Is there any way to accomplish our goal? Are there any ways to control the visibility of a property based on a condition? Do you have any recommendations for how we can get the expected behavior?

    I would appreciate your input.

    Below is a swagger file sample that illustrates the situation:

    {
        "swagger": "2.0",
        "info": {
          "title": "example",
          "version": "example"
        },
        "basePath": "/something",
        "host": "myhost.com",
        "paths": {
            "/items": {
                "post": {
                    "operationId": "CreateItem",
                    "parameters": [
                        {
                            "in": "body",
                            "name": "newItem",
                            "schema": {
                                "$ref": "#/definitions/Item"
                            }
                        }
                    ],
                    "responses": {
                        "200": {
                            "description": "Successfuly created.",
                            "schema": {
                                "$ref": "#/definitions/Item"
                            }
                        }
                    }
                },
                "patch": {
                    "operationId": "UpdateItem",
                    "parameters": [
                        {
                            "in": "body",
                            "name": "updatemItem",
                            "schema": {
                                "$ref": "#/definitions/Item"
                            }
                        }
                    ],
                    "responses": {
                        "200": {
                            "description": "Successfuly updated.",
                            "schema": {
                                "$ref": "#/definitions/Item"
                            }
                        }
                    }
                }
            },
            "/items/{itemId}": {
                "get": {
                    "operationId": "GetItem",
                    "parameters": [
                        {
                            "in": "path",
                            "name": "itemId"
                        }
                    ],
                    "responses": {
                        "200": {
                            "description": "Successfuly fetched.",
                            "schema": {
                                "$ref": "#/definitions/Item"
                            }
                        }
                    }
                }
            }
        },
        "definitions": {
            "Item": {
                "type": "object",
                "properties": {
                    "Read only property - returned in response only": {
                        "type": "string",
                        "description": "read only - returned in responses only"
                    },
                    "writable property - can be set in creation/update. returned in response": {
                        "type": "string",
                        "description": "writable. can be set in create/update and returned in responses"
                    },
                    "writable property - can be set only for update (e.g., state). returned in response": {
                        "type": "number",
                        "description": "only for update. returned in responses"
                    }
                }
            }
        }
    }
    
    question needs-author-feedback no-recent-activity 
    opened by ayeshurun 2
  • [openAPI-to-cadl] Remove cadl-python from dependencies

    [openAPI-to-cadl] Remove cadl-python from dependencies

    Can't see what purpose this would have since the tool is all typescript. This dependency makes it impossible to use the plugin without Python installed. It should be unnecessary.

    opened by tjprescott 3
  • 'group-parameters: true' does not work

    'group-parameters: true' does not work

    Before filling a bug

    • [x] have you checked the faq for known issues.
    • [x] have you checked existing issues

    I am using autorest/[email protected], when I try to enable x-ms-parameter-grouping by setting group-parameters: true. I will run into an exception as below (with swagger here).

    C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\modelerfour\dist\main.js - FAILURE  {} TypeError: this.codeModel.schemas.add is not a function
        at Grouper.processParameterGroup (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\src\grouper\grouper.ts:98:34) 
        at Grouper.process (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\src\grouper\grouper.ts:45:18)
        at processRequest (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\src\grouper\plugin-grouper.ts:22:27)
        at C:\Users\xidi\.autorest\@[email protected]\libs\extension-base\dist\autorest-extension.js:47:1
    PLUGIN FAILURE: this.codeModel.schemas.add is not a function, TypeError: this.codeModel.schemas.add is not a function
        at Grouper.processParameterGroup (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\src\grouper\grouper.ts:98:34) 
        at Grouper.process (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\src\grouper\grouper.ts:45:18)
        at processRequest (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\src\grouper\plugin-grouper.ts:22:27)
        at C:\Users\xidi\.autorest\@[email protected]\libs\extension-base\dist\autorest-extension.js:47:1, {}
    fatal   | TypeError: this.codeModel.schemas.add is not a function
    fatal   | Process() cancelled due to exception : Plugin grouper reported failure. / Error: Plugin grouper reported failure.
        at C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\core\dist\src_lib_autorest-corets.js:2817:19
        at ScheduleNode (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\core\dist\src_lib_autorest-corets.js:1351:29)
    error   |   Error: Plugin grouper reported failure.
    error   | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.
    debug   | [6.82 s] Shutting Down.
    debug   | [6.82 s] Exiting.
     xidi on  ~/acsharp/samples
    

    I also have a try with a pretty simple swagger here. And it throws a different exception as below.

    C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\modelerfour\dist\main.js - FAILURE {} TypeError: request.updateSignatureParameters is not a function at Grouper.process (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\src\grouper\grouper.ts:46:21) at processRequest (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\src\grouper\plugin-grouper.ts:22:27) at C:\Users\xidi\.autorest\@[email protected]\libs\extension-base\dist\autorest-extension.js:47:1 PLUGIN FAILURE: request.updateSignatureParameters is not a function, TypeError: request.updateSignatureParameters is not a function at Grouper.process (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\src\grouper\grouper.ts:46:21) at processRequest (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\src\grouper\plugin-grouper.ts:22:27) at C:\Users\xidi\.autorest\@[email protected]\libs\extension-base\dist\autorest-extension.js:47:1, {} fatal | TypeError: request.updateSignatureParameters is not a function fatal | Process() cancelled due to exception : Plugin grouper reported failure. / Error: Plugin grouper reported failure. at C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\core\dist\src_lib_autorest-corets.js:2817:19 at ScheduleNode (C:\Users\xidi\.autorest\@[email protected]\node_modules\@autorest\core\dist\src_lib_autorest-corets.js:1351:29) error | Error: Plugin grouper reported failure.

    Please provide as much information as you can. This would be:
    - OpenAPI files having the issues
    - Autorest command used
    

    Expected behavior A clear and concise description of what you expected to happen.

    Additional context Add any other context about the problem here.

    opened by dolauli 9
  • A question related to modelAsString in x-ms-enum

    A question related to modelAsString in x-ms-enum

    Before asking the question:

    • [x] have you checked the faq, the documentation in the docs folder and couldn't find the information there
    • [x] have you checked existing issues for a similar question?

    I am using autorest/[email protected]. And I need to use it with following switch on. As a result, modelerfour will create SealedChoiceSchema for x-ms-enum. The issue I ran into is that modelAsString is dropped. Is there any way I could know whether modelAsString is set to true or false in modelerfour? Would it be possible to add the modelASstring in the extensions of a SealedChoiceSchema?

    always-seal-x-ms-enums: true
    
    question 
    opened by dolauli 24
Releases(autorest-core-2.0.4421)
Owner
Microsoft Azure
APIs, SDKs and open source projects from Microsoft Azure
Microsoft Azure
The sarge package provides a wrapper for subprocess which provides command pipeline functionality.

Overview The sarge package provides a wrapper for subprocess which provides command pipeline functionality. This package leverages subprocess to provi

Vinay Sajip 14 Dec 18, 2022
The blazing-fast Discord bot.

Wavy Wavy is an open-source multipurpose Discord bot built with pycord. Wavy is still in development, so use it at your own risk. Tools and services u

Wavy 7 Dec 27, 2022
This repository outlines deploying a local Kubeflow v1.3 instance on microk8s and deploying a simple MNIST classifier using KFServing.

Zero to Inference with Kubeflow Getting Started This repository houses all of the tools, utilities, and example pipeline implementations for exploring

Ed Henry 3 May 18, 2022
Beautiful static documentation generator for OpenAPI/Swagger 2.0

Spectacle The gentleman at REST Spectacle generates beautiful static HTML5 documentation from OpenAPI/Swagger 2.0 API specifications. The goal of Spec

Sourcey 1.3k Dec 13, 2022
Gaphor is the simple modeling tool

Gaphor Gaphor is a UML and SysML modeling application written in Python. It is designed to be easy to use, while still being powerful. Gaphor implemen

Gaphor 1.3k Jan 03, 2023
JMESPath is a query language for JSON.

JMESPath JMESPath (pronounced "james path") allows you to declaratively specify how to extract elements from a JSON document. For example, given this

1.7k Dec 31, 2022
Plover jyutping - Plover plugin for Jyutping input

Plover plugin for Jyutping Installation Navigate to the repo directory: cd plove

Samuel Lo 1 Mar 17, 2022
An open-source script written in python just for fun

Owersite Owersite is an open-source script written in python just for fun. It do

大きなペニスを持つ少年 7 Sep 21, 2022
✨ Real-life Data Analysis and Model Training Workshop by Global AI Hub.

🎓 Data Analysis and Model Training Course by Global AI Hub Syllabus: Day 1 What is Data? Multimedia Structured and Unstructured Data Data Types Data

Global AI Hub 71 Oct 28, 2022
Second version of SQL-PYTHON-Practicas

SQLite-Python Acerca de | Autor Sobre el repositorio Segunda version de SQL-PYTHON-Practicas 💻 Tecnologias Visual Studio Code Python SQLite3 📖 Requi

1 Jan 06, 2022
[Unofficial] Python PEP in EPUB format

PEPs in EPUB format This is a unofficial repository where I stock all valid PEPs in the EPUB format. Repository Cloning git clone --recursive Mickaël Schoentgen 9 Oct 12, 2022

Always know what to expect from your data.

Great Expectations Always know what to expect from your data. Introduction Great Expectations helps data teams eliminate pipeline debt, through data t

Great Expectations 7.8k Jan 05, 2023
Course Materials for Math 340

UBC Math 340 Materials This repository aims to be the one repository for which you can find everything you about Math 340. Lecture Notes Lecture Notes

2 Nov 25, 2021
Automatic links from code examples to reference documentation

sphinx-codeautolink Automatic links from Python code examples to reference documentation at the flick of a switch! sphinx-codeautolink analyses the co

Felix Hildén 41 Dec 17, 2022
The Python Dict that's better than heroin.

addict addict is a Python module that gives you dictionaries whose values are both gettable and settable using attributes, in addition to standard ite

Mats Julian Olsen 2.3k Dec 22, 2022
Bring RGB to life in Neovim

Bring RGB to life in Neovim Change your RGB devices' color depending on Neovim's mode. Fast and asynchronous plugin to live your vim-life to the fulle

Antoine 40 Oct 27, 2022
Speed up Sphinx builds by selectively removing toctrees from some pages

Remove toctrees from Sphinx pages Improve your Sphinx build time by selectively removing TocTree objects from pages. This is useful if your documentat

Executable Books 8 Jan 04, 2023
Mkdocs obsidian publish - Publish your obsidian vault through a python script

Mkdocs Obsidian Mkdocs Obsidian is an association between a python script and a

Mara 49 Jan 09, 2023
Sphinx-performance - CLI tool to measure the build time of different, free configurable Sphinx-Projects

CLI tool to measure the build time of different, free configurable Sphinx-Projec

useblocks 11 Nov 25, 2022
A document format conversion service based on Pandoc.

reformed Document format conversion service based on Pandoc. Usage The API specification for the Reformed server is as follows: GET /api/v1/formats: L

David Lougheed 3 Jul 18, 2022