@@ -253,17 +253,38 @@ def get_input_params_table(_category_params, category_name) -> str:
253
253
254
254
output_rst = self .get_output_params_table_rst (output_params_json )
255
255
256
+ schema_ref_base_url = (
257
+ 'https://github.com/softwareengineerprogrammer/GEOPHIRES/blob/main/src/geophires_x_schema_generator/'
258
+ )
259
+ input_schema_ref_rst = ''
260
+ if self .get_input_schema_reference () is not None :
261
+ input_schema_ref_rst = (
262
+ f'Schema: '
263
+ f'`{ self .get_input_schema_reference ()} '
264
+ f'<{ schema_ref_base_url } { self .get_input_schema_reference ()} >`__'
265
+ )
266
+
267
+ output_schema_ref_rst = ''
268
+ if self .get_output_schema_reference () is not None :
269
+ output_schema_ref_rst = (
270
+ f'Schema: '
271
+ f'`{ self .get_output_schema_reference ()} '
272
+ f'<{ schema_ref_base_url } { self .get_output_schema_reference ()} >`__'
273
+ )
274
+
256
275
rst = f"""{ self .get_schema_title ()} Parameters
257
276
==========
258
277
259
278
.. contents::
260
279
261
280
Input Parameters
262
281
################
282
+ { input_schema_ref_rst }
263
283
{ input_rst }
264
284
265
- Output Parameters
285
+ Outputs
266
286
#################
287
+ { output_schema_ref_rst }
267
288
{ output_rst }
268
289
"""
269
290
@@ -287,7 +308,7 @@ def get_output_params_table(_category_params, category_name) -> str:
287
308
_output_rst = f"""
288
309
{ category_display }
289
310
{ '-' * len (category_display )}
290
- .. list-table:: { category_display } { ' ' if len (category_display ) > 0 else '' } Parameters
311
+ .. list-table:: { category_display } { ' ' if len (category_display ) > 0 else '' } Outputs
291
312
:header-rows: 1
292
313
293
314
* - Name
@@ -309,6 +330,12 @@ def get_output_params_table(_category_params, category_name) -> str:
309
330
310
331
return output_rst
311
332
333
+ def get_input_schema_reference (self ) -> str :
334
+ return 'geophires-request.json'
335
+
336
+ def get_output_schema_reference (self ) -> str :
337
+ return 'geophires-result.json'
338
+
312
339
313
340
def _get_key (param : dict , k : str , default_val = '' ) -> Any :
314
341
if k in param and str (param [k ]) != '' :
@@ -358,7 +385,7 @@ def get_output_params_table_rst(self, output_params_json) -> str:
358
385
output_params = json .loads (output_params_json )
359
386
360
387
output_rst = """
361
- .. list-table:: Output Parameters
388
+ .. list-table:: Outputs
362
389
:header-rows: 1
363
390
364
391
* - Name
@@ -382,6 +409,12 @@ def get_key(k):
382
409
383
410
return output_rst
384
411
412
+ def get_input_schema_reference (self ) -> str :
413
+ return 'hip-ra-x-request.json'
414
+
415
+ def get_output_schema_reference (self ) -> str :
416
+ return None
417
+
385
418
386
419
def _get_logger (logger_name = None ):
387
420
sh = logging .StreamHandler (sys .stdout )
0 commit comments