About my project
My project was to build utilities for the management of the OpenAPI Schema. It’s a bit different project than others because I had to write the code in the Postman(Yes! you can write code in Postman).
You can see my final project over here.
What is OpenAPI?
The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.
An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases.
Why did I choose this project?
My biggest motivation to apply for this project was the idea behind OpenAPI which is ‘API Design First Approach’.
The first time I came to know about Postman was through the Postman API hackathon held last January where I participated and got an opportunity to build a project using Postman. I was amazed by the Postman features(i.e. Postman Monitors) which allow users to build Postman Public Workspaces and APIs with ease.
Tech Stack that I use
I used JavaScript as the primary language for the project's development, and I also used Postman version control to manage my contributions.
Challenges that I faced
The very first challenge was to go through the huge existing codebase and break it down into small chunks to make it more understandable and modular.
The second challenge for me was to learn about the OpenAPI Specification(it was a great learning and the OpenAPI documentation is pretty amazing, anyone can understand it easily).
What we have planned?
I have planned to do these tasks during the GSoC Period:
- Evaluate the scope of API
- Add default response code to all API paths
- Remove any duplicate words from summary
- Uppercase the first letter of each method summary
- Add or remove a slash at the end of each path
- Add or remove header parameters to all of the HTTP methods
- Add or remove query parameters to all of the HTTP methods
- Build an operation id by assembling the HTTP method and summary stripped of spaces
- Add or Remove a property from component schema.
- Turn each HTTP method all uppercase or lowercase
- Run a find and replace on each of the paths
What I have done?
During the GSoC period, I have done these tasks:
- Evaluate the scope of API
- Add default response code to all API paths
- Remove any duplicate words from summary
- Uppercase the first letter of each method summary
- Add or remove a slash at the end of each path
- Add or remove header parameters to all of the HTTP methods
- Add or remove query parameters to all of the HTTP methods
- Build an operation id by assembling the HTTP method and summary stripped of spaces
- Add or Remove a property from component schema.
Work to be done
These two tasks are left:
- Turn each HTTP method all uppercase or lowercase
- Run a find and replace on each of the paths
Future Developments Opportunities
The work that I have done can be packed or stacked into a user-friendly NPM package that can be manipulated through the command line, this would be a great help for the community and the upcoming developers.
Take-Away
Writing code is not enough!
Before the GSoC! I thought writing code that works fine is good but it’s not. You also need to make it modular and readable so, everyone can understand it easily. And we also need to document it properly so new developers can easily understand it even if you leave the project.
Overall Experience
I was new to this OpenAPI Ecosystem and initially faced multiple challenges, but working with this project helped me in gaining confidence and got me interested and passionate about OpenAPI.
This project has given me a lot of experience and learning as an Open Source Contributor and gave me enough confidence to stand out in the Open Source Community.
Thanks for reading this blog
Do leave your feedback or suggestions, I appreciate your honest feedback!.
Thank You