diff --git a/docs/img/mapping-template-mode.png b/docs/img/mapping-template-mode.png new file mode 100644 index 00000000..a4f4bcac Binary files /dev/null and b/docs/img/mapping-template-mode.png differ diff --git a/docs/img/mapping-template-workflow.png b/docs/img/mapping-template-workflow.png new file mode 100644 index 00000000..9a69e134 Binary files /dev/null and b/docs/img/mapping-template-workflow.png differ diff --git a/docs/mapping_template_release_guide.md b/docs/mapping_template_release_guide.md new file mode 100644 index 00000000..bbaa18ef --- /dev/null +++ b/docs/mapping_template_release_guide.md @@ -0,0 +1,97 @@ +# Mapping template release guide + +## Workflow of mapping template release + +![image](img/mapping-template-workflow.png) + +### Development phase + +* Allow multiple versions in development phase. +* Each development version only records the functional changes compared to the previous development version. + +### Release phase + +* Create the final release version. +* Merge all change notes (since the last release) into the final release. +* Remove all development and test versions in directory of mef-sonata/template-upgrade. + +## Mapping Template Version Naming Convention + +### Version Pattern + +{Major}.{Minor}.{Patch} + +* Major + * Arabic numerals + * Consistent with the major version of the Kraken application +* Minor + * Arabic numerals +* Patch + * Letters or numbers + +### Version naming convention + +#### Development phase + +* version ends with suffix snapshot,for example + * 1.0.1-snapshot + * 1.2.0-snapshot + +#### Release phase + +Version should not contain letters,for example + +* 1.6.0 +* 1.6.1 +* 2.0.0 + +The following picture explains the rules for version number changes during the development and release phases. +![mapping-template-mode.png](img/mapping-template-mode.png) +## When to add a new mapping template release + +* Add API Use Case +* Modify existed API Use Case + * Modify user mapping template + * Modify mapping target file + * Modify API orchestration file + * Modify API request validation rule file +* Other changes + * Add/Modify API spec file + * Add/Modify open API spec of supported product + +## How to create a mapping template release + +1. Create a mapping template release file(e.g. release.1.5.13.yaml) under directory of mef-sonata/template-upgrade in the module of kraken-java-sdk-mef. + + Here show an example of mapping template release + + ```yaml + --- + kind: kraken.product.template-upgrade + apiVersion: v1 + metadata: + key: kraken.product.template-upgrade.1.5.13 + name: V1.5.13 + labels: + productSpec: grace + productVersion: V1.5.13 + publishDate: 2024-11-15 + description: | + Make some improvements to order template: + add itemTerm in add order template; + add expectedCompletionDate in get order template; + version: 1 + ``` + **Important fields explanation** + + * productSpec: Standard version of one product.Such as grace,haley in LSO SONATA. + * productVersion: Release version of mapping template release. + * publishDate: Release date of mapping template. + * description: Description of all changes in the current release. +2. Add path of the release file to mef-sonata/product.yaml + + ```yaml + spec: + componentPaths: + - classpath:/mef-sonata/template-upgrade/release.1.5.13.yaml + ``` diff --git a/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/template-upgrade/release.1.5.20.yaml b/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/template-upgrade/release.1.5.20.yaml deleted file mode 100644 index ed17a9b6..00000000 --- a/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/template-upgrade/release.1.5.20.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -kind: kraken.product.template-upgrade -apiVersion: v1 -metadata: - key: kraken.product.template-upgrade.1.5.20 - name: V1.5.20 - labels: - productSpec: grace - productVersion: V1.5.20 - publishDate: 2024-11-21 - description: | - Removed the constant value validation of 'place.@type' but remained the existence checking of this node. - version: 2 \ No newline at end of file diff --git a/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/template-upgrade/release.1.6.0.yaml b/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/template-upgrade/release.1.6.0.yaml new file mode 100644 index 00000000..9573f446 --- /dev/null +++ b/kraken-java-sdk/kraken-java-sdk-mef/src/main/resources/mef-sonata/template-upgrade/release.1.6.0.yaml @@ -0,0 +1,21 @@ +--- +kind: kraken.product.template-upgrade +apiVersion: v1 +metadata: + key: kraken.product.template-upgrade.1.6.0 + name: V1.6.0 + labels: + productSpec: grace + productVersion: V1.6.0 + publishDate: 2024-11-25 + description: | + split get order by id into 4 use cases + - get UNI ADD order by id + - get Eline ADD order by id + - get UNI DELETE order by id + - get Eline DELETE order by id + update 4 get order by id template to support stateChange mapping + quote status will be "unableToProvide" when seller return a negative price value + add itemTerm in the response mapping of create UNI ADD order and create Eline ADD order + add productOrderItem[0].product.id in response mapping of create UNI add order and create Eline add order + version: 2 \ No newline at end of file