@Bean
	RouterFunction<?> routes(BookRepository br) {
		return nest(path("/greeter").and(path("/greeter2")),
				route(GET("/books").and(accept(MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML)), req -> ok().body(br.findAll()))
						.withAttribute(OPERATION_ATTRIBUTE, operationBuilder().beanClass(BookRepository.class).beanMethod("findAll"))

						.and(route(GET("/books").and(accept(MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN)), req -> ok().body(br.findAll()))
								.withAttribute(OPERATION_ATTRIBUTE, operationBuilder().beanClass(BookRepository.class).beanMethod("findAll")))

						.and(route(GET("/books/{author}"), req -> ok().body(br.findByAuthor(req.pathVariable("author"))))
								.withAttribute(OPERATION_ATTRIBUTE, operationBuilder()
										.operationId("findByAuthor").parameter(parameterBuilder().name("author").in(ParameterIn.PATH))
										.beanClass(BookRepository.class).beanMethod("findByAuthor")))
		);
	}
Routes router function.

@param br the br
@return the router function
springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v30/app141/BookRouter.java