Forum Discussion

Tushar's avatar
Tushar
New Contributor
3 years ago

To Map Multiple Get Request to Single Endpoint.

Hi,
Is it possible to map multiple GET requests to single Endpoint without parameters.
Is there any Solution for this?

7 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Can you please show the issue with some example to understand it correctly. or a screen shot?
    • Tushar's avatar
      Tushar
      New Contributor

      Hi,

      We have a single endpoint to which we can make multiple request and each request is identified by an identifier query parameter.
      Currently this parameter accept 17 values and may increase in future, We want to show documentation for this request for all different values.

      Can we show Endpoints for all different values as a separate endpoint rather than showing single parameter

      For eg-
      As per our documentation

      API -> /demo

      queryParam : identifier =<Values>


      Our requirement is to show endpoints separately as given below

      API 1 - /demo?identifier=value1

      API 2 - /demo?identifier=value2

      • Tushar's avatar
        Tushar
        New Contributor

        Following is the swagger file excerpt, We have included 2 GET methods under /api/r4/Claim endpoint,Similarly we want more GET methods to be added under /api/r4/Claim.

        /api/r4/Claim:
        get:
        summary: Searches for Claim resources by query parameters
        tags:
        - Claim
        responses:
        '200':
        description: Ok
        content:
        application/json:
        schema:
        $ref: '#/components/schemas/BundleClaimR4'
        '401':
        description: UnAuthorized
        '403':
        description: Forbidden
        '404':
        description: Not Found
        parameters:
        - name: identifier
        in: query
        description: The identifier to search for
        required: false
        schema:
        type: string

         

        get:
        summary: Searches for Claim resources by query parameters
        tags:
        - Claim
        responses:
        '200':
        description: Ok
        content:
        application/json:
        schema:
        $ref: '#/components/schemas/BundleClaimR4'
        '401':
        description: UnAuthorized
        '403':
        description: Forbidden
        '404':
        description: Not Found
        parameters:
        - name: patient
        in: query
        description: Patient identifier or reference to search for
        required: false
        schema:
        type: string