@@ -109,7 +109,7 @@ def _with_cat(p: Parameter, cat: str):
109109 def generate_json_schema (self ) -> tuple [dict , dict ]:
110110 """
111111 :return: request schema, result schema
112- :rtype: Tuple [dict, dict]
112+ :rtype: tuple [dict, dict]
113113 """
114114 input_params_json , output_params_json = self .get_parameters_json ()
115115 input_params = json .loads (input_params_json )
@@ -156,10 +156,6 @@ def get_result_json_schema(self, output_params_json) -> dict:
156156 properties = {}
157157 required = []
158158
159- # if result_fields_by_category is None:
160- # # noinspection PyProtectedMember
161- # result_fields_by_category = GeophiresXResult._RESULT_FIELDS_BY_CATEGORY
162-
163159 output_params = json .loads (output_params_json )
164160 display_name_aliases = {}
165161 for param_name in output_params :
@@ -415,39 +411,6 @@ def get_parameter_sources(self) -> list:
415411 def get_schema_title (self ) -> str :
416412 return 'HIP-RA-X'
417413
418- def get_result_json_schema (self , output_params_json ) -> dict :
419- output_params = json .loads (output_params_json )
420-
421- properties = {}
422-
423- # noinspection PyProtectedMember
424- for category in [HIP_RA_X ._SUMMARY_OF_RESULTS_OUTPUT_CATEGORY , HIP_RA_X ._SUMMARY_OF_INPUTS_OUTPUT_CATEGORY ]:
425- cat_properties = {}
426- for param_name , output_param in output_params .items ():
427- description = _get_key (output_param , 'ToolTipText' , default_val = None ) or None
428- units_val = output_param ['CurrentUnits' ] if isinstance (output_param .get ('CurrentUnits' ), str ) else None
429- cat_properties [param_name ] = {
430- 'type' : _get_key (output_param , 'json_parameter_type' , default_val = None ) or None ,
431- 'description' : description ,
432- 'units' : units_val ,
433- }
434-
435- properties [category ] = {
436- 'type' : 'object' ,
437- 'properties' : cat_properties ,
438- }
439-
440- result_schema = {
441- 'definitions' : {},
442- '$schema' : 'http://json-schema.org/draft-04/schema#' ,
443- 'type' : 'object' ,
444- 'title' : f'{ self .get_schema_title ()} Result Schema' ,
445- 'required' : [],
446- 'properties' : properties ,
447- }
448-
449- return result_schema
450-
451414 def get_output_params_table_rst (self , output_params_json ) -> str :
452415 """
453416 FIXME TODO consolidate with generated result schema
0 commit comments