slackapi / slack-api-specs

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

Implementing `views.*` methods? #29

Closed agius closed 4 years ago

agius commented 5 years ago

Description

Hello Slack folks!

I was trying to implement the new modal views in one of my apps, but the views.open, views.push, and views.update methods are not available in slack-ruby/slack-ruby-client . After reading the source for that library, it looks like the methods are missing because they are not in the OpenAPI spec.

Is support for these new methods coming? Is there a timeline for implementation? I'm wondering if I should abandon slack-ruby-client and just write my own instead.

Thanks!

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

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

episod commented 5 years ago

I hope to get a new OpenAPI spec generated in time for our Spec conference next week -- it's a pretty manual process unfortunately. I'll update this ticket when it goes out -- it'll include the views.* methods.

I'm not sure if the slack-ruby-client uses the OpenAPI spec to build its definition or not, but in the meantime you can should be able to use the library's more abstract web request interface to start interacting with the method directly, without a bit of the abstraction.

response = Slack::Web::Faraday::Request::post("https://slack.com/api/views.open", your_method_arguments)
agius commented 5 years ago

@episod Thanks for the quick and helpful response! That solves my issue for now.

Looks like I was wrong, slack-ruby actually uses slack-api-ref, which scrapes the web documentation. Doesn't look like there is movement to switch it over to slack-api-spec, since this issue has been open since April 2018 😿

Good luck with the Spec conference!

idyll commented 4 years ago

@episod did you ever get the OpenAPI spec updated?

I'm maintaining an autogenerated package for Elixir and it looks like we're still missing the views.* details in the OpenAPI spec.

I'd prefer it if I didn't need to manually write in support for the views...

acconrad commented 4 years ago

@idyll any chance you have that available somewhere? would love to get this added to the Elixir-Slack package, we're experiencing the same problem there as well: https://github.com/BlakeWilliams/Elixir-Slack/issues/150

episod commented 4 years ago

Good news, views.* is now in the spec. Let us know if you have any issues with them.