cancel
Showing results for 
Search instead for 
Did you mean: 

To Map Multiple Get Request to Single Endpoint.

Tushar
New Contributor

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 7
nmrao
Community Hero

Re: To Map Multiple Get Request to Single Endpoint.

Can you please show the issue with some example to understand it correctly. or a screen shot?


Regards,
Rao.
Tushar
New Contributor

Re: To Map Multiple Get Request to Single Endpoint.

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
New Contributor

Re: To Map Multiple Get Request to Single Endpoint.

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

nmrao
Community Hero

Re: To Map Multiple Get Request to Single Endpoint.

Is this related to swagger Ui?


Regards,
Rao.
Tushar
New Contributor

Re: To Map Multiple Get Request to Single Endpoint.

It's related to Swagger Editor as we are trying to add Multiple GET methods under single /api/r4/Claim endpoint.

TanyaYatskovska
Community Manager

Re: To Map Multiple Get Request to Single Endpoint.

HI @Tushar,

If it's related with Swagger Editor, perhaps, it's worth asking this question in the Swagger community. You can find it here:

https://community.smartbear.com/t5/Swagger-Open-Source-Tools/bd-p/SwaggerOSTools

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Limited time: Gain insights – and win prizes – with our event “Inside Zephyr”! Runs May 17-28
HimanshuTayal
Community Hero

Re: To Map Multiple Get Request to Single Endpoint.

If it is not related to ReadyAPI community then we can mark it as closed or we can move it to Swagger Community @TanyaYatskovska what you suggest


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors