[
  {
    "title": "Returns a list of users",
    "canonical": "returns-a-list-of-users",
    "description": "Optional extended description in CommonMark or HTML.",
    "type": "rest_get",
    "category": "rest",
    "context": {
      "method": "get",
      "path": "/users",
      "group": [
        ""
      ],
      "fullPath": "http://api.example.com/v1/users",
      "servers": [
        "http://api.example.com/v1"
      ],
      "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 \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '\n{\n  \"status\": [\n    \"active\"\n  ]\n}\n'"
                  },
                  {
                    "title": "javascript",
                    "language": "javascript",
                    "code": "const options = {\n  method: 'GET',\n  headers: {accept: 'application/json', 'content-type': 'application/json'},\n  body: JSON.stringify({status: ['active']})\n};\n\nfetch('http://api.example.com/v1/users', 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\"\n\npayload = { \"status\": [\"active\"] }\nheaders = {\n    \"accept\": \"application/json\",\n    \"content-type\": \"application/json\"\n}\n\nresponse = requests.get(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\"\n\n\tpayload := strings.NewReader(\"{\\\"status\\\":[\\\"active\\\"]}\")\n\n\treq, _ := http.NewRequest(\"GET\", 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": "A sample JSON response",
          "examples": [
            {
              "codeblock": {
                "title": "200",
                "tabs": [
                  {
                    "title": "application/json",
                    "language": "json",
                    "code": "{\n  \"id\": 1,\n  \"username\": \"John Doe\"\n}"
                  }
                ]
              }
            }
          ],
          "kind": "response"
        }
      ]
    },
    "definitions": [
      {
        "title": "Request body",
        "variants": [
          {
            "title": "application/json",
            "description": "",
            "properties": [
              {
                "name": "status",
                "type": "$$array",
                "description": "",
                "meta": [],
                "properties": [],
                "ofProperty": {
                  "name": "",
                  "type": "$$enum",
                  "properties": [
                    {
                      "name": "active",
                      "type": "string",
                      "description": "",
                      "meta": []
                    },
                    {
                      "name": "inactive",
                      "type": "string",
                      "description": "",
                      "meta": []
                    }
                  ],
                  "description": "",
                  "meta": [
                    {
                      "name": "enum-type",
                      "value": "string"
                    }
                  ],
                  "ofProperty": {
                    "name": "",
                    "description": "",
                    "type": "string"
                  },
                  "symbolDef": {
                    "id": "#/components/schemas/Status",
                    "canonical": "objects/Status",
                    "label": "Status"
                  }
                },
                "symbolDef": {
                  "id": "#/components/schemas/Status",
                  "canonical": "objects/Status",
                  "label": "Status"
                }
              }
            ],
            "meta": [
              {
                "name": "contentType",
                "value": "application/json"
              }
            ]
          }
        ],
        "properties": [],
        "meta": [],
        "type": "$rest.request.body"
      },
      {
        "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": "objects/User",
              "label": "User"
            }
          }
        ],
        "properties": []
      }
    ]
  },
  {
    "title": "User",
    "description": "",
    "canonical": "objects/User",
    "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": "objects/User",
          "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": [
        "Objects"
      ]
    }
  },
  {
    "title": "Status",
    "description": "",
    "canonical": "objects/Status",
    "definitions": [
      {
        "title": "Status",
        "properties": [],
        "meta": [],
        "symbolDef": {
          "id": "#/components/schemas/Status",
          "canonical": "objects/Status",
          "label": "Status"
        }
      }
    ],
    "examples": {
      "groups": []
    },
    "type": "rest_component_schema",
    "context": {
      "componentSchema": "Status",
      "group": [
        "Objects"
      ]
    }
  }
]