Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As an API user, I want to get an XML response #456

Closed
tloubrieu-jpl opened this issue Apr 1, 2021 · 7 comments · Fixed by #82
Closed

As an API user, I want to get an XML response #456

tloubrieu-jpl opened this issue Apr 1, 2021 · 7 comments · Fixed by #82
Assignees
Labels

Comments

@tloubrieu-jpl
Copy link
Member

tloubrieu-jpl commented Apr 1, 2021

Motivation

...so that the API can support numerous format responses to support the community.

Details

Note: The content should match the application/json structure

That can be done easily by applying the default springboot content negotiation instead of the custom made content negotiation which returns the original pds4 label.

The pds4 label response could be kept for content-type=application/pds4+xml

Acceptance criteria

Given any API request
When I perform with content-type header 'application/xml'
I expect to get the same attributes and same structure as the same request run with content-type header set to application/json

@tloubrieu-jpl
Copy link
Member Author

We are still having an issue with xml not serializing the list values in the properties dictionnary.

@jordanpadams jordanpadams changed the title As an API user, I want to get 'application/xml' content which matches the json structure As an API user, I want to get an XML response Sep 29, 2021
@al-niessner
Copy link
Contributor

Does this also relate to #440?

@gxtchen
Copy link

gxtchen commented Feb 28, 2022

@viviant100 @tloubrieu-jpl Hi Thomas, I don't see the changes in jpl-gamma, is the fix in pds-registry-app-1.0.3?

@tloubrieu-jpl
Copy link
Member Author

Hi @gxtchen ,

Now this component is hosted in the repository https://github.com/NASA-PDS/registry-api . Sorry I missed to tell you that.
The continuous integration/continuous delivery is not working yet on this repository so you don't have a snashot release to test with. I will fix that today hopefully.

@tloubrieu-jpl
Copy link
Member Author

Hi @gxtchen ,

I updated the registry-api repository so that you have a released package to test with.

See the instructions in the main README on https://github.com/NASA-PDS/registry-api

Let me know if you have questions.

Thanks

@gxtchen
Copy link

gxtchen commented Mar 3, 2022

@tloubrieu-jpl after running docker compose --profile=dev-api up command, all processes exited except for docker-elasticsearch-1. I can't load the api then.

@gxtchen
Copy link

gxtchen commented Mar 6, 2022

@viviant100 @tloubrieu-jpl
Doesn't seems to work.
When I tried to get application/json
I got curl -X GET --header 'Accept: application/json' 'http://localhost:8080/collections?limit=100&keyword=*&only-summary=false'
and return code of 200 with 3 hits.
next, I tried application/json
curl -X GET --header 'Accept: application/json' 'http://localhost:8080/collections?limit=100&keyword=*&only-summary=false'
It also works.
But when I tried application/xml
I got this in the Curl stirng
curl -X GET --header 'Accept: application/json' 'http://localhost:8080/collections?limit=100&keyword=*&only-summary=false'
and I got a return code of 501
and no content.

@jordanpadams jordanpadams transferred this issue from NASA-PDS/pds-api May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants