Skip to content

(fix): change ParameterId hashCode() #1902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

mskangg
Copy link

@mskangg mskangg commented Oct 21, 2022

Fixes #1901

  • Objects.hash(pName, paramType, $ref) -> Objects.hash(pName);

In version 1.6.11 ParameterId was simply String name.
There is a new ParameterId in version 1.6.12 and there is a bug.
So I changed ParameterId.hashCode() code to String name.

- Objects.hash(pName, paramType, $ref) -> Objects.hash(pName);
@bnasslahsen
Copy link
Collaborator

@mskangg,

Thank you for your attempt!

For example, this use case is not handled:

	@GetMapping("/duplicate_param")
	@Operation(summary = "Duplicate param")
	@Parameter(name = "sample", required = true, in = ParameterIn.HEADER, description = "sample Header")
	@Parameter(name = "sample", required = true, in = ParameterIn.QUERY, description = "sample query")
	public String duplicateParam(@RequestParam String sample, @RequestHeader("sample") String sampleHeader) {
		return "duplicateParam";
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When @Get, using @Parameter over the method results in duplicate of the same parameter
2 participants