Skip to content

v7.1.0

Choose a tag to compare

@rrayst rrayst released this 12 Feb 16:09
· 1 commit to c6c8ee6cb0e93d2fb29e59edca2f9d298e5a6724 since this release

Membrane 7.1.0

Membrane 7 introduces the new YAML configuration as its most significant change. It simplifies and accelerates API definition, supports schema-based autocompletion, and provides a smoother development workflow. The updated tutorials
serve both as ready-to-use templates and as reference material.

The XML configuration remains fully supported. Most existing proxies.xml configurations continue to work. Depending on the features used, minor adjustments may be required.

New Features and Improvements

  • Improved and more consistant YAML syntax
  • Tutorials can be run with docker
  • PATCH without a body is supported
  • xml2json: Enhanced exception handling.
  • Updated documentation and comments for clarity and consistency in related classes (Header, MimeType, etc.).
  • JSONBody Store the body as parsed JsonNode or Document
    • Interceptors can reuse already parsed JSON instead of triggering additional parsing

Breaking Changes

Membrane generally maintains backward compatibility within a major version. However, refinements to the YAML configuration required some breaking changes to improve consistency and usability. For migrating to Membrane 7 refer to the Migration Guide.

  • groovy interceptor: Return string from script does not set a content type of text/html anymore. User has to set the content type manually.
  • basicAuthentication: The interceptor removes the Authentication header from the request.
  • The MethodOverrideInterceptor was removed

YAML configuration

The format has changed for the following configuration elements:

  • headerFilter
  • choose
  • chain
  • basicAuthentication
  • OpenApi: rename specs to openapi

List items can now be written in inline form if the list accepts exactly one concrete element type (no polymorphic candidates) and the element is not collapsed and not noEnvelope.

The previous wrapper form (- : { ... }) remains supported.

Old:

properties:
  - property:
      name: driverClassName
      value: org.h2.Driver
  - property:
      name: url
      value: jdbc:h2:./membranedb;AUTO_SERVER=TRUE

New:

properties:
  - name: driverClassName
    value: org.h2.Driver
  - name: url
    value: jdbc:h2:./membranedb;AUTO_SERVER=TRUE