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

feat(openapi): support patternProperties #514

Merged
merged 2 commits into from
Dec 17, 2021

Conversation

fxalgrain
Copy link
Contributor

@fxalgrain fxalgrain commented Dec 13, 2021

Description

This PR solve #165 issue.

The idea is to transform the patternProperties into a valid OpenAPI definition. We lost the precision in public documentation but validation still done on server side

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
Copy link
Member

@climba03003

Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also change it on swagger side?

@coveralls
Copy link

coveralls commented Dec 13, 2021

Pull Request Test Coverage Report for Build 1583864045

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 12 of 12 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 1572109812: 0.0%
Covered Lines: 628
Relevant Lines: 628

💛 - Coveralls

@fxalgrain
Copy link
Contributor Author

I can do it but I m not a daily user of swagger specs.
Before do it, could you confirm me the following stuff:
It looks like we can apply the same code fix as additionalProperties exists too. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#schemaObject
And after go in the code, I think we need update the resolveResponse and resolveBodyParams?

@climba03003 Sounds good for you?

@climba03003
Copy link
Member

@climba03003 Sounds good for you?

Yes, you can apply the same fix.

@fxalgrain
Copy link
Contributor Author

@climba03003 I did it, expecting as you wish :)

Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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.

None yet

4 participants