Forum Discussion
HKosova
5 years agoSmartBear Alumni (Retired)
Define the base "Star" model where the "name" property is optional. Then define another model, say, "NewStar", as allOf of the base model and the required list. Use the base "Star" model in the update request and the "NewStar" model in the create request.
Star: type: object properties: ... NewStar: allOf: - $ref: '#/definitions/Star' # or '#/components/schemas/Star' if you use OAS3 - required: - name
Related Content
Recent Discussions
- 10 hours agoBartMadeBotBad
- 21 hours agosuhaskr
- 11 days agoPrathik
swagger- specific_Api
Solved15 days agoyos123- 17 days agoozfarooq