lib/lhj/command/yapi.rb in lhj-tools-0.1.84 vs lib/lhj/command/yapi.rb in lhj-tools-0.1.85
- old
+ new
@@ -69,10 +69,10 @@
# 3.print request param
print_req_query(res_body['data']) unless res_body['data']['req_body_is_json_schema']
# 4.print request method
service_code = print_http_method(res_body['data'], project_info)
# print request mock data
- print_mock_request_data(req_models) unless req_models.empty?
+ print_mock_request_data(req_models) if !req_models.nil? && !req_models.empty?
# 5.save to file
file_map = save_to_file(service_code) if @save
# 6.push to git
push_to_git if @sync
# 7.notify robot