From 662fc64a651b90bcc39b269a3a8dc070c19168e8 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Thu, 13 Jan 2022 17:52:46 +0100 Subject: [PATCH] api_docs: Update regex for generating code example fixture. Updates regex in the openapi markdown extension to match api endpoint names that contain dashes, which is the case for `zulip-outgoing-webhook` and `rest-error-handling`. --- zerver/openapi/markdown_extension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/openapi/markdown_extension.py b/zerver/openapi/markdown_extension.py index 63fe92339e..4f6ab36874 100644 --- a/zerver/openapi/markdown_extension.py +++ b/zerver/openapi/markdown_extension.py @@ -31,7 +31,7 @@ from zerver.openapi.openapi import ( openapi_spec, ) -API_ENDPOINT_NAME = r"/[a-z_/-{}]+:[a-z]+" +API_ENDPOINT_NAME = r"/[a-z_\-/-{}]+:[a-z]+" API_LANGUAGE = r"\w+" API_KEY_TYPE = r"fixture|example" MACRO_REGEXP = re.compile(