Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
API for a simple basket service
swagger: '2.0'
info:
title: BasketService API
version: "1.0.0"
host: api.myservice.com
schemes:
- https
basePath: /v1
produces:
- application/json
paths:
/basket:
get:
summary: List all available baskets
description: |
Sample API for basket retrieval.
responses:
200:
description: An array of baskets
schema:
type: array
items:
$ref: '#/definitions/Basket'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
definitions:
Basket:
type: object
properties:
id:
type: string
description: Unique identifier representing a specific basket.
Error:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment