diff --git a/address-kit/v1/cnrsunit/expand.ini b/address-kit/v1/cnrsunit/expand.ini deleted file mode 100644 index ffef47e..0000000 --- a/address-kit/v1/cnrsunit/expand.ini +++ /dev/null @@ -1,35 +0,0 @@ -# OpenAPI Documentation - JSON format (dot notation) -post.responses.default.description = Return all objects with enrich fields -post.responses.default.content.application/json.schema.$ref = #/components/schemas/JSONStream -post.summary = Enrich one field of each Object with a Python function -post.requestBody.required = true -post.requestBody.content.application/json.schema.$ref = #/components/schemas/JSONStream -post.parameters.0.in = query -post.parameters.0.name = path -post.parameters.0.schema.type = string -post.parameters.0.description = The path in each object to enrich with an Python script -post.parameters.1.in = query -post.parameters.1.name = indent -post.parameters.1.schema.type = boolean -post.parameters.1.description = Indent or not the JSON Result - -[use] -plugin = @ezs/spawn -plugin = @ezs/basics -plugin = @ezs/storage -plugin = @ezs/analytics - -[JSONParse] - -[expand] -path = env('path', 'value') -size = 100 -# in production mode, uncomment the following line -# cache = boost - -[expand/exec] -# command should be executable ! -command = ./expand.py - -[dump] -indent = env('indent', false) diff --git a/address-kit/v1/cnrsunit/expand.py b/address-kit/v1/cnrsunit/expand.py deleted file mode 100644 index 15d094a..0000000 --- a/address-kit/v1/cnrsunit/expand.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/python3 -import sys -import json -for line in sys.stdin: - data = json.loads(line) - data['value'] = data['value'].upper() - sys.stdout.write(json.dumps(data)) - sys.stdout.write('\n')