Skip to content

Commit

Permalink
fix: correct class spell responses
Browse files Browse the repository at this point in the history
  • Loading branch information
ecshreve committed Dec 4, 2024
1 parent f17c753 commit 75cbb18
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 6,196 deletions.
6,184 changes: 0 additions & 6,184 deletions src/swagger/api-spec/openapi.json

This file was deleted.

29 changes: 23 additions & 6 deletions src/swagger/api-spec/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/APIReferenceList'
$ref: '#/components/schemas/ClassSpellList'
example:
count: 2
results:
Expand Down Expand Up @@ -776,23 +776,18 @@ paths:
- index: dominate-monster
name: Dominate Monster
url: /api/spells/dominate-monster
level: 8
- index: earthquake
name: Earthquake
url: /api/spells/earthquake
level: 8
- index: incendiary-cloud
name: Incendiary Cloud
url: /api/spells/incendiary-cloud
level: 8
- index: power-word-stun
name: Power Word Stun
url: /api/spells/power-word-stun
level: 8
- index: sunburst
name: Sunburst
url: /api/spells/sunburst
level: 8
'/api/conditions/{index}':
get:
summary: Get a condition by index.
Expand Down Expand Up @@ -4182,3 +4177,25 @@ components:
notes:
description: Information regarding the damage.
type: string
ClassLevelSpell:
description: |
`ClassLevelSpell`
allOf:
- $ref: '#/components/schemas/APIReference'
- type: object
properties:
level:
type: number
description: The level of the spell slot used to cast the spell.
ClassSpellList:
description: |
`ClassSpellList`
type: object
properties:
count:
description: Total number of resources available.
type: number
results:
type: array
items:
$ref: '#/components/schemas/ClassLevelSpell'
7 changes: 1 addition & 6 deletions src/swagger/paths/classes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class-spells-path:
content:
application/json:
schema:
$ref: '../schemas/combined.yml#/APIReferenceList'
$ref: '../schemas/combined.yml#/ClassSpellList'
example:
count: 2
results:
Expand Down Expand Up @@ -450,20 +450,15 @@ class-spell-level-spells-path:
- index: dominate-monster
name: Dominate Monster
url: '/api/spells/dominate-monster'
level: 8
- index: earthquake
name: Earthquake
url: '/api/spells/earthquake'
level: 8
- index: incendiary-cloud
name: Incendiary Cloud
url: '/api/spells/incendiary-cloud'
level: 8
- index: power-word-stun
name: Power Word Stun
url: '/api/spells/power-word-stun'
level: 8
- index: sunburst
name: Sunburst
url: '/api/spells/sunburst'
level: 8
23 changes: 23 additions & 0 deletions src/swagger/schemas/classes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,26 @@ class-level-model:
- $ref: '#/cs-sorcerer'
- $ref: '#/cs-warlock'
- $ref: '#/cs-wizard'
class-level-spell-model:
description: |
`ClassLevelSpell`
allOf:
- $ref: './combined.yml#/APIReference'
- type: object
properties:
level:
type: number
description: 'The level of the spell slot used to cast the spell.'

class-spell-list-model:
description: |
`ClassSpellList`
type: object
properties:
count:
description: 'Total number of resources available.'
type: number
results:
type: array
items:
$ref: '#/class-level-spell-model'
4 changes: 4 additions & 0 deletions src/swagger/schemas/combined.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,7 @@ OptionSet:
$ref: './common.yml#/option-set-model'
Option:
$ref: './common.yml#/option-model'
ClassLevelSpell:
$ref: './classes.yml#/class-level-spell-model'
ClassSpellList:
$ref: './classes.yml#/class-spell-list-model'
1 change: 1 addition & 0 deletions src/swagger/schemas/subclass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ subclass-model:
$ref: "./combined.yml#/SpellPrerequisite"
spell:
$ref: "./combined.yml#/APIReference"

subclass-level-resource-model:
type: object
properties:
Expand Down

0 comments on commit 75cbb18

Please sign in to comment.