Browse Source

add fixed_term_tenancy pattern to api docs and make it dynamically not required

pull/66/head
Kat 4 years ago
parent
commit
5af35df146
  1. 4
      app/models/case_log.rb
  2. 3
      docs/api/DLUHC-CORE-Data.v1.json

4
app/models/case_log.rb

@ -186,6 +186,10 @@ private
dynamically_not_required << "net_income_frequency" dynamically_not_required << "net_income_frequency"
end end
if tenancy_type == "Fixed term – Secure"
dynamically_not_required << "fixed_term_tenancy"
end
required.delete_if { |key, _value| dynamically_not_required.include?(key) } required.delete_if { |key, _value| dynamically_not_required.include?(key) }
end end
end end

3
docs/api/DLUHC-CORE-Data.v1.json

@ -873,7 +873,8 @@
}, },
"fixed_term_tenancy": { "fixed_term_tenancy": {
"type": "string", "type": "string",
"minLength": 1 "minLength": 1,
"pattern": "((?!1|0)([0-9][0-9]))+"
}, },
"tenancy_type": { "tenancy_type": {
"type": "string", "type": "string",

Loading…
Cancel
Save