+ /**
+ * Test that request parameters are correctly typed.
+ */
+ @Test
+ public void testParametersTypesForMountPointApi() throws Exception {
+ swagger.onMountPointCreated(INSTANCE_ID);
+ final var doc = (OpenApiObject) swagger.getMountPointApi(URI_INFO, 1L, Optional.empty(),
+ OAversion.V3_0);
+ final var pathToContainer = "/rests/data/nodes/node=123/yang-ext:mount/typed-params:typed/";
+ final var integerTypes = List.of("uint64", "uint32", "uint16", "uint8", "int64", "int32", "int16", "int8");
+ for (final var type: integerTypes) {
+ final var typeKey = type + "-key";
+ final var path = pathToContainer + type + "={" + typeKey + "}";
+ assertTrue(doc.getPaths().has(path));
+ assertEquals("integer", doc.getPaths().get(path).get("get").get("parameters").get(0).get("schema")
+ .get("type").textValue());
+ }
+ }
+