March 2020
Intermediate to advanced
392 pages
10h 10m
English
Output models are the counterpart to input models; they define what the output of our service should look like.
A difference to the input models is that we don't need quite as many output models. We return information if we do the following:
The first point and the last one can be combined since they contain roughly the same information. So let's start with the following steps:
import Vaporstruct OrderItemResponse: Content { var productId: Int var unitPrice: Int var quantity: Int var totalAmount: Int}
Notice that this file ...
Read now
Unlock full access