mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
openapi: Combine two similar openapi markdown extensions.
Previously api_description and api_code_examples were two independent markdown extensions for displaying OpenAPI content used in the same places. We combine them into a single markdown extension (with two processors) and move them to the openapi folder to make the codebase more readable and better group the openapi code in the same place.
This commit is contained in:
@@ -6,7 +6,7 @@ import markdown
|
||||
import html
|
||||
|
||||
from zulip import Client
|
||||
from zerver.lib.bugdown import api_code_examples
|
||||
from zerver.openapi import markdown_extension
|
||||
from zerver.models import get_realm
|
||||
from zerver.openapi.curl_param_value_generators import REGISTERED_GENERATOR_FUNCTIONS, CALLED_GENERATOR_FUNCTIONS
|
||||
|
||||
@@ -14,7 +14,7 @@ def test_generated_curl_examples_for_success(client: Client) -> None:
|
||||
authentication_line = "{}:{}".format(client.email, client.api_key)
|
||||
# A limited markdown engine that just processes the code example syntax.
|
||||
realm = get_realm("zulip")
|
||||
md_engine = markdown.Markdown(extensions=[api_code_examples.makeExtension(
|
||||
md_engine = markdown.Markdown(extensions=[markdown_extension.makeExtension(
|
||||
api_url=realm.uri + "/api")])
|
||||
|
||||
# We run our curl tests in alphabetical order, since we depend
|
||||
|
||||
Reference in New Issue
Block a user