@Override
	public Operation customize(Operation operation, HandlerMethod handlerMethod) {
		if (handlerMethod.getReturnType().getParameterType().isAssignableFrom(Duration.class)) {
			for (Map.Entry<String, io.swagger.v3.oas.models.responses.ApiResponse> entry : operation.getResponses().entrySet()) {
				io.swagger.v3.oas.models.responses.ApiResponse response = entry.getValue();
				Content content = response.getContent();
				if (content.containsKey(MediaType.APPLICATION_JSON_VALUE)) {
					Schema schema = content.get(MediaType.APPLICATION_JSON_VALUE).getSchema();
					schema.types(Set.of("string"));
					schema.getProperties().clear();
				}
			}
		}
		return operation;
	}
Customize operation.

@param operation     the operation
@param handlerMethod the handler method
@return the operation
springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v31/app115/JavaTimeOperationCustomizer.java