Coder Social home page Coder Social logo

calamum's Issues

Return error

Run this command
calamum -f myapi.json -t twitter

return [ERROR] undefined method `each' for nil:NilClass

Resource Files

It would be interesting if this gem could also handle the resources in smaller files. For instance, if the resources could be separate json files.

enable -s won't sort resources based on the key values

In doc_parser.rb, we put each resource into a Hash.
Ln 5 "@resources = Hash.new"
then in the twitter template, we read it by
Ln 32 "<% @resources.each do |name, endpoints| %>"
which can't ensure read resources in sequence.

what about reading it by:

<% @resources.sort.map do |name, endpoints| %> ?

POST json data

Can the description of a POST (or PUT) be a JSON document, instead of a set of params?

Header in HTML tab

I have tried to add header by different ways but could not succeed, can you please tell me how can i added header to API documentation.

Accept: application/vnd.example.v1
Content-Type: application/json

"header": {
"Accept": {
"type": "string",
"description": "application/vnd.example.v1",
"required": true
},
"Content-Type": {
"type": "string",
"description": "application/json",
"required": true
}
},

"Resources" are not consistently sorted

Because resources are stored as a dictionary, regenerating the documentation from the same YAML file does not result in consistent output. It would be nice if they remained in the same order across re-runs (alphabetically?).

Calamum appears to depend on pry but is not listed as a dependency

On a fresh RVM 1.9.3 install in Ubuntu 12.04 after running gem install calamum.

$> calamum
/home/vagrant/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- pry (LoadError)
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p484/gems/calamum-1.1.0/lib/calamum.rb:5:in `<top (required)>'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p484/gems/calamum-1.1.0/lib/calamum/runner.rb:1:in `<top (required)>'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p484/gems/calamum-1.1.0/bin/calamum:8:in `<top (required)>'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p484/bin/calamum:23:in `load'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p484/bin/calamum:23:in `<main>'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'

After running gem install pry calamum works as expected.

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.