useshortcut / shortcut-client-js

The official JavaScript client library for the Shortcut (formerly Clubhouse) REST API.
https://useshortcut.github.io/shortcut-client-js/
132 stars 31 forks source link

Swagger schema issue #142

Open ngouy opened 1 year ago

ngouy commented 1 year ago

Per the swagger file, in the definitions:

"Group": {
      "description": "A Group.",
      "type": "object",
      "properties": {
         //...
       },
      "required": [
        "app_url",
        "description",
        "archived",
        "entity_type",
        "color",
        "num_stories_started",
        "mention_name",
        "name",
        "color_key",
        "num_stories",
        "num_epics_started",
        "id",
        "display_icon",
        "member_ids",
        "story_workflow_ids",
        "workflow_ids"
      ]
    }

But then when I query the API, some "required" attributes are nil. color for example is not required, because most (to not say all) of the groups have an color_key, which I guess replaces the color

I don't know when Creating a new group, but by definition, on how open-api generator build a client on top of the swagger files, it errors out because no color is present (API returns null), but the attribute is "required"

I'ts only one issue I found. I will keep posting here if I found others

tresni commented 1 year ago

Might want to look at #141 where I updated all this to the latest schema definitions.