Return fields & metadata to the response of an IVOA query
Addresses issue #70
Contains following fixes:
- Return fields for all TAP queries (Dynamically generated fields from any TAP/Obscore Query)
- Bugfix for cases where url is not available
Merge request reports
Activity
requested review from @vermaas
8 8 query = serializers.CharField() 9 9 url = serializers.CharField() 10 10 thumbnail = serializers.CharField() 11 # fieldnames = serializers.CharField() 11 fields = serializers.ListField() This is not the correct place for this change. The 'query_serializer.py' is the class containing the default minimal serializers for every archive that doesn't chose to override them. This change would mean that every service that uses the default would now also have to implement the 'fields' value.
Instead, if you want to add extra fields to the 'vo_reg' serialization, then you have to override this class in the 'vo_reg.py' service connector. But this is really easy, just copy that 'CreateAndRunQuerySerializer' class into 'vo_reg.py' with your extra 'fields' field onboard, that is all. When a serializer is found inside a service connector, then ESAP will use that one instead of the basic one from 'query_serializer.py'.
See some documentation about this: https://git.astron.nl/astron-sdc/esap-api-gateway/-/wikis/Service-Category-Query#pagination-and-serializers-through-django-rest-framework
changed this line in version 2 of the diff
added 1 commit
- 10a40418 - Undo change to query_serialer / Add serializer to vo_reg
added 1 commit
- a85e78b3 - Get connector for each query and pass to run_query method
mentioned in commit e621e058