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.
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'
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.
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.Alterations affecting layer info service (i.e.,
/FeatureServer/:id
) responsefields
array objects have propertiesname
,type
,alias
,defaultValue: null
,domain: null
,editable: false
,nullable: false
andsqlType: "sqlTypeOther"
fields
array objects of typeString
andDate
have alength
property with values128
and36
respectivelyfields
array in the response is the object withname: 'OBJECTID'
Alterations affecting query service (i.e.,
/FeatureServer/:id/query
) responsefields
array objects have propertiesname
,type
,alias
,defaultValue: null
,domain: null
, andsqlType: "sqlTypeOther"
fields
array in the response is the object withname: '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.