Skip to content

Fix properties on same level as $ref #521

@colleenXu

Description

@colleenXu

I notice that when the TRAPI spec is copied into the SmartAPI or OpenAPI Editors, they throw warnings for some Schema Objects.

This is happening because for OpenAPI 3.0, any properties on the same level as a $ref are ignored (aka "sibling property loss"). To avoid confusion/unexpected behavior, I think we should fix this.

The solutions I've found are:

  • use allOf and set properties in the top level (ref 1, ref 2). But this is verbose and doesn't seem to be worth it for only descriptions.
  • use $comment to put the descriptions. But the downside is that they aren't supposed to be used to communicate to schema users.
  • migrate to OpenAPI 3.1, where it looks like "summary", "description", and other properties can be put on the same level as $ref for Schema Objects (ref 1, ref 2)

References:

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