fsprojects-archive / zzarchive-apiaryprovider Goto Github PK
View Code? Open in Web Editor NEW[ARCHIVED] Type provider for Apiary.io
License: Other
[ARCHIVED] Type provider for Apiary.io
License: Other
I wanted to use this provider for calling skypickerpublicapi.
I was able to create provider:
let search = new ApiaryProvider<"skypickerpublicapi">("https://api.skypicker.com/")
But unfortunately it is not possible to call some api by it, the requests were always wrong.
Other big issue is that it doesn't support POST requests.
Moving discussion from fsprojects/FSharp.Data#156
At that point we can maybe rename ApiaryProvider to RestApiProvider?
I'm trying this out with our Volusion Storefront API, but I wasn't able to get this working.
let store = new ApiaryProvider<"volusion">("http://www.samplestore.io")
After debugged this for a while this evening, I found that in ApiaryGenerator.fs
the body.InnerText was returning "", so I changed the code to be:
let generateMembersForJsonResult (ctx:ApiaryGenerationContext) name spec =
let samples =
[ for example in spec?responses do
if example?status.AsInteger() = 200 then
match example.TryGetProperty "body" with
| Some body ->
let source = body.InnerText()
if String.IsNullOrEmpty source then ()
else yield JsonValue.ParseSample source
| None -> () ]
This got me past that error, but nothing was quite right. Just looking to be pointed in the right direction.
Starting Target: RunTest_ApiaryProvider.DesignTime.Tests
/Users/travis/build/fsprojects/ApiaryProvider/tools/Nunit/nunit-console.exe "-nologo" "-noshadow" "-labels" "/Users/travis/build/fsprojects/ApiaryProvider/tests/ApiaryProvider.DesignTime.Tests/bin/Release/ApiaryProvider.DesignTime.Tests.dll" "-xml:TestResults.xml" "-framework:4.0" "-domain:Multiple"
mono /Users/travis/build/fsprojects/ApiaryProvider/tools/Nunit/nunit-console.exe "-nologo" "-noshadow" "-labels" "/Users/travis/build/fsprojects/ApiaryProvider/tests/ApiaryProvider.DesignTime.Tests/bin/Release/ApiaryProvider.DesignTime.Tests.dll" "-xml:TestResults.xml" "-framework:4.0" "-domain:Multiple"
Cannot open assembly '/Users/travis/build/fsprojects/ApiaryProvider/tools/Nunit/nunit-console.exe': No such file or directory.
Running build failed.
Has this been updated to the latest version of Blueprint?
But using fsx normally works fine
RAML (http://raml.org/) is a YAML-based mark up language for describing a REST API, with it we should be able to create a REST API against any RESTful service using its RAML spec.
Use an assemblyresolver in the ApiaryProvider.fs file before the constructor to resolve into the nuget packages folder
As it is, it will probably cause problems if there's a version mismatch between what was bundled and the version of FSharp.Data that is being used from NuGet
((50, 13), (50, 41)) The type provider 'ApiaryProvider.ProviderImplementation.ApiaryProvider' reported an error: The remote server returned an error: (404) Not Found.
Seems it can't find the sample blueprint.
If you get CI working so I have a baseline to work against, we'll contribute a Hawk authentication mechanism.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.