ServiceStack UI and Complex Types #18
-
Hi there Everyone, Noob here, beginning to learn ServiceStack. I have a service with the following request response objects:
The above service functions as expected and I can see the ServiceStack UI (The Swagger like browser interface) responds as appropriate. Now when I make the request type slightly more complex, the ServiceStack UI freezes. Here's an example:
The UI just freezes and I'm unable to interact with the API: Do the DTO members have to be a primitive/native type ? Can we not have more complex types when making API calls ? Thanks for any pointers in the right directions ! Sincerely, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's not freezing, it just can't display a form UI control that can submit a complex type property so it's ignored, i.e. there's no HTML input control that can send a complex type so it's ignored in the UI. You'll still be able to call the API through code, you just wont be able to get an Auto UI that will be able to populate complex type properties. You'll need to use a flat Request DTO structure to be included in an Auto Form UI. |
Beta Was this translation helpful? Give feedback.
It's not freezing, it just can't display a form UI control that can submit a complex type property so it's ignored, i.e. there's no HTML input control that can send a complex type so it's ignored in the UI. You'll still be able to call the API through code, you just wont be able to get an Auto UI that will be able to populate complex type properties.
You'll need to use a flat Request DTO structure to be included in an Auto Form UI.