For example, I have this:
types: City: properties: name: string /cities: post: body: application/json: type: City
POST method used for new entity creation.
I want implement GET method for resource “cities”, which should return “City” collection, but all instances in its response MUST have IDs (for example, “cityId” field).
This is not valid:
/cities: get: responses: 200: body: application/json: type: City properties: cityId: type: number
“You can declare inline/anonymous types everywhere a type can be referenced except in a Type Expression.”
I do not want to add “cityId” field into my “City” type, because it not needed in the POST (creation) request.
How can I solve this problem?