Hello - i'm revisiting Prismic after several years and was refreshing my memory about the V1 and V2 api's - as I couldn't remember why my older work was in V1, and after studying my examples again it all came flooding back. Given the docs all seem to point to the V2 api now - is V1 going to continue to be supported?
I mention this as there seems to be lots of text around v2 api's being self describing etc - but yet when I query prismic to get information on a document - the structure of v2 results seems very oddly thought out - and I don't understand the decisions that were made for this api?
For example - in V1 a result was mostly self describing with a "type" field, e.g.
"data":{
"dashboard":{
"title":{"type":"StructuredText","value":[{"type":"heading1","text":"Test","spans":[]}]},
"description":{"type":"StructuredText","value":[{"type":"paragraph","text":"This is a test","spans":[]}]},
"picture":{"type":"Image","value":{"main":{"dimensions":{"width":2048,"height":1536},"alt":null,"copyright":null,"url":"https://images.prismic.io/slicemachine-blank/26d81419-4d65-46b8-853e-8ea902e160c1_groovy.png?auto=compress,format"}
However in V2 the same result doesn't describe the date types uniformally - in particular a picture has no Type information which seems strange to me?
"data":{
"title":[{"type":"heading1","text":"Test","spans":[]}],
"description":[{"type":"paragraph","text":"This is a test","spans":[]}],
"picture":{"dimensions":{"width":2048,"height":1536},"alt":null,"copyright":null,"url":"https://images.prismic.io/slicemachine-blank/26d81419-4d65-46b8-853e-8ea902e160c1_groovy.png?auto=compress,format"}}}]
What was the thinking behind this? Given the ethos of prismic is in information modelling, why would you throw away this type information in your newer api? I never understood this - and years later, coming back to look again and seeing how the product has evolved, this still sticks out as a sore thumb to me - as it limits the the programmability of Prismic in my opinion.
But I'm wondering if I am totally missing something here?
Tim