go-microservices-tuto/swagger.yaml

52 lines
1.1 KiB
YAML

basePath: /
consumes:
- application/json
definitions:
Product:
description: Product defines the structure of a product
properties:
description:
type: string
x-go-name: Description
id:
format: int64
type: integer
x-go-name: ID
name:
type: string
x-go-name: Name
price:
format: float
type: number
x-go-name: Price
sku:
type: string
x-go-name: SKU
type: object
x-go-package: github.com/rjNemo/go-micro/products/models
info:
description: Documentation for Product API
title: Product API
version: 1.0.0
paths:
/products:
get:
description: Returns a list of products
operationId: listProducts
responses:
"200":
$ref: '#/responses/productsResponse'
tags:
- products
produces:
- application/json
responses:
productsResponse:
description: list of products in the response. For go-swagger
schema:
items:
$ref: '#/definitions/Product'
type: array
schemes:
- http
swagger: "2.0"