koopjs / FeatureServer

An open source Geoservices Implementation (deprecated)
https://geoservices.github.io
Other
104 stars 32 forks source link

Layer and query service payload updates to match ArcGIS REST API. #85

Closed rgwozdz closed 6 years ago

rgwozdz commented 6 years ago

Noticed several differences in response payloads for /FeatureServer/:id, and /FeatureServer/:id/query when comparing ArcGIS REST API and Koop service responses. This was based both on docs at https://developers.arcgis.com/rest/services-reference/ and actual responses of ArcServer 10.51. Made the following adjustments to Koop so that response JSON matches the ArcGIS REST API response.

  1. Alterations affecting layer info service (i.e., /FeatureServer/:id) response

    • Ensure that all fields array objects have properties name, type, alias, defaultValue: null, domain: null, editable: false, nullable: false and sqlType: "sqlTypeOther"
    • Ensure that all fields array objects of type String and Date have a length property with values 128 and 36 respectively
    • Ensure that the first element of fields array in the response is the object with name: 'OBJECTID'
  2. Alterations affecting query service (i.e., /FeatureServer/:id/query) response

    • Ensure that all fields array objects have properties name, type, alias, defaultValue: null, domain: null, and sqlType: "sqlTypeOther"
    • Ensure that the first element of fields array in the response is the object with name: 'OBJECTID'

In addition, I added some additional route and JSON schema tests to cover the JSON templates and code that contribute to the structure of these service responses.

rgwozdz commented 6 years ago

Not quite ready yet....

trescube commented 6 years ago

respectfully -> respectively. but it's great that you have respect for the numbers, though! :)