kombo-ruby-sdk/docs/Schema4.md
Adriano Caloiaroooo 000eb69c9e
initial commit
2025-11-19 13:39:55 -08:00

861 B

Kombo::Schema4

Class instance methods

openapi_one_of

Returns the list of classes defined in oneOf.

Example

require 'kombo_client'

Kombo::Schema4.openapi_one_of
# =>
# [
#   :'Array<Schema4>',
#   :'Boolean',
#   :'Float',
#   :'Hash<String, Schema4>',
#   :'String'
# ]

build

Find the appropriate object from the openapi_one_of list and casts the data into it.

Example

require 'kombo_client'

Kombo::Schema4.build(data)
# => #<Array<Schema4>:0x00007fdd4aab02a0>

Kombo::Schema4.build(data_that_doesnt_match)
# => nil

Parameters

Name Type Description
data Mixed data to be matched against the list of oneOf items

Return type

  • Array<Schema4>
  • Boolean
  • Float
  • Hash<String, Schema4>
  • String
  • nil (if no type matches)