Correct errors in the deck api spec

This commit is contained in:
Correl Roush 2024-02-21 17:54:48 -05:00
parent 04ad554d3c
commit 86675016c4

View file

@ -254,24 +254,25 @@ paths:
properties: properties:
name: name:
type: string type: string
required: true
cards: cards:
type: array type: array
items: items:
$ref: '#/components/schemas/card_constraint' $ref: '#/components/schemas/card_constraint'
required:
- name
text/csv: text/csv:
schema: schema:
type: array type: array
items: items:
$ref: '#/components/schemas/card_constraint' $ref: '#/components/schemas/card_constraint'
example: |- example: |-
Name,Quantity,Set Code,Collector Number Name,Quantity,Set Code,Collector Number
"Sol Ring",1,CMR,472 "Sol Ring",1,CMR,472
text/plain: text/plain:
schema: schema:
type: string type: string
example: |- example: |-
1 Sol Ring (CMR) 472 1 Sol Ring (CMR) 472
responses: responses:
'200': '200':
description: Deck created description: Deck created
@ -280,6 +281,12 @@ paths:
schema: schema:
$ref: '#/components/schemas/deck' $ref: '#/components/schemas/deck'
/api/decks/{deck_id}: /api/decks/{deck_id}:
parameters:
- in: path
name: deck_id
schema:
type: integer
required: true
get: get:
summary: Retrieve deck summary: Retrieve deck
tags: tags:
@ -303,6 +310,12 @@ paths:
summary: Find cards in collection summary: Find cards in collection
tags: tags:
- Decks - Decks
parameters:
- in: path
name: deck_id
schema:
type: integer
required: true
responses: responses:
'200': '200':
description: Cards description: Cards