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

Unknown groups.getMembers responses schema #221

Open
elias506 opened this issue Apr 30, 2022 · 2 comments
Open

Unknown groups.getMembers responses schema #221

elias506 opened this issue Apr 30, 2022 · 2 comments

Comments

@elias506
Copy link

Have this responses for groups.getMembers method:

"responses": {
        "response": {
          "$ref": "responses.json#/definitions/groups_getMembers_response"
        },
        "fieldsResponse": {
          "$ref": "responses.json#/definitions/groups_getMembers_fields_response"
        },
        "filterResponse": {
          "$ref": "responses.json#/definitions/groups_getMembers_filter_response"
        }
      },

But, as far as I understand, fields like in groups_getMembers_fields_response will be returned by fields in request in array, there is no reason for separate response. And filters field just set filters for response, no reason for separate response

In doc https://dev.vk.com/method/groups.getMembers has completely different result description

@FeeeeK
Copy link

FeeeeK commented May 31, 2022

На самом деле тут все куда сложнее. Ответ сервера зависит от параметров. Мне лень искать все эти объекты, поэтому просто добавлю скриншоты уже сгенерированного по схеме кода.

  • Передаем параметр fields и получаем groups_getMembers_fields_response, но в items, которого должен быть users_user_full, а не groups_user_xtr_role, как в схеме.
    image

  • Передаем параметр filter со значением managers и получаем новый ответ, которого нет в схеме, а в items должен быть groups_member_role
    image

С другими значениями получаем обычный groups_getMembers_response

@FeeeeK
Copy link

FeeeeK commented May 31, 2022

Просьба к тем, кто генерирует схему и не собирается менять этот метод: назовите респонсы с учетом имен этих параметров, как вы делали в некоторых методах.
Пусть это и очень неочевидная хрень, но раз до меня уже дошло, что раз параметра из названия респонса нет в методе, то это должно быть значением какого-либо другого параметра, то так и оставьте, не придумывайте что-то более сложное и запутанное.

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

2 participants