Comments (5)
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.
This one looks expected to me
from autorest.
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.
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.
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)
- [TSP] Default value of string[]
- [TSP] Default value of duration HOT 2
- [TSP] Escape character issue of */ HOT 2
- [TSP] Model extends Record<unknown> HOT 1
- [TSP] The result of ArmResourceActionSync's TRequest was an error type HOT 1
- Add a flag to disable conversion feature for backcomp HOT 1
- Support new location resource
- Change to raw operation for `route.tsp` operation
- Fatal error in lintdiff execution resulting in a healthy automated check when it is expected to fail
- Migrate `@projectedName` to new decorators
- Support x-nullable in conversion
- Convert basic type definition to scalar
- Support `@summary` for model, parameter and model properties
- Revisit the conversion for `x-ms-secret`
- Support `x-ms-mutability` in conversion
- Add a schema of autorest configuration to schemastore.org
- How to disable method validations on Swagger API to TypeSpec conversion HOT 1
- Error on converting Swagger API to TypeSpec HOT 2
- Handle csharp error for arm tsp converter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autorest.