Bug 35197: Field name consistency
This patch adds a to_api_mapping and updates the yaml definitions to be ensure we are consistent with modern best practice for our api field names. 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:
parent
4d40f5f2b9
commit
629e62ed28
|
|
@ -42,6 +42,23 @@ sub effective_authorised_value_category {
|
|||
return $category;
|
||||
}
|
||||
|
||||
=head3 to_api_mapping
|
||||
|
||||
This method returns the mapping for representing an AdditionalField object
|
||||
on the API.
|
||||
|
||||
=cut
|
||||
|
||||
sub to_api_mapping {
|
||||
return {
|
||||
id => 'additional_field_id',
|
||||
tablename => 'table_name',
|
||||
authorised_value_category => 'authorised_value_category_name',
|
||||
marcfield => 'marc_field',
|
||||
marcfield_mode => 'marc_field_mode'
|
||||
};
|
||||
}
|
||||
|
||||
sub _type { 'AdditionalField' }
|
||||
|
||||
=head1 AUTHOR
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
---
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
additional_field_id:
|
||||
type: integer
|
||||
description: internally assigned additional field identifier
|
||||
readOnly: true
|
||||
tablename:
|
||||
table_name:
|
||||
description: name of the table this additional field corresponds to
|
||||
type: string
|
||||
name:
|
||||
description: name of the additional field
|
||||
type: string
|
||||
authorised_value_category:
|
||||
authorised_value_category_name:
|
||||
description: authorised value category of the additional field
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
marcfield:
|
||||
description: marcfield of the additional field
|
||||
marc_field:
|
||||
description: marc field of the additional field
|
||||
type: string
|
||||
marcfield_mode:
|
||||
description: marcfield mode of the additional field
|
||||
marc_field_mode:
|
||||
description: marc field mode of the additional field
|
||||
type: string
|
||||
enum:
|
||||
- get
|
||||
|
|
@ -31,5 +31,5 @@ properties:
|
|||
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- tablename
|
||||
- additional_field_id
|
||||
- table_name
|
||||
|
|
|
|||
Loading…
Reference in New Issue