Add test for length parameter
[netconf.git] / restconf / restconf-openapi / src / test / resources / yang-document / controller-string-examples-length.json
diff --git a/restconf/restconf-openapi/src/test/resources/yang-document/controller-string-examples-length.json b/restconf/restconf-openapi/src/test/resources/yang-document/controller-string-examples-length.json
new file mode 100644 (file)
index 0000000..daefdc5
--- /dev/null
@@ -0,0 +1,227 @@
+{
+  "openapi": "3.0.3",
+  "info": {
+    "version": "1.0.0",
+    "title": "strings-examples-length",
+    "description": "We are providing full API for configurational data which can be edited (by POST, PUT, PATCH and DELETE).\nFor operational data we only provide GET API.\n\nFor majority of request you can see only config data in examples. That's because we can show only one example\nper request. The exception when you can see operational data in example is when data are representing\noperational (config false) container with no config data in it."
+  },
+  "servers": [
+    {
+      "url": "http://localhost:8181/"
+    }
+  ],
+  "paths": {
+    "/rests/data": {
+      "post": {
+        "description": "\n\nNote:\nIn example payload, you can see only the first data node child of the resource to be created, following the\nguidelines of RFC 8040, which allows us to create only one resource in POST request.\n",
+        "summary": "POST - Controller - strings-examples-length - strings-examples-length",
+        "requestBody": {
+          "description": "test",
+          "content": {
+            "application/json": {
+              "schema": {
+                "properties": {
+                  "test": {
+                    "$ref": "#/components/schemas/strings-examples-length_test",
+                    "type": "object"
+                  }
+                }
+              }
+            },
+            "application/xml": {
+              "schema": {
+                "$ref": "#/components/schemas/strings-examples-length_test"
+              }
+            }
+          }
+        },
+        "responses": {
+          "201": {
+            "description": "Created"
+          }
+        },
+        "tags": [
+          "Controller strings-examples-length"
+        ],
+        "parameters": []
+      }
+    },
+    "/rests/data/strings-examples-length:test": {
+      "put": {
+        "description": "",
+        "summary": "PUT - strings-examples-length - Controller - test",
+        "requestBody": {
+          "description": "test",
+          "content": {
+            "application/json": {
+              "schema": {
+                "properties": {
+                  "strings-examples-length:test": {
+                    "$ref": "#/components/schemas/strings-examples-length_test",
+                    "type": "object"
+                  }
+                }
+              }
+            },
+            "application/xml": {
+              "schema": {
+                "$ref": "#/components/schemas/strings-examples-length_test"
+              }
+            }
+          }
+        },
+        "responses": {
+          "201": {
+            "description": "Created"
+          },
+          "204": {
+            "description": "Updated"
+          }
+        },
+        "tags": [
+          "Controller strings-examples-length"
+        ],
+        "parameters": []
+      },
+      "patch": {
+        "description": "",
+        "summary": "PATCH - strings-examples-length - Controller - test",
+        "requestBody": {
+          "description": "test",
+          "content": {
+            "application/yang-data+json": {
+              "schema": {
+                "properties": {
+                  "strings-examples-length:test": {
+                    "$ref": "#/components/schemas/strings-examples-length_test",
+                    "type": "object"
+                  }
+                }
+              }
+            },
+            "application/yang-data+xml": {
+              "schema": {
+                "$ref": "#/components/schemas/strings-examples-length_test"
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK"
+          },
+          "204": {
+            "description": "Updated"
+          }
+        },
+        "tags": [
+          "Controller strings-examples-length"
+        ],
+        "parameters": []
+      },
+      "delete": {
+        "description": "",
+        "summary": "DELETE - Controller - strings-examples-length - test",
+        "responses": {
+          "204": {
+            "description": "Deleted"
+          }
+        },
+        "tags": [
+          "Controller strings-examples-length"
+        ],
+        "parameters": []
+      },
+      "get": {
+        "description": "",
+        "summary": "GET - Controller - strings-examples-length - test",
+        "responses": {
+          "200": {
+            "description": "200",
+            "content": {
+              "application/xml": {
+                "schema": {
+                  "$ref": "#/components/schemas/strings-examples-length_test"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "properties": {
+                    "test": {
+                      "$ref": "#/components/schemas/strings-examples-length_test",
+                      "type": "object"
+                    }
+                  }
+                }
+              }
+            }
+          }
+        },
+        "tags": [
+          "Controller strings-examples-length"
+        ],
+        "parameters": [
+          {
+            "name": "content",
+            "in": "query",
+            "required": false,
+            "schema": {
+              "enum": [
+                "config",
+                "nonconfig",
+                "all"
+              ],
+              "type": "string"
+            }
+          }
+        ]
+      }
+    }
+  },
+  "components": {
+    "schemas": {
+      "strings-examples-length_test": {
+        "title": "strings-examples-length_test",
+        "type": "object",
+        "properties": {
+          "my-phys-address": {
+            "description": "",
+            "type": "string",
+            "example": "00:00",
+            "minLength": 5,
+            "maxLength": 5
+          },
+          "my-mac-address": {
+            "description": "",
+            "type": "string",
+            "example": "00:00:00:00:",
+            "minLength": 12,
+            "maxLength": 18
+          },
+          "my-string": {
+            "description": "",
+            "type": "string",
+            "example": "00000",
+            "minLength": 5,
+            "maxLength": 10
+          }
+        },
+        "xml": {
+          "name": "test",
+          "namespace": "urn:ietf:params:xml:ns:yang:strings:examples"
+        }
+      }
+    },
+    "securitySchemes": {
+      "basicAuth": {
+        "scheme": "basic",
+        "type": "http"
+      }
+    }
+  },
+  "security": [
+    {
+      "basicAuth": []
+    }
+  ]
+}