Created
August 30, 2024 17:28
-
-
Save joshtwist/1ca553c837983a87cfa7f60c1212bbf7 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
openapi: 3.0.0 | |
info: | |
title: Chill Vibes CBD Drinks API | |
description: > | |
Welcome to the Chill Vibes CBD Drinks API! | |
We're here to quench your thirst and soothe your soul, | |
one API call at a time. Remember, our drinks are high | |
in CBD, but our server responses are always 200 OK! | |
version: 1.0.0 | |
contact: | |
name: Mellow Support Team | |
email: [email protected] | |
servers: | |
- url: https://api.chillvibesdrinks.com/v1 | |
paths: | |
/drinks: | |
get: | |
summary: List all CBD drinks | |
description: > | |
Get ready for a tidal wave of tranquility! | |
This endpoint returns all our CBD-infused beverages. | |
Warning: Reading this list may induce extreme relaxation. | |
parameters: | |
- name: mood | |
in: query | |
description: Filter drinks by your current mood | |
schema: | |
type: string | |
enum: [anxious, stressed, paranoid, "convinced-the-government-is-watching"] | |
responses: | |
'200': | |
description: A blissful array of CBD drinks | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/DrinkList' | |
post: | |
summary: Create a new CBD drink | |
description: > | |
Feeling creative? Concoct your own CBD elixir! | |
But remember, if it tastes like bong water, that's on you. | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NewDrink' | |
responses: | |
'201': | |
description: Drink created successfully. Cheers! | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Drink' | |
'400': | |
description: Bad request. Did you try to mix Red Bull with CBD again? | |
/drinks/{drinkId}: | |
get: | |
summary: Get a specific CBD drink | |
description: > | |
Dive deep into the calm waters of a single CBD beverage. | |
It's like meditation, but for your taste buds! | |
parameters: | |
- name: drinkId | |
in: path | |
required: true | |
schema: | |
type: integer | |
responses: | |
'200': | |
description: A single serving of liquid zen | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Drink' | |
'404': | |
description: Drink not found. Time for a reality check? | |
/order: | |
post: | |
summary: Place an order | |
description: > | |
Ready to elevate your chill game? Order now! | |
We promise our delivery person won't eat your snacks... probably. | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Order' | |
responses: | |
'201': | |
description: Order placed successfully. Namaste! | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/OrderConfirmation' | |
'400': | |
description: Bad request. Are you sure you're not already too relaxed? | |
/vibecheck: | |
get: | |
summary: Get your current vibe level | |
description: > | |
Curious about your current state of chill? | |
We'll tell you if you're more "zen master" or "squirrel on espresso". | |
responses: | |
'200': | |
description: Your vibe, scientifically measured | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/VibeCheck' | |
components: | |
schemas: | |
Drink: | |
type: object | |
properties: | |
id: | |
type: integer | |
example: 420 | |
name: | |
type: string | |
example: "Cloud Nine Coconut Water" | |
description: | |
type: string | |
example: "Like a tropical vacation for your neurons" | |
cbd_content: | |
type: integer | |
description: CBD content in milligrams | |
example: 25 | |
price: | |
type: number | |
format: float | |
example: 9.99 | |
mood_enhancer: | |
type: string | |
example: "Blissful tranquility with a hint of giggles" | |
required: | |
- name | |
- cbd_content | |
- price | |
NewDrink: | |
type: object | |
properties: | |
name: | |
type: string | |
example: "Mellow Mango Madness" | |
description: | |
type: string | |
example: "It's like your taste buds are getting a gentle hug" | |
cbd_content: | |
type: integer | |
description: CBD content in milligrams | |
example: 30 | |
price: | |
type: number | |
format: float | |
example: 11.99 | |
mood_enhancer: | |
type: string | |
example: "Euphoric calm with a side of the munchies" | |
required: | |
- name | |
- cbd_content | |
- price | |
DrinkList: | |
type: array | |
items: | |
$ref: '#/components/schemas/Drink' | |
Order: | |
type: object | |
properties: | |
customer_name: | |
type: string | |
example: "Bob Marley" | |
address: | |
type: string | |
example: "42 Chill Street, Mellowville, CA 90420" | |
items: | |
type: array | |
items: | |
type: object | |
properties: | |
drink_id: | |
type: integer | |
quantity: | |
type: integer | |
example: | |
- drink_id: 420 | |
quantity: 3 | |
- drink_id: 710 | |
quantity: 1 | |
required: | |
- customer_name | |
- address | |
- items | |
OrderConfirmation: | |
type: object | |
properties: | |
order_id: | |
type: string | |
example: "CHILL-123456" | |
estimated_delivery: | |
type: string | |
format: date-time | |
total_price: | |
type: number | |
format: float | |
chill_message: | |
type: string | |
example: "Your path to tranquility is on its way. Remember: good things come to those who wait... and meditate." | |
VibeCheck: | |
type: object | |
properties: | |
vibe_level: | |
type: integer | |
minimum: 1 | |
maximum: 10 | |
example: 8 | |
vibe_description: | |
type: string | |
example: "Floating on a cloud of pure bliss" | |
recommended_drink: | |
$ref: '#/components/schemas/Drink' | |
wise_words: | |
type: string | |
example: "When life gives you lemons, squeeze them into your CBD lemonade" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment