diff --git a/config/schemas/materia.json b/config/schemas/materia.json new file mode 100644 index 0000000..3dc2ecb --- /dev/null +++ b/config/schemas/materia.json @@ -0,0 +1,13 @@ +{ + "properties": { + "descricao": { + "id": "/properties/descricao", + "type": "string" + }, + "id": { + "id": "/properties/id", + "type": "integer" + } + }, + "type": "object" +} diff --git a/config/schemas/mentoria.json b/config/schemas/mentoria.json new file mode 100644 index 0000000..ffb1b08 --- /dev/null +++ b/config/schemas/mentoria.json @@ -0,0 +1,18 @@ +{ + "mentor": { + "$ref": "#/pessoa", + "type": "object" + }, + "mentorado": { + "$ref": "#/pessoa", + "type": "object" + }, + "inicio": "TIMESTAMP", + "conclusao": "TIMESTAMP", + "materias": [ + { + "$ref": "#/pessoa", + "type": "object" + } + ] +} diff --git a/config/schemas/pessoa.json b/config/schemas/pessoa.json new file mode 100644 index 0000000..1434d3f --- /dev/null +++ b/config/schemas/pessoa.json @@ -0,0 +1,73 @@ +{ + "properties": { + "id": { + "description": "Codigo identificador do usuário", + "id": "/properties/id", + "type": "integer" + }, + "name": { + "description": "O nome principal do usuário", + "id": "/properties/name", + "type": "string" + }, + "email": { + "description": "O email principal do usuário", + "id": "/properties/email", + "type": "string" + }, + "level": { + "id": "/properties/level", + "properties": { + "id": { + "description": "O level atual do usuário", + "id": "/properties/level/properties/id", + "type": "integer" + }, + "name": { + "description": "A descrição do level", + "id": "/properties/level/properties/name", + "type": "string" + } + }, + "type": "object" + }, + "status": { + "default": "ATIVO", + "description": "O status atual do usuário", + "id": "/properties/status", + "type": "string" + }, + "contacts": { + "id": "/properties/contacts", + "items": { + "id": "/properties/contacts/items", + "properties": { + "description": { + "description": "O contato do usuario", + "examples": [ + "www.linkedin.com/in/fulano" + ], + "id": "/properties/contacts/items/properties/description", + "type": "string" + }, + "name": { + "description": "O Label do contato.", + "examples": [ + "LinkedIn", + "GitHub", + "FaceBook", + "Twitter", + "Site", + "Youtube" + ], + "id": "/properties/contacts/items/properties/name", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" +} diff --git a/config/schemas/solicitacao.json b/config/schemas/solicitacao.json new file mode 100644 index 0000000..6d7efe5 --- /dev/null +++ b/config/schemas/solicitacao.json @@ -0,0 +1,43 @@ +{ + "properties": { + "data_solicitacao": { + "id": "/properties/data_solicitacao", + "format": "date-time", + "type": "string" + }, + "level": { + "$ref": "/properties/level", + "type": "object" + }, + "materias": { + "items": { + "properties": { + "$ref": "/properties/materia", + "type": "object" + }, + "type": "object" + }, + "type": "array" + }, + "mentoria": { + "properties": { + "$ref": "/properties/mentoria", + "type": "object" + }, + "type": "object" + }, + "solicitante": { + "properties": { + "$ref": "/properties/pessoa", + "type": "object" + }, + "type": "object" + }, + "ultima_atualizacao": { + "id": "/properties/ultima_atualizacao", + "format": "date-time", + "type": "string" + } + }, + "type": "object" +}