{
  "swagger": "2.0",
  "info": {
    "description": "Microservice over initiatives ontology",
    "version": "0.0.1",
    "title": "Initiatives Microservice API",
    "contact": {}
  },
  "host": "dev-motion.cwbyminsait.com",
  "basePath": "/initiatives",
  "tags": [
    {
      "name": "initiative-controller",
      "description": "Initiative Controller"
    }
  ],
  "schemes": [
    "http",
    "https"
  ],
  "produces": [
    "application/json",
    "application/yaml",
    "text/plain"
  ],
  "paths": {
    "/v1/initiatives": {
      "get": {
        "tags": [
          "initiative-controller"
        ],
        "summary": "Get initiatives",
        "description": "Return all initiatives",
        "operationId": "getInitiativesUsingGET",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Request Successful, review the resulting object. ",
            "schema": {
              "$ref": "#/definitions/InitiativeDTO"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      },
      "post": {
        "tags": [
          "initiative-controller"
        ],
        "summary": "Initiative creation",
        "description": "Create new the initiative",
        "operationId": "createInitiativeUsingPOST",
        "consumes": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "initiative",
            "description": "initiative",
            "required": true,
            "schema": {
              "$ref": "#/definitions/InitiativeDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request Successful, review the resulting object. If infoError is not null, then a functional error has occurred in the back-end ",
            "schema": {
              "$ref": "#/definitions/InitiativeDTO"
            }
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      }
    },
    "/v1/initiatives/{initiativeId}": {
      "get": {
        "tags": [
          "initiative-controller"
        ],
        "summary": "Get initiative by initiativeId",
        "description": "Get initiative by initiativeId",
        "operationId": "getByIdUsingGET",
        "parameters": [
          {
            "name": "initiativeId",
            "in": "path",
            "description": "initiativeId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated Successful, review the resulting object.",
            "schema": {
              "$ref": "#/definitions/InitiativeDTO"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Initiative not found."
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      },
      "put": {
        "tags": [
          "initiative-controller"
        ],
        "summary": "Update an initiative",
        "description": "Update the initiative",
        "operationId": "putInitiativeUsingPUT",
        "consumes": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "initiative",
            "description": "initiative",
            "required": true,
            "schema": {
              "$ref": "#/definitions/InitiativeDTO"
            }
          },
          {
            "name": "initiativeId",
            "in": "path",
            "description": "initiativeId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Created"
          },
          "204": {
            "description": "Updated Successful, review the resulting object.",
            "schema": {
              "$ref": "#/definitions/InitiativeDTO"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      },
      "delete": {
        "tags": [
          "initiative-controller"
        ],
        "summary": "Delete initiative",
        "description": "Deleting the initiative",
        "operationId": "deleteByIdUsingDELETE",
        "parameters": [
          {
            "name": "initiativeId",
            "in": "path",
            "description": "initiativeId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated Successful, review the resulting object.",
            "schema": {
              "$ref": "#/definitions/InitiativeDTO"
            }
          },
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      }
    }
  },
  "definitions": {
    "Action model": {
      "type": "object",
      "properties": {
        "actionId": {
          "type": "string",
          "description": "Action id",
          "allowEmptyValue": false
        },
        "affectedAssetId": {
          "type": "string",
          "description": "Affected asset id by this action",
          "allowEmptyValue": false
        },
        "creationDate": {
          "type": "string",
          "description": "Action creation date",
          "allowEmptyValue": false
        },
        "extrainfo": {
          "description": "Action extra info (no default fields)",
          "allowEmptyValue": false,
          "$ref": "#/definitions/JsonNode"
        },
        "responsible": {
          "type": "string",
          "description": "Responsible for this action",
          "allowEmptyValue": false
        },
        "status": {
          "type": "string",
          "description": "Action status",
          "allowEmptyValue": false
        },
        "type": {
          "type": "string",
          "description": "Action type",
          "allowEmptyValue": false
        }
      },
      "title": "Action model"
    },
    "DataWrapperDTO«InitiativeDTO»": {
      "type": "object",
      "properties": {
        "data": {
          "$ref": "#/definitions/InitiativeDTO"
        }
      },
      "title": "DataWrapperDTO«InitiativeDTO»"
    },
    "InitiativeDTO": {
      "type": "object",
      "properties": {
        "actionList": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Action model"
          }
        },
        "initiativeId": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "title": "InitiativeDTO"
    },
    "JsonNode": {
      "type": "object",
      "properties": {
        "array": {
          "type": "boolean"
        },
        "bigDecimal": {
          "type": "boolean"
        },
        "bigInteger": {
          "type": "boolean"
        },
        "binary": {
          "type": "boolean"
        },
        "boolean": {
          "type": "boolean"
        },
        "containerNode": {
          "type": "boolean"
        },
        "double": {
          "type": "boolean"
        },
        "float": {
          "type": "boolean"
        },
        "floatingPointNumber": {
          "type": "boolean"
        },
        "int": {
          "type": "boolean"
        },
        "integralNumber": {
          "type": "boolean"
        },
        "long": {
          "type": "boolean"
        },
        "missingNode": {
          "type": "boolean"
        },
        "nodeType": {
          "type": "string",
          "enum": [
            "ARRAY",
            "BINARY",
            "BOOLEAN",
            "MISSING",
            "NULL",
            "NUMBER",
            "OBJECT",
            "POJO",
            "STRING"
          ]
        },
        "null": {
          "type": "boolean"
        },
        "number": {
          "type": "boolean"
        },
        "object": {
          "type": "boolean"
        },
        "pojo": {
          "type": "boolean"
        },
        "short": {
          "type": "boolean"
        },
        "textual": {
          "type": "boolean"
        },
        "valueNode": {
          "type": "boolean"
        }
      },
      "title": "JsonNode"
    },
    "LinksDTO": {
      "type": "object",
      "properties": {
        "first": {
          "type": "string"
        },
        "last": {
          "type": "string"
        },
        "next": {
          "type": "string"
        },
        "previous": {
          "type": "string"
        },
        "self": {
          "type": "string"
        }
      },
      "title": "LinksDTO"
    },
    "PaginationDTO": {
      "type": "object",
      "properties": {
        "links": {
          "$ref": "#/definitions/LinksDTO"
        }
      },
      "title": "PaginationDTO"
    },
    "PaginationDataWrapperDTO«InitiativeDTO»": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/InitiativeDTO"
          }
        },
        "pagination": {
          "$ref": "#/definitions/PaginationDTO"
        }
      },
      "title": "PaginationDataWrapperDTO«InitiativeDTO»"
    }
  }
}
