[
  {
    "title": "Returns a list of users",
    "canonical": "/users/get",
    "description": "Optional extended description in CommonMark or HTML.",
    "type": "rest_get",
    "category": "rest",
    "context": {
      "method": "get",
      "path": "/users",
      "group": [
        "API & Reference",
        "Endpoints",
        "Users"
      ],
      "fullPath": "http://api.example.com/v1/users",
      "servers": [
        "http://api.example.com/v1",
        "http://staging-api.example.com"
      ],
      "scopes": []
    },
    "examples": {
      "groups": [
        {
          "description": "Example request",
          "examples": [
            {
              "codeblock": {
                "tabs": [
                  {
                    "title": "shell",
                    "language": "shell",
                    "code": "curl --request GET \\\n     --url 'http://api.example.com/v1/users?limit=20' \\\n     --header 'accept: application/json'"
                  },
                  {
                    "title": "javascript",
                    "language": "javascript",
                    "code": "const options = {method: 'GET', headers: {accept: 'application/json'}};\n\nfetch('http://api.example.com/v1/users?limit=20', options)\n  .then(res => res.json())\n  .then(res => console.log(res))\n  .catch(err => console.error(err));"
                  },
                  {
                    "title": "python",
                    "language": "python",
                    "code": "import requests\n\nurl = \"http://api.example.com/v1/users?limit=20\"\n\nheaders = {\"accept\": \"application/json\"}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.text)"
                  },
                  {
                    "title": "go",
                    "language": "go",
                    "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1/users?limit=20\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
                  }
                ]
              }
            }
          ],
          "kind": "request"
        },
        {
          "description": "Example response",
          "examples": [
            {
              "codeblock": {
                "title": "200",
                "tabs": [
                  {
                    "title": "application/json",
                    "language": "json",
                    "code": "[\n  {\n    \"id\": 0,\n    \"username\": \"string\",\n    \"email\": \"user@example.com\",\n    \"status\": \"active\",\n    \"createdAt\": \"2019-08-24T14:15:22Z\",\n    \"updatedAt\": \"2019-08-24T14:15:22Z\"\n  }\n]"
                  }
                ]
              }
            }
          ],
          "kind": "response"
        }
      ]
    },
    "definitions": [
      {
        "title": "Query parameters",
        "properties": [
          {
            "name": "limit",
            "type": "integer",
            "description": "Maximum number of items to return",
            "meta": [
              {
                "name": "required",
                "value": "true"
              },
              {
                "name": "defaults",
                "value": 20
              }
            ]
          },
          {
            "name": "offset",
            "type": "integer",
            "description": "Number of items to skip",
            "meta": [
              {
                "name": "defaults",
                "value": 0
              }
            ]
          }
        ],
        "type": "$rest.param.query"
      },
      {
        "title": "Response",
        "type": "return",
        "variants": [
          {
            "title": "200",
            "description": "A JSON array of users",
            "properties": [],
            "rootProperty": {
              "type": "$$array",
              "properties": [
                {
                  "name": "id",
                  "type": "integer",
                  "description": "",
                  "meta": [
                    {
                      "name": "required",
                      "value": "true"
                    }
                  ]
                },
                {
                  "name": "username",
                  "type": "string",
                  "description": "",
                  "meta": [
                    {
                      "name": "required",
                      "value": "true"
                    }
                  ]
                },
                {
                  "name": "email",
                  "type": "string",
                  "description": "",
                  "meta": []
                },
                {
                  "name": "status",
                  "type": "$$enum",
                  "description": "",
                  "meta": [
                    {
                      "name": "enum-type",
                      "value": "string"
                    }
                  ],
                  "properties": [
                    {
                      "name": "active",
                      "type": "string",
                      "description": "",
                      "meta": []
                    },
                    {
                      "name": "inactive",
                      "type": "string",
                      "description": "",
                      "meta": []
                    }
                  ],
                  "ofProperty": {
                    "name": "",
                    "description": "",
                    "type": "string"
                  }
                },
                {
                  "name": "createdAt",
                  "type": "string",
                  "description": "",
                  "meta": []
                },
                {
                  "name": "updatedAt",
                  "type": "string",
                  "description": "",
                  "meta": []
                }
              ]
            },
            "meta": [
              {
                "name": "status",
                "value": "200"
              },
              {
                "name": "contentType",
                "value": "application/json"
              },
              {
                "name": "definitionDescription",
                "value": ""
              }
            ],
            "symbolDef": {
              "id": "#/components/schemas/User",
              "canonical": "/users/object",
              "label": "User"
            }
          }
        ],
        "properties": []
      }
    ]
  },
  {
    "title": "Get user by ID",
    "canonical": "/users/userId",
    "description": "Get user by ID",
    "type": "rest_get",
    "category": "rest",
    "context": {
      "method": "get",
      "path": "/users/{userId}",
      "group": [
        "API & Reference",
        "Endpoints",
        "Users"
      ],
      "fullPath": "http://api.example.com/v1/users/{userId}",
      "servers": [
        "http://api.example.com/v1",
        "http://staging-api.example.com"
      ],
      "scopes": []
    },
    "examples": {
      "groups": [
        {
          "description": "Example request",
          "examples": [
            {
              "codeblock": {
                "tabs": [
                  {
                    "title": "shell",
                    "language": "shell",
                    "code": "curl --request GET \\\n     --url http://api.example.com/v1/users/userId \\\n     --header 'accept: application/json'"
                  },
                  {
                    "title": "javascript",
                    "language": "javascript",
                    "code": "const options = {method: 'GET', headers: {accept: 'application/json'}};\n\nfetch('http://api.example.com/v1/users/userId', options)\n  .then(res => res.json())\n  .then(res => console.log(res))\n  .catch(err => console.error(err));"
                  },
                  {
                    "title": "python",
                    "language": "python",
                    "code": "import requests\n\nurl = \"http://api.example.com/v1/users/userId\"\n\nheaders = {\"accept\": \"application/json\"}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.text)"
                  },
                  {
                    "title": "go",
                    "language": "go",
                    "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1/users/userId\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
                  }
                ]
              }
            }
          ],
          "kind": "request"
        },
        {
          "description": "Example response",
          "examples": [
            {
              "codeblock": {
                "title": "200",
                "tabs": [
                  {
                    "title": "application/json",
                    "language": "json",
                    "code": "{\n  \"id\": 0,\n  \"username\": \"string\",\n  \"email\": \"user@example.com\",\n  \"status\": \"active\",\n  \"createdAt\": \"2019-08-24T14:15:22Z\",\n  \"updatedAt\": \"2019-08-24T14:15:22Z\"\n}"
                  }
                ]
              }
            }
          ],
          "kind": "response"
        }
      ]
    },
    "definitions": [
      {
        "title": "Response",
        "type": "return",
        "variants": [
          {
            "title": "200",
            "description": "User details",
            "properties": [
              {
                "name": "id",
                "type": "integer",
                "description": "",
                "meta": [
                  {
                    "name": "required",
                    "value": "true"
                  }
                ]
              },
              {
                "name": "username",
                "type": "string",
                "description": "",
                "meta": [
                  {
                    "name": "required",
                    "value": "true"
                  }
                ]
              },
              {
                "name": "email",
                "type": "string",
                "description": "",
                "meta": []
              },
              {
                "name": "status",
                "type": "$$enum",
                "description": "",
                "meta": [
                  {
                    "name": "enum-type",
                    "value": "string"
                  }
                ],
                "properties": [
                  {
                    "name": "active",
                    "type": "string",
                    "description": "",
                    "meta": []
                  },
                  {
                    "name": "inactive",
                    "type": "string",
                    "description": "",
                    "meta": []
                  }
                ],
                "ofProperty": {
                  "name": "",
                  "description": "",
                  "type": "string"
                }
              },
              {
                "name": "createdAt",
                "type": "string",
                "description": "",
                "meta": []
              },
              {
                "name": "updatedAt",
                "type": "string",
                "description": "",
                "meta": []
              }
            ],
            "meta": [
              {
                "name": "status",
                "value": "200"
              },
              {
                "name": "contentType",
                "value": "application/json"
              },
              {
                "name": "definitionDescription",
                "value": ""
              }
            ],
            "symbolDef": {
              "id": "#/components/schemas/User",
              "canonical": "/users/object",
              "label": "User"
            }
          },
          {
            "title": "404",
            "description": "User not found",
            "properties": [],
            "meta": [
              {
                "name": "status",
                "value": "404"
              }
            ]
          }
        ],
        "properties": []
      }
    ]
  },
  {
    "title": "Get user's posts",
    "canonical": "/users/posts",
    "description": "Get user's posts",
    "type": "rest_get",
    "category": "rest",
    "context": {
      "method": "get",
      "path": "/users/{userId}/posts",
      "group": [
        "API & Reference",
        "Endpoints",
        "Users"
      ],
      "fullPath": "http://api.example.com/v1/users/{userId}/posts",
      "servers": [
        "http://api.example.com/v1",
        "http://staging-api.example.com"
      ],
      "scopes": []
    },
    "examples": {
      "groups": [
        {
          "description": "Example request",
          "examples": [
            {
              "codeblock": {
                "tabs": [
                  {
                    "title": "shell",
                    "language": "shell",
                    "code": "curl --request GET \\\n     --url http://api.example.com/v1/users/userId/posts \\\n     --header 'accept: application/json'"
                  },
                  {
                    "title": "javascript",
                    "language": "javascript",
                    "code": "const options = {method: 'GET', headers: {accept: 'application/json'}};\n\nfetch('http://api.example.com/v1/users/userId/posts', options)\n  .then(res => res.json())\n  .then(res => console.log(res))\n  .catch(err => console.error(err));"
                  },
                  {
                    "title": "python",
                    "language": "python",
                    "code": "import requests\n\nurl = \"http://api.example.com/v1/users/userId/posts\"\n\nheaders = {\"accept\": \"application/json\"}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.text)"
                  },
                  {
                    "title": "go",
                    "language": "go",
                    "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1/users/userId/posts\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
                  }
                ]
              }
            }
          ],
          "kind": "request"
        },
        {
          "description": "Example response",
          "examples": [
            {
              "codeblock": {
                "title": "200",
                "tabs": [
                  {
                    "title": "application/json",
                    "language": "json",
                    "code": "[\n  {\n    \"id\": 0,\n    \"title\": \"string\",\n    \"content\": \"string\",\n    \"userId\": 0,\n    \"createdAt\": \"2019-08-24T14:15:22Z\",\n    \"updatedAt\": \"2019-08-24T14:15:22Z\"\n  }\n]"
                  }
                ]
              }
            }
          ],
          "kind": "response"
        }
      ]
    },
    "definitions": [
      {
        "title": "Response",
        "type": "return",
        "variants": [
          {
            "title": "200",
            "description": "List of user's posts",
            "properties": [],
            "rootProperty": {
              "type": "$$array",
              "properties": [
                {
                  "name": "id",
                  "type": "integer",
                  "description": "",
                  "meta": [
                    {
                      "name": "required",
                      "value": "true"
                    }
                  ]
                },
                {
                  "name": "title",
                  "type": "string",
                  "description": "",
                  "meta": [
                    {
                      "name": "required",
                      "value": "true"
                    }
                  ]
                },
                {
                  "name": "content",
                  "type": "string",
                  "description": "",
                  "meta": [
                    {
                      "name": "required",
                      "value": "true"
                    }
                  ]
                },
                {
                  "name": "userId",
                  "type": "integer",
                  "description": "",
                  "meta": [
                    {
                      "name": "required",
                      "value": "true"
                    }
                  ]
                },
                {
                  "name": "createdAt",
                  "type": "string",
                  "description": "",
                  "meta": []
                },
                {
                  "name": "updatedAt",
                  "type": "string",
                  "description": "",
                  "meta": []
                }
              ]
            },
            "meta": [
              {
                "name": "status",
                "value": "200"
              },
              {
                "name": "contentType",
                "value": "application/json"
              },
              {
                "name": "definitionDescription",
                "value": ""
              }
            ],
            "symbolDef": {
              "id": "#/components/schemas/Post",
              "label": "Post"
            }
          }
        ],
        "properties": []
      }
    ]
  },
  {
    "title": "Create a new post for user",
    "canonical": "/users/posts/create",
    "description": "Create a new post for user",
    "type": "rest_post",
    "category": "rest",
    "context": {
      "method": "post",
      "path": "/users/{userId}/posts",
      "group": [
        "API & Reference",
        "Endpoints",
        "Users"
      ],
      "fullPath": "http://api.example.com/v1/users/{userId}/posts",
      "servers": [
        "http://api.example.com/v1",
        "http://staging-api.example.com"
      ],
      "scopes": []
    },
    "examples": {
      "groups": [
        {
          "description": "Example request",
          "examples": [
            {
              "codeblock": {
                "tabs": [
                  {
                    "title": "shell",
                    "language": "shell",
                    "code": "curl --request POST \\\n     --url http://api.example.com/v1/users/userId/posts \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '\n{\n  \"title\": \"string\",\n  \"content\": \"string\"\n}\n'"
                  },
                  {
                    "title": "javascript",
                    "language": "javascript",
                    "code": "const options = {\n  method: 'POST',\n  headers: {accept: 'application/json', 'content-type': 'application/json'},\n  body: JSON.stringify({title: 'string', content: 'string'})\n};\n\nfetch('http://api.example.com/v1/users/userId/posts', options)\n  .then(res => res.json())\n  .then(res => console.log(res))\n  .catch(err => console.error(err));"
                  },
                  {
                    "title": "python",
                    "language": "python",
                    "code": "import requests\n\nurl = \"http://api.example.com/v1/users/userId/posts\"\n\npayload = {\n    \"title\": \"string\",\n    \"content\": \"string\"\n}\nheaders = {\n    \"accept\": \"application/json\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.post(url, json=payload, headers=headers)\n\nprint(response.text)"
                  },
                  {
                    "title": "go",
                    "language": "go",
                    "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"http://api.example.com/v1/users/userId/posts\"\n\n\tpayload := strings.NewReader(\"{\\\"title\\\":\\\"string\\\",\\\"content\\\":\\\"string\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
                  }
                ]
              }
            }
          ],
          "kind": "request"
        },
        {
          "description": "Example response",
          "examples": [
            {
              "codeblock": {
                "title": "201",
                "tabs": [
                  {
                    "title": "application/json",
                    "language": "json",
                    "code": "{\n  \"id\": 0,\n  \"title\": \"string\",\n  \"content\": \"string\",\n  \"userId\": 0,\n  \"createdAt\": \"2019-08-24T14:15:22Z\",\n  \"updatedAt\": \"2019-08-24T14:15:22Z\"\n}"
                  }
                ]
              }
            }
          ],
          "kind": "response"
        }
      ]
    },
    "definitions": [
      {
        "title": "Request body",
        "variants": [
          {
            "title": "application/json",
            "description": "",
            "properties": [
              {
                "name": "title",
                "type": "string",
                "description": "",
                "meta": [
                  {
                    "name": "required",
                    "value": "true"
                  }
                ]
              },
              {
                "name": "content",
                "type": "string",
                "description": "",
                "meta": [
                  {
                    "name": "required",
                    "value": "true"
                  }
                ]
              }
            ],
            "meta": [
              {
                "name": "contentType",
                "value": "application/json"
              },
              {
                "name": "required",
                "value": "true"
              }
            ],
            "symbolDef": {
              "id": "#/components/schemas/PostInput",
              "label": "PostInput"
            }
          }
        ],
        "properties": [],
        "meta": [
          {
            "name": "required",
            "value": "true"
          }
        ],
        "type": "$rest.request.body"
      },
      {
        "title": "Response",
        "type": "return",
        "variants": [
          {
            "title": "201",
            "description": "Post created successfully",
            "properties": [
              {
                "name": "id",
                "type": "integer",
                "description": "",
                "meta": [
                  {
                    "name": "required",
                    "value": "true"
                  }
                ]
              },
              {
                "name": "title",
                "type": "string",
                "description": "",
                "meta": [
                  {
                    "name": "required",
                    "value": "true"
                  }
                ]
              },
              {
                "name": "content",
                "type": "string",
                "description": "",
                "meta": [
                  {
                    "name": "required",
                    "value": "true"
                  }
                ]
              },
              {
                "name": "userId",
                "type": "integer",
                "description": "",
                "meta": [
                  {
                    "name": "required",
                    "value": "true"
                  }
                ]
              },
              {
                "name": "createdAt",
                "type": "string",
                "description": "",
                "meta": []
              },
              {
                "name": "updatedAt",
                "type": "string",
                "description": "",
                "meta": []
              }
            ],
            "meta": [
              {
                "name": "status",
                "value": "201"
              },
              {
                "name": "contentType",
                "value": "application/json"
              },
              {
                "name": "definitionDescription",
                "value": ""
              }
            ],
            "symbolDef": {
              "id": "#/components/schemas/Post",
              "label": "Post"
            }
          }
        ],
        "properties": []
      }
    ]
  },
  {
    "title": "User",
    "description": "",
    "canonical": "/users/object",
    "definitions": [
      {
        "title": "User",
        "properties": [
          {
            "name": "id",
            "type": "integer",
            "description": "",
            "meta": [
              {
                "name": "required",
                "value": "true"
              }
            ]
          },
          {
            "name": "username",
            "type": "string",
            "description": "",
            "meta": [
              {
                "name": "required",
                "value": "true"
              }
            ]
          },
          {
            "name": "email",
            "type": "string",
            "description": "",
            "meta": []
          },
          {
            "name": "status",
            "type": "$$enum",
            "description": "",
            "meta": [
              {
                "name": "enum-type",
                "value": "string"
              }
            ],
            "properties": [
              {
                "name": "active",
                "type": "string",
                "description": "",
                "meta": []
              },
              {
                "name": "inactive",
                "type": "string",
                "description": "",
                "meta": []
              }
            ],
            "ofProperty": {
              "name": "",
              "description": "",
              "type": "string"
            }
          },
          {
            "name": "createdAt",
            "type": "string",
            "description": "",
            "meta": []
          },
          {
            "name": "updatedAt",
            "type": "string",
            "description": "",
            "meta": []
          }
        ],
        "meta": [],
        "symbolDef": {
          "id": "#/components/schemas/User",
          "canonical": "/users/object",
          "label": "User"
        }
      }
    ],
    "examples": {
      "groups": [
        {
          "description": "Example",
          "examples": [
            {
              "codeblock": {
                "tabs": [
                  {
                    "title": "json",
                    "language": "json",
                    "code": "{\n  \"id\": 0,\n  \"username\": \"\",\n  \"email\": \"\",\n  \"status\": \"\",\n  \"createdAt\": \"\",\n  \"updatedAt\": \"\"\n}"
                  }
                ]
              }
            }
          ]
        }
      ]
    },
    "type": "rest_component_schema",
    "context": {
      "componentSchema": "User",
      "group": [
        "API & Reference",
        "Endpoints",
        "Users"
      ]
    }
  }
]