-
|
Dealing with an existing API. There's a model like below. Then in HTTP stuff , the POST request format is ThingWritable. The response format is Thing and the GET response is Thing. What's the good pattern for composing something like this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
We have For now, you could do something like: |
Beta Was this translation helpful? Give feedback.
-
|
I should also say, ideally you use visibility for this purpose but that can be a challenge when adapting existing APIs. |
Beta Was this translation helpful? Give feedback.
-
|
Perfect. Thank you for both of those tips. |
Beta Was this translation helpful? Give feedback.
We have
OptionalProperties<T>, though notRequiredPropertieswhich should be added I think, so you could write:For now, you could do something like: