[PATCH v1 5/9] urls: Increment API version

Stephen Finucane stephen at that.guru
Sat Jul 13 02:10:40 AEST 2024


On Mon, 2024-06-17 at 18:18 -0400, Adam Hassick wrote:
> Add version 1.4 because new fields were added to the API.

Can you move this to the front of the series and squash in the non-schema docs
changes from the next patch into this one (we can keep the schema changes
separate since they're so big)? Otherwise this LGTM.

Reviewed-by: Stephen Finucane <stephen at that.guru>

> ---
>  patchwork/urls.py | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/patchwork/urls.py b/patchwork/urls.py
> index ecd3668..11cd8e7 100644
> --- a/patchwork/urls.py
> +++ b/patchwork/urls.py
> @@ -347,12 +347,16 @@ if settings.ENABLE_REST_API:
>  
>      urlpatterns += [
>          re_path(
> -            r'^api/(?:(?P<version>(1.0|1.1|1.2|1.3))/)?', include(api_patterns)
> +            r'^api/(?:(?P<version>(1.0|1.1|1.2|1.3|1.4))/)?',
> +            include(api_patterns),
>          ),
>          re_path(
> -            r'^api/(?:(?P<version>(1.1|1.2|1.3))/)?', include(api_1_1_patterns)
> +            r'^api/(?:(?P<version>(1.1|1.2|1.3|1.4))/)?',
> +            include(api_1_1_patterns),
> +        ),
> +        re_path(
> +            r'^api/(?:(?P<version>(1.3|1.4))/)?', include(api_1_3_patterns)
>          ),
> -        re_path(r'^api/(?:(?P<version>(1.3))/)?', include(api_1_3_patterns)),
>          # token change
>          path(
>              'user/generate-token/',



More information about the Patchwork mailing list