-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcribbage.azurewebsites.net.yaml
55 lines (55 loc) · 1.61 KB
/
cribbage.azurewebsites.net.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
openapi: 3.0.0
info:
title: Score Calculation API
description: API for calculating scores in a card game
version: 1.0.0
servers:
- url: https://cribbage.azurewebsites.net/
paths:
/score_hand_show:
post:
summary: Calculate score
operationId: score_hand_show
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
starter:
type: string
description: The starter card, e.g. '5H' for 5 of hearts
hand:
type: array
items:
type: string
description: A card in the hand, e.g. and array with cards like '5H' for 5 of hearts
isCrib:
type: boolean
description: Whether the hand is a crib
required:
- starter
- hand
- isCrib
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
type:
type: string
description: The type of response
score:
type: integer
description: The calculated score
message:
type: string
description: A message about the score calculation
'400':
description: Bad Request
'500':
description: Internal Server Error