Skip to content

Commit

Permalink
Merge pull request #146 from open-zaak/feature/pagination-for-zaken-c…
Browse files Browse the repository at this point in the history
…omponent

Feature/pagination for zaken component
  • Loading branch information
joeribekker committed Oct 29, 2019
2 parents e541a88 + 2367e68 commit 94da067
Show file tree
Hide file tree
Showing 9 changed files with 343 additions and 51 deletions.
9 changes: 9 additions & 0 deletions src/openzaak/components/zaken/api/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ class StatusViewSet(
serializer_class = StatusSerializer
filterset_class = StatusFilter
lookup_field = "uuid"
pagination_class = PageNumberPagination

permission_classes = (ZaakAuthRequired,)
permission_main_object = "zaak"
required_scopes = {
Expand Down Expand Up @@ -382,6 +384,7 @@ class ZaakObjectViewSet(
serializer_class = ZaakObjectSerializer
filterset_class = ZaakObjectFilter
lookup_field = "uuid"
pagination_class = PageNumberPagination

permission_classes = (ZaakAuthRequired,)
permission_main_object = "zaak"
Expand Down Expand Up @@ -561,6 +564,8 @@ class KlantContactViewSet(
queryset = KlantContact.objects.all()
serializer_class = KlantContactSerializer
lookup_field = "uuid"
pagination_class = PageNumberPagination

permission_classes = (ZaakAuthRequired,)
permission_main_object = "zaak"
required_scopes = {
Expand Down Expand Up @@ -610,6 +615,8 @@ class RolViewSet(
serializer_class = RolSerializer
filterset_class = RolFilter
lookup_field = "uuid"
pagination_class = PageNumberPagination

permission_classes = (ZaakAuthRequired,)
permission_main_object = "zaak"
required_scopes = {
Expand Down Expand Up @@ -674,6 +681,8 @@ class ResultaatViewSet(
serializer_class = ResultaatSerializer
filterset_class = ResultaatFilter
lookup_field = "uuid"
pagination_class = PageNumberPagination

permission_classes = (ZaakAuthRequired,)
permission_main_object = "zaak"
required_scopes = {
Expand Down
149 changes: 130 additions & 19 deletions src/openzaak/components/zaken/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ paths:
operationId: klantcontact_list
summary: Alle KLANTCONTACTen opvragen.
description: Alle KLANTCONTACTen opvragen.
parameters:
- name: page
in: query
description: Een pagina binnen de gepagineerde set resultaten.
required: false
schema:
type: integer
responses:
'200':
description: OK
Expand All @@ -79,9 +86,25 @@ paths:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/KlantContact'
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/KlantContact'
'401':
description: Unauthorized
headers:
Expand Down Expand Up @@ -507,6 +530,12 @@ paths:
schema:
type: string
format: uri
- name: page
in: query
description: Een pagina binnen de gepagineerde set resultaten.
required: false
schema:
type: integer
responses:
'200':
description: OK
Expand All @@ -519,9 +548,25 @@ paths:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Resultaat'
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/Resultaat'
'400':
description: Bad request
headers:
Expand Down Expand Up @@ -1536,6 +1581,12 @@ paths:
- klantcontacter
- zaakcoordinator
- mede_initiator
- name: page
in: query
description: Een pagina binnen de gepagineerde set resultaten.
required: false
schema:
type: integer
responses:
'200':
description: OK
Expand All @@ -1548,9 +1599,25 @@ paths:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Rol'
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/Rol'
'400':
description: Bad request
headers:
Expand Down Expand Up @@ -2112,6 +2179,12 @@ paths:
schema:
type: string
format: uri
- name: page
in: query
description: Een pagina binnen de gepagineerde set resultaten.
required: false
schema:
type: integer
responses:
'200':
description: OK
Expand All @@ -2124,9 +2197,25 @@ paths:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Status'
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/Status'
'400':
description: Bad request
headers:
Expand Down Expand Up @@ -3554,6 +3643,12 @@ paths:
- woz_waarde
- zakelijk_recht
- overige
- name: page
in: query
description: Een pagina binnen de gepagineerde set resultaten.
required: false
schema:
type: integer
responses:
'200':
description: OK
Expand All @@ -3566,9 +3661,25 @@ paths:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ZaakObject'
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type: string
format: uri
nullable: true
previous:
type: string
format: uri
nullable: true
results:
type: array
items:
$ref: '#/components/schemas/ZaakObject'
'400':
description: Bad request
headers:
Expand Down Expand Up @@ -6825,9 +6936,9 @@ components:
required: true
securitySchemes:
JWT-Claims:
type: http
scheme: bearer
bearerFormat: JWT
scheme: bearer
type: http
schemas:
KlantContact:
required:
Expand Down Expand Up @@ -9332,7 +9443,7 @@ components:
description: Which field to use when ordering the results.
type: string
minLength: 1
Wijzgingen:
Wijzigingen:
title: Wijzigingen
type: object
properties:
Expand Down Expand Up @@ -9484,7 +9595,7 @@ components:
format: date-time
readOnly: true
wijzigingen:
$ref: '#/components/schemas/Wijzgingen'
$ref: '#/components/schemas/Wijzigingen'
ZaakBesluit:
required:
- besluit
Expand Down

0 comments on commit 94da067

Please sign in to comment.