XVincentX / vscode-apielements

VSCode extensions for API Elements (aka: API Blueprint and Swagger)
MIT License
120 stars 15 forks source link

Preview mode #63

Open borekb opened 8 years ago

borekb commented 8 years ago

Hi, this is an awesome extension! I don't like working with Blueprint in Apiary's online editor so this really has been a blessing.

Do you think it would be possible to add a preview somehow? Sort of like Markdown preview, just with Blueprint specifics?

borekb commented 8 years ago

Possibly draw an inspiration from here: https://atom.io/packages/api-blueprint-preview

EDIT: I've just spotted a note about it in your current README, sorry :)

XVincentX commented 8 years ago

Hey!

Thanks a lot, it's good to see that this is helping somebody around.

So - the preview is something I'm aiming for in the middle term roadmap, but I didn't find a proper solution yet.

Thing is - I could employ aglio, but unfortunately it seems like it's not really super updated as well it's still working with the old API Blueprint AST (which means: it won't work with Swagger documents and I want to get an unified experience).

So - as long aglio does not get updated, the short term solution would be to use the Apiary preview feature, but it would involve to have an Apiary account, allowing the file to be continuously uploaded into Apiary (which not everybody wants) and things like that.

The last solution would be - craft a new API Blueprint renderer from scratch. I'd love to work on that, but it would be an huge step.

Any particular thoughts, in meantime?

borekb commented 8 years ago

Yeah, maybe start with the official Apiary previewer which should be relatively easy to do (I assume) and think about a more independent, offline solution later. I, personally, would be fine with server roundtrips until a better solution is around.

XVincentX commented 8 years ago

Yes, it should be. All right, thanks a lot for the heads-up, I'll try to work on this!

XVincentX commented 8 years ago

I coded this thing on the fly and actually is not that bad.

borekb commented 8 years ago

Wow! You rock.

XVincentX commented 8 years ago

I'll try to polish it and see if I can publish something.

XVincentX commented 8 years ago

@borekb I've just published the 0.6 version which contains a small implementation of the thing. It was done in kind of rush as I'm a bit busy in other things now - but I'll return on this once I'll be free.

Let me know if that at least solves your use case!

borekb commented 8 years ago

It's a great start, thanks! A couple of initial impressions:

image

XVincentX commented 8 years ago

The latter is definitely more difficult to do and I'm not even sure that's possible. I'll keep an eye on it (and reopen it) but I would say that's a very low priority thing. See the issues to have an idea of the roadmap

XVincentX commented 7 years ago

Note: I missed the preview activation event

FranklinYu commented 5 years ago

Are you somewhat interested in Swagger preview? I can help research the possibility.

XVincentX commented 5 years ago

Hey Franklin,

Unfortunately I am not developing this extension actively anymore due to a general lack of interest. Feel free to clone and make it happen if you think it’d be beneficial but keep in mind it’s based on some old packages that will need to be updated.

Cheers!