Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import org.jspecify.annotations.Nullable;

Expand All @@ -40,36 +40,43 @@
* <a href="https://github.com/FasterXML/jackson-dataformat-xml/issues/355">FasterXML/jackson-dataformat-xml#355</a>.
*
* @author Rossen Stoyanchev
* @author Sebastien Deleuze
* @since 6.0.5
*/
@JsonInclude(NON_EMPTY)
@JacksonXmlRootElement(localName = "problem", namespace = ProblemDetailJacksonXmlMixin.NAMESPACE)
@JsonRootName(value = "problem", namespace = ProblemDetailJacksonXmlMixin.NAMESPACE)
public interface ProblemDetailJacksonXmlMixin {

/** RFC 7807 (obsoleted by RFC 9457) namespace. */
String NAMESPACE = "urn:ietf:rfc:7807";


@JacksonXmlProperty(namespace = NAMESPACE)
@com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
@tools.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
URI getType();

@JacksonXmlProperty(namespace = NAMESPACE)
@com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
@tools.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
String getTitle();

@JacksonXmlProperty(namespace = NAMESPACE)
@com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
@tools.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
int getStatus();

@JacksonXmlProperty(namespace = NAMESPACE)
@com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
@tools.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
String getDetail();

@JacksonXmlProperty(namespace = NAMESPACE)
@com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
@tools.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
URI getInstance();

@JsonAnySetter
void setProperty(String name, @Nullable Object value);

@JsonAnyGetter
@JacksonXmlProperty(namespace = NAMESPACE)
@com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty(namespace = NAMESPACE)
Map<String, Object> getProperties();

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonView;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.skyscreamer.jsonassert.JSONAssert;
import org.xmlunit.assertj.XmlAssert;
Expand Down Expand Up @@ -413,7 +412,6 @@ private void testProblemDetailMediaType(String expectedContentType) throws Excep
}

@Test
@Disabled("https://github.com/FasterXML/jackson-dataformat-xml/issues/757")
void problemDetailWhenProblemXmlRequested() throws Exception {
this.servletRequest.addHeader("Accept", MediaType.APPLICATION_PROBLEM_XML_VALUE);
testProblemDetailMediaType(MediaType.APPLICATION_PROBLEM_XML_VALUE);
Expand Down