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

'objs_conversation' contains more than one object #46

Open
4 of 9 tasks
dhandapani-hd opened this issue Dec 14, 2020 · 1 comment
Open
4 of 9 tasks

'objs_conversation' contains more than one object #46

dhandapani-hd opened this issue Dec 14, 2020 · 1 comment

Comments

@dhandapani-hd
Copy link

dhandapani-hd commented Dec 14, 2020

Description

I am working with Slack Swagger for my project. I am using NSwag to create a client out of the swagger file.

The generated client file does not contain the properties for 'objs_conversation' definition. This is because, in swagger file, it does not contain 'properties' and 'data type' properties directly. Instead it contains only 'items' (which then contains 3 definitions).

Swagger definition for the same - https://justpaste.it/388lf

Questions

  1. Is this the latest swagger json file? and is it officially supported by slack? (I know it is, just getting the confirmation :) )
  2. How to identify which definition to choose for 'objs_conversation'?

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 [ ])

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

Bug Report

I am using NSwag to create a client out of the swagger file.

The generated client file does not contain the properties for 'objs_conversation' definition. This is because, in swagger file, it does not contain 'properties' and 'data type' properties directly. Instead it contains only 'items' (which then contains 3 definitions).

Swagger definition for the same - https://justpaste.it/388lf

Reproducible in:

All environments

Steps to reproduce:

Generate the c# client using NSwag from the swagger file.

Expected result:

'objs_conversation' to contains properties. (3 different objects under 'objs_converstion' is confusing and how would we be able to differentiate? it could be with three different names)

Actual result:

It is empty

Attachments:

image

@krissirk
Copy link

The schema for objs_conversation has “items” declared without a type. It appears that what is desired is to declare a mixed array, which is only supported in OAS 3.0. One alternative option is to use “allOf” to combine all fields of all the channel types and beside “non-requiredness,” it should assign the values to whatever matching field(s).

FWIW, the reference to objs_conversation from the operation conversations.list already is a list input parameter.

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

2 participants