Giter Site home page Giter Site logo

apiaryio / apiary-client Goto Github PK

View Code? Open in Web Editor NEW
205.0 27.0 70.0 456 KB

Apiary CLI client

Home Page: https://help.apiary.io/tools/apiary-cli/

License: MIT License

Ruby 91.15% HTML 3.23% Gherkin 4.99% API Blueprint 0.05% JavaScript 0.34% Dockerfile 0.25%
apiary

apiary-client's Issues

Rack version too restrictive

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?

Creating a new API at Apiary

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.

Feature request: Live preview with hot-reload

Is there a hidden configuration file that wasn't mentioned in the documentation? Currently live-reload is not working for me and I'm not sure where I should change those Babel settings.

apiary-console

I'm starting the preview server using apiary preview --path="src/api.apib" --server --port 8080

Fetching an .apib file?

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?

Jsonp Response type not working

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:

  • Response 200 (application/json; charset=utf-8)
    {
    ...
    }
  • Response 200 (application/javascript; charset=utf-8)
    {
    ...
    }

Is this currently supported?

Preview is not working

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.

Preview --output Table of Contents Missing

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

Bug with unicode characters

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",

Installation on Mac tries to overwrite something called `rake`

$ 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

Add validation as a stand-alone command.

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.

libsnowcrash.so not found

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?

Ability to generate without the layout

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.

Problems with fetch team api

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

Request timeout | Server broke connection

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?

Introducing redsnow broke apiary-client for Windows users

apiary-client does not install properly on Windows since we added redsnow/snowcrash into the gem.

(reported by: internal conversation)

Possible solutions:

  1. remove redsnow features for all installations of apiary-client
  2. remove redsnow features from Windows installations of apiary-client
  3. make redsnow installable on Windows

Hotfix solution for Windows users:

Downgrade to version 0.2.0 of apiary-client.

Tab character in blueprint document crashes parser

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)

Apiary preview with `--server` showing nothing

What

I run apiary preview --server and go to localhost:8080. I see a blue-grey bar, but no content.

screen shot 2016-02-02 at 11 21 34 am

#### Further diagnostic
$ apiary preview --output tmp.html
$ open tmp.html
// Opens, I can see the output fine. 

$ apiary preview 
// Opens, I can see the output fine.

Reproduce

$ apiary preview --server

System

OSX 10.10.5, Chrome 48.

Blueprints won't load

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

Preview Mock Server samples always use http://jsapi.apiary.io/ as hostname

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.

Change API host

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/"

preview --output generates a broken HTML

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

Apiary help inconsistent

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.

Validate command line arguments

We're not validating command line arguments. For instance

$apiary preview -v

displays version, instead of display any sort of argument error message

Publish fails with exception `RestClient::InternalServerError`

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.

Broken in windows, suggestions

A few issues prevent this from working in windows:

  • Hardcoded path to /tmp/. Instead:
require `tmpdir'
path = "#{Dir.tmpdir}/path/to/file"

could be used.

  • Hardcoded browser open string 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.

Preview shows old UI

I am using the beta version (3 column layout). There's no command to view my docs locally with this new layout.

Check apiary.apib files

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.

apiary publish

Be able to "apiary publish ".

This will create new API version in Apiary from arbitrary valid blueprint file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.