path is defined multiple times
See original GitHub issueDescribe the bug After updating from 5.3.0 to 5.4.0 I got the following error message:
5671:15 error path-params Path parameter
path
is defined multiple times. Path parameters must be unique.
I looked through the file and there’s only a single mention of a path
parameter
To Reproduce
Here’s the OpenAPI file I’m working on: https://github.com/Open-EO/openeo-api/blob/bc79b312768cc462a99f09d1f9c8caeb47b5dfbc/openapi.yaml I’m running: spectral lint openapi.yaml Ruleset is spectral:oas
Expected behavior No error message.
Environment (remove any that are not applicable):
- Library version: 5.4.0
- OS: Windows 10 + Linux on TravisCI
Additional context Downgrading to 5.3.0 doesn’t show an error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Type BuildConfig is defined multiple times - Stack Overflow
I ran into a situation where a BuildConfig 3.class showed up, so now I search by Config ... MainActivity is defined multiple times....
Read more >Path | Android Developers
The Path class encapsulates compound (multiple contour) geometric paths consisting of straight line segments, quadratic curves, and cubic curves.
Read more >API - esbuild
The build API call operates on one or more files in the file system. ... Imports that are defined at run-time (i.e. imports...
Read more >os.path — Common pathname manipulations — Python 3.11 ...
Return the time of last access of path. The return value is a floating point number giving the number of seconds since the...
Read more >Type com.google.gson.ExclusionStrategy is defined multiple ...
Type com.google.gson.ExclusionStrategy is defined multiple times ... implementation project(path: ':wcs-android-sdk-1.1.0.13-release')
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@m-mohr After a quick look at the code, I reversed engineered the problem. From the
put
anddelete
operation standpoint, the issue is legit. The parameter is indeed defined at the operation level, but also exists at the pathparameters
level.Now, I can see that there are at least two things that seem wrong from the UX perspective:
["components", "parameters", "file_path"]
. This is very unhelpful to actually understand the context of the problem (and reminds me a lot of of https://github.com/stoplightio/spectral/issues/1254#issuecomment-650575599)@P0lip @philsturgeon Improving the error message should be quite easy in this context. However, I’m slightly more concerned about the “misleading” path. Thoughts?
@m-mohr Yep. That was what I was pointing at with my previous comment:
Thanks to your issue and #1254, we’ve now got two great cases to improve the report of paths so that they’re more helpful.