NASA-PDS / registry-api

Web API service for the PDS Registry, providing the implementation of the PDS Search API (https://github.com/nasa-pds/pds-api) for the PDS Registry.
https://nasa-pds.github.io/pds-api
Apache License 2.0
2 stars 5 forks source link

Service using JSON blob in pds4+xml response when it should use ops blob #81

Closed al-niessner closed 2 years ago

al-niessner commented 2 years ago

πŸ› Describe the bug

For curl --location --request GET 'http://localhost:8080/products/urn:nasa:pds:izenberg_pdart14_meap:document:ns_inst::1.0' --header 'Accept: application/pds4+xml'

The <pds4> should be XML but JSON is being decoded:

<pds4>{"Product_Document":{"Identification_Area":{"product_class":"Product_Document","Modification_History":{"Modification_Detail":{"modification_date":"2016-03-16","description":"Initial PDS4 version.","version_id":1}},"information_model_version":"1.14.0.0","logical_identifier":"urn:nasa:pds:izenberg_pdart14_meap:document:ns_inst","version_id":1,"Citation_Information":{"publication_year":2016,"description":"Description of the MESSENGER Neutron Spectrometer (NS)."},"title":"MESSENGER Neutron Spectrometer (NS) Description"},"xmlns":"http://pds.nasa.gov/pds4/pds/v1","xsi:schemaLocation":"http://pds.nasa.gov/pds4/pds/v1 http://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1E00.xsd","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","Context_Area":{"Investigation_Area":{"Internal_Reference":{"lid_reference":"urn:nasa:pds:context:investigation:mission.messenger","reference_type":"document_to_investigation"},"name":"MESSENGER","type":"Mission"},"Observing_System":{"name":"MESSENGER","Observing_System_Component":[{"Internal_Reference":{"lid_reference":"urn:nasa:pds:context:instrument_host:spacecraft.mess","reference_type":"is_instrument_host"},"name":"MESSENGER","type":"Host"},{"Internal_Reference":{"lid_reference":"urn:nasa:pds:context:instrument:ns.mess","reference_type":"is_instrument"},"name":"NS","type":"Instrument"}]},"Target_Identification":{"Internal_Reference":{"lid_reference":"urn:nasa:pds:context:target:planet.mercury","reference_type":"document_to_target"},"name":"Mercury","type":"Planet"}},"Document":{"publication_date":"2016-03-16","description":"Description of the MESSENGER Neutron Spectrometer (NS).","Document_Edition":{"files":1,"language":"English","Document_File":{"file_name":"ns_inst.pdf","document_standard_id":"PDF/A"},"edition_name":"MESSENGER NS Instrument Description"}}}}</pds4>

πŸ“œ To Reproduce

Using curl above the <pds4> element decodes to JSON.

πŸ•΅οΈ Expected behavior

Using curl from above the <pds4> element decodes to XML.

πŸ–₯ System Info


πŸ¦„ Related requirements

βš™οΈ Engineering Details

al-niessner commented 2 years ago

This is to repair know problems in PR #20