java-faker
java-faker copied to clipboard
Add support for Argentina Zip Codes
Is your feature request related to a problem? Please describe. A program I'm wanting to test has been running into issues when using argentina zip codes
Describe the solution you'd like fake data emulating argentine zip codes
Describe alternatives you've considered generic letter followed by 4 random digits
Additional context an overview of argentine zip codes is found here.
- I've written up a stab at the es-ar.yml file in resources, but I've not added anything outside of states, abbreviations and zip codes.
- addresses often include a final 3 characters in the postal code noting the position on the city block. I've not added that and dont fully comprehend it, nor am I wanting to implement it. I'll consider putting in the time if I'm unable to submit a PR without that data. I dont think it's critical though.
- is the naming of the properties in the yaml file pretty strict? I've added zipcodes per their province, but I note that other yaml files only use the "postcode_by_state". I've used that to conform with other propery files, but I believe argentina refers to them as provinces.
- What language / implementation is used with the yaml string interpolation? I'm trying to figure out how to write up the postal code format.
this is a snippet of the file as it stands. please let me know if you'd suggest I structure the data differently. I'm mostly concerned about figuring how to format the postal code to reference the proper state abbreviation as its source of zip code to use.
es-AR:
faker:
address:
state: ["Buenos Aires", "Catamarca", ...]
state_abbr: ["B", "K", "H", "U", "X", ...]
postcode_by_state:
# source: https://postalcodes.azinfoportal.com/argentina/
A: ["4123", "4126", "3636", ... ]
B: ["1704", "1706", "1708", ... ]
D: ["5770", "5771", "5773", ... ]
E: ["1647", "1649", "2000", ... ]