I'm getting into ArcGIS API for Python,and I have a general, hand-wavy kind of question. Why do layers sometimes have certain information and sometimes don't?
For example, the "layerDefinition" object has a property called,"fields."
https://developers.arcgis.com/web-map-specification/objects/layerDefinition/
In my code below, I can get a layer definition for a feature layer, but there is no "fields" attribute. I can get the field names through the popupInfo.fieldInfos property, but I'm confused by why the "fields" attribute just doesn't seem to be there. I won't go into details, but I'm finding the properties associated with objects are inconsistently available. I have another notebook that I had to add a few lines to test for the property because some objects had it and some didn't. All the same type object. It lists field names and ALL layers I was checking do have fields, some just didn't have that information in there JSON file and some did.
If this question is too general, I can focus, but I think I'm missing a general concept and a (simple?) explanation would help me out.
Thank you very much,
Randy McGregor