From 635c76fb65b6d9e895bdc3d220d699bbe80144db Mon Sep 17 00:00:00 2001 From: Nathan Amorim Date: Tue, 1 Jun 2021 19:00:10 -0300 Subject: [PATCH 1/2] Add files via upload --- jsonschema/schemas/Apac_1_000.json | 486 +++++++++++++++++++++++++++++ 1 file changed, 486 insertions(+) create mode 100644 jsonschema/schemas/Apac_1_000.json diff --git a/jsonschema/schemas/Apac_1_000.json b/jsonschema/schemas/Apac_1_000.json new file mode 100644 index 000000000..2145da1eb --- /dev/null +++ b/jsonschema/schemas/Apac_1_000.json @@ -0,0 +1,486 @@ +{ + "$schema": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/schemas/Apac_1_000.json#", + "info": { + "description": "APAC", + "version": "1.000", + "title": "APAC", + "contact": "TribeSau.Squads@totvs.com.br", + "x-totvs": { + "messageDocumentation": { + "name": "Apac", + "description": "APAC", + "segment": "Saúde" + } + } + }, + "definitions": { + "Apac": { + "type": "object", + "properties": { + "id": { + "description": "Identificador do registro", + "required": false, + "type": "string", + "x-totvs": [ + { + "product": "RM", + "field": "[SZAPAC.CODCOLIGADA,SZAPAC.IDAPAC,SZAPAC.SEQAPAC]", + "required": true, + "type": "String", + "available": true, + "canUpdate": false + } + ] + }, + "companyId": { + "description": "Cod. Coligada", + "required": true, + "type": "integer", + "format": "int16", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.CODCOLIGADA", + "required": true, + "type": "smallint", + "available": true, + "canUpdate": false + } + ] + }, + "apacId": { + "description": "Id. APAC", + "required": true, + "type": "integer", + "format": "int32", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.IDAPAC", + "required": true, + "type": "int", + "available": true, + "canUpdate": false + } + ] + }, + "apacSequence": { + "description": "Sequencial APAC", + "required": true, + "type": "integer", + "format": "int32", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.SEQAPAC", + "required": true, + "type": "int", + "available": true, + "canUpdate": false + } + ] + }, + "accountNumber": { + "description": "Número da conta", + "required": true, + "type": "string", + "maxLength": 14, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.NUMEROCONTA", + "required": true, + "type": "varchar", + "length": 14, + "available": true, + "canUpdate": true + } + ] + }, + "accountSequence": { + "description": "Sequencial da conta", + "required": true, + "type": "integer", + "format": "int32", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.SEQUENCIALCONTA", + "required": true, + "type": "int", + "available": true, + "canUpdate": true + } + ] + }, + "numberApac": { + "description": "Número da APAC", + "required": false, + "type": "string", + "maxLength": 13, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.NUMAPAC", + "required": false, + "type": "varchar", + "length": 13, + "available": true, + "canUpdate": true + } + ] + }, + "apresentation": { + "description": "Competência", + "required": false, + "type": "string", + "format": "date-time", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.COMPPRODUCAO", + "required": false, + "type": "datetime", + "available": true, + "canUpdate": true + } + ] + }, + "apacType": { + "description": "Tipo da APAC", + "required": true, + "type": "string", + "maxLength": 1, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.TIPOAPAC", + "required": true, + "type": "char", + "length": 1, + "available": true, + "canUpdate": true + } + ] + }, + "attendanceType": { + "description": "Tipo de Atendimento", + "required": false, + "type": "string", + "maxLength": 2, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.TIPOATEND", + "required": false, + "type": "varchar", + "length": 2, + "available": true, + "canUpdate": true + } + ] + }, + "exitReason": { + "description": "Motivo saída", + "required": false, + "type": "string", + "maxLength": 2, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.MOTSAIDA", + "required": false, + "type": "varchar", + "length": 2, + "available": true, + "canUpdate": true + } + ] + }, + "dateDeathExit": { + "description": "Data de Saída", + "required": false, + "type": "string", + "format": "date-time", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.DTOBITOSAIDA", + "required": false, + "type": "datetime", + "available": true, + "canUpdate": true + } + ] + }, + "authorizingDoctor": { + "description": "Cod. Médico Autorizador", + "required": false, + "type": "integer", + "format": "int32", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.MEDAUTORIZ", + "required": false, + "type": "int", + "available": true, + "canUpdate": true + } + ] + }, + "requestDate": { + "description": "Data da solicitação", + "required": false, + "type": "string", + "format": "date-time", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.DTSOLICITACAO", + "required": false, + "type": "datetime", + "available": true, + "canUpdate": true + } + ] + }, + "authorizingDate": { + "description": "Data da autorização", + "required": false, + "type": "string", + "format": "date-time", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.DTAUTOZ", + "required": false, + "type": "datetime", + "available": true, + "canUpdate": true + } + ] + }, + "issuingOrgan": { + "description": "Cod. Órgão Emissor", + "required": false, + "type": "string", + "maxLength": 10, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.CODORGEMISSOR", + "required": false, + "type": "varchar", + "length": 10, + "available": true, + "canUpdate": true + } + ] + }, + "attendanceFeature": { + "description": "Caráter do atendimento", + "required": false, + "type": "string", + "maxLength": 2, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.CARATERATEND", + "required": false, + "type": "varchar", + "length": 2, + "available": true, + "canUpdate": true + } + ] + }, + "numberApacPrevious": { + "description": "Número da APAC anterior", + "required": false, + "type": "string", + "maxLength": 13, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.NUMAPACANT", + "required": false, + "type": "varchar", + "length": 13, + "available": true, + "canUpdate": true + } + ] + }, + "mainProcedureCode": { + "description": "Cod. Procedimento principal", + "required": false, + "type": "string", + "maxLength": 10, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.CODPROCPRINC", + "required": false, + "type": "varchar", + "length": 10, + "available": true, + "canUpdate": true + } + ] + }, + "requestingCNES": { + "description": "CNES do solicitante", + "required": false, + "type": "string", + "maxLength": 7, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.CNESSOLICT", + "required": false, + "type": "varchar", + "length": 7, + "available": true, + "canUpdate": true + } + ] + }, + "status": { + "description": "Status", + "required": true, + "type": "string", + "maxLength": 1, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.STATUS", + "required": true, + "type": "char", + "length": 1, + "available": true, + "canUpdate": true + } + ] + }, + "initialDate": { + "description": "Data início validade", + "required": false, + "type": "string", + "format": "date-time", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.DATAINI", + "required": false, + "type": "datetime", + "available": true, + "canUpdate": true + } + ] + }, + "finalDate": { + "description": "Data fim validade", + "required": false, + "type": "string", + "format": "date-time", + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.DATAFIM", + "required": false, + "type": "datetime", + "available": true, + "canUpdate": true + } + ] + }, + "errorFlag": { + "description": "Flag de erro", + "required": true, + "type": "string", + "maxLength": 1, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.FLAGERRO", + "required": true, + "type": "char", + "length": 1, + "available": true, + "canUpdate": true + } + ] + }, + "serviceCode": { + "description": "Serviço", + "required": false, + "type": "string", + "maxLength": 3, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.CODSERVICO", + "required": false, + "type": "varchar", + "length": 3, + "available": true, + "canUpdate": true + } + ] + }, + "classificationCode": { + "description": "Classificação", + "required": false, + "type": "string", + "maxLength": 3, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.CODCLASSIFICACAO", + "required": false, + "type": "varchar", + "length": 3, + "available": true, + "canUpdate": true + } + ] + }, + "teamCode": { + "description": "Equipe", + "required": false, + "type": "string", + "maxLength": 12, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.CODEQUIPE", + "required": false, + "type": "varchar", + "length": 12, + "available": true, + "canUpdate": true + } + ] + }, + "doctorCNSMainProcedure": { + "description": "Médico Executante Proc. Principal", + "required": false, + "type": "string", + "maxLength": 15, + "x-totvs": [ + { + "product": "RM", + "field": "SZAPAC.CNSMEDEXECPROCPRINCIPAL", + "required": false, + "type": "varchar", + "length": 15, + "available": true, + "canUpdate": true + } + ] + } + } + } + } +} \ No newline at end of file From 722a5eec862b1809fdd28e99b37865d0e674cbaf Mon Sep 17 00:00:00 2001 From: Nathan Amorim Date: Tue, 1 Jun 2021 19:03:38 -0300 Subject: [PATCH 2/2] Add files via upload --- jsonschema/apis/Apac_v1_000.json | 329 +++++++++++++++++++++++++++++++ 1 file changed, 329 insertions(+) create mode 100644 jsonschema/apis/Apac_v1_000.json diff --git a/jsonschema/apis/Apac_v1_000.json b/jsonschema/apis/Apac_v1_000.json new file mode 100644 index 000000000..870780c6a --- /dev/null +++ b/jsonschema/apis/Apac_v1_000.json @@ -0,0 +1,329 @@ +{ + "openapi": "3.0.1", + "servers": [ + { + "description": "API de APAC", + "url": "{{host}}/api/hcg/v1", + "variables": { + "serverUrl": { + "default": "localhost" + }, + "serverHttpPort": { + "default": "8051" + } + } + } + ], + "info": { + "description": "API de APAC", + "version": "1.000", + "title": "APAC", + "contact": { + "name": "T-Talk", + "url": "api.totvs.com.br", + "email": "comiteintegracao@totvs.com.br" + }, + "x-totvs": { + "messageDocumentation": { + "name": "Apac", + "description": "APAC", + "segment": "Saúde" + }, + "productInformation": [ + { + "product": "RM", + "contact": "TribeSau.Squads@totvs.com.br", + "description": "APAC", + "adapter": "", + "helpUrl": "" + } + ] + } + }, + "paths": { + "/apac": { + "get": { + "tags": [ + "apac" + ], + "summary": "Listagem de registros", + "description": "Retorna uma lista de registros", + "operationId": "GetAll", + "x-totvs": { + "productInformation": [ + { + "product": "RM", + "available": true, + "note": "Este verbo está disponível com todos os parâmetros", + "minimalVersion": "12.1.32" + } + ] + }, + "parameters": [ + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" + }, + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Order" + }, + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Page" + }, + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/PageSize" + }, + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Fields" + } + ], + "responses": { + "200": { + "description": "Registros recuperados com sucesso", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/schemas/Apac_1_000.json#/definitions/PagedApac" + } + } + } + }, + "404": { + "description": "Erro no momento da recuperação dos registros.", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" + } + } + } + } + } + }, + "post": { + "tags": [ + "apac" + ], + "summary": "Insere um registro", + "description": "Insere um registro", + "operationId": "Post", + "x-totvs": { + "productInformation": [ + { + "product": "RM", + "available": true, + "note": "Este verbo não esta disponivel", + "minimalVersion": "12.1.32" + } + ] + }, + "parameters": [ + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" + } + ], + "requestBody": { + "description": "Objeto para inserir um registro", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/schemas/Apac_1_000.json#/definitions/Apac" + } + } + } + }, + "responses": { + "200": { + "description": "Registro inserido com sucesso", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/schemas/Apac_1_000.json#/definitions/Apac" + } + } + } + }, + "400": { + "description": "Erro no momento da alteração", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" + } + } + } + } + } + } + }, + "/apac/{id}": { + "get": { + "tags": [ + "apac" + ], + "summary": "Recupera um registro", + "description": "Recupera um registro", + "operationId": "GetOne", + "x-totvs": { + "productInformation": [ + { + "product": "RM", + "available": true, + "note": "Este verbo está disponível com todos os parâmetros.", + "minimalVersion": "12.1.32" + } + ] + }, + "parameters": [ + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" + }, + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Expand" + }, + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Fields" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "Registro recuperado com sucesso", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/schemas/Apac_1_000.json#/definitions/Apac" + } + } + } + }, + "404": { + "description": "Erro no momento da recuperação do registro.", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" + } + } + } + } + } + }, + "put": { + "tags": [ + "apac" + ], + "summary": "Atualiza um registro", + "description": "Atualiza um registro", + "operationId": "Put", + "x-totvs": { + "productInformation": [ + { + "product": "RM", + "available": true, + "note": "Este verbo esta disponivel apenas para o campo MainProcedureCode (procedimento principal).", + "minimalVersion": "12.1.32" + } + ] + }, + "parameters": [ + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" + }, + { + "$ref": "#/components/parameters/id", + "required": "true" + } + ], + "requestBody": { + "description": "Objeto para atualizar registro", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/schemas/Apac_1_000.json#/definitions/Apac" + } + } + } + }, + "responses": { + "200": { + "description": "Registro atualizado com sucesso", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/schemas/Apac_1_000.json#/definitions/Apac" + } + } + } + }, + "400": { + "description": "Erro no momento da alteração", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" + } + } + } + } + } + }, + "delete": { + "tags": [ + "apac" + ], + "summary": "Exclui um registro", + "x-totvs": { + "productInformation": [ + { + "product": "RM", + "available": true, + "note": "Este verbo não está disponível.", + "minimalVersion": "12.1.32" + } + ] + }, + "description": "Exclui um registro", + "operationId": "Delete", + "parameters": [ + { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/parameters/Authorization" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "Registro excluído com sucesso" + }, + "400": { + "description": "Erro no momento da exclusão do registro.", + "content": { + "application/json": { + "schema": { + "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/Apac/V1/1_000/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/ErrorModel" + } + } + } + } + } + } + } + }, + "components": { + "parameters": { + "id": { + "name": "id", + "in": "path", + "description": "Cod. Coligada, Id. APAC, Sequencial APAC", + "required": true, + "schema": { + "type": "string" + } + } + }, + "schemas": {} + } +}