Bug 37592: (QA follow-up) Add API mapping and definition

Sticking to API guidelines, this adds the creation_date and
modification_date fields to the api definitions and the required
to_api_mappings for those fields to be properly populated.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2024-09-12 11:49:53 +01:00 committed by Katrin Fischer
parent ab7d511822
commit b884de71ce
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
2 changed files with 12 additions and 1 deletions

View file

@ -241,7 +241,10 @@ on the API.
=cut
sub to_api_mapping {
return {};
return {
created_on => "creation_date",
updated_on => "modification_date"
};
}
=head3 delete

View file

@ -10,6 +10,10 @@ properties:
booking_id:
description: Internal booking identifier
type: integer
creation_date:
description: Creation date and time of this booking
format: date-time
type: string
end_date:
description: Start date and time of this booking
format: date-time
@ -24,6 +28,10 @@ properties:
type:
- object
- 'null'
modification_date:
description: Modification date and time of this booking
format: date-time
type: string
patron_id:
description: Internal patron identifier
type: integer