Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 204 additions & 1 deletion docs/public/openapi/zarv-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
],
"tags": [
{ "name": "Autenticação", "description": "API de Autenticação" },
{ "name": "Verificação", "description": "API de Verificações" }
{ "name": "Verificação", "description": "API de Verificações" },
{ "name": "Veiculo", "description": "API de Veículos" }
],
"paths": {
"/api/v1/authentication": {
Expand Down Expand Up @@ -160,6 +161,175 @@
}
}
}
},
"/api/v2/verifications/{id}/pdf": {
"get": {
"summary": "Obter PDF da verificação",
"description": "Retorna os bytes do arquivo PDF de uma verificação específica pelo ID. A resposta contém o conteúdo binário do arquivo e nao uma URL para download.",
"tags": ["Verificação"],
"security": [{ "Authentication v2": [] }],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"example": "805181ca-2956-49e1-81bb-93d1792d269d"
}
}
],
"responses": {
"200": {
"description": "Bytes do arquivo PDF da verificação",
"content": {
"application/pdf": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "Parâmetros inválidos",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"example": "No verificationID provided"
}
}
}
}
}
},
"500": {
"description": "Erro ao gerar ou obter o PDF",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"example": "internal server error"
}
}
}
}
}
}
}
}
},
"/api/v1/asset": {
"post": {
"summary": "Criar um veículo",
"description": "Cria um novo veículo por Placa ou Vin",
"tags": ["Veiculo"],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/VehicleCreateRequest" }
}
}
},
"responses": {
"201": {
"description": "Veículo criado com sucesso",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VehicleCreateResponse"
}
}
}
}
}
},
"get": {
"summary": "Listar meus veículos",
"description": "Listar todos os meus veículos",
"tags": ["Veiculo"],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/VehicleCreateRequest" }
}
}
},
"responses": {
"201": {
"description": "Veículos listado com sucesso",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VehicleCreateResponse"
}
}
}
}
}
}
},
"/api/v1/asset/{id}": {
"patch": {
"summary": "Editar um veículo",
"description": "Editar um veículo",
"tags": ["Veiculo"],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/VehicleCreateRequest" }
}
}
},
"responses": {
"201": {
"description": "Veículo editado com sucesso",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VehicleCreateResponse"
}
}
}
}
}
},
"get": {
"summary": "Consultar um veículo",
"description": "Consultar ums veículo",
"tags": ["Veiculo"],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/VehicleCreateRequest" }
}
}
},
"responses": {
"201": {
"description": "Veículos listado com sucesso",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VehicleCreateResponse"
}
}
}
}
}
}
}
},
"components": {
Expand Down Expand Up @@ -658,6 +828,39 @@
"limit": { "type": "integer", "example": 10 },
"total": { "type": "integer", "example": 100 }
}
},
"VehicleCreateRequest": {
"type": "object",
"properties": {
"license_plate": {
"type": "string",
"example": "DXZ8N65"
},
"workspaceId": {
"type": "vin",
"example": "JH4KA8160PC000949"
}
}
},
"VehicleCreateResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"example": "805181ca-2956-49e1-81bb-93d1792d269d"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"example": "bc5a5b9e-3bb2-4998-b301-a6a39314d330"
},
"userId": {
"type": "string",
"format": "uuid",
"example": "767b88ea-6f5e-4256-b6bb-726cb402cd7b"
}
}
}
}
}
Expand Down
Loading