Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we generate code for the same path but with different parameters separately? #77

Open
vctqs1 opened this issue Apr 20, 2024 · 0 comments

Comments

@vctqs1
Copy link

vctqs1 commented Apr 20, 2024

Hello everyone. Is there a way for us to configure code generation for APIs such as services/data/v60.0/query/?q=select Id,Name From Account and services/data/v60.0/query/?q=select Id,Name From Contact with q is the query parameter?

I've defined them as multiple endpoints in the Postman collection, but when generating OpenAPI instead something like

 "/services/data/v60.0/query/?q={Get_All_Location_Query}": {}
 "/services/data/v60.0/query/?q={Get_Location_By_Ids_Query}": {}
 "/services/data/v60.0/query/?q={Get_All_Product_Offering_Query}": {}
image it is recognize as a single endpoint with multiple examples inside
"/services/data/v60.0/query/": {
   "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "select Id,Name from Account"
            },
          },
}

Do we have any way to generate multiple endpoints as Postman Collection definition? instead of grouping them?


The reason behind this is that our team is currently working on Salesforce. We are attempting to execute queries by passing ?q=<query> as shown in the screenshot. However, the data responses returned differ between them with different ?q=query.
Because, we're trying to build an OpenAPI specification and share it with external our partners. This approach allows us to clearly define a single query with a single response.

Expectation: We'd like to aim to have a single request in Postman represented as a single endpoint path in the OAS document. Only merging/grouping them if there are have exactly same request url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant