Skip to content

Feature Request: Allow sibling elements with $ref that overrides the references definition #2744

Closed
@juzerali

Description

@juzerali

Currently I can either specify a $ref or the complete property description. However there are use cases where refenced definition needs to be overridden, particularly description.

components:
    schemas:
        Money:
            description: Represents monetary value
            properties:
                currency:
                    type: string
                amount:
                    type: integer
properties:
    minimum_amount_value:
        $ref: '#/components/schemas/Money'
        description: Minimum amount required to make a transaction

In the above example, I can't both reuse Money model and explain it's property semantics. It shouldn't be this way. I believe all the properties in $ref should be overridable, but at the very least description should be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions