Feature Server is ignoring the outFields options when generating the fields response. Therefore, when clients get the response they think the Feature Set response contains these fields, when if fact it may not. So before creating fields, this fix filters metadata.fields so that it will only contain fields contained in the outFields options.
Give this request to Feature Server: (note date, OBJECTID in outfields)
Feature Server is ignoring the outFields options when generating the fields response. Therefore, when clients get the response they think the Feature Set response contains these fields, when if fact it may not. So before creating fields, this fix filters
metadata.fields
so that it will only contain fields contained in theoutFields
options.Give this request to Feature Server: (note date, OBJECTID in outfields)
FeatureServer/0/query?f=json&geometry={%22xmin%22:-13633964.480821775,%22ymin%22:4540069.018923454,%22xmax%22:-13618753.512193045,%22ymax%22:4553904.1210430525}&geometryType=esriGeometryEnvelope&inSR=102100&spatialRel=esriSpatialRelIntersects&outFields=date,OBJECTID&returnGeometry=true&maxAllowableOffset=38&outSR=102100&resultOffset=0&resultRecordCount=1000&where=1=1
Before this fix the fields response will look like this:
After this fix the fields the response will look like this, b/ outfields contains data :
If outFields does not contain data it will look like this (per commit 89d35e1).
See #34