Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patternProperties validation is not aligned with JSON-schema #190

Closed
peter-plochan opened this issue Mar 16, 2020 · 2 comments · Fixed by #192
Closed

patternProperties validation is not aligned with JSON-schema #190

peter-plochan opened this issue Mar 16, 2020 · 2 comments · Fixed by #192

Comments

@peter-plochan
Copy link
Contributor

Even the OpenAPI 3 doesn't support pattern properties in schemas yet, the validator includes validation of patternProperties field within the schema. I would expect that these patternProperties should be the same as defined in JSON-schema.
The problem is that the validator accepts something like this (see implementation in schema.go):

Pet:
  type: object
  patternProperties: '^somePattern$'
  additionalProperties:
    $ref: '#/components/schemas/PatternPropertySchema'
@fenollp
Copy link
Collaborator

fenollp commented Mar 16, 2020

Indeed patternProperties field support should be deleted. I'll review any PR you send my way :)

@peter-plochan
Copy link
Contributor Author

peter-plochan commented Mar 17, 2020

@fenollp #192 - not sure if it's enough for complete removal, but hopefully it is :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants