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 -> x-patternProperties #22

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jcts3
Copy link

@jcts3 jcts3 commented Jan 13, 2023

Proposed fix for #17.

Mimicked the behaviour of what's done here to convert the patternProperties object into x-patternProperties.

Given it's only using the Specification Extension functionality of adding ^x- on the front of the unsupported property, it's not supported by a lot of tools, but it abides by the specification at least?

I haven't been able to contribute much to Open Source before, so I hope this is helpful!

@JaredCE
Copy link
Owner

JaredCE commented Jan 14, 2023

Hey. Thanks for this.

I must admit i'm at a slight crossroads about including this. I had thought about doing it myself, but my concern is that once you start renaming properties to ^x-, you lose the usefulness of the schema unless you have a tool that then re-converts ^x- properties back to their original state.

Ideally the world will move on to OpenAPI 3.1.X which allows for JSON schemas greater than Draft-04 and there won't be a need for this library.

Will have a think, but thank you for the PR and please don't be dissuaded from adding anymore additions or improvements.

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 this pull request may close these issues.

2 participants