Code Monkey home page Code Monkey logo

Comments (5)

timotheeguerin avatar timotheeguerin commented on May 28, 2024 1

from the place where this error is emitted

         // we're attempting to put another operation at the same path/method
        // where there is one already.
        // This is likely a case where a multi-api-version file is trying to
        // go thru the composer, and this is not allowed.
        throw new Error(
          `There are multiple operations defined for \n  '${key}: ${metadata.path}'.\n\n  You are probably trying to use an input with multiple API versions with an autorest V2 generator, and that will not work. `,
        );

autorest is basically just a pipeline runner. It provides all those plugins where a few are those old legacy one(including this new composer. I have no idea why you still be calling this here.

The duplicate operation is also something I am just confused it would ever work. The only things that I can see autorest was kinda design to work with is if you loaded different version of the same api but that's something we never actually did.
If you pass those spec through the m4 pipeline(generate SDK) it also fails later complaining about some duplication. TO me this just seems like this spec shouldn't be keeping those dup operations.

The previous bug I fixed was bad in the sense that it was just crashing with a meaningless message and that's not something we should do.

from autorest.

timotheeguerin avatar timotheeguerin commented on May 28, 2024

This one looks expected to me

from autorest.

mikeharder avatar mikeharder commented on May 28, 2024

This one looks expected to me

Are you saying it's expected that autorest fails on duplicate paths, and fix #4896 was just to convert the failure from a crash to a better error message? Or did the spec have multiple issues, and fixing #4896 fixed one issue which just exposed the next issue?

from autorest.

timotheeguerin avatar timotheeguerin commented on May 28, 2024

So digging into that, it might be getting there because of autorest deciding to run the legacy pipeline by default. Maybe we could not do that anymore(though I am worried this will break existing flow) so maybe have a flag.

However my last point still stand. Even though the linter flow might not complain about that it would still fail later.

from autorest.

mikeharder avatar mikeharder commented on May 28, 2024

To me this just seems like this spec shouldn't be keeping those dup operations.

I think this was a temporary bug in the spec -- it's since been updated to remove the dup operations.

Closing for now, will re-open if this becomes a recurring problem.

from autorest.

Related Issues (20)

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.