Open sommmen opened 2 years ago
Hi @sommmen it will be very nice from you, if you can create openapi doc, I appreciate it
Hi @sommmen it will be very nice from you, if you can create openapi doc, I appreciate it
Hiya - i'm currently in need of the /timeseries api so i will be writing an api doc for that. Was hoping you could just generate the open api document from the server code but here's a sample doc that i worked on:
https://app.swaggerhub.com/apis/sommmen/exchangerate.host/1.0
I used Swagger inspector of smartbear to get the initial api document off. Then using swaggerhub I added the samples and some descriptions by hand.
I then used https://roger13.github.io/SwagDefGen/ to take the json response objects and make them into a yaml schema. I had to hand tailor them because dictionary (maps) were converted to objects (and not dictionaries) for the rates.
Open api docs are here: https://swagger.io/docs/specification/paths-and-operations/
Anyways from then on the api generation part seems to work for a c# client (using NSwag):
Anyways i'm working on customer project right now so my focus will be purely on the timeseries api but if i have time i may expand on the rest of the endpoints.
EDIT: still working on the doc - now added most params and endpoints, now need to work on adding the responses. EDIT2: not a lot of free time unfortunately. tbc in the future.
It seems the api for exchangerate.host was changed. The 'old' api is now known as the 'fixer' api from ApiLayer it seems. Therefore i updated the document to now point to apilayer and it seems to work fine as is now.
https://app.swaggerhub.com/apis/sommmen/exchangerate.host/1.0
Hiya,
I'd love support for OpenApi3 so i can easily write a client for c#.
https://swagger.io/
I'm a .NET dev and for ASP.NET the most common web tech theres tooling to auto generate openapi3 documents. Clients for various languages can then be created from that document and consuming apis is now both fun and easy.
Perhaps we could a) write and maintain an openApi document or b) auto enerate it - but im unsure if thats possible since i don't know the current toolchain.