I created a swagger containing a get and a put, where in the first I call an element ("MyCar") and in the second I update the license plate. Being the same object, how can I make sure that in the swagger put it can show only the plate instead of all the fields of the object?
'/example/car/{carId}':
get:
summary: Get a Car by Id
description: Get a car
operationId: getCar
tags:
- Car
parameters:
- in: path
name: carId
required: true
description: carID
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/MyCar'
[...]
put:
summary: Update car plate
description: update a plate by carID
operationId: updatePlate
tags:
- Car
parameters:
- in: path
name: carId
required: true
description: CarID to save
schema:
type: string
requestBody:
description: The new plate to create
content:
application/json:
schema:
$ref: '#/components/schemas/MyCar'
[...]
MyCar:
type: object
properties:
id:
type: string
owner:
type: string
plate:
type: string
is there a way to show only the license plate in the put without showing the whole object?