diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -177,7 +177,7 @@ function processParameter(param,op,path,index,openapi) {
 		for (var mimetype of consumes) {
 			result.content[mimetype] = {};
 			if (param.description) result.content[mimetype].description = param.description;
-			result.content[mimetype].schema = param.schema||{};
+			result.content[mimetype].schema = common.clone(param.schema)||{};
 		}
 	}
 
@@ -269,7 +269,7 @@ function processPaths(container,containerName,options,requestBodyCache,openapi) 
 							response.content = {};
 							for (var mimetype of produces) {
 								response.content[mimetype] = {};
-								response.content[mimetype].schema = response.schema;
+								response.content[mimetype].schema = common.clone(response.schema);
 							}
 							delete response.schema;
 						}
Clone schemas to prevent internal refs in yaml