Skip to content
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

Probably controller method parameter servletResponse should be annotated as hidden for openAPI #9

Open
Unstopabul opened this issue Feb 5, 2024 · 0 comments

Comments

@Unstopabul
Copy link

Currently a controller method looks like this:
public ExampleOut executeExampleIn(@RequestBody ExampleIn examplein,
@RequestParam @Parameter(hidden = true) Map<String, String> params,
HttpServletResponse servletResponse, @RequestHeader Map<String, String> headers) {
kafkaSenderService.send(topicName, examplein, params, servletResponse);
return new ExampleOut();
}

servletResponse parameter is not annotated. As the result, this parameter is listed in the generated api and has pretty long description.

"paths": {
	"/kafka/example_group/example_topic/ExampleIn": {
		"post": {
			"tags": [
				"example"
			],
			"description": "example handler",
			"operationId": "executeExampleIn",
			"parameters": [
				{
					"name": "servletResponse",
					"in": "query",
					"required": true,
					"schema": {
						"type": "object",
						"properties": {
							"trailerFields": {
								"type": "object"
							},
							"status": {
								"type": "integer",
								"format": "int32"
							},
							"headerNames": {
								"type": "array",
								"items": {
									"type": "string"
								}
							},
							"contentType": {
								"type": "string"
							},
							"outputStream": {
								"type": "object",
								"properties": {
									"ready": {
										"type": "boolean"
									},
									"writeListener": {
										"type": "object",
										"writeOnly": true
										...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant