Skip to content

Mismatch between Card schema and response for 'minor' arcana card.聽#15

Open

Description

@sareg0

Thank you so much for this API. It has been a joy to play and build with. 馃敭

I am building a small app where I generate TypeScript types from the schema. In doing so, I noticed that the response for an individual card on /cards does not match the schema for Card.

The Card schema in the API does not include the optional suits property, for a 'minor' arcana card.

The API specified schema for a Card does not have suits

https://app.swaggerhub.com/apis/ekswagger/tarot-api/1.3#/Card
Below is the schema for Card

components:
  schemas:
    Card:
      type: object
      properties:
        name_short:
          type: string
        name:
          type: string
        value:
          type: string
        value_int:
          type: integer
        type:
          type: string
          enum: [major, minor]
        meaning_up:
          type: string
        meaning_rev:
          type: string
        desc:
          type: string

response for /cards (for a major and a minor card)

The minor arcana card has the 'suits' property.

{
    "nhits": 78,
    "cards": [
        {
            "type": "major",
            "name_short": "ar02",
            "name": "The High Priestess",
            "value": "2",
            "value_int": 2,
            "meaning_up": "Secrets, mystery, the future as yet unrevealed; the woman who interests the Querent, if male; the Querent herself, if female; silence, tenacity; mystery, wisdom, science.",
            "meaning_rev": "Passion, moral or physical ardour, conceit, surface knowledge.",
            "desc": "She has the lunar crescent at her feet..."
        },
        {
            "name": "Ten of Swords",
            "name_short": "sw10",
            "value": "ten",
            "value_int": 10,
            "suit": "swords",
            "type": "minor",
            "meaning_up": "Whatsoever is intimated by the design; also pain, affliction, tears, sadness, desolation. It is not especially a card of violent death.",
            "meaning_rev": "Advantage, profit, success, favour, but none of these are permanent; also power and authority.",
            "desc": "A prostrate figure, pierced by all the swords belonging to the card."
        }
    ]
}

Please feel free to close this or correct me if I'm mistaken. Also let me know if you want me to help in fixing; I'm happy to help. 馃檹

Activity

  1. changed the title [-]Mismatch between `Card` schema and response?[/-] [+]Mismatch between `Card` schema and response for 'minor' arcana card.[/+] on Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions