diff --git a/pygeoapi/openapi.py b/pygeoapi/openapi.py index e3c5db3..d90971e 100644 --- a/pygeoapi/openapi.py +++ b/pygeoapi/openapi.py @@ -345,6 +345,8 @@ def get_oas_30(cfg): } } } + if 'example' in p.metadata: + paths['{}/jobs'.format(process_name_path)]['post']['requestBody']['content']['application/json']['example'] = p.metadata['example'] # noqa oas['paths'] = paths diff --git a/pygeoapi/process/hello_world.py b/pygeoapi/process/hello_world.py index b1a517c..688d29c 100644 --- a/pygeoapi/process/hello_world.py +++ b/pygeoapi/process/hello_world.py @@ -68,7 +68,14 @@ PROCESS_METADATA = { 'mimeType': 'application/json' }] } - }] + }], + 'example': { + 'inputs': [{ + 'id': 'name', + 'value': 'hi there', + 'type': 'text/plain' + }] + } }