Skip to content

endpoints will be repeated after the reload #552

Closed
@tumayun

Description

@tumayun

env

grape (0.6.1)
goliath (1.0.3)
rack (1.5.2)

posts.rb

class Posts < Grape::API
  version 'v1', :using => :path
  format :json

  params do
    requires :id, type: Integer
  end

  resource 'shopping-carts' do
    get "/users/:id" do
    end

    post "/users" do
    end

    put "/users/:id" do
    end

    delete "/users/:id" do
    end
  end
end
2.0.0p247 :001 > Posts.endpoints.size
 => 4 
2.0.0p247 :002 > load '/home/tumayun/workspace/shopping-cart-service/app/apis/posts.rb'
 => true 
2.0.0p247 :003 > Posts.endpoints.size
 => 8 
2.0.0p247 :004 > load '/home/tumayun/workspace/shopping-cart-service/app/apis/posts.rb'
 => true 
2.0.0p247 :005 > Posts.endpoints.size
 => 12 
2.0.0p247 :006 > load '/home/tumayun/workspace/shopping-cart-service/app/apis/posts.rb'
 => true 
2.0.0p247 :007 > Posts.endpoints.size
 => 16 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions