Code Monkey home page Code Monkey logo

json_schema_builder's People

Contributors

holek avatar schorsch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

json_schema_builder's Issues

Error for models containing at least one concern with `included` block

Hi and thanks for this gem

If I have a model

class Account < ActiveRecord::Base
  include Avatarify
end

that includes a concern

module Meritify
  extend ActiveSupport::Concern

  included do
    mount_uploader :avatar, AvatarUploader
  end

  def thumb_avatar_url
    avatar.thumb.url
  end

  def normal_avatar_url
    avatar.normal.url
  end
end

and i run

SchemaBuilder::Writer.new.write

via rails console

I'm getting this

ActiveSupport::Concern::MultipleIncludedBlocks: Cannot define multiple 'included' blocks for a Concern
from /home/oivai/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/concern.rb:126:in `included'

If I exclude concern from model, everything works just fine. Would you point me to the right direction? Is there a solution?

The gemfile should specify "gli ~> 1" to use gli 1.x

After a clean git clone and bundle install, running the following gives:

$ bundle exec ./bin/schema
You should include GLI::App instead
GLI.run no longer works for GLI-2, you must just call `run(ARGV)' instead
either fix your app, or use the latest GLI in the 1.x family

Manually installing gli version 1.x, with gem install gli -v "~> 1" fixes the issue. This should be put in the gemspec.

Dynamic creation of json schema

It would be cool if a json schema representation could be created on the fly for a certain model(eg as a view). I am experimenting with dynamic models and a noSQL backend.
Do you know of a gem that does that? otherwise I might fork this little project (unless you want a pull request for it)

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.