examples/store-api-tests/spec/api/restspec/endpoints.rb in restspec-0.0.4 vs examples/store-api-tests/spec/api/restspec/endpoints.rb in restspec-0.1
- old
+ new
@@ -1,20 +1,21 @@
resource :products do
- schema :product
-
collection do
- post :create
+ post :create do
+ schema :product, :for => [:payload, :response]
+ end
+
get :index do
- schema :product, without: [:category]
+ schema :product, :for => [:response], :without => [:category]
end
end
member do
url_param(:id) { schema_id(:product) }
get :show
put :update
- delete :destroy
+ delete(:destroy) { no_schema }
end
end
resource :categories do
schema :category