Skip to content

Commit

Permalink
feat(magic-items): Support images for magic items (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
bagelbits authored Sep 22, 2024
1 parent 51935b1 commit dc76f22
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 81 deletions.
126 changes: 45 additions & 81 deletions package-lock.json

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

1 change: 1 addition & 0 deletions src/graphql/typeDefs.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ type MagicItem implements IEquipmentBase {
desc: [String!]!
rarity: MagicItemRarity!
equipment_category: EquipmentCategory!
image: String
}

interface IEquipment implements IEquipmentBase {
Expand Down
1 change: 1 addition & 0 deletions src/models/magicItem/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const MagicItemSchema = new Schema<MagicItem>({
_id: { type: String, select: false },
desc: { type: [String], index: true },
equipment_category: APIReferenceSchema,
image: { type: String, index: true },
index: { type: String, index: true },
name: { type: String, index: true },
rarity: RaritySchema,
Expand Down
1 change: 1 addition & 0 deletions src/models/magicItem/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type MagicItem = {
_id?: mongoose.Types.ObjectId;
desc: string[];
equipment_category: APIReference;
image?: string;
index: string;
name: string;
rarity: Rarity;
Expand Down
3 changes: 3 additions & 0 deletions src/swagger/schemas/equipment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ magic-item-model:
- $ref: './combined.yml#/ResourceDescription'
- type: object
properties:
image:
description: 'The image url of the magic item.'
type: string
equipment_category:
$ref: './combined.yml#/APIReference'
rarity:
Expand Down

0 comments on commit dc76f22

Please sign in to comment.