Skip to content

schema with allOf combinator containing only one item should be replaced with the item directly should not fire when overriding description in OAS 3.0 #757

@scottbusche-usps

Description

@scottbusche-usps

When working in OAS version 3.0 and you want to use the same reference, but override the description, you have to do something like this:

field1:
  $ref: '#/components/schemas/field1'
field1b:
  description: I have the same structure as field1, but I am different
  allOf:
    - $ref: '#/components/schemas/field1'

This will cause the schema with allOf combinator containing only one item should be replaced with the item directly rule to trigger. I don't believe it should, as in OAS 3.0, you cannot override a description of a $ref without using the allOf field. In OAS 3.1+ it makes complete sense to fire, since you can directly override the description.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions