Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

linkifiers: Extract shared parameter in `zulip.yaml`.

akshatdalton53f123df72c9
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 8536ea34eb0..4e0cecf0a0e 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -6620,26 +6620,8 @@ paths:
`POST {{ api_url }}/v1/realm/filters`
parameters:
- - name: pattern
- in: query
- description: |
- The [Python regular
- expression](https://docs.python.org/3/howto/regex.html) that should
- trigger the linkifier.
- schema:
- type: string
- example: "#(?P<id>[0-9]+)"
- required: true
- - name: url_format_string
- in: query
- description: |
- The URL used for the link. If you used named groups for the `pattern`,
- you can insert their content here with
- `%(name_of_the_capturing_group)s`.
- schema:
- type: string
- example: https://github.com/zulip/zulip/issues/%(id)s
- required: true
+ - $ref: "#/components/parameters/LinkifierPattern"
+ - $ref: "#/components/parameters/LinkifierURLFormatString"
responses:
"200":
description: Success.
@@ -11948,3 +11930,25 @@ components:
- type: integer
example: "20"
required: false
+ LinkifierPattern:
+ name: pattern
+ in: query
+ description: |
+ The [Python regular
+ expression](https://docs.python.org/3/howto/regex.html) that should
+ trigger the linkifier.
+ schema:
+ type: string
+ example: "#(?P<id>[0-9]+)"
+ required: true
+ LinkifierURLFormatString:
+ name: url_format_string
+ in: query
+ description: |
+ The URL used for the link. If you used named groups for the `pattern`,
+ you can insert their content here with
+ `%(name_of_the_capturing_group)s`.
+ schema:
+ type: string
+ example: https://github.com/zulip/zulip/issues/%(id)s
+ required: true