mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	api_docs: Add "ReactionType" common component.
To facilitate re-use of the same parameters in other paths, this commit store the content of the parameter "reaction_type" in components.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							db3d95fd16
						
					
				
				
					commit
					08314e3bf4
				
			@@ -935,22 +935,7 @@ paths:
 | 
			
		||||
          type: string
 | 
			
		||||
        example: '1f419'
 | 
			
		||||
        required: false
 | 
			
		||||
      - name: reaction_type
 | 
			
		||||
        in: query
 | 
			
		||||
        description: |
 | 
			
		||||
          If the client is upvoting a reaction and wants to specifically add
 | 
			
		||||
          a vote to an existing reaction, we recommend passing this parameter
 | 
			
		||||
          using the value the server provided for the existing reaction.
 | 
			
		||||
 | 
			
		||||
          **Changes**: In Zulip 2.2 (feature level 2), this become
 | 
			
		||||
          optional for [custom emoji](/help/add-custom-emoji);
 | 
			
		||||
          previously, this endpoint assumed `unicode_emoji` if this
 | 
			
		||||
          parameter was not specified (as `realm_emoji` for custom
 | 
			
		||||
          emoji).
 | 
			
		||||
        schema:
 | 
			
		||||
          type: string
 | 
			
		||||
        example: 'unicode_emoji'
 | 
			
		||||
        required: false
 | 
			
		||||
      - $ref: '#/components/parameters/ReactionType'
 | 
			
		||||
      responses:
 | 
			
		||||
        '200':
 | 
			
		||||
          $ref: '#/components/responses/SimpleSuccess'
 | 
			
		||||
@@ -993,15 +978,7 @@ paths:
 | 
			
		||||
          type: string
 | 
			
		||||
        example: '1f419'
 | 
			
		||||
        required: false
 | 
			
		||||
      - name: reaction_type
 | 
			
		||||
        in: query
 | 
			
		||||
        description: |
 | 
			
		||||
          When removing a reaction with a [custom emoji](/help/add-custom-emoji),
 | 
			
		||||
          set `reaction_type` to `realm_emoji`.
 | 
			
		||||
        schema:
 | 
			
		||||
          type: string
 | 
			
		||||
        example: 'unicode_emoji'
 | 
			
		||||
        required: false
 | 
			
		||||
      - $ref: '#/components/parameters/ReactionType'
 | 
			
		||||
      responses:
 | 
			
		||||
        '200':
 | 
			
		||||
          $ref: '#/components/responses/SimpleSuccess'
 | 
			
		||||
@@ -3826,3 +3803,13 @@ components:
 | 
			
		||||
          type: string
 | 
			
		||||
        default: []
 | 
			
		||||
      example: ['ZOE@zulip.com']
 | 
			
		||||
    ReactionType:
 | 
			
		||||
      name: reaction_type
 | 
			
		||||
      in: query
 | 
			
		||||
      description: |
 | 
			
		||||
        When removing a reaction with a [custom emoji](/help/add-custom-emoji),
 | 
			
		||||
        set `reaction_type` to `realm_emoji`.
 | 
			
		||||
      schema:
 | 
			
		||||
        type: string
 | 
			
		||||
      example: 'unicode_emoji'
 | 
			
		||||
      required: false
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user