Skip to content

Commit

Permalink
refactor: swag
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus allen authored and marcus allen committed Feb 23, 2025
1 parent 8bfcfee commit 1b92c55
Showing 1 changed file with 125 additions and 6 deletions.
131 changes: 125 additions & 6 deletions pairings-api/swagger/v1/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,31 @@ paths:
security:
- bearer_auth: []
parameters:
- name: by_category[category]
- name: by_category
in: query
required: false
schema:
type: string
- name: by_flavor_profile[flavor_profile]
- name: by_flavor_profile[]
in: query
items:
type: string
required: false
schema:
type: string
- name: search[query]
type: array
- name: search
in: query
required: false
schema:
type: string
- name: visible_to[user_id]
- name: visible_to
in: query
required: false
schema:
type: string
responses:
'200':
description: filters by category
description: filters by search
'401':
description: unauthorized
post:
Expand Down Expand Up @@ -93,6 +95,123 @@ paths:
description: successful
'404':
description: not found
"/pairings":
get:
summary: Lists pairings
security:
- bearer_auth: []
parameters:
- name: visible_to
in: query
required: false
schema:
type: string
- name: by_strength
in: query
required: false
schema:
type: string
- name: by_confidence
in: query
required: false
schema:
type: string
- name: public_pairings
in: query
required: false
schema:
type: boolean
- name: private_pairings
in: query
required: false
schema:
type: boolean
responses:
'200':
description: filters public pairings
'401':
description: unauthorized
post:
summary: Creates a pairing
security:
- bearer_auth: []
parameters: []
responses:
'201':
description: pairing created
'422':
description: unprocessable entity
requestBody:
content:
application/json:
schema:
type: object
properties:
item1_id:
type: string
item2_id:
type: string
strength:
type: integer
confidence_score:
type: number
public:
type: boolean
pairing_notes:
type: string
required:
- item1_id
"/pairings/{id}":
parameters:
- name: id
in: path
required: true
schema:
type: string
get:
summary: Shows a pairing
security:
- bearer_auth: []
responses:
'200':
description: successful
'404':
description: not found
patch:
summary: Updates a pairing
security:
- bearer_auth: []
parameters: []
responses:
'200':
description: successful
'404':
description: not found
'400':
description: bad request
requestBody:
content:
application/json:
schema:
type: object
properties:
strength:
type: integer
confidence_score:
type: number
public:
type: boolean
pairing_notes:
type: string
delete:
summary: Deletes a pairing
security:
- bearer_auth: []
responses:
'200':
description: successful
'404':
description: not found
"/password":
patch:
summary: Updates password
Expand Down

0 comments on commit 1b92c55

Please sign in to comment.