Reputation: 3
I would like to rewrite parameters in the resources of APIs in publisher.
I need to rewrite resource /question?$top=parameter1&$select=parameter2&$filter=parameter3 to /question/parameter3?$top=parameter1&$select=parameter2.
Could you please advise?
Thanks.
Upvotes: 0
Views: 237
Reputation: 1224
You can edit the resource by editing the relevant Swagger definition. Navigate to the API Definition
section in the left panel in Publisher Portal, edit the resource and update the Swagger definition with the required changes to the resource.
As per the question, you need to add paramter3
as path parameter and remove one query parameter. You can use the following swagger segment to set path parameter to the resource.
parameters:
- name: parameter3
in: path
required: true
schema:
type: string
Upvotes: 1