Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sareg0 opened this issue Jun 6, 2024 · 0 comments
Open

Comments

@sareg0
Copy link

sareg0 commented Jun 6, 2024

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. 🙏

@sareg0 sareg0 changed the title Mismatch between Card schema and response? Mismatch between Card schema and response for 'minor' arcana card. Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant