Skip to content

Commit

Permalink
Merge pull request #4878 from open-formulieren/task/3283-remove-locat…
Browse files Browse the repository at this point in the history
…ion-get-street-name-and-city-endpoint

Removing deprecated /location/get-street-name-and-city api endpoint
  • Loading branch information
robinmolen authored Dec 4, 2024
2 parents 0bda3f3 + 55c7f3e commit e4dd230
Show file tree
Hide file tree
Showing 6 changed files with 256 additions and 274 deletions.
6 changes: 6 additions & 0 deletions docs/installation/upgrade-300.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,9 @@ StUF-ZDS payments extension conversion
The import conversion of StUF-ZDS plugin extensions, back to the default StUF-ZDS plugin,
has been removed. We recommend re-creating the exports on a newer version of Open Forms,
or manually changing the plugin to `stuf-zds-create-zaak` in the export files.

Removal of /api/v2/location/get-street-name-and-city endpoint
=============================================================

The /api/v2/location/get-street-name-and-city was deprecated for some time,
and is now removed in favor of the /api/v2/geo/address-autocomplete endpoint.
46 changes: 2 additions & 44 deletions src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2746,10 +2746,8 @@ paths:
/api/v2/geo/address-autocomplete:
get:
operationId: geo_address_autocomplete_retrieve
description: |-
Get the street name and city for a given postal code and house number.
**NOTE** the `/api/v2/location/get-street-name-and-city/` endpoint will be removed in v3. Use `/api/v2/geo/address-autocomplete/` instead.
description: Get the street name and city for a given postal code and house
number.
summary: Get a street name and city
parameters:
- in: query
Expand Down Expand Up @@ -3087,46 +3085,6 @@ paths:
$ref: '#/components/headers/X-Is-Form-Designer'
Content-Language:
$ref: '#/components/headers/Content-Language'
/api/v2/location/get-street-name-and-city:
get:
operationId: location_get_street_name_and_city_retrieve
description: |-
Get the street name and city for a given postal code and house number.
**NOTE** the `/api/v2/location/get-street-name-and-city/` endpoint will be removed in v3. Use `/api/v2/geo/address-autocomplete/` instead.
summary: Get a street name and city
parameters:
- in: query
name: house_number
schema:
type: number
description: House number of the address
required: true
- in: query
name: postcode
schema:
type: string
description: Postal code of the address
required: true
tags:
- location
deprecated: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetStreetNameAndCityViewResult'
description: ''
headers:
X-Session-Expires-In:
$ref: '#/components/headers/X-Session-Expires-In'
X-CSRFToken:
$ref: '#/components/headers/X-CSRFToken'
X-Is-Form-Designer:
$ref: '#/components/headers/X-Is-Form-Designer'
Content-Language:
$ref: '#/components/headers/Content-Language'
/api/v2/logic/description:
post:
operationId: logic_description_create
Expand Down
6 changes: 1 addition & 5 deletions src/openforms/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from rest_framework_nested.routers import NestedSimpleRouter

from openforms.config.api.viewsets import ThemeViewSet
from openforms.contrib.kadaster.api.views import AddressAutocompleteView
from openforms.forms.api.public_api.viewsets import CategoryViewSet
from openforms.forms.api.viewsets import (
FormDefinitionViewSet,
Expand Down Expand Up @@ -101,12 +100,9 @@
path("forms-import", FormsImportAPIView.as_view(), name="forms-import"),
path("prefill/", include("openforms.prefill.api.urls")),
path("validation/", include("openforms.validations.api.urls")),
# TODO: in Open Forms v3, this must become a simple RedirectView to the
# endpoint for openforms.contrib.kadaster.api.views.AddressAutocomplete
path(
"location/get-street-name-and-city",
AddressAutocompleteView.as_view(),
name="get-street-name-and-city-list",
RedirectView.as_view(pattern_name="api:geo:address-autocomplete"),
),
path(
"logic/description",
Expand Down
Loading

0 comments on commit e4dd230

Please sign in to comment.