{
  "openapi": "3.0.4",
  "info": {
    "title": "API de Integração",
    "version": "v1"
  },
  "paths": {
    "/api/Grade": {
      "get": {
        "tags": [
          "Grade"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GradeDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GradeDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GradeDTO"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/Login/application": {
      "post": {
        "tags": [
          "Login"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationLoginDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationLoginDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationLoginDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/School": {
      "get": {
        "tags": [
          "School"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchoolDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchoolDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchoolDTO"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/User/data": {
      "get": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/User/login": {
      "post": {
        "tags": [
          "User"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginDTO"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginDTO"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/email/{email}": {
      "get": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/cpf/{cpf}": {
      "get": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "cpf",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/salta_id/{salta_id}": {
      "get": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "salta_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                }
              }
            }
          }
        }
      }
    },
    "/api/User/class/group/{email}": {
      "get": {
        "tags": [
          "User"
        ],
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserBaseDataResponseDTO"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApplicationLoginDTO": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EExternalDataOrigin": {
        "enum": [
          "None",
          "PortalLiv",
          "Atlas"
        ],
        "type": "string"
      },
      "GradeDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "external_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "origin": {
            "$ref": "#/components/schemas/EExternalDataOrigin"
          },
          "grade_segment": {
            "$ref": "#/components/schemas/GradeSegmentDTO"
          }
        },
        "additionalProperties": false
      },
      "GradeSegmentDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "external_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LoginDTO": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "cpf": {
            "type": "string",
            "nullable": true
          },
          "platformId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "foundByPlatFormIdToken": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SchoolDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "external_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "inep_code": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "cnpj": {
            "type": "string",
            "nullable": true
          },
          "school_group": {
            "$ref": "#/components/schemas/SchoolGroupDTO"
          }
        },
        "additionalProperties": false
      },
      "SchoolGroupDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "external_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UserBaseDataResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "external_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "user-school-profile": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserScoolProfileDataResponseDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UserProfileDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "external_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UserSchoolClassDataResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "external_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "school_year": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "enrollment": {
            "type": "string",
            "nullable": true
          },
          "grade": {
            "$ref": "#/components/schemas/GradeDTO"
          }
        },
        "additionalProperties": false
      },
      "UserScoolProfileDataResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "school": {
            "$ref": "#/components/schemas/SchoolDTO"
          },
          "user-profile": {
            "$ref": "#/components/schemas/UserProfileDTO"
          },
          "school-classes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserSchoolClassDataResponseDTO"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "jwt_auth": {
        "type": "http",
        "description": "Especifique o token de autorização",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "jwt_auth": [ ]
    }
  ],
  "tags": [
    {
      "name": "Grade"
    },
    {
      "name": "Login"
    },
    {
      "name": "School"
    },
    {
      "name": "User"
    }
  ]
}