You are on page 1of 3

Taller

USTED DEBE DESARROLLAR ESTE TALLER COMPLETAMENTE, ADJUNTARLO Y SUBIRLO A


LA PLATAFORMA PARA QUE PUEDAS CONTINUAR CON LAS DEMAS ACTIVIDADES

1. Según lo visto hasta ahora en el curso crea tu propia API de ejemplo utilizando
SWAGGER con los métodos faltantes put delete

openapi: 3.0.0
info:
version: 1.0.0
title: Api Cliente Mejor Venta
description: ''
license:
name: Apache 2.0

servers:
# Added by API Auto Mocking Plugin
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/ANDERSON12384_1/ApiClienteMejorVenta/1.0.0
- url: https://development.gigantic-server.com/v1
description: Development server
- url: https://staging.gigantic-server.com/v1
description: Staging server
- url: https://api.gigantic-server.com/v1
description: Production server

paths:
/ clientes:
get:
description: Clientes con mejor ventas
parameters:
- in: query
name: id
required: false
description: codigo del cliente
schema:
type: number

- in: query
name: ventas
required: false
description: venta del cliente
schema:
type: number

responses:
200:
description: Successfull request
content:
aplication/json:
schema:
type: array
items:
properties:
id:
type: integer

nombre:
type: string
example: Anderson Rodriguez
ventas:
type: number
format: float

404:
description: request not found
content:
aplication/json:
schema:
type: string
example: {Error 404. Page or resquest not found}

post:
description: Clientes con mejor ventas
parameters:
- name: cliente
in: query
description: crear un nuevo cliente
schema:
type: object
properties:
nombre:
type: string
description: primer nombre
example: 'Anderson'
id:
type: number
description: codigo cliente
email:
type: string
description: correo de cliente
example: anderson12384@f.
responses:
200:
description: client that was insert

delete:
description: Delete cliente
parameters:
- in: query
name: id
schema:
type: number

required: true
description: string id of user to
responses:
200:
description: User that was deleted
405:
description: User that was deleted

You might also like