Skip to content

Support getCountries and getLocationByAddress endpoints#104

Merged
Jonathan-Zollinger merged 17 commits into
mainfrom
madsen/support-locations/get-countries-and-get-location-by-address
Jun 3, 2026
Merged

Support getCountries and getLocationByAddress endpoints#104
Jonathan-Zollinger merged 17 commits into
mainfrom
madsen/support-locations/get-countries-and-get-location-by-address

Conversation

@ZeterTheDuck

Copy link
Copy Markdown
Contributor

This PR adds support for the /api/v1/locations/{language}/address/{address} and /api/v1/locations/{language}/countries endpoints, which adds the CountryIdentifiers class, renaming the class with the same name to "CountryBasicIdentifiers".

@ZeterTheDuck

Copy link
Copy Markdown
Contributor Author

A couple comments:

  • The test for getLocationByAddress uses the known working location variable in JustServeSpec. I was unsure how to—or if I should—add it as a test parameter under the "where" block, so I just used it inside the method.
  • The countryId property for CountryIdentifiers is set to be a UUID format. This restriction is not present in the swagger documentation, but all returns from my testing were of UUID format, so I added it.

@ZeterTheDuck
ZeterTheDuck marked this pull request as ready for review June 1, 2026 19:43

@Jonathan-Zollinger Jonathan-Zollinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please implement the one note I made, otherwise looks good and tests pass

Comment thread core/src/main/resources/schema.yml Outdated
Comment on lines +1107 to +1185
mapId:
type: string
nullable: true
fullDisplayAddress:
description: "Full representation of this location's address"
type: string
nullable: true
address:
description: "Primary street address"
type: string
nullable: true
suite:
description: "Additional address details"
type: string
nullable: true
city:
type: string
nullable: true
civicCityId:
type: string
format: uuid
nullable: true
neighborhood:
type: string
nullable: true
county:
type: string
nullable: true
state:
type: string
nullable: true
postal:
type: string
nullable: true
country:
type: string
nullable: true
countryCode:
description: "ISO 3166-1 standard three-letter country code"
type: string
nullable: true
locationVisibilityId:
type: integer
format: int32
missionId:
type: string
nullable: true
ccId:
type: string
nullable: true
stakeId:
type: string
nullable: true
areaId:
type: string
nullable: true
latitude:
type: number
format: double
longitude:
type: number
format: double
maxLatitude:
type: number
format: double
minLatitude:
type: number
format: double
maxLongitude:
type: number
format: double
minLongitude:
type: number
format: double
geoCodeOverride:
type: boolean
timezone:
type: string
nullable: true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please re-collapse these

@Jonathan-Zollinger

Copy link
Copy Markdown
Member

looks good! tests pass!

@Jonathan-Zollinger
Jonathan-Zollinger merged commit b966999 into main Jun 3, 2026
1 check failed
@ZeterTheDuck

ZeterTheDuck commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

It appears that there was an improper merge in LocationSpec. For the test in lines 41-52, a similar test (getCountries) in this PR was detected as a refactor of an existing test (getBasicCountryIdentifiers) in main, and overwrote the existing test.

I'll need to check the other PRs to make sure nothing similar happened to other schemas or branches.

@ZeterTheDuck

ZeterTheDuck commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

I will re-add that test in the madsen/support-locations/get-all-countries branch (see 713acb8)

Jonathan-Zollinger pushed a commit that referenced this pull request Jun 15, 2026
This test was accidentally removed in #104.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants