﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31819	Django + Django REST Framework generates API errors with swagger	Perry Harrington	nobody	"The Django Validators use the syntax \Z to designate an end of line,  similar to the more conventional $ marker.

This swagger ticket gives context to the following: https://github.com/swagger-api/swagger-editor/issues/1601

Javascript uses the $ as the end anchor, this has slightly different semantics to the intended \Z anchor in Python.

The problem is that swagger chokes on this syntax, and looking at the code it comes directly from the Python regexes being exported to the openapi spec.

I propose 2 possible solutions:

1. Change the Django regexes to use the $ anchor, this may have unintended behavior.  The \Z regex is not valid as an anchor in Javascript.
2. Run all of the python regexes through a simple replace, changing \Z for $

I'm open to any other suggestions, but as I see it now, the yaml produced from Django regexes is not compliant with Javascript and javascript validators by extension.

I can manually edit yaml files, but I'd like to have a dynamic API endpoint for schema definitions."	Bug	closed	Core (Other)	3.0	Normal	invalid	swagger regex javascrip rest openapi	Perry Harrington	Unreviewed	0	0	0	0	0	0
