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

index f8412ba8c32535dfe1273d18b67822813fdb02de..e4df905df5df277172f8d456090916f0b1405953 100644 (file)
@@ -206,6 +206,29 @@ class Orvos::V1::SchemaController < ApplicationController
                        "https://api.clinicalfuture.com/auth/orvos",
                        "https://api.clinicalfuture.com/auth/orvos.readonly"
                       ]
+            },
+            create: {
+              id: "orvos.#{k.to_s.underscore.pluralize}.create",
+              path: "#{k.to_s.underscore.pluralize}",
+              httpMethod: "POST",
+              description: "Create a new #{k.to_s}.",
+              parameters: {
+                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"
+                      ]
             }
           }
         }