Skip to content

Commit

Permalink
changes to lock
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivrij committed Oct 23, 2023
1 parent 701f941 commit ca47dc1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
2 changes: 2 additions & 0 deletions src/drc/api/serializers/bestandsdeel.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

class BestandsDeelSerializer(serializers.HyperlinkedModelSerializer):
lock = serializers.CharField(
read_only=True,
source="canonical.lock",
help_text="Hash string, which represents id of the lock of related informatieobject",
)

Expand Down
8 changes: 3 additions & 5 deletions src/drc/datamodel/models/bestandsdeel.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ class BestandsDeel(models.Model):
help_text=_("De (binaire) bestandsinhoud van dit specifieke bestandsdeel."),
)
lock = models.CharField(
max_length=255,
null=True,
default="",
blank=True,
help_text=_(
"Hash string, which represents id of the lock of related informatieobject"
),
max_length=100,
help_text=_("Hash string, which represents id of the lock"),
)

class Meta:
Expand Down
15 changes: 6 additions & 9 deletions src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ paths:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/BestandsDeelRequest'
required: true
security:
- JWT-Claims:
- documenten.bijwerken
Expand Down Expand Up @@ -5451,7 +5450,13 @@ components:
zeggen: het aantal bytes dat staat genoemd bij grootte is daadwerkelijk
ontvangen.'
title: voltooid
lock:
type: string
readOnly: true
description: Hash string, which represents id of the lock of related informatieobject
title: lock
required:
- lock
- omvang
- url
- volgnummer
Expand All @@ -5465,14 +5470,6 @@ components:
writeOnly: true
description: De (binaire) bestandsinhoud van dit specifieke bestandsdeel.
title: inhoud
lock:
type: string
writeOnly: true
minLength: 1
description: Hash string, which represents id of the lock of related informatieobject
title: lock
required:
- lock
BestandsDeelResponse:
type: object
properties:
Expand Down
1 change: 1 addition & 0 deletions src/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Objecttype op [GEMMA Online](https://www.gemmaonline.nl/index.php/Rgbz_1.0/doc/o
| volgnummer | Een volgnummer dat de volgorde van de bestandsdelen aangeeft. | integer | ja | ~~C~~​R​~~U~~~~D~~ |
| omvang | De grootte van dit specifieke bestandsdeel. | integer | ja | ~~C~~​R​~~U~~~~D~~ |
| voltooid | Indicatie of dit bestandsdeel volledig is geupload. Dat wil zeggen: het aantal bytes dat staat genoemd bij grootte is daadwerkelijk ontvangen. | boolean | ja | ~~C~~​R​~~U~~~~D~~ |
| lock | Hash string, which represents id of the lock of related informatieobject | string | ja | ~~C~~​R​~~U~~~~D~~ |

## EnkelvoudigInformatieObject

Expand Down

0 comments on commit ca47dc1

Please sign in to comment.