Sha256: f46da08e56d932adc95d7d416d928e8c85d36c7748325d6089b53784115341c4

Contents?: true

Size: 1.55 KB

Versions: 6

Compression:

Stored size: 1.55 KB

Contents

Spree::Core::Engine.routes.draw do
  namespace :api, defaults: { format: :json } do
    namespace :v2 do
      resources :countries, only: [:index, :show] do
        resources :states, only: [:index, :show]
      end

      resources :images, only: [:index, :show] do
        resource :product, :variant, only: :show
      end

      resources :line_items, only: :create

      resources :option_types, only: [:index, :show] do
        resources :option_values, :products, only: [:index, :show]
      end

      resources :option_values, only: [:index, :show] do
        resource :option_type, only: :show
        resources :variants, only: [:index, :show]
      end

      resources :orders, only: :show

      resources :prices, only: [:index, :show] do
        resource :variant, :product, only: :show
      end

      resources :products, only: [:index, :show] do
        resources :option_types, :variants, :images, only: [:index, :show]
      end

      resources :states, only: [:index, :show] do
        resource :country, only: :show
      end

      resources :taxonomies, only: [:index, :show] do
        resources :taxons, only: [:index, :show]
      end

      resources :taxons, only: [:index, :show] do
        resources :children, :products, only: [:index, :show]
        resource :parent, only: :show, controller: 'taxons'
        resource :taxonomy, only: :show
      end

      resources :variants, only: [:index, :show] do
        resources :prices, :option_values, :images, only: [:index, :show]
        resource :product, only: :show
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
spree_api_v2-0.2.2 config/routes.rb
solidus_api_v2-0.2.2 config/routes.rb
solidus_api_v2-0.2.1 config/routes.rb
spree_api_v2-0.2.1 config/routes.rb
spree_api_v2-0.2.0 config/routes.rb
solidus_api_v2-0.2.0 config/routes.rb