Last active
July 27, 2017 03:28
-
-
Save mediafreakch/ae60aad51733d81bb2b34ea0ed06b542 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is an example of the Uber API | |
# as a demonstration of an API spec in YAML | |
swagger: '2.0' | |
info: | |
title: ...WIP... Ricardo Search API | |
description: Biggest e-commerce provider in Switzerland's API - Web friendly | |
version: "0.1.0" | |
# the domain of the service | |
host: ricardo.ch | |
# array of all schemes that your API supports | |
schemes: | |
- https | |
# will be prefixed to all paths | |
basePath: /search/api/v1 | |
securityDefinitions: | |
api_key: | |
type: apiKey | |
name: X-Api-Key | |
in: header | |
security: | |
- api_key: [] | |
produces: | |
- application/json | |
paths: | |
/articles: | |
get: | |
summary: Get a collection of articles matching the querystrings | |
parameters: | |
- name: searchSentence | |
in: query | |
type: string | |
- name: pageSize | |
in: query | |
type: number | |
- name: currentPage | |
in: query | |
type: number | |
- name: searchFullMatch | |
in: query | |
type: string | |
- name: searchOneOf | |
in: query | |
type: string | |
- name: searchExclude | |
in: query | |
type: string | |
- name: priceMax | |
in: query | |
type: number | |
- name: priceMin | |
in: query | |
type: number | |
- name: itemCondition | |
in: query | |
type: number | |
- name: paymentMethod | |
in: query | |
type: number | |
- name: categoryNr | |
in: query | |
type: number | |
- name: language | |
in: query | |
type: number | |
- name: offerType | |
in: query | |
type: number | |
- name: areaCountryNr | |
in: query | |
type: number | |
- name: areaNr | |
in: query | |
type: number | |
- name: zip | |
in: query | |
type: number | |
- name: range | |
in: query | |
type: number | |
- name: startingOn | |
in: query | |
type: number | |
- name: endingSoon | |
in: query | |
type: number | |
- name: memberClass | |
in: query | |
type: number | |
- name: withPicture | |
in: query | |
type: boolean | |
- name: sortingType | |
in: query | |
type: string | |
- name: auctionNr | |
in: query | |
type: number | |
- name: listingType | |
in: query | |
type: number | |
- name: sellerNickName | |
in: query | |
type: string | |
- name: useDescription | |
in: query | |
type: boolean | |
- name: shipping | |
in: query | |
type: number | |
- name: availabiility | |
in: query | |
type: number | |
- name: includeCbClassifieds | |
in: query | |
type: boolean | |
- name: premiumOptions | |
in: query | |
type: number | |
- name: onlyNewAuction | |
in: query | |
type: boolean | |
- name: include | |
in: query | |
type: string | |
- name: exclude | |
in: query | |
type: string | |
- name: getFacets | |
in: query | |
type: boolean | |
- name: getImages | |
in: query | |
type: boolean | |
- name: getArticles | |
in: query | |
type: boolean | |
- name: topArticlesCount | |
in: query | |
type: number | |
- name: isExtended | |
in: query | |
type: boolean | |
responses: | |
200: | |
description: An array of articles matching the queries | |
schema: | |
$ref: '#/definitions/SearchResult' | |
definitions: | |
SearchResult: | |
type: object | |
properties: | |
articles: | |
type: array | |
items: | |
$ref: '#/definitions/SearchResultItem' | |
totalCount: | |
type: number | |
SearchResultItem: | |
type: object | |
properties: | |
articleNr: | |
type: number | |
categoryNr: | |
type: number | |
bidsCount: | |
type: number | |
buyNowPrice: | |
type: number | |
lastbid: | |
type: number | |
title: | |
type: string | |
categoryPath: | |
type: string | |
isCb: | |
type: boolean | |
imageVersion: | |
type: number | |
endDate: | |
type: string | |
isMakeOffer: | |
type: boolean | |
itemCondition: | |
type: number | |
promotionalOption: | |
type: number | |
quantity: | |
type: number | |
sellerNr: | |
type: number | |
shippingCondition: | |
type: number | |
shippingCost: | |
type: number | |
startDate: | |
type: string | |
subTitle: | |
type: string | |
subTitleFr: | |
type: string | |
titleFr: | |
type: string | |
zipCode: | |
type: number | |
isClassified: | |
type: boolean | |
isTopArticle: | |
type: boolean | |
hasPicture: | |
type: boolean | |
offerType: | |
type: number | |
paymentMethod: | |
type: number | |
premiumOption: | |
type: number | |
seller: | |
$ref: '#/definitions/Seller' | |
showPictureInList: | |
type: boolean | |
isFixedPriceauction: | |
type: boolean | |
Seller: | |
type: object | |
properties: | |
sellerNr: | |
type: number | |
sellerNickname: | |
type: string | |
sellerStatus: | |
type: number | |
sellerCity: | |
type: string | |
sellerTotalResult: | |
type: number | |
sellerPositiveRate: | |
type: number | |
sellerNickNameForUrl: | |
type: string | |
sellerZipCode: | |
type: number | |
sellerCountryNr: | |
type: number | |
sellerCountry: | |
type: object | |
properties: | |
id: | |
type: number | |
countryId: | |
type: number | |
countryName: | |
type: string | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment