{

"get": {
  "operationId": "getCategories",
  "description": "List of categories",
  "tags": ["Category"],
  "parameters": [
    { "$ref": "../../common/components.json#/components/request/parameters/token_param" }
  ],
  "responses": {
    "200": {
      "description": "Object was returned correctly",
      "content": {
        "application/json": {
          "schema": {
            "description": "List of categories",
            "type": "array",
            "items": { "allOf": [{ "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" }] }
          }
        },
        "application/xml": {
          "schema": {
            "description": "List of categories",
            "type": "array",
            "xml": { "name": "/", "wrapped": true },
            "items": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" }
          }
        }
      }
    },
    "400": { "description": "Bad request" },
    "404": { "description": "Not found" },
    "500": { "description": "Server error" }
  }
},
"post": {
  "operationId": "createCategory",
  "description": "Create new category",
  "tags": ["Category"],
  "parameters": [
    { "$ref": "../../common/components.json#/components/request/parameters/token_param" }
  ],
  "requestBody": {
    "required": true,
    "description": "Category fields to fill",
    "content": {
      "application/json": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/request/post" } },
      "application/xml": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/request/post" } }
    }
  },
  "responses": {
    "200": {
        "description": "Object created and returned correctly",
        "content": {
          "application/json": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" } },
          "application/xml": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" } }
        }
      },
    "400": { "description": "Bad request" },
    "500": { "description": "Server error" }
  }
}

}