Created
May 24, 2017 18:49
-
-
Save juandjara/36a92e88f4ff5d2c2781e284c97a8262 to your computer and use it in GitHub Desktop.
Swagger specs for datask
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
title: Uber API | |
description: Move your app forward with the Uber API Rober | |
version: 1.0.0 | |
host: api.uber.com | |
schemes: | |
- https | |
basePath: /v1 | |
produces: | |
- application/json | |
paths: | |
/products: | |
get: | |
summary: Product Types | |
description: | | |
The Products endpoint returns information about the *Uber* products | |
offered at a given location. The response includes the display name | |
and other details about each product, and lists the products in the | |
proper display order. | |
parameters: | |
- name: latitude | |
in: query | |
description: Latitude component of location. | |
required: true | |
type: number | |
format: double | |
- name: longitude | |
in: query | |
description: Longitude component of location. | |
required: true | |
type: number | |
format: double | |
tags: | |
- Products | |
responses: | |
'200': | |
description: An array of products | |
schema: | |
type: array | |
items: | |
$ref: '#/definitions/User' | |
default: | |
description: Unexpected error | |
schema: | |
$ref: '#/definitions/Error' | |
definitions: | |
Company: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
name: | |
type: string | |
description: Nombre de la empresa | |
address: | |
type: string | |
description: Dirección de la empresa | |
lsUser: | |
type: array | |
items: | |
$ref: '#/definitions/User' | |
description: Lista de contactos asociados a esta empresa | |
lstProject: | |
type: array | |
items: | |
$ref: '#/definitions/Project' | |
description: Lista de proyectos vinculados a esta empresa | |
companyType: | |
type: integer | |
format: int32 | |
description: 'Tipo de empresa (propia o empresa cliente) [EnumCompanyType]' | |
Project: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
name: | |
type: string | |
description: Nombre asignado al proyecto | |
lstContact: | |
type: array | |
items: | |
$ref: '#/definitions/User' | |
description: Lista de contactos vinculados a este proyecto | |
status: | |
type: integer | |
format: int32 | |
description: 'Estado en el que se encuentra el proyecto (Activo, Pausa, Finalizado) [EnumProjectStatus]' | |
budget: | |
type: integer | |
format: int32 | |
description: 'Presupuesto vinculado al proyecto. [Budget]' | |
lstPanel: | |
type: array | |
items: | |
$ref: '#/definitions/Panel' | |
description: 'Lista de paneles creados para un proyecto [List<Panel>]' | |
lstUserProject: | |
type: array | |
items: | |
$ref: '#/definitions/Project' | |
description: Lista de los usuarios vinculados a un proyecto y el rol de cada uno de estos respecto al proyecto en cuestión | |
company: | |
type: integer | |
format: int32 | |
description: 'Empresa para la que se está desarrollando el proyecto [Company]' | |
completedEstimated: | |
type: integer | |
format: int32 | |
description: Porcentaje estimado (por el gestor del proyecto) de desarrollo del proyecto | |
Budget: | |
properties: | |
ownAmount: | |
type: number | |
format: float | |
description: Importe interno de la empresa | |
externalAmount: | |
type: number | |
format: float | |
description: Importe de contratación a proveedores | |
hours: | |
type: number | |
format: float | |
description: Número de horas presupuestadas | |
billingDate: | |
type: string | |
format: date | |
description: Fecha de contratación del proyecto | |
startDate: | |
type: string | |
format: date | |
description: Fecha estimada de inicio del proyecto | |
endDate: | |
type: string | |
format: date | |
description: Fecha estimada de finalización del proyecto | |
User: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
name: | |
type: string | |
description: Nombre del usuario | |
surname: | |
type: string | |
description: Apellidos del usuario | |
officePhone: | |
type: string | |
description: Télefono de la oficina (sobre todo cuando el usuario es de tipo cliente) | |
mobilePhone: | |
type: string | |
description: Télefono móvil del usuario | |
company: | |
type: integer | |
format: int32 | |
description: Empresa a la que pertenece el usuario | |
lstUserProject: | |
type: array | |
items: | |
$ref: '#/definitions/Project' | |
description: Lista de los usuarios vinculados a un proyecto y el rol de cada uno de estos respecto al proyecto en cuestión | |
profile: | |
type: integer | |
format: int32 | |
description: 'Perfil del usuario (Administrador, Gestor, Desarrollador) [EnumPerfilUsuario]' | |
userType: | |
type: integer | |
format: int32 | |
description: 'Tipo de usuario (Interno, Contacto) [EnumTipoUsuario]' | |
lstNotification: | |
type: array | |
items: | |
$ref: '#/definitions/Notification' | |
description: 'Lista de notificaciones asociadas al usuario [List<Notificacion>]' | |
preferences: | |
type: integer | |
format: int32 | |
description: 'Preferencias del usuario [Preferences]' | |
UserProject: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
user: | |
type: integer | |
format: int32 | |
description: 'Usuario al que se va a vincular con un determinado proyecto [User]' | |
project: | |
type: integer | |
format: int32 | |
description: 'Proyecto al que se va a vincular un determinado usuario [Project]' | |
relationType: | |
type: integer | |
format: int32 | |
description: 'Tipo de relación entre el usuario y el proyecto (Gestor, Desarrollador, Cliente) [EnumProjectUser]' | |
Panel: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
name: | |
type: string | |
description: Nombre del panel | |
project: | |
type: integer | |
format: int32 | |
description: 'Proyecto al que pertenece el panel [Project]' | |
lstTask: | |
type: array | |
items: | |
$ref: '#/definitions/Task' | |
description: Lista de tareas vinculadas a este panel | |
status: | |
type: integer | |
format: int32 | |
description: 'Estado del panel (Visible, Oculto) [EnumPanelStatus]' | |
order: | |
type: integer | |
format: int32 | |
description: Orden que ocupa el panel respecto a los demas del mismo proyecto | |
creationDate: | |
type: string | |
format: date | |
description: Fecha de creación del panel | |
defaultTaskStatus: | |
type: integer | |
format: int32 | |
description: 'Estado por defecto de la tarea que se cree o mueva a este panel (Pendiente, Activa, Completada) [EnumTaskStatus]' | |
Task: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
title: | |
type: string | |
description: Tìtulo de la tarea | |
description: | |
type: string | |
description: Descripción de la tarea | |
panel: | |
type: integer | |
format: int32 | |
description: 'Panel al que pertenece la tarea [Panel]' | |
craetionUser: | |
type: integer | |
format: int32 | |
description: 'Usuario que creó la tarea [User]' | |
assignedUser: | |
type: integer | |
format: int32 | |
description: 'Usuario al que se ha asignado la tarea [User]' | |
taskType: | |
type: integer | |
format: int32 | |
description: 'Tipo de tarea (Personalizado, Solicitud, Predefinido) [EnumTaskType]' | |
complexity: | |
type: integer | |
format: int32 | |
description: 'Tipo de complejidad de la tarea (Simple, Compleja) [EnumTaskComplexity]' | |
estimatedHours: | |
type: integer | |
format: int32 | |
description: Horas estimadas para completar la tarea | |
estimatedMinutes: | |
type: integer | |
format: int32 | |
description: Minutos estimados para completar la tarea | |
lstComment: | |
type: array | |
items: | |
$ref: '#/definitions/Comment' | |
description: Lista de comentarios vinculados a la tarea | |
lstTime: | |
type: array | |
items: | |
$ref: '#/definitions/Time' | |
description: Lista de tiempos vinculados a la tarea | |
creationDate: | |
type: string | |
format: date | |
description: Fecha de creación de la tarea | |
order: | |
type: integer | |
description: Orden de la tarea respecto al resto que se encuentran en el mismo panel | |
Preferences: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
user: | |
type: integer | |
format: int32 | |
description: 'Usuario al que pertenecen las preferencias [User]' | |
colour: | |
type: string | |
description: Color que se empleará en la interfaz web para reconocer al usuario | |
abbreviation: | |
type: string | |
description: Abreviatura del nombre del usuario que se empleará en la web para reconocer al usuario (máx 4 digitos) | |
projectOrder: | |
type: integer | |
format: int32 | |
description: 'Tipo de orden que se empleará para listar los proyectos (Mas recientes, Mas antiguos) [EnumProjectOrder]' | |
lstTask: | |
type: array | |
items: | |
$ref: '#/definitions/Task' | |
description: 'El atributo "lstTarea" se empleará para marcar aquellas tareas que quieres destacar y que siempre estarán visibles desde la barra del usuario, de manera que no tengas que navegar para marcar tiempo en estas tareas. Esto es muy util cuando trabajas en varios proyectos en el mismo dia.' | |
Comment: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
user: | |
type: integer | |
format: int32 | |
description: 'Usuario al que pertenecen las preferencias [User]' | |
task: | |
type: integer | |
format: int32 | |
description: 'Tarea a la que pertenece el comentario [Task]' | |
creationDate: | |
type: string | |
format: date | |
description: Fecha de creación del comentario | |
modificationDate: | |
type: string | |
format: date | |
description: Fecha de modificación del comentario | |
text: | |
type: string | |
description: Texto del comentario | |
reference: | |
type: integer | |
format: int32 | |
description: 'Se emplea para indicar que este comentario es en respuesta a otro anterior, se intenta seguir la estructura de comentarios de Google Drive [Task]' | |
status: | |
type: integer | |
format: int32 | |
description: 'Estado del comentario (Pendiente, Completado) [EnumCommentStatus]' | |
TaskRequest: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
user: | |
type: integer | |
format: int32 | |
description: 'Usuario al que pertenecen las preferencias [User]' | |
customer: | |
type: integer | |
format: int32 | |
description: 'Cliente al que se envía la solicitud [User]' | |
estimatedAmount: | |
type: integer | |
format: int32 | |
description: Coste estimado del desarrollo | |
billingAmount: | |
type: integer | |
format: int32 | |
description: Coste a facturar | |
status: | |
type: integer | |
format: EnumRequestStatus | |
description: 'Estado en el que se ecuentra la solicitud (Pendiente, Aceptada, Rechazada)' | |
requestDate: | |
type: string | |
format: date | |
description: Fecha en la que se realizó la solicitud | |
requestChanged: | |
type: string | |
format: date | |
description: Fecha en la que cambió de estado la solicitud | |
task: | |
type: integer | |
format: int32 | |
description: 'tarea a la que se encuentra vinculada la solicitud [Task]' | |
Time: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
user: | |
type: integer | |
format: int32 | |
description: 'Usuario al que pertenecen el tiempo [User]' | |
start: | |
type: string | |
format: date | |
description: Fecha y hora de inicio de la marca de tiempo | |
end: | |
type: string | |
format: date | |
description: Fecha y hora de fin de la marca de tiempo | |
task: | |
type: integer | |
format: int32 | |
description: 'Tarea con la que está vinculada la marca de tiempo [Task]' | |
timeType: | |
type: integer | |
format: int32 | |
description: 'Tipo de registro de tiempo (Inicio, Fin, Pausa, Tarea) [EnumTime]' | |
Notification: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
originUser: | |
type: integer | |
format: int32 | |
description: 'Usuario que genera la notificación [User]' | |
targetUser: | |
type: integer | |
format: int32 | |
description: 'Usuario para el que se genera la notificación [User]' | |
creationDate: | |
type: string | |
format: date | |
description: Fecha de creación de la notificiación | |
comment: | |
type: integer | |
format: int32 | |
description: 'Comentario al que se encuentra vinculada la notificación [Comment]' | |
task: | |
type: integer | |
format: int32 | |
description: 'Tarea a la que se encuentra vinculada la notifiación [Task]' | |
project: | |
type: integer | |
format: int32 | |
description: 'Proyecto al que se encuentra vinculada la notifiación [Project]' | |
notificationType: | |
type: integer | |
format: int32 | |
description: 'Tipo de notificación (Comentario, Tarea, Proyecto) [EnumNotification]' | |
status: | |
type: integer | |
format: int32 | |
description: 'Estado de la notificación (Activa, Archivada) [EnumNotificationStatus]' | |
Subscription: | |
properties: | |
id: | |
type: integer | |
description: Identificador | |
company: | |
type: integer | |
format: int32 | |
description: 'Empresa a la que pertenece la subscripción [Company]' | |
start: | |
type: string | |
format: date | |
description: Fecha de inicio de la subscripción | |
end: | |
type: string | |
format: date | |
description: Fecha de fin de la subscripción | |
type: | |
type: integer | |
format: int32 | |
description: 'Tipo de subscripción (FREE, MAX_10, MAX_20, MAX_50, MAX_100, PREMIUM) [EnumSubscription]' | |
status: | |
type: integer | |
format: int32 | |
description: 'Estado de la notificación (Active, Inactive) [EnumSubscriptionStatus]' | |
Error: | |
properties: | |
code: | |
type: integer | |
format: int32 | |
message: | |
type: string | |
fields: | |
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
entity Company { | |
id Long, | |
name String, | |
address String, | |
typeCompany EnumCompanyType | |
} | |
entity Project { | |
id Long, | |
name String, | |
status EnumProjectStatus, | |
completedEstimated Integer | |
} | |
entity Budget { | |
idd Long, | |
ownAmount Float, | |
hours Float, | |
billingDate LocalDate, | |
startDate LocalDate, | |
endDate LocalDate | |
} | |
entity UserData { | |
id Long, | |
name String required, | |
surname String required, | |
email String required, | |
officePhone String, | |
profile EnumUserProfile, | |
typeUser EnumUserType | |
} | |
entity UserProject { | |
id Long, | |
relationType EnumProjectUser required | |
} | |
/** | |
* The Employee entity. | |
*/ | |
entity Panel { | |
id Long, | |
name String required, | |
status EnumPanelStatus, | |
orderPanel Integer, | |
creationDate LocalDate, | |
defaultTaskStatus EnumTaskStatus | |
} | |
entity Task { | |
id Long, | |
title String required, | |
description String, | |
taskType EnumTaskType, | |
complexity EnumTaskComplexity, | |
estimatedHours Integer, | |
estimatedMinutes Integer, | |
creationDate ZonedDateTime required, | |
orderTask Integer | |
} | |
entity Preference { | |
id Long, | |
colour String, | |
abreviation String, | |
projectOrder EnumProjectOrder | |
} | |
entity Comment { | |
id Long, | |
creationDate ZonedDateTime, | |
modificationDate ZonedDateTime, | |
text String required, | |
status EnumCommentStatus | |
} | |
entity TaskRequest { | |
id Long, | |
estimatedAmount Float required, | |
billingAmount Float required, | |
status EnumRequestStatus, | |
requestDate ZonedDateTime, | |
requestChanged ZonedDateTime | |
} | |
entity Time { | |
id Long, | |
start ZonedDateTime, | |
end ZonedDateTime, | |
type EnumTime | |
} | |
entity Notification { | |
id Long, | |
creationDate ZonedDateTime, | |
status EnumNotificationStatus, | |
type EnumNotification | |
} | |
entity Subscription { | |
id Long, | |
start LocalDate, | |
end LocalDate, | |
type EnumSubscription, | |
status EnumSubscriptionStatus | |
} | |
/****** Enumerados ***********/ | |
enum EnumRequestStatus { | |
PENDING, ACCEPTED, REJECTED | |
} | |
enum EnumTaskComplexity { | |
SIMPLE, COMPLEX | |
} | |
enum EnumStatusCompany { | |
INTERNAL, CONTACT | |
} | |
enum EnumUserType { | |
INTERNAL, CONTACT | |
} | |
enum EnumProjectStatus { | |
ACTIVE, PAUSED, COMPLETED | |
} | |
enum EnumPanelStatus { | |
VISIBLE, HIDDEN | |
} | |
enum EnumTaskType { | |
REQUEST, CUSTOM, PRESET | |
} | |
enum EnumNotification { | |
COMMENT, TASK, PROJECT | |
} | |
enum EnumTaskStatus { | |
PENDING, ACTIVE, COMPLETED | |
} | |
enum EnumProjectOrder { | |
LATEST, OLDEST | |
} | |
enum EnumTime { | |
START, END, PAUSE, TASK | |
} | |
enum EnumCommentStatus { | |
PENDING, COMPLETED | |
} | |
enum EnumNotificationStatus { | |
ACTIVE, FILED | |
} | |
enum EnumSubscription { | |
FREE, MAX_10, MAX_20, MAX_50, MAX_100, PREMIUM | |
} | |
enum EnumSubscriptionStatus { | |
ACTIVE, INACTIVE | |
} | |
enum EnumCompanyType { | |
INTERNAL, CONTACT | |
} | |
enum EnumUserProfile { | |
ADMIN, MANAGER, DEVELOPER | |
} | |
enum EnumProjectUser { | |
MANAGER, DEVELOPER, CUSTOMER | |
} | |
/**** RELACIONES ****/ | |
relationship OneToMany { | |
Company{project(name)} to Project{company(name)} | |
} | |
relationship OneToMany { | |
Company{userData(name)} to UserData{company(name)} | |
} | |
relationship OneToMany { | |
Project{panel(name)} to Panel{project(name)} | |
} | |
relationship OneToOne { | |
Project{budget} to Budget{project(name)} | |
} | |
relationship OneToMany { | |
Project{notification} to Notification{project(name)} | |
} | |
relationship OneToMany { | |
UserData{notification} to Notification{userData(name)} | |
} | |
relationship OneToMany { | |
UserData{comment} to Comment{userData(name)} | |
} | |
relationship OneToOne { | |
UserData{preference} to Preference{userData(name)} | |
} | |
relationship OneToMany { | |
UserData{taskRequest(task)} to TaskRequest{userData(name)} | |
} | |
relationship OneToMany { | |
UserData{task(title)} to Task{userData(name)} | |
} | |
relationship OneToOne { | |
UserProject{project(name)} to Project{userProject(name)} | |
} | |
relationship OneToOne { | |
UserProject{userData(name)} to UserData{userProject(relationType)} | |
} | |
relationship OneToMany { | |
Panel{task(title)} to Task{panel(name)} | |
} | |
relationship OneToMany { | |
Task{time} to Time{task(title)} | |
} | |
relationship OneToMany { | |
Task{comment} to Comment{task(title)} | |
} | |
relationship OneToMany { | |
Preference{task(title)} to Task{preference} | |
} | |
relationship OneToOne { | |
Comment{origin} to Comment | |
} | |
relationship OneToOne { | |
TaskRequest{task(title)} to Task{taskRequest} | |
} | |
relationship ManyToOne { | |
Time{userData(name)} to UserData | |
} | |
relationship OneToMany { | |
Task{notification(type)} to Notification | |
} | |
relationship OneToMany { | |
Comment{notification(type)} to Notification | |
} | |
relationship OneToOne { | |
Subscription{company(name)} to Company{subscription(type)} | |
} | |
/****** Paginacion ********/ | |
paginate Company, Project, UserData, Task, Comment, TaskRequest, Time, Notification with pager | |
dto all with mapstruct | |
service all with serviceImpl except Budget, UserProject, Preference, Time | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment