add update method. refs #1406
authorTom Clegg <tom@clinicalfuture.com>
Wed, 20 Mar 2013 02:46:11 +0000 (19:46 -0700)
committerTom Clegg <tom@clinicalfuture.com>
Wed, 20 Mar 2013 02:46:11 +0000 (19:46 -0700)
app/controllers/orvos/v1/schema_controller.rb

index e4df905df5df277172f8d456090916f0b1405953..1f209eb3f750ac42129bde19d2b8e2441a13ebe5 100644 (file)
@@ -229,6 +229,35 @@ class Orvos::V1::SchemaController < ApplicationController
               scopes: [
                        "https://api.clinicalfuture.com/auth/orvos"
                       ]
+            },
+            update: {
+              id: "orvos.#{k.to_s.underscore.pluralize}.update",
+              path: "#{k.to_s.underscore.pluralize}/{uuid}",
+              httpMethod: "PUT",
+              description: "Update attributes of an existing #{k.to_s}.",
+              parameters: {
+                uuid: {
+                  type: "string",
+                  description: "The ID for the #{k.to_s} in question.",
+                  required: true,
+                  location: "path"
+                },
+                k.to_s.underscore => {
+                  type: "object",
+                  required: true,
+                  location: "query",
+                  properties: object_properties
+                }
+              },
+              request: {
+                "$ref" => k.to_s
+              },
+              response: {
+                "$ref" => k.to_s
+              },
+              scopes: [
+                       "https://api.clinicalfuture.com/auth/orvos"
+                      ]
             }
           }
         }