camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: swagger-java should use json as content type header in response.
Date Mon, 28 Sep 2015 11:05:38 GMT
swagger-java should use json as content type header in response.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f4487208
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f4487208
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f4487208

Branch: refs/heads/master
Commit: f44872085f984e8e80e999ce216a8337bd080126
Parents: dff9cd8
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Sep 28 13:07:21 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Sep 28 13:07:21 2015 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/swagger/RestSwaggerSupport.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f4487208/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerSupport.java
b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerSupport.java
index 873efc3..e7de20d 100644
--- a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerSupport.java
+++ b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerSupport.java
@@ -179,6 +179,8 @@ public class RestSwaggerSupport {
 
         List<RestDefinition> rests = getRestDefinitions(contextId);
         if (rests != null) {
+            response.addHeader(Exchange.CONTENT_TYPE, "application/json");
+
             // read the rest-dsl into swagger model
             Swagger swagger = reader.read(rests, route, swaggerConfig, contextId, classResolver);
 


Mime
View raw message