www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Swaggarize

reply Bogdan <szabobogdan yahoo.com> writes:
A few months ago I was so pissed off that I was more productive 
writing a project in javascript than in D, that I was almost 
wanted to not use D anymore.

This happened because there are a lot of nice libraries that 
people write for javascript and all that you have to do is to 
bind together some libraries to a web framework and you have a 
new project. This ruins all my fun from programming...

Thinking further I figured out that D is a nice environment, 
because people like me contribute to it... so I decided to write 
in D the javascript libraries that I would use.

I don't know who heard about swagger, http://swagger.io/ . I 
started to use it on the project that I work now to have a 
living, and I noticed that the tools related to this project are 
very good and I would like to take the advantage with my pet 
projects (which are in D).

I wrote a small library that maps all the swagger paths to some D 
functions. More than that it does the validation for almost all 
the parameters. If there is something that is missing, just let 
me know or create a PR.

you can find the code here:
https://github.com/gedaiu/swaggarize
Oct 20 2015
parent Dejan Lekic <dejan.lekic gmail.com> writes:
For a moment I hoped that you are working on the D codegen for 
Swagger. :) *that* would really be a useful thing, in my humble 
opinion!

Speaking about the rant about JS and productivity. I never say JS 
as "one language to rule them all", nor I saw D in the same way. 
D and JS cover different domains and should be used in those 
areas they are really good at. So, ideally developer would use 
both.
Oct 20 2015