Skip to content

problem with oneOf: string/integer #286

@jcoyne

Description

@jcoyne

I have added a rails application here that illustrates the problem: https://github.com/jcoyne/comittee-bug

It has a failing test which you can run by doing:

bundle exec rspec spec/requests/resources_request_spec.rb

Committee reports{"id":"bad_request","message":"7116 isn't one of in #/components/schemas/Title/properties/value"}

I believe this is because of: https://github.com/jcoyne/comittee-bug/blob/master/openapi.yml#L32-L34

If I comment out the line:

          - type: integer

then it works fine.

If I change this line of the test:

https://github.com/jcoyne/comittee-bug/blob/master/spec/requests/resources_request_spec.rb#L6

to look like a string, e.g. ({ "title":{"value":"Number 7116"}}) it also works fine.

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