USACE / cwms-data-api

Corps Water Management System RESTful Data Service
MIT License
13 stars 14 forks source link

Parameter JSON format using EN units for default-si-unit. #174

Open rripken opened 2 years ago

rripken commented 2 years ago

Something is wrong with the JSON returned from /parameters. Its using the same units values for default-si-unit and default-english-unit.

This is not occurring when csv,tab or xml formats are used, near as I can tell its only in the json.

rripken commented 2 years ago

screenshot

rripken commented 2 years ago

Example Snippet

   {
        "abstract-param": "Length",
        "name": "Dist",
        "office": "All",
        "default-english-unit": "mi",
        "default-si-unit": "mi",
        "long-name": "Distance",
        "description": "Distance between two points."
      },
      {
        "abstract-param": "Length",
        "name": "Elev",
        "office": "All",
        "default-english-unit": "ft",
        "default-si-unit": "ft",
        "long-name": "Elevation",
        "description": "The height of a surface above a datum which approximates sea level"
      },
rripken commented 2 years ago

Fairly certain this is in the pl/sql. Its possible this was already fixed in a newer schema. I discovered this against 21.1.1

MikeNeilson commented 2 years ago

Likely not. most of us don't really touch that part. I'm more inclined to give the /office treatment and move that out to the Java code. At least for the JSON anyways.

MikeNeilson commented 10 months ago

This endpoint should be changed to the newer style with the old methods getting a deprecated header per #483