0% found this document useful (0 votes)
72 views2 pages

Hipster Products API Spec - Yaml

This API specification defines endpoints and responses for a products catalog. It includes endpoints to get a list of products or details of a single product by ID. Responses include product data like name, description, price and categories. Security is defined using an API key passed as a query parameter.

Uploaded by

rina mahure
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views2 pages

Hipster Products API Spec - Yaml

This API specification defines endpoints and responses for a products catalog. It includes endpoints to get a list of products or details of a single product by ID. Responses include product data like name, description, price and categories. Security is defined using an API key passed as a query parameter.

Uploaded by

rina mahure
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

swagger: '2.

0'
info:
title: Hipster Products API
version: "1"
description: Products API for Hipster Application
host: eval.cloudlearning.com
basePath:
/v1/hipster-products-api
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
APIKeyQuery:
type: "apiKey"
in: "query"
name: "apikey"
security:
- APIKeyQuery: []
paths:
/products:
get:
operationId: GetProducts
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/hipstershopListProductsResponse'
tags:
- ProductCatalogService
/products/{productId}:
get:
operationId: GetProductDetails
parameters:
- in: path
name: productId
type: string
required: true
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/hipstershopProduct'
tags:
- ProductCatalogService
definitions:
hipstershopListProductsResponse:
type: object
properties:
products:
type: array
items:
$ref: '#/definitions/hipstershopProduct'
hipstershopMoney:
type: object
properties:
currency_code:
type: string
description: The 3-letter currency code defined in ISO 4217.
units:
type: string
format: int64
description: |-
The whole units of the amount.
For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
nanos:
type: integer
format: int32
description: |-
Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If `units` is positive, `nanos` must be positive or zero.
If `units` is zero, `nanos` can be positive, zero, or negative.
If `units` is negative, `nanos` must be negative or zero.
For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
description: Represents an amount of money with its currency type.
hipstershopProduct:
type: object
properties:
id:
type: string
name:
type: string
description:
type: string
picture:
type: string
price_usd:
$ref: '#/definitions/hipstershopMoney'
categories:
type: array
items:
type: string
description: |-
Categories such as "vintage" or "gardening" that can be used to look up
other related products.

You might also like