Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Incorrect schema for calls.add and calls.info #69

Open
1 of 6 tasks
AndreaMGuzman opened this issue Dec 15, 2021 · 0 comments
Open
1 of 6 tasks

Incorrect schema for calls.add and calls.info #69

AndreaMGuzman opened this issue Dec 15, 2021 · 0 comments

Comments

@AndreaMGuzman
Copy link

AndreaMGuzman commented Dec 15, 2021

Description

Calls.add
The 200 response schema for calls.add can be improved by moving the response value id from additionalProperty to a named properties. Since this id value will be used in other operations such as calls.info, calls.end and more, it is actually a “required” response property, not “additional”. The OpenApi swagger parser library has limitations in additionalProperties when both additionalProperties and properties are defined, resulting in additionalProperties values being ignored, so the services that use this parser will lose the call id information from the response.

Possible solution
Change the 200 response for calls.add to:

"schema": {
  "properties": {
     "ok": { "$ref": "#/definitions/defs_ok_true" },
     "call": {
       "type": "object",
       "properties": {
         "id": {"type": "string"}
       }
     }
  }
}

Calls.info
The consumes for calls.info is defined to be application/json and application/x-www-form-urlencoded. However, when sending the request with application/json Content-Type header, Slack ignores the input parameter id. The server only accepts request with no Content-Type, or Content-Type: application/x-www-form-urlencoded.

Possible solution
remove application/json from the consumes definition

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

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

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

  • [x ] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x ] I've read and agree to the Code of Conduct.
  • [x ] I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

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

Reproducible in:

all
Development environment:

Steps to reproduce:

Expected result:

What you expected to happen

Actual result:

What actually happened

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.
If attaching logs, please remove user data and tokens.

@AndreaMGuzman AndreaMGuzman changed the title Incorrect "response" schema for calls.add Incorrect "response" schema for calls.add and calls.info Dec 17, 2021
@AndreaMGuzman AndreaMGuzman changed the title Incorrect "response" schema for calls.add and calls.info Incorrect schema for calls.add and calls.info Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant