Skip to content

Instantly share code, notes, and snippets.

@dcortesnet
Created May 23, 2022 15:07
Show Gist options
  • Save dcortesnet/2edd121d480f8a165b87817931ad5447 to your computer and use it in GitHub Desktop.
Save dcortesnet/2edd121d480f8a165b87817931ad5447 to your computer and use it in GitHub Desktop.
Swagger estructura base open api microservicio
openapi: "3.0.2"
info:
title: API docs
version: "1.0"
servers:
- url: https:ma-autored
paths:
/v1.0/paises/CL/vehiculo/{patente}:
get:
tags:
- vehiculos
description: Obtener información del auto por patente
parameters:
- in: path
schema:
type: string
name: patente
description: Patente del auto
required: true
example: RDLC84
responses:
"200":
description: Resultado de búsqueda registro civil
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/InformacionRegistroCivilAuto"
/v1.0/paises/CL/vehiculo:valorizar:
post:
tags:
- vehiculos
description: Tasación de auto
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/InformacionTasacion"
responses:
"200":
description: Resultado de tasación del auto
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/InformacionPrecioSugerido"
components:
schemas:
InformacionRegistroCivilAuto:
type: object
properties:
brand_id:
type: integer
example: 1
brand_name:
type: string
example: "KIA"
model_id:
type: integer
example: 1
model_name:
type: string
example: "RIO"
year:
type: integer
example: 2018
vehicle_type:
type: string
example: "AUTOMOVIL"
color:
type: string
example: "NEGRO"
version_name:
type: string
example: "RIO 5"
version_id:
type: integer
example: 1
InformacionTasacion:
type: object
required:
- model_id
- year
- brand_id
- version_id
- km
properties:
model_id:
type: integer
example: 1
year:
type: integer
example: 2018
brand_id:
type: integer
example: 1
version_id:
type: integer
example: 1
km:
type: integer
example: 500000
requested_id:
type: integer
example: 1
InformacionPrecioSugerido:
type: object
properties:
brand_id:
type: integer
example: 1
model_id:
type: integer
example: 1
year:
type: integer
example: 2018
version_id:
type: integer
example: 1
requested_km:
type: integer
example: 500000
requested_time:
type: string
example: "2020/07/10 09:49:48"
brand_name:
type: string
example: "STRING"
model_name:
type: string
example: "STRING"
show_name:
type: string
example: "STRING"
average_km:
type: integer
example: 50000
request_id:
type: integer
example: 1
registers_quantity:
type: integer
example: 10
retake:
type: object
properties:
suggested_price:
type: integer
example: 3000000
calculation_type:
type: string
example: "STRING"
precision:
type: string
example: "string"
warnings:
type: object
properties:
warning_1:
type: integer
example: 500000
min_price:
type: integer
example: 2500000
max_price:
type: integer
example: 3500000
publication:
type: object
properties:
suggested_price:
type: integer
example: 3000000
calculation_type:
type: string
example: "string"
precision:
type: string
example: "string"
warnings:
type: object
properties:
warning_1:
type: integer
example: 500000
min_price:
type: integer
example: 2500000
max_price:
type: integer
example: 3500000
sale:
type: object
properties:
suggested_price:
type: integer
example: 3000000
calculation_type:
type: string
example: "string"
precision:
type: string
example: "string"
warnings:
type: object
properties:
warning_1:
type: integer
example: 500000
min_price:
type: integer
example: 2500000
max_price:
type: integer
example: 3500000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment