Here you can find the source of sanitizePath(String apiPath)
Parameter | Description |
---|---|
apiPath | The api path to sanitize |
public static String sanitizePath(String apiPath)
//package com.java2s; //License from project: Apache License public class Main { /**//from w w w . j a va2 s . c o m * This sanitizes an API path. It handles removing regex path expressions * e.g instead of /api/test/{id:[0-9]+} it will return /api/test/{id} * @param apiPath The api path to sanitize * @return The sanitized path */ public static String sanitizePath(String apiPath) { return apiPath.replaceAll("[: ]+.*?}", "}"); } }