Postman Interpreter in Rust
Context: A lot of advancements have been made in terms of web API development and SDK generation for consumer to use. Documenting and sharing API using OpenAPI (OAI) and creating/generating SDK's using OAI specs has allowed a big step forward for API design and usage. Good API design and documentation is crucial for adaptation.
Challenge: Despite there existing more readable options for documenting and sharing API that have OAI specs, demonstrating how an end to end workflow using multiple API calls is still a challenge. Things get even more complicated if one is trying to document or demonstrate a workflow that involve multiple API's.
Current Solutions:
- Rely on written documentation to communicate what E2E workflows are supposed to look like to a consumer (can be a challenge to write good documentation that doesn't leave the consumer still asking questions in addition to keeping them up to date)
Possible Solutions(pros/cons):
- Use a popular framework/ecosystem for designing and testing API and write an API workflow that can include calls to multiple different API's in its workflow and write an interpreter in Rust that can utilize that representation of a workflow and be the SDK for consumer use. WebAssembly can be used to export that interpreter to various other programming languages.
- Pros:
- Great flexibility
- Great performance by utilizing Rust
- Design API workflow once, export it everywhere
- Cons:
- A lot of work to write an interpreter that can handle the vast scope of possible workflows and scenarios of web API's
- Would be tied to an ecosystem that can change
- Pros:
- (Didn't identify alternative competing solutions from Google research)
Solution in Progress: A Rust interpreter that can take in an exported JSON representation of a Postman collection and be able to perform the actions encapsulated in that collection. Using WebAssembly System Interface, this interpreter can be utilized by various other programming languages while only maintaining one codebase.
Business Impact:
- Consumer win:
- Would only have to maintain one source of truth Postman collection when supporting various language's SDKs
- Less coding errors, more time spent on intuitive user interface
- Open Source Contributor win:
- Be able to demonstrate skill with Rust programming language
- Potentially be involved in growing trend of unification and simplication of API usage in tech
- Everyone win:
- Greater clarity in API documentation
- Enhanced ability to tie different API's together for better designation of responsibilities