postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.84k stars 839 forks source link

OData URL, parameter, and header auto-suggest #5719

Open smeierhofer opened 5 years ago

smeierhofer commented 5 years ago

An OData REST service provides a metadata document that describes the entity model and services. This metadata document provides all the details necessary to know how to construct HTTP requests to do Query+CRUD operations on entities. It specifies the properties of each entity, their relationships, and the actions and functions that operate on entities or operate independent of any entity.

The HTTP requests to an OData service must specify the names of the OData model elements or the functions or actions being invoked. But Postman doesn't know anything about the OData service and so it can't help in constructing the request. But if Postman understood OData it could help greatly in building the HTTP request.

I want to point Postman at the OData service root and have it fetch the OData document. Then when I create a new HTTP request and start typing the URL, I want Postman to suggest what to type in the URL. Similarly when I build a request with the query parameter "$select" I want Postman to show a list of the entity's properties so that I can select the ones I want. When I use the $filter parameter I want Postman to help me build the filter expression. I want it to tell me if the syntax of anything isn't correct or if I have a typo in a field name. I want it to suggest field names. I want all the same things I get when coding in a modern IDE (like IntelliJ IDEA) or when using a modern SQL tool (e.g. SQLServer SSMS) to construct a SQL statement.

I don't want a pop-up dialog to help me construct the query parameters (even the complex parameters like $filter). I know enough about how to construct the $filter parameter that a pop-up just gets in the way. What I do today is fetch the metadata document manually and copy to an editor. Then I use Postman to construct the request and reference the metadata document as necessary. But this is cumbersome and slow and only gets worse as the OData service gets more complex.

a85 commented 5 years ago

OData and other schema formats will be supported soon. We are doing some work to support this and more such formats.

Tiberriver256 commented 4 years ago

Any updates on this? Biggest thing for me would be path parameters to start working.

Examples: /api/MyResource(:Id) /api/MyFunction(Arg1=':arg1')

Postman does not inject the :Id