Skip to content

Multiple endpoints on @GetParam, but springdoc only generate one #219

@timpamungkas

Description

@timpamungkas

I have one method marked as multiple endpoints : /, /ping, /health
Like this

@Tag(name = OpenApiConfig.TAG_HEALTH_CHECK, description = "Health check / ping API")
@RestController
public class DefaultHealthCheckApi {

	@Operation(summary = "Check server status", description = "Check server status, will return 200 with simple string if alive. Do nothing else.")
	@GetMapping(value = { "/ping", "/health", "/" }, produces = MediaType.TEXT_PLAIN_VALUE)
	public ResponseEntity<String> ping() {
		return ResponseEntity.ok("Healthy");
	}

}

But springdoc only generates the first (/ping in this case)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions