juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [juneau] branch master updated: Fix bug where HTML-Schema is not rendering correctly in REST.
Date Sun, 04 Mar 2018 19:10:43 GMT
This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 1458f42  Fix bug where HTML-Schema is not rendering correctly in REST.
1458f42 is described below

commit 1458f4288e0513aad7b6a7b85595a1abb2fc321c
Author: JamesBognar <jamesbognar@apache.org>
AuthorDate: Sun Mar 4 14:10:39 2018 -0500

    Fix bug where HTML-Schema is not rendering correctly in REST.
---
 .../src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java | 4 ++--
 juneau-doc/src/main/javadoc/overview.html                             | 4 ++++
 .../src/main/java/org/apache/juneau/rest/response/DefaultHandler.java | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
index c98940e..f1a694a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
@@ -84,7 +84,7 @@ public final class HtmlSchemaDocSerializer extends HtmlDocSerializer {
 	}
 
 	@Override /* Serializer */
-	public HtmlDocSerializerSession createSession(SerializerSessionArgs args) {
-		return new HtmlDocSerializerSession(this, args);
+	public HtmlSchemaDocSerializerSession createSession(SerializerSessionArgs args) {
+		return new HtmlSchemaDocSerializerSession(this, args);
 	}
 }
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index 1c1b065..bc22405 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -16427,6 +16427,8 @@
 		<ul class='spaced-list'>
 			<li>
 				Fixed bug where <code><ja>@Bean</ja>(typeName)</code> was not
being detected on non-bean POJO classes.
+			<li>
+				Fixed bug where HTML-Schema was not being rendered correctly.
 		</ul>
 		
 		<h5 class='topic'>juneau-server</h5>
@@ -16434,6 +16436,8 @@
 			<li>
 				Fixed bug in <code>UriResolver</code> when request path info had special
characters.
 			<li>
+				Fixed bug where incorrect media type was being set on responses (e.g. <code>text/html+schema</code>
instead of <code>text/html</code> for schema documents).
+			<li>
 				{@link org.apache.juneau.rest.remoteable.RemoteableServlet} now provides a form page
for invoking remoteable methods in a browser.
 			<li>
 				Newlines were being stripped from <code><ja>@HtmlDoc</ja>(script)</code>
when serialized which could cause script lines to become commented out.
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java
index 96a5ba1..548369f 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/response/DefaultHandler.java
@@ -53,7 +53,7 @@ public class DefaultHandler implements ResponseHandler {
 			MediaType mediaType = res.getMediaType();
 			if (mediaType == null)
 				mediaType = sm.getMediaType();
-			res.setContentType(mediaType.toString());
+			res.setContentType(s.getResponseContentType().toString());
 
 			try {
 				RequestProperties p = res.getProperties();

-- 
To stop receiving notification emails like this one, please contact
jamesbognar@apache.org.

Mime
View raw message