How do I mark a field as required in a request body model? #5759
Answered
by
timotheeguerin
camille-villanueva
asked this question in
Q&A
-
Using OpenAPI 3.0.0. Goal: I want the What I've tried:
However, doing it this way does not seem to work as the |
Beta Was this translation helpful? Give feedback.
Answered by
timotheeguerin
Feb 4, 2025
Replies: 1 comment 3 replies
-
how are you using this model? by default properties are required in typespec and this is transfered to the openapi3. Can you share a repro here https://typespec.io/playground? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ah the reason is because the operation you have is a
@patch
operation which right now http library makes the assumption it is a merge patch which apply if you use a model(so you can reuse the resource model)Currently to disable that you have to put
@parameterVisibility
with no parameters on the operation playground
Please note however that this is something we are trying to change to make more explicit. @willmtemple might be able to say more