Feature #2477
closed
API: Presentation view improvements
Added by Bernhard Koschiček-Krombholz 11 months ago.
Updated 7 months ago.
Description
With the feature #2450 there is a new endpoint specifically designed for presentation sites.
Since there will be need for improvement and feedback, feel free to add items to the list.
Improvements
Change name (We can do this, when it moves away from the proposal state)
- remove references (edition, bib, ext ref) from relations and make a special case for them ✅
add parameter to get not only one "hop" of linked events, actors or places but as many as there are (get linked entities recursive) (Good idea, but need to figure it out elsewhere first)
- Remodel
geometries to a valid GeoJSON ✅
Fixes
- add the
viewClass property to the response ✅
- add the
IIIFManifest property to the entries of the files array (if available) ✅
- add value types (ideally with
value and unit) to types array ✅
- RelatedEntityModel: instead of
relationTypesModel the response contains a property named relationTypes -> should be renamed in the OpenAPI definition ✅
- Assignee deleted (
Bernhard Koschiček-Krombholz)
- Status changed from Acknowledged to Assigned
- Assignee set to Bernhard Koschiček-Krombholz
Thanks Bernhard, the endpoint works really well! To fully replace the call to the /entity/ endpoint in the frontend, we'd need the following adjustments to /entity_presentation_view/ :
- add the
viewClass property to the response
- add the
IIIFManifest property to the entries of the files array (if available)
- add value types (ideally with
value and unit ) to types array
Changes in the OpenAPI definition:
- PresentationViewModel: the
type property in the geometries object is currently typed as string - would it be possible to make this an enum compatible with the GeoJSON types (Point, Polygon,...)?
- RelatedEntityModel: add proper typing to the
geometries property (according to the OpenAPI definition, it's currently an empty object)
- RelatedEntityModel: instead of
relationTypesModel the response contains a property named relationTypes -> should be renamed in the OpenAPI definition
- Description updated (diff)
- add the
viewClass property to the response
- add the
IIIFManifest property to the entries of the files array (if available)
- add value types (ideally with
value and unit ) to types array
These very already included, they were just marshalled away. My bad.
- RelatedEntityModel: instead of
relationTypesModel the response contains a property named relationTypes -> should be renamed in the OpenAPI definition
Fixed.
- PresentationViewModel: the
type property in the geometries object is currently typed as string - would it be possible to make this an enum compatible with the GeoJSON types (Point, Polygon,...)?
- RelatedEntityModel: add proper typing to the
geometries property (according to the OpenAPI definition, it's currently an empty object)
I noticed, that I just dump the geometries, but that is not correct. I should include a standardized GeoJSON, so I have to remodel it.
- Description updated (diff)
- Description updated (diff)
I corrected the geometries property in openapi as well as in the real output. It should be an absolute valid GeoJSON now.
- Description updated (diff)
- Status changed from Assigned to Closed
Setting this on closed. If any other issues arise, please set it on assigned again and write your problems. Thank you!
- Status changed from Closed to Assigned
Thanks a lot for the fixes! Just a (hopefully) small issue in the openapi definition: The geometries property in the RelatedEntityModel seems to be lacking the reference to Geometries ("$ref":"#/components/schemas/Geometries"). It is currently typed as an empty object, but the actual response correctly contains a GeoJSON geometry.
- Status changed from Assigned to Closed
- Status changed from Closed to In Progress
There are no locations for Actors.
And there might be a problem, if an entity is connected to a location, each entity connected to that location will be added to that entity result, which is not what we want. So location only needs the connections to the administrative unit types.
Also look specifically into the geometry IDs, they maybe point to the location ID, not the place ID.
- Status changed from In Progress to Closed
Fixed issue. Added placeId to geometries.
Also available in: Atom
PDF