2 * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.restconf.openapi;
10 import java.util.List;
12 import org.opendaylight.restconf.openapi.model.Parameter;
13 import org.opendaylight.restconf.openapi.model.Path;
15 public final class OpenApiTestUtils {
17 private OpenApiTestUtils() {
22 * Get path parameters names for {@code path} for GET operation.
24 * @return {@link List} of parameters excluding `content` parameter
26 public static List<String> getPathGetParameters(final Map<String, Path> paths, final String path) {
27 return paths.get(path).get().parameters()
30 .filter(p -> !"content".equals(p))
35 * Get path parameters names for {@code path} for POST operation.
37 * @return {@link List} of parameters
39 public static List<String> getPathPostParameters(final Map<String, Path> paths, final String path) {
40 return paths.get(path).post().parameters()