diff --git a/docs/MIGRATION-GUIDE.md b/docs/MIGRATION-GUIDE.md index 892b1cf42a..17295b8fc7 100644 --- a/docs/MIGRATION-GUIDE.md +++ b/docs/MIGRATION-GUIDE.md @@ -206,4 +206,89 @@ Default naming scheme for `` has changed. This might affect exist ## `jwtSign` - `expiryTime` has been renamed to `expirySeconds`. -- HTTP response in case of JWT validation failure was changed to Problem JSON. \ No newline at end of file +- HTTP response in case of JWT validation failure was changed to Problem JSON. + +# Migrate to Membrane 7.1 + +## New Yaml Syntax + +### `headerFilter` +Instead of +```yaml +headerFilter: + rules: + - include: + pattern: "X-XSS-Protection" + - exclude: + pattern: "X-.*" +``` +use +```yaml +headerFilter: + rules: + - include: "X-XSS-Protection" + - exclude: "X-.*" +``` + +### `chain` + +The `chainDef` no longer exists. Use `chain` to define a chain of plugins and simply reference them as all other components. + +instead of +```yaml +components: + log: + chainDef: + flow: + - log: + message: "Path: ${path}" +--- +api: + port: 2000 + flow: + - chain: + ref: '#/components/log' +``` +use +```yaml +components: + log: + chain: + flow: + - log: + message: "Path: ${path}" +--- +api: + port: 2000 + flow: + - $ref: '#/components/log' +``` + +- `groovy` interceptor: Return string from script does not set a content type of `text/html` anymore. User has to set the content type manually. + +- Choose Interceptor configuration +- Chain (ChainDef) configuration +- OpenApi: rename `specs` to `openapi` +- **YAML configuration in list elements**: + * 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`, not `noEnvelope`, and not string-like. + * Old wrapper form remains supported: `- : { ... }` (Only when schema validation is deactivated). + + Old: + ```yaml + properties: + - property: + name: driverClassName + value: org.h2.Driver + - property: + name: url + value: jdbc:h2:./membranedb;AUTO_SERVER=TRUE + ``` + New: + ```yaml + properties: + - name: driverClassName + value: org.h2.Driver + - name: url + value: jdbc:h2:./membranedb;AUTO_SERVER=TRUE + ``` +- removed `MethodOverrideInterceptor` \ No newline at end of file