dotcom icon indicating copy to clipboard operation
dotcom copied to clipboard

Add Swagger/OpenAPI specification

Open catalandres opened this issue 9 years ago • 3 comments

By documenting the API in a standard format we could use cool tools like this one, which we could use to generate wrappers in a bunch of different languages.

Is it something that's in your radar? If not, I would like to give it a try.

catalandres avatar Apr 15 '16 00:04 catalandres

Swagger would be great! We are generating the actual APIs from Perl (Jewish calendar and Shabbat APIs) and PHP (Hebrew Date converter API). Do you think we can use the swagger YAML editor to generate the swagger docs without needing to integrate into Perl? (Not sure if there is the notion of swagger "annotations" for Perl the way that is popular in Java).

If you would like to take a stab at this we would be delighted to include it.

mjradwin avatar Apr 15 '16 02:04 mjradwin

First attempt, an almost complete stab at documenting convert, here.

You can go to the Swagger editor to paste it and try it out. I think the documentation output is pretty cool.

I have coded this manually. There are integrations for Perl and PHP available, but my Perl is nonexisting and I don't know how these would fit with the current setup.

catalandres avatar Apr 15 '16 15:04 catalandres

Looks superb. I only had to change the path from /converter to /converter/ to get the Send Request button to work correctly.

If you'd like to document /hebcal/ and/or /shabbat/ APIs, we can include those in the same documentation.

mjradwin avatar Apr 18 '16 03:04 mjradwin