Created
July 3, 2015 09:13
-
-
Save paoloyx/2af9876f2a1987dffc33 to your computer and use it in GitHub Desktop.
JsonDefinition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"verb": "POST", | |
"uri": "/add-products", | |
"apiOperation": { "value":"Add products","notes" : "Create new products."}, | |
"methodName": "addProductsQuestionnaire", | |
"parameters": [ | |
{"name":"products", "paramType":"RequestBody","paramClass":"it.menarini.coaching.model.CoachQuestionnaireProduct","isCollection" : true, "required" : true, "apiParam" : {"name":"productQuestionnaire","value":"The new Products object"}} | |
], | |
"preAssign" : { "products.id" : "select seq_coaching_product.nextval from dual" }, | |
"preSqlTemplate": ["delete from coach_questionnare_product where coach_questionnaire_id = :products.coachQuestionnaireId"], | |
"sqlTemplate": "insert into coach_questionnare_product (id, qualification, weight, description, coach_questionnaire_id) values (:products.id, :products.qualification, :products.weight, :products.description, :products.coachQuestionnaireId)", | |
"returnModelMultiInstance": true, | |
"returnLocation" : "/" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment