{
  "openapi": "3.0.0",
  "info": {
    "termsOfService": "https://fungenerators.com/terms",
    "x-ballerina-init-description": "The connector initialization requires setting the API credentials. \nCreate a [fungenerators account](https://fungenerators.com/) and obtain tokens by following [this guide](https://fungenerators.com/api/uuid/#authentication).",
    "description": "This is a generated connector from [fungenerators UUID API v1.5](https://fungenerators.com/api/uuid/) OpenAPI Specification.\nA full featured, REST based UUID generator with json/xml/jsonp result support. You can try them out right here. [Click here to subscribe](http://fungenerators.com/api/uuid/)",
    "x-ballerina-display": {
      "label": "Fun Generators UUID",
      "iconPath": "icon.png"
    },
    "title": "UUID Generation API",
    "version": "1.5",
    "contact": {
      "name": "Fun Generators",
      "url": "https://fungenerators.com/"
    }
  },
  "tags": [
    {
      "name": "UUID Generation",
      "description": "Generate different versions of UUID easily.",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://fungenerators.com/api/uuid/"
      }
    },
    {
      "name": "UUID Parsing",
      "description": "Parse UUID string and check for its validity and return version details",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://fungenerators.com/api/uuid/"
      }
    }
  ],
  "paths": {
    "/uuid": {
      "get": {
        "operationId": "generateUUID",
        "tags": [
          "UUID Generation"
        ],
        "summary": "Generate a random UUID (v4).",
        "security": [
          {
            "X-Fungenerators-Api-Secret": []
          }
        ],
        "parameters": [
          {
            "description": "Number of UUID's to generate (defaults to 1)",
            "in": "query",
            "name": "count",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200  response",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": "{\n  \"success\": {\n    \"total\": 4\n  },\n  \"contents\": {\n    \"uuid\": [\n      {\n        \"uuid\": \"b201b88e-b0d2-4e82-9ea8-d2d1e25b3bd0\",\n        \"version\": 4\n      },\n      {\n        \"uuid\": \"75becbbb-ae68-4e1a-95b1-c2dfc7a5891a\",\n        \"version\": 4\n      },\n      {\n        \"uuid\": \"3cffa9ad-00a9-4d7a-87f3-85626808444f\",\n        \"version\": 4\n      },\n      {\n        \"uuid\": \"d2c477c2-a2e3-463a-a3c5-0f131c9826c2\",\n        \"version\": 4\n      }\n    ],\n    \"copyright\": {\n        \"year\": \"2020\",\n        \"url\": \"  https://fungenerators.com/random/uuid\"\n    }\n  }\n}"
                  }
                }
              }
            }
          },
          "401": {
            "description": "401  response",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": "{\n    \"error\": {\n        \"code\": 401,\n        \"message\": \"Unauthorized\"\n    }\n}"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "parseUUID",
        "tags": [
          "UUID Parsing"
        ],
        "summary": "Parse a UUID string and return its version and check whether it is valid.",
        "security": [
          {
            "X-Fungenerators-Api-Secret": []
          }
        ],
        "parameters": [
          {
            "description": "UUID String to parse",
            "in": "query",
            "name": "uuidstr",
            "required": true,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200  response",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": "{\n  \"success\": {\n    \"total\": 1\n  },\n  \"contents\": {\n    \"uuid\": [\n      {\n        \"is_valid\": true,\n        \"uuid\": \"14cdb9b4-de01-3faa-aff5-65bc2f771745\",\n        \"version\": 3\n      }\n    ],\n    \"copyright\": {\n      \"year\": \"2020\",\n      \"url\": \"  https://fungenerators.com/random/uuid\"\n    }\n  }\n}"
                  }
                }
              }
            }
          },
          "401": {
            "description": "401  response",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": "{\n    \"error\": {\n        \"code\": 401,\n        \"message\": \"Unauthorized\"\n    }\n}"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/uuid/version/{version}": {
      "get": {
        "operationId": "generateUUIDByVersion",
        "tags": [
          "UUID Generation"
        ],
        "summary": "Generate a random UUID (v4).",
        "security": [
          {
            "X-Fungenerators-Api-Secret": []
          }
        ],
        "parameters": [
          {
            "description": "Number of UUID's to generate (defaults to 1)",
            "in": "query",
            "name": "count",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "integer"
            }
          },
          {
            "description": "Version of the UUID spec to use. (0-5), Use '0' for nil (00000000-0000-0000-0000-000000000000) UUID.",
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "integer"
            }
          },
          {
            "description": "For v3 and v5 of UUID Spec you can supply the type (dns/url/oid/x500/nil).",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string",
              "format": "string"
            }
          },
          {
            "description": "For v3 and v5 of UUID Spec supply the text value for the type specified dns/url/oid/x500/nil. For example specify a dns/domain string if the type is \"dns\"",
            "in": "query",
            "name": "text",
            "required": false,
            "schema": {
              "type": "string",
              "format": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200  response",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": "{\n  \"success\": {\n    \"total\": 4\n  },\n  \"contents\": {\n    \"uuid\": [\n      {\n        \"uuid\": \"b201b88e-b0d2-4e82-9ea8-d2d1e25b3bd0\",\n        \"version\": 4\n      },\n      {\n        \"uuid\": \"75becbbb-ae68-4e1a-95b1-c2dfc7a5891a\",\n        \"version\": 4\n      },\n      {\n        \"uuid\": \"3cffa9ad-00a9-4d7a-87f3-85626808444f\",\n        \"version\": 4\n      },\n      {\n        \"uuid\": \"d2c477c2-a2e3-463a-a3c5-0f131c9826c2\",\n        \"version\": 4\n      }\n    ],\n    \"copyright\": {\n        \"year\": \"2020\",\n        \"url\": \"  https://fungenerators.com/random/uuid\"\n    }\n  }\n}"
                  }
                }
              }
            }
          },
          "401": {
            "description": "401  response",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": "{\n    \"error\": {\n        \"code\": 401,\n        \"message\": \"Unauthorized\"\n    }\n}"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.fungenerators.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "X-Fungenerators-Api-Secret": {
        "type": "apiKey",
        "name": "X-Fungenerators-Api-Secret",
        "in": "header",
        "description": "Represents API Key `X-Fungenerators-Api-Secret`"
      }
    }
  }
}