Skip to content

Commit f5f5962

Browse files
committed
fix: correct class spell responses
1 parent f17c753 commit f5f5962

File tree

6 files changed

+91
-23
lines changed

6 files changed

+91
-23
lines changed

src/swagger/api-spec/openapi.json

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@
872872
"content": {
873873
"application/json": {
874874
"schema": {
875-
"$ref": "#/components/schemas/APIReferenceList"
875+
"$ref": "#/components/schemas/ClassSpellList"
876876
},
877877
"example": {
878878
"count": 2,
@@ -1251,32 +1251,27 @@
12511251
{
12521252
"index": "dominate-monster",
12531253
"name": "Dominate Monster",
1254-
"url": "/api/spells/dominate-monster",
1255-
"level": 8
1254+
"url": "/api/spells/dominate-monster"
12561255
},
12571256
{
12581257
"index": "earthquake",
12591258
"name": "Earthquake",
1260-
"url": "/api/spells/earthquake",
1261-
"level": 8
1259+
"url": "/api/spells/earthquake"
12621260
},
12631261
{
12641262
"index": "incendiary-cloud",
12651263
"name": "Incendiary Cloud",
1266-
"url": "/api/spells/incendiary-cloud",
1267-
"level": 8
1264+
"url": "/api/spells/incendiary-cloud"
12681265
},
12691266
{
12701267
"index": "power-word-stun",
12711268
"name": "Power Word Stun",
1272-
"url": "/api/spells/power-word-stun",
1273-
"level": 8
1269+
"url": "/api/spells/power-word-stun"
12741270
},
12751271
{
12761272
"index": "sunburst",
12771273
"name": "Sunburst",
1278-
"url": "/api/spells/sunburst",
1279-
"level": 8
1274+
"url": "/api/spells/sunburst"
12801275
}
12811276
]
12821277
}
@@ -6178,6 +6173,39 @@
61786173
}
61796174
}
61806175
]
6176+
},
6177+
"ClassLevelSpell": {
6178+
"description": "`ClassLevelSpell`\n",
6179+
"allOf": [
6180+
{
6181+
"$ref": "#/components/schemas/APIReference"
6182+
},
6183+
{
6184+
"type": "object",
6185+
"properties": {
6186+
"level": {
6187+
"type": "number",
6188+
"description": "The level of the spell slot used to cast the spell."
6189+
}
6190+
}
6191+
}
6192+
]
6193+
},
6194+
"ClassSpellList": {
6195+
"description": "`ClassSpellList`\n",
6196+
"type": "object",
6197+
"properties": {
6198+
"count": {
6199+
"description": "Total number of resources available.",
6200+
"type": "number"
6201+
},
6202+
"results": {
6203+
"type": "array",
6204+
"items": {
6205+
"$ref": "#/components/schemas/ClassLevelSpell"
6206+
}
6207+
}
6208+
}
61816209
}
61826210
}
61836211
}

src/swagger/api-spec/openapi.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ paths:
553553
content:
554554
application/json:
555555
schema:
556-
$ref: '#/components/schemas/APIReferenceList'
556+
$ref: '#/components/schemas/ClassSpellList'
557557
example:
558558
count: 2
559559
results:
@@ -776,23 +776,18 @@ paths:
776776
- index: dominate-monster
777777
name: Dominate Monster
778778
url: /api/spells/dominate-monster
779-
level: 8
780779
- index: earthquake
781780
name: Earthquake
782781
url: /api/spells/earthquake
783-
level: 8
784782
- index: incendiary-cloud
785783
name: Incendiary Cloud
786784
url: /api/spells/incendiary-cloud
787-
level: 8
788785
- index: power-word-stun
789786
name: Power Word Stun
790787
url: /api/spells/power-word-stun
791-
level: 8
792788
- index: sunburst
793789
name: Sunburst
794790
url: /api/spells/sunburst
795-
level: 8
796791
'/api/conditions/{index}':
797792
get:
798793
summary: Get a condition by index.
@@ -4182,3 +4177,25 @@ components:
41824177
notes:
41834178
description: Information regarding the damage.
41844179
type: string
4180+
ClassLevelSpell:
4181+
description: |
4182+
`ClassLevelSpell`
4183+
allOf:
4184+
- $ref: '#/components/schemas/APIReference'
4185+
- type: object
4186+
properties:
4187+
level:
4188+
type: number
4189+
description: The level of the spell slot used to cast the spell.
4190+
ClassSpellList:
4191+
description: |
4192+
`ClassSpellList`
4193+
type: object
4194+
properties:
4195+
count:
4196+
description: Total number of resources available.
4197+
type: number
4198+
results:
4199+
type: array
4200+
items:
4201+
$ref: '#/components/schemas/ClassLevelSpell'

src/swagger/paths/classes.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class-spells-path:
201201
content:
202202
application/json:
203203
schema:
204-
$ref: '../schemas/combined.yml#/APIReferenceList'
204+
$ref: '../schemas/combined.yml#/ClassSpellList'
205205
example:
206206
count: 2
207207
results:
@@ -450,20 +450,15 @@ class-spell-level-spells-path:
450450
- index: dominate-monster
451451
name: Dominate Monster
452452
url: '/api/spells/dominate-monster'
453-
level: 8
454453
- index: earthquake
455454
name: Earthquake
456455
url: '/api/spells/earthquake'
457-
level: 8
458456
- index: incendiary-cloud
459457
name: Incendiary Cloud
460458
url: '/api/spells/incendiary-cloud'
461-
level: 8
462459
- index: power-word-stun
463460
name: Power Word Stun
464461
url: '/api/spells/power-word-stun'
465-
level: 8
466462
- index: sunburst
467463
name: Sunburst
468464
url: '/api/spells/sunburst'
469-
level: 8

src/swagger/schemas/classes.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,26 @@ class-level-model:
250250
- $ref: '#/cs-sorcerer'
251251
- $ref: '#/cs-warlock'
252252
- $ref: '#/cs-wizard'
253+
class-level-spell-model:
254+
description: |
255+
`ClassLevelSpell`
256+
allOf:
257+
- $ref: './combined.yml#/APIReference'
258+
- type: object
259+
properties:
260+
level:
261+
type: number
262+
description: 'The level of the spell slot used to cast the spell.'
263+
264+
class-spell-list-model:
265+
description: |
266+
`ClassSpellList`
267+
type: object
268+
properties:
269+
count:
270+
description: 'Total number of resources available.'
271+
type: number
272+
results:
273+
type: array
274+
items:
275+
$ref: '#/class-level-spell-model'

src/swagger/schemas/combined.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,7 @@ OptionSet:
118118
$ref: './common.yml#/option-set-model'
119119
Option:
120120
$ref: './common.yml#/option-model'
121+
ClassLevelSpell:
122+
$ref: './classes.yml#/class-level-spell-model'
123+
ClassSpellList:
124+
$ref: './classes.yml#/class-spell-list-model'

src/swagger/schemas/subclass.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ subclass-model:
3636
$ref: "./combined.yml#/SpellPrerequisite"
3737
spell:
3838
$ref: "./combined.yml#/APIReference"
39+
3940
subclass-level-resource-model:
4041
type: object
4142
properties:

0 commit comments

Comments
 (0)