Will document types, be part of the schema in the new Delivery API?
Hi all,
Just fooled around with the new Delivery API in the current RC of V12.
But when playing with the API i noticed that document types are not part of the generated schema for swagger. I was hoping they would be visible, as to use TS generator for swagger to generate my client and types, so i won't have to do it by hand.
Does anyone know if this is a feature that might be added at some point, or am i just supposed to spend hours/days manually keeping my headless solution up to date?
Thats right, but as long as contetTypes aren't a part of the schema, a TS generator for a client, wont now the types and it wont be possible to automaticly get strongly typed data.
The way I do (planned) is that when a page is published I send the id of the page to an API. This API connect to Umbraco (v12) and get the json from it.
It will be saved in a database and the client (website) connect to the API and request the page.
In this way I can crash the Umbraco (if I want) or update it without any downtime.
This wouldn't work in our setup.
Like Steffen, I need to create strongly-typed models (using OpenAPI) that can be consumed by i.e. a frontend-application. If the delivery API doesn't support this, I would probably have to do my own mappings and create custom viewmodels that will work using OpenAPI.
It's just a bit too much double-work and I would really much want Umbraco to handle this in a nice way.
Will document types, be part of the schema in the new Delivery API?
Hi all,
Just fooled around with the new Delivery API in the current RC of V12. But when playing with the API i noticed that document types are not part of the generated schema for swagger. I was hoping they would be visible, as to use TS generator for swagger to generate my client and types, so i won't have to do it by hand.
Does anyone know if this is a feature that might be added at some point, or am i just supposed to spend hours/days manually keeping my headless solution up to date?
If you look for "contentType" in the json returned by Umbraco - then you will have the documenttype that are being used for the current page.
In "properties" is all the component you are using on the documenttype.
Thats right, but as long as contetTypes aren't a part of the schema, a TS generator for a client, wont now the types and it wont be possible to automaticly get strongly typed data.
Ah I see... I am also looking at Umb12 with headless but I go another route with it to get more control on content and stability
Did you find a way to do this? I am waiting to use the new delivery API until this is possible. Thanks.
The way I do (planned) is that when a page is published I send the id of the page to an API. This API connect to Umbraco (v12) and get the json from it.
It will be saved in a database and the client (website) connect to the API and request the page.
In this way I can crash the Umbraco (if I want) or update it without any downtime.
This wouldn't work in our setup. Like Steffen, I need to create strongly-typed models (using OpenAPI) that can be consumed by i.e. a frontend-application. If the delivery API doesn't support this, I would probably have to do my own mappings and create custom viewmodels that will work using OpenAPI.
It's just a bit too much double-work and I would really much want Umbraco to handle this in a nice way.
Sometimes you need to see Umbraco as a platform to extend and not as a system that gives everything for you :)
i have the same issue my document types not appeared
I have just tried this on Umbraco V13 and i can confirm that this is still an issue.
is working on a reply...