mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
linkifiers: Extract shared parameter in zulip.yaml.
In zulip.yaml, `pattern` and `url_format_string` are extracted as a shared parameters. This is done as a preparatory commit for `Add settings UI to edit linkifiers`. Related issue: #10830.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user