openapi-core icon indicating copy to clipboard operation
openapi-core copied to clipboard

oneOf type forced to object

Open smarlowucf opened this issue 7 years ago • 4 comments

If you have a list oneOf types validator defaults them to object and fails:

schema

utctime:
  oneOf:
    - type: string
      enum: [always, now]
    - type: string
      format: date-time

request

{'utctime': 'now'}

Yields: openapi_core.schema.media_types.exceptions.InvalidMediaTypeValue: Value of now not an object.

Now should be of type string not object.

smarlowucf avatar Jul 26 '18 20:07 smarlowucf

Same problem here.

GuillemGSubies avatar Aug 02 '18 14:08 GuillemGSubies

I have the same issue.

dremdem avatar Aug 03 '18 15:08 dremdem

I have the same issue too.

r-azh avatar Aug 05 '18 09:08 r-azh

Could we please have any update on this?

piotr-dobrogost avatar Jun 03 '19 16:06 piotr-dobrogost