Skip to content

Commit

Permalink
training-center#40 - Criando schemas básicos
Browse files Browse the repository at this point in the history
  • Loading branch information
Rogerio Angeliski committed Oct 27, 2017
1 parent f8930da commit e2fa6b4
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 0 deletions.
13 changes: 13 additions & 0 deletions config/schemas/materia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"properties": {
"descricao": {
"id": "/properties/descricao",
"type": "string"
},
"id": {
"id": "/properties/id",
"type": "integer"
}
},
"type": "object"
}
18 changes: 18 additions & 0 deletions config/schemas/mentoria.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"mentor": {
"$ref": "#/pessoa",
"type": "object"
},
"mentorado": {
"$ref": "#/pessoa",
"type": "object"
},
"inicio": "TIMESTAMP",
"conclusao": "TIMESTAMP",
"materias": [
{
"$ref": "#/pessoa",
"type": "object"
}
]
}
73 changes: 73 additions & 0 deletions config/schemas/pessoa.json
Original file line number Diff line number Diff line change
@@ -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"
}
43 changes: 43 additions & 0 deletions config/schemas/solicitacao.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit e2fa6b4

Please sign in to comment.