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

better JSON responses for uploads #19

Open
tomkralidis opened this issue Oct 2, 2019 · 0 comments
Open

better JSON responses for uploads #19

tomkralidis opened this issue Oct 2, 2019 · 0 comments
Labels
enhancement New feature or request OSCAR/Surface Issue addresses OSCAR/Surface feature

Comments

@tomkralidis
Copy link
Contributor

(moved from wmo-cop/wmo-oscar#33)

Doing a WMDR upload to the M2M API via pyoscar results in the following:

pyoscar upload --xml ../msc-wigos-metadata/out/2202102.xml --api-token API_TOKEN --env dev
Running against OSCAR dev (https://oscardepl.wmo.int/surface/rest/api/)
{
    "logs": "The XML has been parsed with the following exceptions/issues:\nREF_8: The value for coordinates \"latitude = -121.2\" is invalid. Information for the \"facility/geospatialLocation/location\" is discarded.\nREF_8: The value for coordinates \"longitude = 61.766666666666666\" is invalid. Information for the \"facility/geospatialLocation/location\" is discarded.\nREF_5: ReferenceType for \"facility/geospatialLocation/geopositioningMethod\" with URL \"http://codes.wmo.int/wmdr/GeopositioningMethod/\" could not be found. Information for \"facility/geospatialLocation\" is discarded.\nREF_8: The value for coordinates \"latitude = -121.2367\" is invalid. Information for the \"facility/geospatialLocation/location\" is discarded.\nREF_5: ReferenceType for \"facility/geospatialLocation/geopositioningMethod\" with URL \"http://codes.wmo.int/wmdr/GeopositioningMethod/\" could not be found. Information for \"facility/geospatialLocation\" is discarded.\nREF_8: The value for coordinates \"latitude = -121.236667\" is invalid. Information for the \"facility/geospatialLocation/location\" is discarded.\nREF_5: ReferenceType for \"facility/geospatialLocation/geopositioningMethod\" with URL \"http://codes.wmo.int/wmdr/GeopositioningMethod/\" could not be found. Information for \"facility/geospatialLocation\" is discarded.\nREF_8: The value for coordinates \"latitude = -121.2367\" is invalid. Information for the \"facility/geospatialLocation/location\" is discarded.\nREF_5: ReferenceType for \"facility/geospatialLocation/geopositioningMethod\" with URL \"http://codes.wmo.int/wmdr/GeopositioningMethod/\" could not be found. Information for \"facility/geospatialLocation\" is discarded.\nREF_6: No value found for the element \"facility/territory/validPeriod/../beginPosition\". Information for this item is discarded.\nREF_4: A facility with alias \"FORT SIMPSON CLIMATE\" already exists. This alias is discarded.\nREF_6: No value found for the element \"faciliy/responsibleParty/validPeriod\". Information for this item is discarded.\nREF_3: The element \"ObservingFacility/\u2026/programAffiliation\" with WMO306_CD = \"GCOS\" is not linked with any observation under \"observation/programAffilation\", thus it is discarded.\nREF_3: The element \"ObservingFacility/\u2026/programAffiliation\" with WMO306_CD = \"WIGOSnonAffiliated\" is not linked with any observation under \"observation/programAffilation\", thus it is discarded.\n",
    "xmlStatus": "SUCCESS_WITH_WARNINGS",
    "id": 11
}
  1. can the logs property be changed to a list of messages
  2. if not, can the newlines in the logs property be encoded as \\n instead of \n for better pretty printing/readability at least?

Item 1 would be preferred if possible.

@joergklausen joergklausen added the enhancement New feature or request label Apr 23, 2021
@joergklausen joergklausen added the OSCAR/Surface Issue addresses OSCAR/Surface feature label Apr 23, 2021
@amilan17 amilan17 moved this to Submitted in OSCAR/Surface Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request OSCAR/Surface Issue addresses OSCAR/Surface feature
Projects
Status: Submitted
Development

No branches or pull requests

2 participants