Peterchen23
5 years agoNew Member
Use $ref exclude properties
We have a Simple Model like:
schemas: UserModel: properties:
customerId:
type: string
example: K123S email: type: string format: email example: test@test.de title: type: string example: Herr firstName: type: string example: Weihnachts lastName: type: string example: Mann birthday: type: string format: date example: 24.12.1999 phone: type: string format: phone example: +49 151 12423435
And now i want a requestBody without the customerId field.
components: requestBodies: UserCreateBody: description: Create a User required: true content: application/json: schema: properties: password: type: string allOf: - $ref: '#/components/schemas/UserModel'
How can i exclude the customerId?