Is it possible to override description of property from reference object.
-------------Models----------
User:
description: |
Represents a User
type: object
required:
- id
properties:
firstName:
description: The first name for the user. Optional.
type: string
maxLength: 50
UserSet:
description: Represents a collection of Users. No specific ordering is guaranteed.
type: array
items:
$ref: '#/User'
------------ API --------------
Now, my api references the UserSet
responses:
'200':
description: Fetched user information for the specified users (by ids or email addresses).
content:
application/json:
schema:
$ref: '../../../../components/schemas/service-models.yaml#/UserSet'
---- Expectation -----
I want to override description of firstName from User in my API? If not, is the alternative to create a different User with expected description for firstName and create a new Userset?
---- References ---- Is it possible to override the "required" attribute of a referenced parameter in OpenAPI 3? https://github.com/OAI/OpenAPI-Specification/issues/2026
From these links, only the description of referenced object can be modified.