openapi: 3.0.0
info:
  title: Center for Recognition and Inspection of Cells (CRIC) Searchable Image Database
  version: '2.0'
  license:
    name: GNU Affero General Public License
    url: 'https://www.gnu.org/licenses/agpl-3.0.en.html'
  contact:
    url: 'https://database.cric.com.br'
    email: cric@ufop.edu.br
    name: Raniere Silva
  description: Center for Recognition and Inspection of Cells (CRIC) Searchable Image Database is a public cell image database.
  termsOfService: 'https://database.cric.com.br/terms'
servers:
  - url: 'https://api.database.cric.com.br/api/v2'
paths:
  /usuarios:
    post:
      summary: New user
      operationId: UsuarioController.cadastrarUsuarioBase
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                primeiro_nome:
                  type: string
                ultimo_nome:
                  type: string
                email:
                  type: string
                senha:
                  type: string
              required:
                - primeiro_nome
                - email
                - senha
            examples:
              Full:
                value:
                  primeiro_nome: Charles
                  ultimo_nome: Doe
                  email: charles@test.database.cric.com.br
                  senha: '123.456'
              Minimal:
                value:
                  primeiro_nome: Charles
                  email: charles@test.database.cric.com.br
                  senha: '123.456'
      security:
        - API Key Authorization: []
      tags:
        - usuarios
      description: Creates a new user.
    get:
      summary: List users
      operationId: UsuarioController.listarUsuarios
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    ativo:
                      type: boolean
                    email:
                      type: string
                    id:
                      type: integer
                    primeiro_nome:
                      type: string
                    senha:
                      type: string
                    ultimo_nome:
                      type: string
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      tags:
        - usuarios
      description: Get all users.
  '/usuarios/{id_usuario}':
    parameters:
      - schema:
          type: integer
        name: id_usuario
        in: path
        required: true
    get:
      summary: Single user
      tags:
        - usuarios
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      operationId: UsuarioController.obterUsuarios
      security:
        - API Key Authorization: []
      description: Get a single user.
    put:
      summary: Edit user
      operationId: put-usuarios-id_usuario
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - API Key Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                primeiro_nome:
                  type: string
                ultimo_nome:
                  type: string
                email:
                  type: string
              required:
                - primeiro_nome
                - ultimo_nome
                - email
      tags:
        - usuarios
      description: Updates a existing user.
    delete:
      summary: Delete user
      operationId: delete-usuarios-id_usuario
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - API Key Authorization: []
      description: Deletes a single user.
      tags:
        - usuarios
  /usuarios/login:
    post:
      summary: Basic authentication
      operationId: login
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  Authorization:
                    type: string
                  usuario:
                    $ref: '#/components/schemas/UsuarioBaseModel'
        '400':
          description: Bad Request
        '404':
          description: Not Found
      description: Basic user authentication.
      tags:
        - autorizacao
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                senha:
                  type: string
            examples:
              Charles:
                value:
                  email: charles@test.database.cric.com.br
                  senha: '123.456'
      parameters: []
    parameters: []
  /imagens:
    post:
      summary: New image
      operationId: post-imagens
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagemModel'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - API Key Authorization: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                id_usuario:
                  type: integer
                codigo_lamina:
                  type: string
                dt_aquisicao:
                  type: string
                  format: date
              required:
                - file
                - id_usuario
                - codigo_lamina
                - dt_aquisicao
        description: ''
      description: Create a single image.
      tags:
        - imagens
    get:
      summary: List images
      operationId: get-imagens
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ImagemModel'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      parameters:
        - schema:
            type: integer
          in: query
          name: id_usuario
      tags:
        - imagens
      description: Get all images.
      security:
        - API Key Authorization: []
  '/imagens/{id_imagem}':
    parameters:
      - schema:
          type: integer
        name: id_imagem
        in: path
        required: true
    get:
      summary: Single image
      tags:
        - imagens
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagemModel'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      operationId: get-imagens-id_imagem
      security:
        - API Key Authorization: []
      description: Get a single image.
    put:
      summary: Edit image
      operationId: put-imagens-id_imagem
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - API Key Authorization: []
      description: Updates a existing image.
      tags:
        - imagens
    delete:
      summary: Delete image
      operationId: delete-imagens-id_imagem
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - API Key Authorization: []
      description: Deletes a single image.
      tags:
        - imagens
  /lesoes:
    post:
      summary: New cell injury
      operationId: post-lesoes
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LesaoModel'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - API Key Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                nome:
                  type: string
                detalhes:
                  type: string
                grade:
                  type: integer
              required:
                - nome
                - grade
            examples:
              Full:
                value:
                  nome: Negative
                  detalhes: Negative for intraepithelial lesion
                  grade: 1
              Minimal:
                value:
                  nome: Negative
                  grade: 1
        description: ''
      description: Creates a new cell injury.
      tags:
        - classificacoes
    get:
      summary: List cell injuries
      operationId: get-lesoes
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LesaoModel'
              examples:
                Cervix:
                  value:
                    - id: 1
                      nome: Unkown
                      detalhes: Unkown
                      grade: 0
                    - id: 2
                      nome: Negative
                      detalhes: Negative for intraepithelial lesion
                      grade: 1
                    - id: 3
                      nome: ASC-US
                      detalhes: Atypical squamous cells of undetermined significance
                      grade: 2
                    - id: 4
                      nome: LSIL
                      detalhes: Low grade squamous intraepithelial lesion
                      grade: 3
                    - id: 5
                      nome: ASC-H
                      detalhes: Atypical squamous cells cannot exclude HSIL
                      grade: 4
                    - id2: 6
                      nome: HSIL
                      detalhes: High grade squamous intraepithelial lesion
                      grade: 5
                    - id: 7
                      nome: SCC
                      detalhes: Squamous cell carcinoma
                      grade: 6
      tags:
        - classificacoes
      description: Get all cell injuries.
  /descricoes:
    parameters: []
    post:
      summary: New cell description
      operationId: post-descricoes
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DescricaoModel'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - API Key Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                codigo:
                  type: integer
                nome:
                  type: string
              required:
                - codigo
                - nome
            examples:
              Epithelia:
                value:
                  codigo: 1
                  nome: Epithelia
      description: Creates cell description.
      tags:
        - segmentacoes
    get:
      summary: List cell descriptions
      operationId: get-descricoes
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DescricaoModel'
              examples:
                Level 1:
                  value:
                    - id: 1
                      codigo: 0
                      nome: Not Applied
                    - id: 2
                      codigo: 1
                      nome: Epithelia
                    - id: 3
                      codigo: 2
                      nome: Flora
                    - id: 4
                      codigo: 3
                      nome: Others
      tags:
        - segmentacoes
      description: Get all cell descriptions.
  '/descricoes/{id_descricoes}':
    parameters:
      - schema:
          type: integer
        name: id_descricoes
        in: path
        required: true
    get:
      summary: Single cell description
      tags:
        - segmentacoes
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DescricaoModel'
              examples:
                Epithelia:
                  value:
                    id: 2
                    codigo: 1
                    nome: Epithelia
        '400':
          description: Bad Request
        '404':
          description: Not Found
      operationId: get-descricoes-id_descricoes
      description: Get a single cell description.
    put:
      summary: Update cell description
      operationId: put-descricoes-id_descricoes
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - API Key Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                codigo:
                  type: integer
                nome:
                  type: string
      description: Updates a existing cell description.
      tags:
        - segmentacoes
    delete:
      summary: Delete cell description
      operationId: delete-descricoes-id_descricoes
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - API Key Authorization: []
      description: Deletes a single cell description
      tags:
        - segmentacoes
  '/lesoes/{id_lesoes}':
    parameters:
      - schema:
          type: integer
        name: id_lesoes
        in: path
        required: true
    get:
      summary: Single cell injury
      tags:
        - classificacoes
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LesaoModel'
              examples:
                Negative:
                  value:
                    id: 2
                    nome: Negative
                    detalhes: Negative for intraepithelial lesion
                    grade: 1
        '400':
          description: Bad Request
        '404':
          description: Not Found
      operationId: get-lesoes-id_lesoes
      description: Get a single cell injury.
    put:
      summary: Edit cell injury
      operationId: put-lesoes-id_lesoes
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - API Key Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                nome:
                  type: string
                detalhes:
                  type: string
                grade:
                  type: integer
              required:
                - nome
                - detalhes
                - grade
        description: ''
      description: Updates a existing cell injury.
      tags:
        - classificacoes
    delete:
      summary: Delete cell injury
      operationId: delete-lesoes-id_lesoes
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - API Key Authorization: []
      tags:
        - classificacoes
      description: Deletes a single cell injury.
  '/imagens/{id_imagem}/classificacoes':
    parameters:
      - schema:
          type: integer
        name: id_imagem
        in: path
        required: true
    post:
      summary: New cell classification in image
      operationId: post-imagens-id_imagem-classificacao-celula
      responses:
        '200':
          description: OK
      description: Creates a new cell classification in image.
      tags:
        - imagens
    get:
      summary: List cell classifications in image
      operationId: get-imagens-id_imagem-classificacao
      responses:
        '200':
          description: OK
      tags:
        - imagens
        - classificacoes
      description: Get all cell classifications in image.
  '/imagens/{id_imagem}/classificacoes/{id_celula}':
    parameters:
      - schema:
          type: integer
        name: id_imagem
        in: path
        required: true
      - schema:
          type: integer
        name: id_celula
        in: path
        required: true
    get:
      summary: Single cell classification in image
      tags:
        - imagens
        - classificacoes
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      operationId: get-imagens-id_imagem-classificacao-celula-id_celula
      description: Get a single cell classification in image.
    put:
      summary: Edit cell classification in image
      operationId: put-imagens-id_imagem-classificacao-celula-id_celula
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      description: Updates a existing cell classification in image.
      tags:
        - imagens
        - classificacoes
    delete:
      summary: Delete cell classification in image
      operationId: delete-imagens-id_imagem-classificacao-celula-id_celula
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      description: Deletes a single cell classification in image.
      tags:
        - imagens
        - classificacoes
  '/imagens/{id_imagem}/segmentacoes/{id_celula}':
    parameters:
      - schema:
          type: integer
        name: id_imagem
        in: path
        required: true
      - schema:
          type: integer
        name: id_celula
        in: path
        required: true
    get:
      summary: Single cell segmentation in image
      tags:
        - imagens
        - segmentacoes
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      operationId: get-imagens-id_imagem-segmentacao-celula-id_celula
      description: Get a single cell segmentation in image
    put:
      summary: Edit cell segmentation in image
      operationId: put-imagens-id_imagem-segmentacao-celula-id_celula
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      description: Updates a existing cell segmentation in image.
      tags:
        - imagens
        - segmentacoes
    delete:
      summary: Delete cell segmentation in image
      operationId: delete-imagens-id_imagem-segmentacao-celula-id_celula
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      description: Delete a single cell segmentation in image.
      tags:
        - imagens
        - segmentacoes
  '/imagens/{id_imagem}/segmentacoes':
    parameters:
      - schema:
          type: integer
        name: id_imagem
        in: path
        required: true
    post:
      summary: New cell segmentation in image
      operationId: post-imagens-id_imagem-segmentacao-celula
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      description: Creates a new cell segmentation in image.
      tags:
        - imagens
        - segmentacoes
    get:
      summary: List cell segmentations in image
      operationId: get-imagens-id_imagem-segmentacao
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      tags:
        - imagens
        - segmentacoes
      description: Get all cell segmentations in image.
  /imagens/export:
    get:
      summary: 'Export images, cell segmentations and classifications'
      tags:
        - imagens
        - segmentacoes
        - classificacoes
      responses:
        '200':
          description: OK
          content:
            application/zip:
              schema:
                type: object
                properties: {}
      operationId: get-imagens-download
      description: 'Export images, cell segmentations and classifications in zip file'
    parameters: []
  '/usuarios/{id_usuario}/admin':
    parameters:
      - schema:
          type: integer
        name: id_usuario
        in: path
        required: true
        description: ''
    post:
      summary: Give administrator rights to user
      operationId: post-usuarios-id_usuario-admin
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - API Key Authorization: []
      tags:
        - usuarios
      description: Give administrator rights to user.
    delete:
      summary: Remove administrator rights from user
      operationId: delete-usuarios-id_usuario-admin
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      security:
        - API Key Authorization: []
      description: Remove administrator rights from user.
      tags:
        - usuarios
  '/imagens/{id_imagem}/aprovada':
    parameters:
      - schema:
          type: integer
        name: id_imagem
        in: path
        required: true
    post:
      summary: Approve a image
      operationId: post-imagens-id_imagem-approvada
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      tags:
        - imagens
      description: Approves a given image.
    delete:
      summary: Unapprove a image
      operationId: delete-imagens-id_imagem-approvada
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      description: Unapproves a given image
      tags:
        - imagens
  /usuarios/logout:
    post:
      summary: Log out
      operationId: post-usuarios-logout
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
      tags:
        - autorizacao
      security:
        - API Key Authorization: []
      description: Log out user.
  /usuarios/senha/trocar:
    parameters: []
    post:
      summary: Change password
      operationId: post-usuario-senha-trocar
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  new_password1:
                    type: string
                  new_password2:
                    type: string
                  old_password:
                    type: string
              examples:
                Minimal:
                  value:
                    new_password1: qwerty.uiop
                    new_password2: qwerty.uiop
                    old_password: '123.456'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      tags:
        - usuarios
        - autorizacao
      security:
        - API Key Authorization: []
      description: Change user's password.
  /usuarios/senha/recuperar:
    post:
      summary: Recover password
      operationId: post-usuario-senha-recuperar
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  email:
                    type: string
              examples:
                Minimal:
                  value:
                    email: amara@test.database.cric.com.br
        '400':
          description: Bad Request
      tags:
        - usuarios
        - autorizacao
      description: Recover user's password.
    parameters: []
  /collections:
    get:
      summary: List Collection
      tags: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CollectionModel'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      operationId: get-collections
      description: Get all collections.
      parameters:
        - schema:
            type: integer
          in: query
          name: id_usuario
    post:
      summary: New Collection
      operationId: post-collections
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionModel'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      description: Create a single collection.
      security:
        - API Key Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                slang:
                  type: string
                owner:
                  type: integer
        description: ''
  '/collections/{slang}':
    parameters:
      - schema:
          type: string
        name: slang
        in: path
        required: true
    get:
      summary: Single Collection
      tags: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionModel'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      operationId: get-collections-id_collection
      description: Get a single collection.
    put:
      summary: Update collection
      operationId: put-collections-id_collection
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      description: Update a single collection.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                slang:
                  type: string
      security:
        - API Key Authorization: []
    delete:
      summary: Delete Collection
      operationId: delete-collections-id_collection
      responses:
        '204':
          description: No Content
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      description: Deletes a single collection.
      security:
        - API Key Authorization: []
  '/collections/{slang}/public':
    parameters:
      - schema:
          type: string
        name: slang
        in: path
        required: true
    post:
      summary: Make collection public
      operationId: post-collection-id_collection-public
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      description: Make the collection public.
      security:
        - API Key Authorization: []
    delete:
      summary: Make collection private
      operationId: delete-collection-id_collection-public
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      description: Make the collection private
      security:
        - API Key Authorization: []
components:
  schemas:
    UsuarioBaseModel:
      title: UsuarioBaseModel
      type: object
      properties:
        id:
          type: string
        primeiro_nome:
          type: string
        ultimo_nome:
          type: string
        email:
          type: string
        senha:
          type: string
        ativo:
          type: boolean
        admin:
          type: boolean
    CelulaModel:
      title: CelulaModel
      type: object
      properties:
        id:
          type: string
        id_imagem:
          $ref: '#/components/schemas/ImagemModel'
        id_descricao:
          $ref: '#/components/schemas/DescricaoModel'
    ClassificacaoCelulaModel:
      title: ClassificacaoCelulaModel
      type: object
      properties:
        id:
          type: string
        coord_centro_nucleo_x:
          type: integer
        coord_centro_nucleo_y:
          type: integer
        id_usuario:
          $ref: '#/components/schemas/UsuarioBaseModel'
        id_imagem:
          $ref: '#/components/schemas/ImagemModel'
        id_lesao:
          $ref: '#/components/schemas/LesaoModel'
    DescricaoModel:
      title: DescricaoModel
      type: object
      properties:
        id:
          type: string
        codigo:
          type: integer
        nome:
          type: string
    ImagemModel:
      title: ImagemModel
      type: object
      properties:
        id:
          type: string
        nome:
          type: string
        doi:
          type: string
        codigo_lamina:
          type: string
        excluida:
          type: boolean
        classificacao_aprovada:
          type: boolean
        dt_aquisicao:
          type: string
        altura:
          type: integer
        largura:
          type: integer
        id_usuario:
          $ref: '#/components/schemas/UsuarioBaseModel'
        id_lesao:
          $ref: '#/components/schemas/CelulaModel'
    LesaoModel:
      title: LesaoModel
      type: object
      properties:
        id:
          type: string
        nome:
          type: string
        detalhes:
          type: string
        grade:
          type: integer
    SegmentacaoCitoplasmaModel:
      title: SegmentacaoCitoplasmaModel
      type: object
      properties:
        id:
          type: string
        coord_x:
          type: integer
        coord_y:
          type: integer
        id_usuario:
          $ref: '#/components/schemas/UsuarioBaseModel'
        id_celula:
          $ref: '#/components/schemas/CelulaModel'
    SegmentacaoNucleoModel:
      title: SegmentacaoNucleoModel
      type: object
      properties:
        id:
          type: string
        coord_x:
          type: integer
        coord_y:
          type: integer
        id_usuario:
          $ref: '#/components/schemas/UsuarioBaseModel'
        id_celula:
          $ref: '#/components/schemas/CelulaModel'
    SessaoUsuarioModel:
      title: SessaoUsuarioModel
      type: object
      properties:
        id:
          type: string
        email:
          type: string
        token_autenticacao:
          type: string
    CollectionModel:
      title: CollectionModel
      type: object
      properties:
        id:
          type: integer
        slang:
          type: string
        name:
          type: string
        description:
          type: string
        public:
          type: boolean
        owner:
          type: integer
        deleted:
          type: boolean
      description: Represents metada of collection.
  securitySchemes:
    API Key Authorization:
      name: authorization
      type: apiKey
      in: header
tags:
  - name: usuarios
  - name: imagens
  - name: classificacoes
  - name: segmentacoes
  - name: autorizacao
