question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

operationId is not guaranteed to be unique

See original GitHub issue

An example of the naive implementation failing is a definition for request mappings like the following

@RequestMapping(method=RequestMethod.GET, value={"/campaigns","/campaigns/{id}"})
public String getCampaignDetails(Model model,
     @RequestParam(value="id", required=false) Long id,
     @PathVariable("id") Long id2)
{
}

Another scenario:

@RequestMapping(method=RequestMethod.GET, value={"/campaigns","/campaignsAlias"})

This bug relates to #659

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:19 (17 by maintainers)

github_iconTop GitHub Comments

6reactions
rajeshkamal5050commented, Jul 29, 2015

Hi,

I am using the 2.1.0 Springfox release. I make sure to provide proper meaningful and unique nicknames across all our controllers. So, I really do not want Springfox to add the additional uniqueness strings something like “UsingGET” etc.

The generated operation ids or java code looks like this, If you look at each of the method names, they are already unique and convey meaningful information. I really do not want the Using part to be appended. I agree that in some scenarios it might be helpful when the developers who do not provide nicknames. But if a nickname is provided then, we should definitely leave the responsibility to the users/developers and not override their settings. Or provide any other mechanism to get the name as what I want to.

Rack Controller.

getRacksUsingGET() getRackUsingGET(String) getAlertsUsingGET1(String, String) getSetupConfigUsingGET(String) updateSetupConfigUsingPUT(String, RackConfig) getEventsUsingGET1(String, String) getHostsUsingGET2(String) getIpReAllocationUsingGET(String) rerunIpReAllocationUsingPUT(String) performIpReAllocationUsingPOST(String) cancelIpReAllocationUsingDELETE(String) getSwitchesUsingGET(String)

0reactions
miguelruizdevcommented, Jan 12, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Checking uniqueness of OperationId when using c ...
After many tries, I've found a workaround: use an operation filter that will throw an exception if OperationId is already used
Read more >
operation-operationId-unique - Redocly
The operationId should be unique (used only once in an OpenAPI definition). This rule is unopinionated.
Read more >
Re: The spooled operation id does not exist ERROR
Spooled operation id, request id and activity id are unique in every error. I have no ideas, which row it refers to. How...
Read more >
Evolve your API with version control - Microsoft Learn
Each operation has a unique operationId and a unique urlPath and ... deadline where support for the operation is no longer guaranteed.
Read more >
Link (MicroProfile OpenAPI API 2.0-RC3 API)
The presence of a link does not guarantee the caller's ability to successfully invoke it ... resolvable OAS operation, as defined with a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found