Skip to content

Trying to layout a request definition in swagger-blocks #127

@bopritchard

Description

@bopritchard

what would be the equivalent in swagger-blocks

extension:
  type: array
  items:
    oneOf:
      - $ref: '#/definitions/Race'
      - $ref: '#/definitions/Ethnicity'

I've tried

    property :extension do
      key :type, :array
      items do
        key :type, :object
        oneOf do
          key :'$ref', :Race
          key :'$ref', :Ethnicity
          key :'$ref', :Ethnicity
        end
      end
    end

but get the following exception

undefined method `oneOf' for #<Swagger::Blocks::Nodes::ItemsNode

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