slackapi / slack-api-specs

Open API specifications for platform products by Slack
MIT License
222 stars 64 forks source link

Required parameters are not marked as required #70

Open aviks opened 2 years ago

aviks commented 2 years ago

Description

The token, channel and ts parameters are shown as required in the documentation for the chat.delete method : https://api.slack.com/methods/chat.delete#arg_token

However, in slack_web_openapi_v2.json , the parameter definitions lack the "required": true annotation.

The same issue exists in other 46 other methods, as far as I can see. These include, among others: chat.meMessage, chat.scheduleMessage, chat.scheduleMessages_list

What type of issue is this? (place an x in one of the [ ])

Requirements (place an x in each of the [ ])


Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

All environments

Steps to reproduce:

Inspect and compare the method documentation and the openapi schema for the above methods

Expected result:

All parameters documented as required should be marked as "required": true in the schema files

Actual result:

Some methods in the schema do not have the "required":true annotation.

Attachments:

"/chat.delete": {
            "post": {
                "consumes": [
                    "application/x-www-form-urlencoded",
                    "application/json"
                ],
                "description": "Deletes a message.",
                "externalDocs": {
                    "description": "API method documentation",
                    "url": "https://api.slack.com/methods/chat.delete"
                },
                "operationId": "chat_delete",
                "parameters": [
                    {
                        "description": "Authentication token. Requires scope: `chat:write`",
                        "in": "header",
                        "name": "token",
                        "type": "string"
                    },
                    {
                        "description": "Timestamp of the message to be deleted.",
                        "in": "formData",
                        "name": "ts",
                        "type": "number"
                    },
                    {
                        "description": "Channel containing the message to be deleted.",
                        "in": "formData",
                        "name": "channel",
                        "type": "string"
                    },
                    {
                        "description": "Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.",
                        "in": "formData",
                        "name": "as_user",
                        "type": "boolean"
                    }
                ],
...............