Skip to content

Commit

Permalink
Ajustes nos jsonschemas
Browse files Browse the repository at this point in the history
  • Loading branch information
robmachado committed Dec 2, 2022
1 parent 2b0993f commit d57c19a
Show file tree
Hide file tree
Showing 36 changed files with 153 additions and 165 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use NFePHP\eSocial\Tools;

$config = [
'tpAmb' => 2,
'tpAmb' => 1,
//tipo de ambiente 1 - Produção; 2 - Produção restrita - dados reais;3 - Produção restrita - dados fictícios.
'verProc' => 'S_1.0.0',
//Versão do processo de emissão do evento. Informar a versão do aplicativo emissor do evento.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"type": ["string","null"],
"$ref": "#/definitions/periodo"
}
}
}
},
"infocadastro": {
"required": false,
Expand Down Expand Up @@ -91,7 +91,7 @@
"cnpjefr": {
"required": false,
"type": ["string","null"],
"pattern": "^[0-9]{14}"
"pattern": "^[0-9]{14}$"
}
}
},
Expand Down Expand Up @@ -166,7 +166,7 @@
"required": false,
"type": ["string","null"],
"$ref": "#/definitions/periodo"
}
}
}
}
}
Expand Down Expand Up @@ -203,7 +203,7 @@
$std->dadosisencao->ideminlei = 'seila';//Sigla e nome do Ministério ou Lei que concedeu o Certificado
$std->dadosisencao->nrcertif = '987654321';//Número do Certificado de Entidade Beneficente de Assistência Social, número da portaria de concessão do Certificado, ou, no caso de concessão através de Lei específica, o número da Lei.
$std->dadosisencao->dtemiscertif = '2016-11-04';//Data de Emissão do Certificado/publicação da Lei
$std->dadosisencao->dtvenccertif = '2018-11-03';//Data de Vencimento do Certificado
$std->dadosisencao->dtvenccertif = '2018-11-03';//Data de Vencimento do Certificado
$std->dadosisencao->nrprotrenov = null;//Protocolo pedido renovação
$std->dadosisencao->dtprotrenov = null;//Data do protocolo de renovação
$std->dadosisencao->dtdou = null;//Preencher com a data de publicação no Diário Oficial da União
Expand Down
18 changes: 8 additions & 10 deletions examples/schemes/v_S_01_00_00/s1010_JsonSchemaEvtTabRubrica.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@
"codrubr": {
"required": true,
"type": "string",
"maxLength": 30,
"pattern": "^(?!eSocial)"
"maxLength": 30
},
"idetabrubr": {
"required": true,
"type": "string",
"maxLength": 8,
"pattern": "^(?!eSocial)"
"maxLength": 8
},
"inivalid": {
"required": true,
Expand Down Expand Up @@ -131,10 +129,10 @@
"codsusp": {
"required": true,
"type": "string",
"pattern": "^[0-9]{1,14}"
"pattern": "^[0-9]{1,14}$"
}
}
}
}
},
"ideprocessoirrf": {
"required": false,
Expand All @@ -152,10 +150,10 @@
"codsusp": {
"required": true,
"type": "string",
"pattern": "^[0-9]{1,14}"
"pattern": "^[0-9]{1,14}$"
}
}
}
}
},
"ideprocessofgts": {
"required": false,
Expand All @@ -171,7 +169,7 @@
"$ref": "#/definitions/string20"
}
}
}
}
}
}
},
Expand All @@ -189,7 +187,7 @@
"type": ["string","null"],
"$ref": "#/definitions/periodo"
}
}
}
}
}
}';
Expand Down
11 changes: 5 additions & 6 deletions examples/schemes/v_S_01_00_00/s1020_JsonSchemaEvtTabLotacao.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"codlotacao": {
"required": true,
"type": "string",
"maxLength": 30,
"pattern": "^(?!eSocial)"
"maxLength": 30
},
"inivalid": {
"required": true,
Expand Down Expand Up @@ -101,7 +100,7 @@
"codsusp": {
"required": true,
"type": "string",
"pattern": "^[0-9]{1,14}"
"pattern": "^[0-9]{1,14}$"
}
}
}
Expand All @@ -119,7 +118,7 @@
"nrinsccontrat": {
"required": true,
"type": "string",
"pattern": "^[0-9]{11,14}"
"pattern": "^[0-9]{11,14}$"
},
"tpinscprop": {
"required": false,
Expand All @@ -130,7 +129,7 @@
"nrinscprop": {
"required": false,
"type": ["string","null"],
"pattern": "^[0-9]{11,14}"
"pattern": "^[0-9]{11,14}$"
}
}
},
Expand Down Expand Up @@ -168,7 +167,7 @@
"type": ["string","null"],
"$ref": "#/definitions/periodo"
}
}
}
}
}
}';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"ufvara": {
"required": true,
"type": "string",
"pattern": "^(AC|AL|AP|AM|BA|CE|DF|ES|GO|MA|MT|MS|MG|PA|PB|PR|PE|PI|RJ|RN|RS|RO|RR|SC|SP|SE|TO)$"
"$ref": "#/definitions/siglauf"
},
"codmunic": {
"required": true,
Expand Down Expand Up @@ -128,7 +128,7 @@
}
}
}
}
}
}
},
"novavalidade": {
Expand All @@ -145,7 +145,7 @@
"type": ["string","null"],
"$ref": "#/definitions/periodo"
}
}
}
}
}
}';
Expand Down
10 changes: 4 additions & 6 deletions examples/schemes/v_S_01_00_00/s1200_JsonSchemaEvtRemun.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@
"tpacconv": {
"required": true,
"type": "string",
"pattern": "A|B|C|D|E|F"
"pattern": "^(A|B|C|D|E|F|G|H)$"
},
"compacconv": {
"required": false,
Expand All @@ -631,7 +631,7 @@
"required": true,
"type": "string",
"maxLength": 1,
"pattern": "S|N"
"pattern": "^(S|N)$"
},
"ideperiodo": {
"required": true,
Expand Down Expand Up @@ -772,9 +772,7 @@
"codcbo": {
"required": true,
"type": "string",
"minLength": 4,
"maxLength": 6,
"pattern": "^[0-9]"
"pattern": "^[0-9]{4,6}$"
},
"natatividade": {
"required": false,
Expand Down Expand Up @@ -901,7 +899,7 @@
$std->dmdev[0]->ideadc[0]->ideperiodo[0]->ideestablot[0]->nrinsc = '12345678901234'; //Obrigatório
$std->dmdev[0]->ideadc[0]->ideperiodo[0]->ideestablot[0]->codlotacao = 'ksjskjkjskjjs'; //Obrigatório

//Informações relativas à remuneração do trabalhador em períodos anteriores.
//Informações relativas à remuneração do trabalhador em períodos anteriores.
$std->dmdev[0]->ideadc[0]->ideperiodo[0]->ideestablot[0]->remunperant[0] = new \stdClass(); //Obrigatório
$std->dmdev[0]->ideadc[0]->ideperiodo[0]->ideestablot[0]->remunperant[0]->matricula = 'kjskjskjskjs'; //Opcional
$std->dmdev[0]->ideadc[0]->ideperiodo[0]->ideestablot[0]->remunperant[0]->indsimples = 1; //Opcional
Expand Down
5 changes: 2 additions & 3 deletions examples/schemes/v_S_01_00_00/s1260_JsonSchemaEvtComProd.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@
"codsusp": {
"required": true,
"type": "string",
"maxLength": 14,
"pattern": "^[0-9]"
"pattern": "^[0-9]{1,14}$"
},
"vrcpsusp": {
"required": false,
Expand All @@ -174,7 +173,7 @@
}
}
}
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"codcateg": {
"required": true,
"type": "string",
"pattern": "^[0-9]{3}"
"pattern": "^[0-9]{3}$"
},
"natatividade": {
"required": false,
Expand Down
20 changes: 10 additions & 10 deletions examples/schemes/v_S_01_00_00/s2200_JsonSchemaEvtAdmissao.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"cpftrab": {
"required": true,
"type": "string",
"pattern": "^[0-9]{11}"
"pattern": "^[0-9]{11}$"
},
"nmtrab": {
"required": true,
Expand Down Expand Up @@ -470,7 +470,7 @@
}
}
}
}
}
},
"infoestatutario": {
"required": false,
Expand Down Expand Up @@ -508,7 +508,7 @@
"type": ["string", "null"],
"$ref": "#/definitions/data"
}
}
}
},
"infocontrato": {
"required": true,
Expand Down Expand Up @@ -570,7 +570,7 @@
"maxLength": 255
}
}
},
},
"duracao": {
"required": false,
"type": ["object","null"],
Expand Down Expand Up @@ -726,7 +726,7 @@
"minLength": 1,
"maxLength": 255
}
}
}
}
},
"treicap": {
Expand All @@ -743,10 +743,10 @@
"minimum": 1,
"maximum": 9999
}
}
}
}
}
}
}
},
"sucessaovinc": {
"required": false,
Expand Down Expand Up @@ -868,8 +868,8 @@
}
}
}
}
}
}
}
}
}';

Expand Down Expand Up @@ -957,7 +957,7 @@
$std->vinculo->infoceletista->trabtemporario->hipleg = 1;
$std->vinculo->infoceletista->trabtemporario->justcontr = 'jwkjwkjwkjwk';

$std->vinculo->infoceletista->trabtemporario->ideestabvinc = new \stdClass();
$std->vinculo->infoceletista->trabtemporario->ideestabvinc = new \stdClass();
$std->vinculo->infoceletista->trabtemporario->ideestabvinc->tpinsc = 2; //1 pu 2
$std->vinculo->infoceletista->trabtemporario->ideestabvinc->nrinsc = '12345678901234';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"codmunic": {
"required": true,
"type": "string",
"pattern": "^[0-9]{7}"
"pattern": "^[0-9]{7}$"
},
"uf": {
"required": true,
Expand All @@ -145,7 +145,7 @@
"paisresid": {
"required": true,
"type": "string",
"pattern": "^[0-9]{3}"
"pattern": "^[0-9]{3}$"
},
"dsclograd": {
"required": true,
Expand Down Expand Up @@ -368,7 +368,7 @@
$std->infodeficiencia->defmental = 'N'; //Obrigatório
$std->infodeficiencia->defintelectual = 'N'; //Obrigatório
$std->infodeficiencia->reabreadap = 'N'; //Obrigatório
$std->infodeficiencia->infocota = 'N'; //Opcional
$std->infodeficiencia->infocota = 'N'; //Opcional
$std->infodeficiencia->observacao = 'lkslkslkslkslkslks'; //Opcional

//Informações dos dependentes.
Expand All @@ -383,7 +383,7 @@

//Informações de contato.
$std->contato = new \stdClass(); //Opcional
$std->contato->foneprinc = '1234567890'; //Opcional
$std->contato->foneprinc = '1234567890'; //Opcional
$std->contato->emailprinc = 'ele@mail.com'; //Opcional

// Schema must be decoded before it can be used for validation
Expand Down
Loading

0 comments on commit d57c19a

Please sign in to comment.