Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Add more useful snippet #46

Open
XVincentX opened this issue Sep 2, 2016 · 18 comments
Open

Add more useful snippet #46

XVincentX opened this issue Sep 2, 2016 · 18 comments
Milestone

Comments

@XVincentX
Copy link
Owner

XVincentX commented Sep 2, 2016

I think it would be a good idea to add a bunch of useful snippets while working with both Swagger and API Blueprint

@jsynowiec , you're the only user reporting so far...I'd love to get some inputs from you. What do you think would speed up your work as snippets?

@XVincentX XVincentX added this to the v0.4.0 milestone Sep 2, 2016
@jsynowiec
Copy link

Even better - I wanted to contribute some of my snippets at some point. Didn't have time yet though.

So far I have snippets for:

  • general endpoint skeleton with header, request and response,
  • a group of CRUD methods for Collection and single resource,
  • some smaller snippets for several project specific things,

I have to clean them up a bit and make more universal. I have this on my todo list.

@jsynowiec
Copy link

I'm also creating some sort of blueprint generator/scaffolding thingie based on my boilerplate. When it's ready it'll be installable via npm and should allow to quickly bootstrap a general API specification with selected authentication, resource links, basic CRUD for user accounts, etc.

@XVincentX
Copy link
Owner Author

Cool! Looking forward for those. Feel free eventually to share raw and unpolished stuff, I'll be happy to finish them and include those.

@jsynowiec
Copy link

I've started to move my snippets from markdown config file to API Blueprint and there is something wrong with language id. Selecting API Blueprint from snippets list opens up the API Blueprint.json file, so it matches the "language": "API Blueprint", contribution. But after saving it only the snippets provided by extension are available. Is space and uppercase letters allowed for language id?

@XVincentX
Copy link
Owner Author

@jsynowiec Unfortunately I do not think I understood the problem correctly. Could you please elaborate or eventually attach a gif?

If you do not want to dig into VSCode extension and those things, feel free to add them here directly and I'll take care of that.

I'll give you credit, of course!

@jsynowiec
Copy link

jsynowiec commented Sep 5, 2016

@jsynowiec Unfortunately I do not think I understood the problem correctly. Could you please elaborate or eventually attach a gif?

I've created a snippet definitions file for API Blueprint (Preferences -> User Snippets -> API Blueprint) and added some snippets that I previously had in my markdown user snippets. After saving the file vscode doesn't list those new snippets while editing apib file.

ezgif com-optimize

It works as supposed when I've added those snippets for Markdown and set API Blueprint as Markdown syntax.

If you do not want to dig into VSCode extension and those things, feel free to add them here directly and I'll take care of that.

It's not a problem. I already have my own extension ;-)

I'm taking my vacation now so I'll get back to it after few weeks.

@XVincentX
Copy link
Owner Author

Oh - interesting. I have no idea to be honest. I'll try to dig into but that might be a VSCode bug as well.

Have a great vacation!

@XVincentX XVincentX modified the milestones: v0.5.0, v0.4.0 Sep 6, 2016
@XVincentX
Copy link
Owner Author

@jsynowiec Are you still interested in sharing these snippets eventually?

@jsynowiec
Copy link

Sure. Have you found a way to allow for external snippets alongside those in the extension?

@XVincentX
Copy link
Owner Author

It seems like a VSCode limitation. I dug into the source code some weeks ago but I do not really remember the precise line.

The question is - do you want to bring these snippets into this extension or - do you want to create another one?

@jsynowiec
Copy link

I'll contribute them and send a PR. Just need some time.

I'm not quite into Swagger so you should create separate enhancement issues for both, Swagger and Blueprint snippets, reference them here. You can assign me to the second one (if GH allows to assign someone outside the repo).

@XVincentX
Copy link
Owner Author

It's not possible to assign external people, unfortunately.
Ok - take your time. I just wanted to make sure you still want to do that.

Once done, I'll take your one as an inspiration and probably convert these to Swagger, if they make sense.

@XVincentX XVincentX modified the milestones: v0.6.0, v0.5.0 Oct 7, 2016
@XVincentX
Copy link
Owner Author

@jsynowiec Any updated on that?

@XVincentX
Copy link
Owner Author

@jsynowiec Ping!

@XVincentX
Copy link
Owner Author

@jsynowiec Last call, then I'll close the issue.

@jsynowiec
Copy link

Hey, sorry ☹️. I haven't had much time, so I haven't got those snippets ready. Even for my day-to-day work I didn't created or refined them as I haven't created a new docs for some time. You can close this or leave it. If I find some spare time I'll try to look into it but can't promise anything right now.

@XVincentX
Copy link
Owner Author

@jsynowiec Do you have some drafts at least? I can work on those eventually.

@jsynowiec
Copy link

Unfortunately nothing I can share without cleaning and rewriting other than what is already available at https://github.com/jsynowiec/api-blueprint-boilerplate/blob/master/src/api.apib

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants