Closed lbeaufort closed 6 months ago
@sasha-dresden added a comment to PR to remove clearEmptyKeys
method. Empty and Falsey values are still desired in payloads as they communicate changes in state.
Passes CR moving to QA
@MitchellTCG @mjtravers can we please add Unit Tests for QA as denoted above. Thanks
Passes on screenshot of "after" payload to compare with payload above and successful unit tests.
@WiseQA payload after change on dev. Note the lack of schema:
{"hasChangeOfAddress":false,"submitAlertText":"Are you sure you want to submit this form electronically? Please note that you cannot undo this action.","report_type":"F99","form_type":"F99","filer_committee_id_number":"C00100461","committee_name":"TEST_COMMITTEE_NAME13","street_1":"TEST_SA13","street_2":null,"city":"TEST_CITY13","state":"AL","zip":"12345","text_code":"MSI","message_text":"asdf"}
QA review verified visual of the payload change on DEV, per DEV comment above.
QA Review Completed. Moved to Stage Ready.
Another view, part 1 of 2 (broken out into comment for Exalate sync):
``json
{
"hasChangeOfAddress": true,
"submitAlertText": "Are you sure you want to submit this form electronically? Please note that you cannot undo this action. Any changes needed will need to be filed as an amended report.",
"schema": {
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/fecgov/fecfile-validate/blob/main/schema/F3X.json",
"version": "8.3.0.1",
"title": "FEC F3X",
"type": "object",
"required": [
"form_type",
"filer_committee_id_number",
"treasurer_last_name",
"treasurer_first_name",
"date_signed"
],
"fec_recommended": [
"committee_name",
"street_1",
"city",
"state",
"zip",
"report_code",
"election_code",
"date_of_election",
"state_of_election",
"coverage_from_date",
"coverage_through_date"
],
"properties": {
"form_type": {
"enum": [
"F3XN",
"F3XA",
"F3XT"
]
},
"filer_committee_id_number": {
"type": "string",
"minLength": 9,
"maxLength": 9,
"pattern": "^[C|P][0-9]{8}$|^[H|S][0-9]{1}[A-Z]{2}[0-9]{5}$"
},
"committee_name": {
"type": [
"string",
"null"
],
"minLength": 0,
"maxLength": 200,
"pattern": "^[ -~]{0,200}$"
},
"change_of_address": {
"type": [
"boolean",
"null"
]
},
"street_1": {
"type": [
"string",
"null"
],
"minLength": 0,
"maxLength": 34,
"pattern": "^[ -~]{0,34}$"
},
"street_2": {
"type": [
"string",
"null"
],
"minLength": 0,
"maxLength": 34,
"pattern": "^[ -~]{0,34}$"
},
"city": {
"type": [
"string",
"null"
],
"minLength": 0,
"maxLength": 30,
"pattern": "^[ -~]{0,30}$"
},
"state": {
"type": [
"string",
"null"
],
"minLength": 2,
"maxLength": 2,
"pattern": "^[A-Z]{2}$"
},
"zip": {
"type": [
"string",
"null"
],
"minLength": 5,
"maxLength": 9,
"pattern": "^[ -~]{0,9}$"
},
"report_code": {
"type": [
"string",
"null"
],
"minLength": 0,
"maxLength": 3,
"pattern": "^[ -~]{0,3}$"
},
"election_code": {
"type": [
"string",
"null"
],
"minLength": 0,
"maxLength": 5,
"pattern": "^[ -~]{0,5}$"
},
"date_of_election": {
"type": [
"string",
"null"
],
"minLength": 10,
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"state_of_election": {
"type": [
"string",
"null"
],
"minLength": 2,
"maxLength": 2,
"pattern": "^[A-Z]{2}$"
},
"coverage_from_date": {
"type": [
"string",
"null"
],
"minLength": 10,
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"coverage_through_date": {
"type": [
"string",
"null"
],
"minLength": 10,
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"qualified_committee": {
"type": [
"boolean",
"null"
]
},
"treasurer_last_name": {
"type": "string",
"minLength": 1,
"maxLength": 30,
"pattern": "^[ -~]{0,30}$"
},
"treasurer_first_name": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"pattern": "^[ -~]{0,20}$"
},
"treasurer_middle_name": {
"type": [
"string",
"null"
],
"minLength": 0,
"maxLength": 20,
"pattern": "^[ -~]{0,20}$"
},
"treasurer_prefix": {
"type": [
"string",
"null"
],
"minLength": 0,
"maxLength": 10,
"pattern": "^[ -~]{0,10}$"
},
"treasurer_suffix": {
"type": [
"string",
"null"
],
"minLength": 0,
"maxLength": 10,
"pattern": "^[ -~]{0,10}$"
},
"date_signed": {
"type": "string",
"minLength": 10,
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"L6b_cash_on_hand_beginning_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L6c_total_receipts_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L6d_subtotal_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L7_total_disbursements_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L8_cash_on_hand_at_close_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L9_debts_to_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L10_debts_by_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11ai_itemized_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11aii_unitemized_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11aiii_total_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11b_political_party_committees_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11c_other_political_committees_pacs_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11d_total_contributions_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L12_transfers_from_affiliated_other_party_cmtes_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L13_all_loans_received_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L14_loan_repayments_received_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L15_offsets_to_operating_expenditures_refunds_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L16_refunds_of_federal_contributions_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L17_other_federal_receipts_dividends_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L18a_transfers_from_nonfederal_account_h3_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L18b_transfers_from_nonfederal_levin_h5_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L18c_total_nonfederal_transfers_18a_18b_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L19_total_receipts_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L20_total_federal_receipts_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L21ai_federal_share_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L21aii_nonfederal_share_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L21b_other_federal_operating_expenditures_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L21c_total_operating_expenditures_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L22_transfers_to_affiliated_other_party_cmtes_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L23_contributions_to_federal_candidates_cmtes_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L24_independent_expenditures_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L25_coordinated_expend_made_by_party_cmtes_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L26_loan_repayments_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L27_loans_made_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L28a_individuals_persons_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L28b_political_party_committees_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L28c_other_political_committees_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L28d_total_contributions_refunds_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L29_other_disbursements_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L30ai_shared_federal_activity_h6_fed_share_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L30aii_shared_federal_activity_h6_nonfed_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L30b_nonallocable_fed_election_activity_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L30c_total_federal_election_activity_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L31_total_disbursements_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L32_total_federal_disbursements_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L33_total_contributions_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L34_total_contribution_refunds_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L35_net_contributions_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L36_total_federal_operating_expenditures_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L37_offsets_to_operating_expenditures_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L38_net_operating_expenditures_period": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L6a_cash_on_hand_jan_1_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L6a_year_for_above_ytd": {
"type": [
"string",
"null"
],
"minLength": 4,
"maxLength": 4,
"pattern": "^[0-9]{4}$"
},
"L6c_total_receipts_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L6d_subtotal_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L7_total_disbursements_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L8_cash_on_hand_close_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11ai_itemized_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
Another view, part 2 of 2 (broken out into comment for Exalate sync):
"L11aii_unitemized_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11aiii_total_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11b_political_party_committees_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11c_other_political_committees_pacs_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L11d_total_contributions_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L12_transfers_from_affiliated_other_party_cmtes_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L13_all_loans_received_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L14_loan_repayments_received_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L15_offsets_to_operating_expenditures_refunds_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L16_refunds_of_federal_contributions_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L17_other_federal_receipts_dividends_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L18a_transfers_from_nonfederal_account_h3_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L18b_transfers_from_nonfederal_levin_h5_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L18c_total_nonfederal_transfers_18a_18b_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L19_total_receipts_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L20_total_federal_receipts_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L21ai_federal_share_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L21aii_nonfederal_share_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L21b_other_federal_operating_expenditures_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L21c_total_operating_expenditures_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L22_transfers_to_affiliated_other_party_cmtes_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L23_contributions_to_federal_candidates_cmtes_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L24_independent_expenditures_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L25_coordinated_expend_made_by_party_cmtes_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L26_loan_repayments_made_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L27_loans_made_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L28a_individuals_persons_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L28b_political_party_committees_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L28c_other_political_committees_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L28d_total_contributions_refunds_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L29_other_disbursements_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L30ai_shared_federal_activity_h6_fed_share_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L30aii_shared_federal_activity_h6_nonfed_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L30b_nonallocable_fed_election_activity_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L30c_total_federal_election_activity_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L31_total_disbursements_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L32_total_federal_disbursements_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L33_total_contributions_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L34_total_contribution_refunds_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L35_net_contributions_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L36_total_federal_operating_expenditures_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L37_offsets_to_operating_expenditures_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
},
"L38_net_operating_expenditures_ytd": {
"type": [
"number",
"null"
],
"minimum": 0,
"maximum": 999999999.99
}
}
},
"report_type": "F3X",
"form_type": "F3XN",
"report_code": "Q2",
"date_of_election": null,
"state_of_election": null,
"coverage_from_date": "2024-04-01",
"coverage_through_date": "2024-06-30"
}
I believe it shouldn't be necessary to send the whole schema to the API for POST requests. Currently, this is what gets sent from the web app to the API upon report creation (see "schema" object in --data-raw)
We should also see if there's any other unnecessary data being sent.
Review and remediate the payloads listed below update the service calls to prune the extraneous data elements.
Review the following payloads:
QA Notes
Passes on screenshot of "after" payload to compare with payload above and successful unit tests.
QA Notes
We should also see if there's any other unnecessary data being sent.
Review and remediate the payloads listed below update the service calls to prune the extraneous data elements.
Review the following payloads:
QA Notes
Passes on screenshot of "after" payload to compare with payload above and successful unit tests.
DEV Notes
null
Design
null