All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.networknt.oas.validator.impl.Regexes Maven / Gradle / Ivy

There is a newer version: 2.1.38
Show newest version
/*******************************************************************************
 *  Copyright (c) 2017 ModelSolv, Inc. and others.
 *  All rights reserved. This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 *
 *  Contributors:
 *     ModelSolv, Inc. - initial API and implementation and/or initial documentation
 *******************************************************************************/
package com.networknt.oas.validator.impl;

import java.util.regex.Pattern;

public class Regexes {

    public static final Pattern PATH_REGEX = Pattern.compile("/.*");
    public static final Pattern EXT_REGEX = Pattern.compile("x-.+");
    public static final Pattern NOEXT_REGEX = Pattern.compile("(?!x-).*");
    public static final Pattern NAME_REGEX = Pattern.compile("[a-zA-Z0-9\\._-]+");
    public static final Pattern NOEXT_NAME_REGEX = Pattern.compile("(?!x-)[a-zA-Z0-9\\._-]+");
    public static final Pattern METHOD_REGEX = Pattern.compile("get|put|post|delete|options|head|patch|trace");
    public static final Pattern PARAM_IN_REGEX = Pattern.compile("path|query|header|cookie");
    public static final Pattern STYLE_REGEX = Pattern
            .compile("matrix|label|form|simple|spaceDelimited|pipeDelimited|deepObject");
    public static final Pattern RESPONSE_REGEX = Pattern.compile("default|\\d\\d\\d");
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy