Skip to content

Commit 9ae7ad6

Browse files
committed
dynamic mapping tests: more cases
1 parent 54e9b05 commit 9ae7ad6

4 files changed

Lines changed: 10 additions & 21 deletions

File tree

fas_config/cookbook_metadata_example.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ recipes:
3434
args:
3535
- "-e"
3636
# read request_only_metadata.json (arg 1) and write to example_metadata.json (arg 2)
37-
- "console.error('Current working directory:', process.cwd()); const fs = require('fs'); fs.writeFileSync(process.argv[2], fs.readFileSync(process.argv[1], 'utf8').replaceAll('_custom_', '%custom%'));"
37+
- "console.error('Current working directory:', process.cwd()); const fs = require('fs'); fs.writeFileSync(process.argv[2], fs.readFileSync(process.argv[1], 'utf8').replaceAll('_custom_de_', '%custom_de%').replaceAll('_custom_en_', '%custom_en%'));"
3838
- "%_exec.pluginDir%/fas_config/request_only_metadata.json"
3939
- type: file_out
4040
file:

fas_config/recipe_dynamic_request_only.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{
22
"params": {
3-
"custom": {
3+
"custom_de": {
44
"type": "string",
5-
"description": "custom text to include in metadata",
5+
"description": "custom text to include in metadata description (de-DE)",
6+
"mandatory": true
7+
},
8+
"custom_en": {
9+
"type": "string",
10+
"description": "custom text to include in metadata description (en-EN)",
611
"mandatory": true
712
}
813
},

fas_config/request_only_mapping_with_error.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

fas_config/request_only_metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"fields": {
55
"filename": "trabant.jpg",
66
"description": {
7-
"de-DE": "_custom_: Das Bild zeigt ein Gemälde eines weißen Trabant-Autos, das durch eine Wand bricht. Die Illusion von zerbrochenem Putz und Ziegeln verstärkt den Eindruck einer Durchbrechung. Auf dem Nummernschild steht 'NOV 9-89', ein Hinweis auf den Tag des Mauerfalls in Berlin. Das Kunstwerk ist von Birgit Kinder signiert.",
8-
"en-US": "The image shows a painting of a white Trabant car breaking through a wall. The illusion of broken plaster and bricks enhances the impression of the car crashing through. The license plate reads 'NOV 9-89', referencing the date of the Berlin Wall's fall. The artwork is signed by Birgit Kinder."
7+
"de-DE": "_custom_de_: Das Bild zeigt ein Gemälde eines weißen Trabant-Autos, das durch eine Wand bricht. Die Illusion von zerbrochenem Putz und Ziegeln verstärkt den Eindruck einer Durchbrechung. Auf dem Nummernschild steht 'NOV 9-89', ein Hinweis auf den Tag des Mauerfalls in Berlin. Das Kunstwerk ist von Birgit Kinder signiert.",
8+
"en-US": "_custom_en_: The image shows a painting of a white Trabant car breaking through a wall. The illusion of broken plaster and bricks enhances the impression of the car crashing through. The license plate reads 'NOV 9-89', referencing the date of the Berlin Wall's fall. The artwork is signed by Birgit Kinder."
99
},
1010
"keywords": [
1111
{

0 commit comments

Comments
 (0)