News for hackers. Stuff that matters.
Re:AsyncAPI – OpenAPI-like specification for event-driven ar... by dsun180 on Monday March 30, 2020 @11:31AM (#22728781)
I would love if the definition of websockets would be added to OpenAPI https://github.com/OAI/OpenAPI-Specification/issues/523
Re:AsyncAPI – OpenAPI-like specification for event-driven ar... by BerislavLopac on Monday March 30, 2020 @03:38PM (#22731481)
What would be the advantage of that? OpenAPI is designed for HTTP-based APIs; I'm sure an equivalent can be done for WebSockets?
Re:AsyncAPI – OpenAPI-like specification for event-driven ar... by dsun180 on Monday March 30, 2020 @06:20PM (#22732803)
I would be able to document websockets side by side with "normal" requests and then use the same tooling for code generation or validation.
Re:AsyncAPI – OpenAPI-like specification for event-driven ar... by KMag on Monday March 30, 2020 @10:39PM (#22734469)
That use case would seem to be better served by creating a new standard that references the other standard for its IDL and serialization format, and general semantics, while having a separate standard for any websocket-specific details.

That avoids having to amend the original standard for each new variation. If you get enough variants (probably in the neighborhood of 2-4), then it makes sense to go back and supersede the original standard by breaking out the high-level layers each into their own standard that's designed for inclusion in other standards. That way, for instance, your async-Bluetooth standard doesn't have to refer to any document that gets bogged down in HTTP/1.1-specific messaging semantics. It's not worth re-factoring your standards stack the first time you reuse a standard, but you don't want some big spaghetti tangle of standards, either.