Skip to content

Commit

Permalink
feat: fixes issue #3 by adding support for missile_weapons and melee_…
Browse files Browse the repository at this point in the history
…weapons (#4)

Co-authored-by: brittonhayes <[email protected]>
  • Loading branch information
brittonhayes and brittonhayes authored Jul 27, 2023
1 parent 8844e62 commit e963487
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 31 deletions.
8 changes: 5 additions & 3 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,12 @@ components:
# bun: "rel:has-many,join:id=unit_id"
items:
$ref: '#/components/schemas/DamageTable'
weapons:
missile_weapons:
type: array
items:
$ref: '#/components/schemas/Weapon'
melee_weapons:
type: array
# x-go-extra-tags:
# bun: "rel:has-many,join:id=unit_id"
items:
$ref: '#/components/schemas/Weapon'

Expand Down
54 changes: 28 additions & 26 deletions api/warhammer.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions fixtures/units.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@
name: Move
value: 5
min_wounds_suffered: 0
weapons:
melee_weapons:
- name: Celestine Hammer
range: 1
attacks: 4
to_hit: 3
to_wound: 3
rend: -1
damage: 2
missile_weapons: []
- id: liberators
name: Liberators
grand_alliance: order
Expand Down Expand Up @@ -72,11 +73,12 @@
name: Move
value: 5
min_wounds_suffered: 0
weapons:
melee_weapons:
- name: Warhammer
range: 1
attacks: 1
to_hit: 4
to_wound: 3
rend: -1
damage: 1
missile_weapons: []

0 comments on commit e963487

Please sign in to comment.