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

Corrected regex serialization for OpenAPI. #7389

Merged
merged 4 commits into from
Jun 28, 2020
Merged

Corrected regex serialization for OpenAPI. #7389

merged 4 commits into from
Jun 28, 2020

Conversation

dhaval-mehta
Copy link
Contributor

@dhaval-mehta dhaval-mehta commented Jun 24, 2020

Fixes #7204

\Z is \z for non-python regex implementation. See: https://stackoverflow.com/questions/53283160/the-z-anchor-not-working-in-python-regex

@carltongibson carltongibson changed the title Fix #7204 Corrected regex serialization for OpenAPI. Jun 24, 2020
@carltongibson carltongibson added this to the 3.12 Release milestone Jun 24, 2020
Copy link
Collaborator

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

Hi @dhaval-mehta. Thanks for this, super.

rest_framework/schemas/openapi.py Show resolved Hide resolved
@carltongibson carltongibson merged commit 5ce237e into encode:master Jun 28, 2020
@dhaval-mehta dhaval-mehta deleted the fix_7204 branch June 28, 2020 16:02
sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request Dec 3, 2022
* replace \Z by \z in regex

* fix test cases for Django >= 3.0

* fix isort

* Added comment for why `\z`.

Co-authored-by: Carlton Gibson <carlton@noumenal.es>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error mapping Python regex to OpenAPI.
2 participants