membrane / api-gateway

API gateway for REST, OpenAPI, GraphQL and SOAP written in Java.
https://membrane-api.io
Apache License 2.0
448 stars 138 forks source link

`<greaser>` XML-serialization does not work #1158

Open rrayst opened 2 days ago

rrayst commented 2 days ago
-------------------------------------------------------------------------------
Test set: com.predic8.membrane.examples.ConfigSerializationTest
-------------------------------------------------------------------------------
Tests run: 55, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 8.823 s <<< FAILURE! -- in com.predic8.membrane.examples.ConfigSerializationTest
com.predic8.membrane.examples.ConfigSerializationTest.doit(String)[5] -- Time elapsed: 0.083 s <<< FAILURE!
java.lang.AssertionError:
The string '<spring:beans xmlns="http://membrane-soa.org/proxies/1/"
  xmlns:spring="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
    http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd">

<!-- WARNING: This is an incomplete serialization of Membrane's configuration. Only use this config as a template for further processing. -->
<router id="main" hotDeploy="true" retryInitInterval="300000" retryInit="false" production="false"><uriFactory allowIllegalCharacters="false" autoEscapeBackslashes="true"></uriFactory><httpClientConfig useExperimentalHttp2="false" maxRetries="5"><connection keepAliveTimeout="4000" timeout="10000"></connection></httpClientConfig><api method="*" host="*" port="2000" name=":2000" blockRequest="false" blockResponse="false"><response><beautifier></beautifier><greaser rate="?"><greaseJson additionalProperties="true" shuffleFields="true"></greaseJson></greaser></response><return statusCode="200"></return><target port="-1" adjustHostHeader="true"></target></api></router>

</spring:beans>
' does contain 'incomplete serialization'.

probably, this is due to a double type being used. Maybe, the serializer does not support it (yet?).