apiaryio / apiary-client Goto Github PK
View Code? Open in Web Editor NEWApiary CLI client
Home Page: https://help.apiary.io/tools/apiary-cli/
License: MIT License
Apiary CLI client
Home Page: https://help.apiary.io/tools/apiary-cli/
License: MIT License
the apiaryio gem depends on rack (~> 1.4.1)
But rails 4.0.2 (specifically actionpack 4.0.2) depends on rack (~> 1.5.2)
As such I can't add gem "apiaryio"
and get the latest version.
Would it be possible to loosen the rack constraint, perhaps >= 1.4.0, < 1.6.0
?
An attempt to create a new API from a local apiary.apib file fails with
zdenek$ apiary publish --api-name=mynewapi123
Apiary service responded with an error: 404 Resource Not Found
Please provide the means to create a new API or at least, provide a clear information that API has to be first created manually at Apiary.
Hello!
Super stoked about Apiary - but I seem to be having some issues fetching the .apib
file.
When I run apiary fetch --api-name { my api name }
, it shows the content in the terminal, but it does not create a local file with the data.
Am I misunderstanding something?
I tried using response type "application/javascript" for jsonp under multiple response for a single resource, but it doesn't seem to work with dredd though:
Is this currently supported?
Hi,
I'm trying execute preview:
$ apiary preview
/var/lib/gems/1.9.1/gems/apiaryio-0.0.8/lib/apiary/command/preview.rb:81: warning: Insecure world writable dir /home/erik/Applications in PATH, mode 040777
Couldn't get a file descriptor referring to the console
other try:
$ apiary preview --path ./apiary.apib
/var/lib/gems/1.9.1/gems/apiaryio-0.0.8/lib/apiary/command/preview.rb:81: warning: Insecure world writable dir /home/erik/Applications in PATH, mode 040777
Couldn't get a file descriptor referring to the console
same result,..
I have the file apiary.apib in the current directory that I'm executing apiary preview.
Please Help, Regards.
According to http://stackoverflow.com/questions/22643429/apiary-multiple-blueprint-file-into-one-api, it should be possible to split up an apiary API documentation over multiple files with the use of an apary.manifest
file.
It would be ideal if the preview tool of the CLI supports this.
I'm looking into automatically publishing a new .apib
on every change to our API, though http://docs.apiary.apiary.io/ seems to be out of sync with http://client.apiary.io/ (the problem I'm trying to solve 😄). I know can read the the Ruby source and try to figure it out though my Ruby isn't very good and it would be nice to have some apiary meta docs
The client should check if its running on a Linux system, and maybe use xdg-open instead?
I'm generating the docs locally with "preview --output", but it doesn't have the Table of Contents pane that is present on apiary hosting. I think the ToC is crucial to any documentation so I'd like to request this feature.
I also noticed the "preview --output option" is not shown in your readme.
Cheers,
Steven
I've simply exported apiary key, then:
apiary fetch --api-name=XXXX --output=apiary.apib
then
apiary preview
and got this error
I've opened apiary.apib file but it its encoding was fine except I had some Polish characters in sample Json responses. After changing all national characters ą to a, ś to s etc. no error appeared connected to file encoding.
When I had for example in sample json response:
"state": "śląskie",
I had this encoding error and after changing it into:
"state": "slaskie",
$ sudo gem install apiaryio
Password:
Fetching: rest-client-1.7.3.gem (100%)
Successfully installed rest-client-1.7.3
Fetching: rack-1.5.5.gem (100%)
Successfully installed rack-1.5.5
Fetching: rake-10.3.2.gem (100%)
rake's executable "rake" conflicts with /usr/bin/rake
Overwrite the executable? [yN] N
ERROR: Error installing apiaryio:
"rake" from rake conflicts with /usr/bin/rake
I understand that the blueprint is validated with redsnow before it's published. However, it would be nice to have the blueprint validated as a separate command so you could validate without publishing. This is especially useful if you're using apiaryio to put the blueprint under version control and want to validate your changes before committing.
Is it possible to pass a custom path the apiary preview CLI tool? Something along these lines?
apiary preview PATH="../apiary.apib"
Just installed this on a clean ubuntu 14.04 VM, and getting this error:
could not open library '/var/lib/gems/1.9.1/gems/redsnow-0.2.1/ext/snowcrash/build/out/Release/lib.target/libsnowcrash.so': /var/lib/gems/1.9.1/gems/redsnow-0.2.1/ext/snowcrash/build/out/Release/lib.target/libsnowcrash.so: cannot open shared object file: No such file or directory (LoadError)
I notice that the snowcrash library was recently updated. Could it be related? If not, any other ideas?
README refers to https://login.apiary.io/tokens
, but it is to be deprecated in favor of a shiny new mechanism for issuing tokens built-in right into in-app settings. We should update the documentation.
In static page generated by:
./bin/apiary preview --path ./features/fixtures/apiary.apib
is mock url http://private-anon-e84174616-apiary.io/notes/{id}
-m
for --message
as mentioned in discussions under #35Hey guys,
on apiary preview
everything starts up fine but all the static assets through fastly are denied. What's weird is that it seems to still dump the asset text but is returning a 403. See here: https://apiary.a.ssl.fastly.net/assets/css/docs.css
Would it help if I offered to help?
appveyor.yml
doesn't contain rake features
while circle.yml
does.
If you have json 1.7.6 and json 1.8.1.
/Users/abtris/.rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/specification.rb:2052:in
raise_if_conflicts': can't activate json-1.7.0, already activated json-1.8.1 (Gem::LoadError)`
Would be nice if we could get just the stuff in the left column.
Use case for this is to add an apiary blueprint plugin for docpad which we already use to generate our apiary blueprint file from CSON files (we render them to JSON and apply other abstractions).
Having this would allow us to use docpad to render the apiary blueprint as well.
apiary fetch –-api-name myapi // works
but when trying to fetch the team doc, it failed with 403 forbidden:
apiary fetch –-api-name teamapi1 // fails with 403
I'm having trouble with publishing my docs.
After executing this command
APIARY_API_KEY="mykey" apiary publish --path=API_DOCS.md --api-name='mydomain'
I get one of this errors
Apiary service responded with an error: Request Timeout
or
Apiary service responded with an error: Server broke connection
The internet connection is good, I tried execute the command many times during the day so I don't think that apiary server is down.
My file is large ~ 2.5 Mb. Could it be the reason? If yes how can I solve this?
Security issue from Hakiri: There is a potential denial of service vulnerability in Rack. Carefully crafted requests can cause a SystemStackError
and potentially cause a denial of service attack.
...instead of exploding.
apiary-client
does not install properly on Windows since we added redsnow/snowcrash into the gem.
(reported by: internal conversation)
Possible solutions:
Hotfix solution for Windows users:
Downgrade to version 0.2.0 of apiary-client.
It is caused by Aruba's dependency on ruby_ffi. It is known error ffi/ffi#500
apiary gem 0.0.8 crashes with error 400 if there's a tab character in the markdown.
% apiary preview --path doc/api-internal-blueprint.md
/Library/Ruby/Gems/1.8/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!': 400 Bad Request (RestClient::BadRequest)
I run apiary preview --server
and go to localhost:8080. I see a blue-grey bar, but no content.
$ apiary preview --output tmp.html
$ open tmp.html
// Opens, I can see the output fine.
$ apiary preview
// Opens, I can see the output fine.
$ apiary preview --server
OSX 10.10.5, Chrome 48.
Suddenly, some of my blueprints can't apiary publish
, even though snowcrash and the app.apiary.io site like 'em just fine. I can't tell if this is a apiary-client issue or an app.apiary.io one.
Sample:
> apiary publish --path _site/api/luna/config-visitor-prioritization-data/blueprint.apib --api-name akamaiopen2lunaconfigvisitorprioritizationdatadev
Apiary service responded with an error: Blueprint you are trying to publish is not valid. Please validate with your snowcrash.
Yet:
> snowcrash -l _site/api/luna/config-visitor-prioritization-data/blueprint.apib
OK.
Versions:
> apiary version
0.2.4
> snowcrash -v
v0.16.1
Gist: https://gist.github.com/jrep/b462c73a1838cf99790d#file-blueprint-apib
I set HOST: http://localhost at the top of my blueprint but it seems to be ignored in the sample code. The host for the endpoint is set correctly at the top of the Example view, but it seems the host is ignored in all samples (cURL, PHP, Javascript) and is instead set to http://jsapi.apiary.io/previews/null/reference/...
Am I doing something wrong in my blueprint or is this a bug? I'm using apiary cli version 0.3.2.
Thanks.
apiary preview --path
successfully creates a standalone version of the documentation. The only issue: The host in examples is set to apiary.io. Any chance to change that to what is provided by the mockdown entry "host"?
I would like to have my host in the examples, not apiary.io
curl --include
"http://apiary.io/api/v1/sites/"
while testing the CLI I noticed that the APIARY_API_KEY must designame an account with WRITE access to the requested project -- even if the docs and blueprint are world-readable, as domain testingapiaryclitestingapiarycli
Using
preview --path ResourceModel.md --output ResourceModel.html
To generate a html results in an HTML where the GET and POST links are not clickable. In contrast, using the "--server" option results in a working result
apiary preview --path ResourceModel.md --server
arael-2:apis almad$ apiary help
Commands:
apiary fetch --api-name=API_NAME # Fetch apiary.apib from API_NAME.apiary.io
apiary help [COMMAND] # Describe available commands or one specific command
apiary preview # Show API documentation in default browser
apiary publish --api-name=API_NAME # Publish apiary.apib on docs.API_NAME.apiary.io
apiary version # Show version
This doesn't document full capabilities, nor is the thing declared in README.
We're not validating command line arguments. For instance
$apiary preview -v
displays version, instead of display any sort of argument error message
I've been calling apiary publish
for a while now, but it recently stopped working.
The command I use is:
apiary publish --api-name <redacted>
It now gives the following stack trace:
/Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!': 500 Internal Server Error (RestClient::InternalServerError)
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
from /Users/jeff/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:627:in `start'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/rest-client-1.6.7/lib/restclient.rb:72:in `post'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/apiaryio-0.0.8/lib/apiary/command/publish.rb:60:in `query_apiary'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/apiaryio-0.0.8/lib/apiary/command/publish.rb:41:in `publish_on_apiary'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/apiaryio-0.0.8/lib/apiary/command/publish.rb:29:in `execute'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/apiaryio-0.0.8/lib/apiary/command/runner.rb:8:in `run'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/apiaryio-0.0.8/lib/apiary/cli.rb:16:in `run'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/apiaryio-0.0.8/lib/apiary/cli.rb:10:in `initialize'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/apiaryio-0.0.8/bin/apiary:5:in `new'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/gems/apiaryio-0.0.8/bin/apiary:5:in `<top (required)>'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/bin/apiary:19:in `load'
from /Users/jeff/.rvm/gems/ruby-1.9.2-p136/bin/apiary:19:in `<main>'
As you can tell from the stack trace, this is with Ruby version 1.9.2-p136 and Apiary gem version 0.0.8.
A few issues prevent this from working in windows:
require `tmpdir'
path = "#{Dir.tmpdir}/path/to/file"
could be used.
system("open file")
. This could be replaced with OS sniffing to support a switch to start /b
instead, or a gem dependency to launchy along with Launchy.open('tmpfile')
Also ran into an issue trying to read from/launch the preview file before the write block completed, but that may be due to other changes I'd made.
Will try to put together a pull request later, but unsure how the --browser switch strings in the command line ought to be handled without making the user specify the full path via config or ENV variables.
I am using the beta version (3 column layout). There's no command to view my docs locally with this new layout.
Hi,
doing "apiary publish --api-name XXXX" I realized that when apiary.apib is not well formed, the command doesn´t throws any error but the file is not loaded into "apiary.io".
Is there any way to check that apiary.apib files are well done (using apiaryio gem)?
Regards.
Hey Guys,
I'd like to look at specific response bodies, and validate them against blueprints. Very similar to whats going on here for json schema.
https://robots.thoughtbot.com/validating-json-schemas-with-an-rspec-matcher
In particular I'd like to:
Any help would be greatly appreciated!
Be able to "apiary publish ".
This will create new API version in Apiary from arbitrary valid blueprint file.
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.