kevindew / openapi3_parser

Open API 3 Parser/Validator for Ruby
MIT License
90 stars 12 forks source link

Unexpected fields: pattern #1

Closed Mutuh closed 6 years ago

Mutuh commented 6 years ago

'pattern' field doesn't pass a validation since the name of that field is specified as symbol in schema.rb: https://github.com/kevindew/openapi3_parser/blob/master/lib/openapi3_parser/node_factories/schema.rb#L26, factory.field_configs.keys array doesn't contain 'pattern' string value: https://github.com/kevindew/openapi3_parser/blob/master/lib/openapi3_parser/node_factory/object/validator.rb#L21

kevindew commented 6 years ago

D'oh - thanks for reporting that.

It's fixed in https://github.com/kevindew/openapi3_parser/commit/e3053a35b7feac7159401cad49e40ad9a416ad8f and will go out in next release.