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:\Users.autorest@[email protected] Loading AutoRest core 'C:\Users.autorest@[email protected]\node_modules@autorest\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:\Users.autorest@[email protected]\node_modules@autorest\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:\Users.autorest@[email protected]\node_modules@autorest\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\akshayranjan.autorest@[email protected]\nodemodules@autorest\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\akshayranjan.autorest@[email protected] core @autorest/core 3.9.3 C:\Users\akshayranjan.autorest@[email protected] extension @autorest/csharp 3.0.0-beta.20221219.1 C:\Users\akshayranjan.autorest@[email protected] extension @autorest/modelerfour 4.25.0 C:\Users\akshayranjan.autorest@[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\akshayranjan.autorest@[email protected]\nodemodules@autorest\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
SqlAlchemy Flask-Restful Swagger Json:API OpenAPI

SAFRS: Python OpenAPI & JSON:API Framework Overview Installation JSON:API Interface Resource Objects Relationships Methods Custom Methods Class Method

Thomas Pollet 361 Nov 16, 2022
Swagger Documentation Generator for Django REST Framework: deprecated

Django REST Swagger: deprecated (2019-06-04) This project is no longer being maintained. Please consider drf-yasg as an alternative/successor. I haven

Marc Gibbons 2.6k Jan 3, 2023
API spec validator and OpenAPI document generator for Python web frameworks.

API spec validator and OpenAPI document generator for Python web frameworks.

1001001 249 Dec 22, 2022
A swagger tool for tornado, using python to write api doc!

SwaggerDoc About A swagger tool for tornado, using python to write api doc! Installation pip install swagger-doc Quick Start code import tornado.ioloo

aaashuai 1 Jan 10, 2022
Flask-Rebar combines flask, marshmallow, and swagger for robust REST services.

Flask-Rebar Flask-Rebar combines flask, marshmallow, and swagger for robust REST services. Features Request and Response Validation - Flask-Rebar reli

PlanGrid 223 Dec 19, 2022
Sane and flexible OpenAPI 3 schema generation for Django REST framework.

drf-spectacular Sane and flexible OpenAPI 3.0 schema generation for Django REST framework. This project has 3 goals: Extract as much schema informatio

T. Franzel 1.4k Jan 8, 2023
Test utility for validating OpenAPI documentation

DRF OpenAPI Tester This is a test utility to validate DRF Test Responses against OpenAPI 2 and 3 schema. It has built-in support for: OpenAPI 2/3 yaml

snok 106 Jan 5, 2023
A curated list of awesome tools for Sphinx Python Documentation Generator

Awesome Sphinx (Python Documentation Generator) A curated list of awesome extra libraries, software and resources for Sphinx (Python Documentation Gen

Hyunjun Kim 831 Dec 27, 2022
Word document generator with python

In this study, real world data is anonymized. The content is completely different, but the structure is the same. It was a script I prepared for the backend of a work using UiPath.

Ezgi Turalı 3 Jan 30, 2022
Literate-style documentation generator.

888888b. 888 Y88b 888 888 888 d88P 888 888 .d8888b .d8888b .d88b. 8888888P" 888 888 d88P" d88P" d88""88b 888 888 888

Pycco 808 Dec 27, 2022
Documentation generator for C++ based on Doxygen and mosra/m.css.

mosra/m.css is a Doxygen-based documentation generator that significantly improves on Doxygen's default output by controlling some of Doxygen's more unruly options, supplying it's own slick HTML+CSS generation and adding a fantastic live search feature.

Mark Gillard 109 Dec 7, 2022
Dynamic Resume Generator

Dynamic Resume Generator

Quinten Lisowe 15 May 19, 2022
🍭 epub generator for lightnovel.us 轻之国度 epub 生成器

lightnovel_epub 本工具用于基于轻之国度网页生成epub小说。 注意:本工具仅作学习交流使用,作者不对内容和使用情况付任何责任! 原理 直接抓取 HTML,然后将其中的图片下载至本地,随后打包成 EPUB。

gyro永不抽风 188 Dec 30, 2022
Markdown documentation generator from Google docstrings

mkgendocs A Python package for automatically generating documentation pages in markdown for Python source files by parsing Google style docstring. The

Davide Nunes 44 Dec 18, 2022
Run `black` on python code blocks in documentation files

blacken-docs Run black on python code blocks in documentation files. install pip install blacken-docs usage blacken-docs provides a single executable

Anthony Sottile 460 Dec 23, 2022
This is a repository for "100 days of code challenge" projects. You can reach all projects from beginner to professional which are written in Python.

100 Days of Code It's a challenge that aims to gain code practice and enhance programming knowledge. Day #1 Create a Band Name Generator It's actually

SelenNB 2 May 12, 2022
Source Code for 'Practical Python Projects' (video) by Sunil Gupta

Apress Source Code This repository accompanies %Practical Python Projects by Sunil Gupta (Apress, 2021). Download the files as a zip using the green b

Apress 2 Jun 1, 2022
Tutorial for STARKs with supporting code in python

stark-anatomy STARK tutorial with supporting code in python Outline: introduction overview of STARKs basic tools -- algebra and polynomials FRI low de

null 121 Jan 3, 2023
Python code for working with NFL play by play data.

nfl_data_py nfl_data_py is a Python library for interacting with NFL data sourced from nflfastR, nfldata, dynastyprocess, and Draft Scout. Includes im

null 82 Jan 5, 2023