stoplightio / desktop

The Stoplight desktop app + issues repository.
https://stoplight.io
79 stars 13 forks source link

Represent messages on queues #90

Open jayshao opened 6 years ago

jayshao commented 6 years ago

While not strictly supported by Swagger today... I would love to see an extension that let us re-use models and the editors to represent messages placed onto or read off of queues (e.g. Kinesis. SNS, Kafka, etc.)

Ideally these would be very similar to the current endpoints - except conceptually I think broken out as a separate category of events - with some way to specify where the events are placed. In practice I think vs. REST semantics there is probably also a stronger distinction between producers and consumers - and both are interesting to be able to use to document a service or as an API (e.g. This API listens on XX queue)

More details:

In our specific example - this is inspired by serverless.com's serverless.yml handling of triggers for function invocation (see: https://serverless.com/framework/docs/providers/aws/guide/serverless.yml/)

As some examples, here are the events a function can bind too - though some are AWS specific and could probably be better generalized:

events: # The Events that trigger this Function

jayshao commented 6 years ago

We played with some conventions for modelling these as groups of endpoints (e.g. creating a tag like 'events') - which might be a workaround, though that doesn't quite feel right.

jayshao commented 6 years ago

Thoughts:

marbemac commented 6 years ago

Would the ability to define schemas and reference them in your docs go a long way towards accomplishing this goal?

Basically, this: https://github.com/stoplightio/desktop/issues/87

jayshao commented 6 years ago

It would go a long way. Putting them in the Swagger files would be nice... but isn't strictly required - developer portal - definitely. Some convention with Swagger extensions might be really nice - but maybe I need to persuade the world to come around to my PoV first :)

On Thu, Nov 30, 2017 at 12:45 PM Marc MacLeod notifications@github.com wrote:

Would the ability to define schemas and reference them in your docs go a long way towards accomplishing this goal?

Basically, this: #87 https://github.com/stoplightio/desktop/issues/87

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stoplightio/desktop/issues/90#issuecomment-348265307, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMitxuu3lkeSKORNAvCbiScVf1XcVoGks5s7umngaJpZM4Qvbry .

--

Jason Shao

Head of Engineering

T: 212 644-6200 x9536

M: 732 221-9771

jason.shao@intersection.com

@jayshao https://twitter.com/jayshao

Intersection

10 Hudson Yards 26th Floor New York NY 10001

intersection.com

marbemac commented 6 years ago

You'll be able to reference the standalone schemas from swagger files as well as hub files.

In Q1 '18 we're introducing plugins that will allow the community to do stuff like define their own re-usable extensions. So, you could create a plugin that defines extensions for the messaging stuff in OAS 2 files, and then try to share it around the SL community :).