{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cnpj-ai/json-schema/cnpj-ai-resposta-pagina-fonte-acordo-leniencia-schema.json",
  "title": "Resposta[PaginaFonte[AcordoLeniencia]]",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cnpj-ai-v2-openapi.yml#/components/schemas/Resposta_PaginaFonte_AcordoLeniencia__",
  "properties": {
    "dados": {
      "$ref": "#/$defs/PaginaFonte_AcordoLeniencia_"
    },
    "meta": {
      "$ref": "#/$defs/Meta"
    }
  },
  "type": "object",
  "required": [
    "dados",
    "meta"
  ],
  "$defs": {
    "AcordoLeniencia": {
      "properties": {
        "id_registro": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id Registro"
        },
        "id_fonte": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id Fonte"
        },
        "cnpj_basico": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cnpj Basico"
        },
        "cnpj_fonte": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cnpj Fonte"
        },
        "processo": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Processo"
        },
        "data_inicio": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Data Inicio",
          "description": "Data preservada na representação armazenada pela fonte; consulte o catálogo de fontes."
        },
        "data_fim": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Data Fim",
          "description": "Data preservada na representação armazenada pela fonte; consulte o catálogo de fontes."
        },
        "orgao": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Orgao"
        },
        "uf": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Uf"
        },
        "situacao": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Situacao"
        },
        "origem": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Origem"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id_registro",
        "id_fonte",
        "cnpj_basico",
        "cnpj_fonte",
        "processo",
        "data_inicio",
        "data_fim",
        "orgao",
        "uf",
        "situacao",
        "origem"
      ],
      "title": "AcordoLeniencia"
    },
    "Meta": {
      "properties": {
        "versao": {
          "type": "string",
          "const": "v2",
          "title": "Versao",
          "default": "v2"
        },
        "release": {
          "type": "string",
          "const": "2.0.0",
          "title": "Release",
          "default": "2.0.0"
        },
        "recurso": {
          "type": "string",
          "enum": [
            "empresas",
            "estabelecimentos"
          ],
          "title": "Recurso"
        },
        "documento": {
          "type": "string",
          "title": "Documento"
        },
        "competencia_receita": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Competencia Receita"
        },
        "fotografia": {
          "type": "string",
          "title": "Fotografia"
        },
        "requisicao_id": {
          "type": "string",
          "format": "uuid",
          "title": "Requisicao Id"
        },
        "disponibilidade": {
          "type": "string",
          "enum": [
            "completa",
            "parcial"
          ],
          "title": "Disponibilidade",
          "default": "completa"
        }
      },
      "type": "object",
      "required": [
        "recurso",
        "documento",
        "competencia_receita",
        "fotografia",
        "requisicao_id"
      ],
      "title": "Meta"
    },
    "PaginaFonte_AcordoLeniencia_": {
      "properties": {
        "itens": {
          "items": {
            "$ref": "#/$defs/AcordoLeniencia"
          },
          "type": "array",
          "title": "Itens"
        },
        "total": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total"
        },
        "proximo_cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Proximo Cursor"
        },
        "proxima_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Proxima Url"
        },
        "fonte": {
          "type": "string",
          "title": "Fonte"
        },
        "status": {
          "type": "string",
          "enum": [
            "encontrado",
            "sem_ocorrencia",
            "indisponivel",
            "erro"
          ],
          "title": "Status"
        },
        "escopo": {
          "type": "string",
          "enum": [
            "empresa",
            "estabelecimento"
          ],
          "title": "Escopo"
        },
        "documento": {
          "type": "string",
          "title": "Documento"
        },
        "competencia": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Competencia"
        },
        "carregada_em": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Carregada Em"
        },
        "cobertura_inicio": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cobertura Inicio"
        },
        "desatualizada": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Desatualizada"
        },
        "proveniencia": {
          "$ref": "#/$defs/Proveniencia"
        }
      },
      "type": "object",
      "required": [
        "itens",
        "total",
        "fonte",
        "status",
        "escopo",
        "documento",
        "competencia",
        "carregada_em",
        "desatualizada",
        "proveniencia"
      ],
      "title": "PaginaFonte[AcordoLeniencia]"
    },
    "Proveniencia": {
      "properties": {
        "fonte": {
          "type": "string",
          "title": "Fonte"
        },
        "url": {
          "type": "string",
          "title": "Url"
        },
        "nota": {
          "type": "string",
          "title": "Nota"
        },
        "licenca": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Licenca"
        },
        "licenca_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Licenca Url"
        },
        "metodologia_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Metodologia Url"
        }
      },
      "type": "object",
      "required": [
        "fonte",
        "url",
        "nota"
      ],
      "title": "Proveniencia"
    }
  }
}