Conversation
opichals
left a comment
There was a problem hiding this comment.
Added just a note about the async interface. I guess we do callbacks for consistency which is a good thing so no need to change.
Perhaps we introduce synchronous API for everything that could be done synchronously later on.
| fury.use(openapi3Serializer); | ||
|
|
||
| // Assume `api` is a Minim element instance, e.g. from `fury.parse(...)` | ||
| fury.serialize({ api, mediaType: 'application/vnd.oai.openapi' }, (error, content) => { |
There was a problem hiding this comment.
I'd expect the serialize would be synchronous for easy of use.
There was a problem hiding this comment.
The parse and serialize functions in Fury are async. As we provide a uniform interface for serializing regardless of format and adapter implementation. This includes the "remote" adapter which uses HTTP to parse/serialize this could be problematic to support them all as sync.
I don't have much strong opinions against or for this, so if you would like sync API we can create an issue in the repository to investigate support across all the adapters.
There was a problem hiding this comment.
FWIW, master has sync interface for serialize now. We can support it here 😄.
|
Hey 👋 , might I ask what's the status of this PR? Thank you 👍 |
This is more of a proof of concept, I'm not sure we'll pursue this any further. |
Initial proof of concept with numerous caveats and unsupported elements (tracked in STATUS.md).