Skip to content

REST API

Carlos Roman edited this page Feb 19, 2017 · 2 revisions

Swagger give you a really good oportunity to generate any language binding to Uchuva REST webservice.

Swagger generate LANG client

If you want to generate a language binding, take the uchuva/prototipo/static/swagger/api.json into a folder and then run:

docker run -it --rm -v $(pwd):/swagger-api/out \
    jimschubert/swagger-codegen-cli generate \
    -i /swagger-api/out/api.json \
    -l $LANG \
    -o /swagger-api/out/$LANG

Set to your own

sudo chown -R $USER:$USER $LANG/

And then execute it.

ruby -Iruby/lib main.rb

You can also generate you binding manually, see this example for Racket and this for Ruby