-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The endpoint /de/FederalStates/{key}/Localities occasionally returns localities without district, although the Swagger marks district as required. The generated Kotlin client therefore fails with MissingKotlinParameterException.
Affected examples (DE):
- State
01(Schleswig-Holstein), page 1: localities containdistrict
curl -X 'GET' \
'https://openplzapi.org/de/FederalStates/02/Localities?page=1&pageSize=50' \
-H 'accept: application/json'
- State
02(Hamburg), page 1: localities does not containdistrict
curl -X 'GET' \
'https://openplzapi.org/de/FederalStates/02/Localities?page=1&pageSize=50' \
-H 'accept: application/json'
Swagger excerpt:
OpenPlzApi.DE.LocalityResponse lists district in required:
"OpenPlzApi.DE.LocalityResponse": {
"required": [
"district",
"federalState",
"municipality",
"name",
"postalCode"
],
"type": "object",
"properties": {
"district": {
"$ref": "#/components/schemas/OpenPlzApi.DE.DistrictSummary"
},
"federalState": {
"$ref": "#/components/schemas/OpenPlzApi.DE.FederalStateSummary"
},
"municipality": {
"$ref": "#/components/schemas/OpenPlzApi.DE.MunicipalitySummary"
},
"name": {
"minLength": 1,
"type": "string",
"description": "Name (Ortsname)",
"readOnly": true,
"example": "Bendorf"
},
"postalCode": {
"minLength": 1,
"type": "string",
"description": "Postal code (Postleitzahl)",
"readOnly": true,
"example": "56170"
}
},
"additionalProperties": false,
"description": "Representation of a German locality (Ort oder Stadt)",
"readOnly": true
}Expected behavior:
- Either
districtis always present (never null/missing), or - Swagger marks
districtas optional/nullable (not inrequired), so the generated client doesn’t crash.
Actual behavior:
- API responses sometimes contain
district: nullor omit the field.
Proposed fix:
- Either always include
districtin responses, or - Mark
districtas optional/nullable in Swagger to match real responses.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working