Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/objecttypes/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ class Meta:
"providerOrganization",
"documentationUrl",
"labels",
"linkableToZaken",
"createdAt",
"modifiedAt",
"allowGeometry",
Expand All @@ -129,7 +128,6 @@ class Meta:
"providerOrganization": {"source": "provider_organization"},
"documentationUrl": {"source": "documentation_url"},
"allowGeometry": {"source": "allow_geometry"},
"linkableToZaken": {"source": "linkable_to_zaken"},
"createdAt": {"source": "created_at", "read_only": True},
"modifiedAt": {"source": "modified_at", "read_only": True},
}
10 changes: 0 additions & 10 deletions src/objecttypes/api/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
name: EUPL-1.2
paths:
/objecttypes:
get:

Check warning on line 43 in src/objecttypes/api/v2/openapi.yaml

View workflow job for this annotation

GitHub Actions / Checks / Lint OAS

operation-description Operation "description" must be present and non-empty string.
operationId: objecttype_list
parameters:
- in: query
Expand Down Expand Up @@ -89,7 +89,7 @@
schema:
$ref: '#/components/schemas/PaginatedObjectTypeList'
description: OK
post:

Check warning on line 92 in src/objecttypes/api/v2/openapi.yaml

View workflow job for this annotation

GitHub Actions / Checks / Lint OAS

operation-description Operation "description" must be present and non-empty string.
operationId: objecttype_create
parameters:
- in: header
Expand Down Expand Up @@ -374,7 +374,7 @@
een specifieke aanroep. Voorbeeld: 1.2.1.'
description: No response body
/objecttypes/{uuid}:
get:

Check warning on line 377 in src/objecttypes/api/v2/openapi.yaml

View workflow job for this annotation

GitHub Actions / Checks / Lint OAS

operation-description Operation "description" must be present and non-empty string.
operationId: objecttype_read
parameters:
- in: path
Expand All @@ -401,7 +401,7 @@
schema:
$ref: '#/components/schemas/ObjectType'
description: OK
put:

Check warning on line 404 in src/objecttypes/api/v2/openapi.yaml

View workflow job for this annotation

GitHub Actions / Checks / Lint OAS

operation-description Operation "description" must be present and non-empty string.
operationId: objecttype_update
parameters:
- in: header
Expand Down Expand Up @@ -442,7 +442,7 @@
schema:
$ref: '#/components/schemas/ObjectType'
description: OK
patch:

Check warning on line 445 in src/objecttypes/api/v2/openapi.yaml

View workflow job for this annotation

GitHub Actions / Checks / Lint OAS

operation-description Operation "description" must be present and non-empty string.
operationId: objecttype_partial_update
parameters:
- in: header
Expand Down Expand Up @@ -482,7 +482,7 @@
schema:
$ref: '#/components/schemas/ObjectType'
description: OK
delete:

Check warning on line 485 in src/objecttypes/api/v2/openapi.yaml

View workflow job for this annotation

GitHub Actions / Checks / Lint OAS

operation-description Operation "description" must be present and non-empty string.
operationId: objecttype_delete
parameters:
- in: path
Expand Down Expand Up @@ -606,11 +606,6 @@
additionalProperties:
type: string
description: Key-value pairs of keywords related for the object type
linkableToZaken:
type: boolean
description: |-
Objects of this type can have a link to 1 or more Zaken.
True indicates the lifetime of the object is linked to the lifetime of linked zaken, i.e., when all linked Zaken to an object are archived/destroyed, the object will also be archived/destroyed.
createdAt:
type: string
format: date
Expand Down Expand Up @@ -822,11 +817,6 @@
additionalProperties:
type: string
description: Key-value pairs of keywords related for the object type
linkableToZaken:
type: boolean
description: |-
Objects of this type can have a link to 1 or more Zaken.
True indicates the lifetime of the object is linked to the lifetime of linked zaken, i.e., when all linked Zaken to an object are archived/destroyed, the object will also be archived/destroyed.
createdAt:
type: string
format: date
Expand Down Expand Up @@ -937,7 +927,7 @@
name: Authorization
description: Token-based authentication with required prefix "Token"
servers:
- url: /api/v2

Check warning on line 930 in src/objecttypes/api/v2/openapi.yaml

View workflow job for this annotation

GitHub Actions / Checks / Lint OAS

servers-use-https Server URL /api/v2 "/api/v2" must match the pattern "^https://.*".
tags:
- name: Objecttypes
externalDocs:
Expand Down

This file was deleted.

11 changes: 0 additions & 11 deletions src/objecttypes/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,6 @@ class ObjectType(models.Model):
"`geometry` property will raise an error "
),
)
linkable_to_zaken = models.BooleanField(
_("linkable to zaken"),
default=False,
help_text=_(
# TODO Document: how and where these links should be created/maintained
"Objects of this type can have a link to 1 or more Zaken.\n"
"True indicates the lifetime of the object is linked to the lifetime "
"of linked zaken, i.e., when all linked Zaken to an object are "
"archived/destroyed, the object will also be archived/destroyed."
),
)

objects = ObjectTypeQuerySet.as_manager()

Expand Down
9 changes: 1 addition & 8 deletions src/objecttypes/tests/v2/test_objecttype_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def test_get_objecttypes(self):
"providerOrganization": object_type.provider_organization,
"documentationUrl": object_type.documentation_url,
"labels": object_type.labels,
"linkableToZaken": False,
"createdAt": "2020-01-01",
"modifiedAt": "2020-01-01",
"allowGeometry": object_type.allow_geometry,
Expand Down Expand Up @@ -119,7 +118,6 @@ def test_create_objecttype(self):
self.assertEqual(object_type.contact_person, "John Smith")
self.assertEqual(object_type.contact_email, "John.Smith@objecttypes.nl")
self.assertEqual(object_type.source, "tree system")
self.assertFalse(object_type.linkable_to_zaken)
self.assertEqual(object_type.update_frequency, UpdateFrequencyChoices.monthly)
self.assertEqual(object_type.provider_organization, "tree provider")
self.assertEqual(object_type.documentation_url, "http://example.com/doc/trees")
Expand All @@ -134,11 +132,7 @@ def test_update_objecttype(self):
url = reverse("objecttype-detail", args=[object_type.uuid])

response = self.client.patch(
url,
{
"dataClassification": DataClassificationChoices.open,
"linkableToZaken": True,
},
url, {"dataClassification": DataClassificationChoices.open}
)

self.assertEqual(response.status_code, status.HTTP_200_OK)
Expand All @@ -148,7 +142,6 @@ def test_update_objecttype(self):
self.assertEqual(
object_type.data_classification, DataClassificationChoices.open
)
self.assertTrue(object_type.linkable_to_zaken)

def test_delete_objecttype(self):
object_type = ObjectTypeFactory.create()
Expand Down