First Look into Github's OpenAPI Description
Tags: webdev, github, design, api
Published: 2020-08-09 09:04:30

The original post was on [First Look into Github's OpenAPI Description - Reading Time: 4 Mins](https://www.maxongzb.com/first-look-into-githubs-openapi-description-reading-time-4-mins/) and cover image by [Photo by Denny Müller on Unsplash](https://unsplash.com/photos/jLjfAWwHdB8)

# Introduction
![undraw launch day 4e04][1]

When it comes to API development, my goto blog has always been [API Evangelist][2]. Which **Kin Lane** who is better known as API Evangelist currently is the chief evangelist for Postman. It is due to his writings and tons of research that lead me to understand alot about what should be considered good practice in developing an API. 

As I dive deeper into it, I start to understand why is there a need to learn about it. Especially the ecosystem surrounding it goes beyond just the simple hello world version of a POST or GET requests. It serves as a **communication**, between multiple different people who might be using it. From a developer who is integrating API for a new service to product or operations team who deals with onboarding & tracking of API services. It could also be an entrepreneur who is looking into building their own SasS company to make it easy for a developer or anyone to adopt it.
 
# What is OpenAPI?
![undraw status update jjgk][3]

[OpenAPI][4] is a set of API design specification standard that is used by alot of companies or organisations. It was previously known as [Swagger][5] by [Smartbear][6]. Who donated the API Specification to the Linux Foundation and created the [OpenAPI Initiative][7]. 

Which tons of companies or organisations use it to document their APIs or to provide a rundown on how an API will work. From calling it to creating API mockup before any actual API development is carried out. This serves two purposes. 

The first acts as a form of **contract** between the API provider & consumer of the API service. For what is expected in the API. The second is to use it as a **single source of truth**. Where everyone has a common understanding of the API from the front-end developer & back-end developer. Which allows them to operate **independently** with just an **API mockup** based upon the OpenAPI specification. 

Without depending for each other to get **ready** to test and built upon an API. While I was seeking to **frantically** develop & provide an API. For my front-end developer or other stakeholders. Who was breathing down my neck to have the API built & deployed for them to test or use it.

# What is Github OpenAPI Description?
![undraw files1 9ool][8]

To be honest, I know that GitHub is one of the few companies that adopt more of an [API first][9] approach to their API services but I did not look at it in detail because I do not use it for my end in my work. 

Which GitHub focus on building API by thinking deeply on the design, adoption, development, deployment, evangelism of the APIs for Developers like you or me. Create products or services on top of it to form an ecosystem. Think of companies like [Travis CI][10], [CodeSandBox][11], [Zapier][12]. Which are some of the services that use it and built on top of these APIs.

What caught me the most is that GitHub has started to transit towards the use of [OpenAPI standard][13] to document and showcase their **600** operations of their APIs to developers. Instead of continuing rolling their own API style. Like alot of companies that tend to provide it. Which can be painful & time-consuming, if you are unable to understand, test or interact how their API work. 

# Some of the Useful API Points for a Developer
![undraw developer activity bv83][14]

Due to its extensive nature of about 600 operations covered by GitHub in their [OpenAPI Description][15]. I won't be listing but those that look interesting to me of their categories. So here it goes:

*   [Actions][16] - Provides ways for you to automate your development workflow. 

*   [Activities][17] - Provides alerts and notifications on your repository that is read-only events

*   [Issues][18] - Deals with the management of issues under the user or the user's organisation he/she belongs to.

*   [Projects][19] - Provides an overview of the management of a project board. You can understand the difference between [Project and Repository][20].

*   [Repository][21] -  The management of repository. Which bulk of your API calls comes from as an individual user or organisation.
 
# Conclusion
![undraw work in progress uhmv][22]

For GitHub transition, their API documentation into OpenAPI can be quite a big deal. Since they are one of the early adopters of GraphQL. Which lead to tons of developers looking to integrate it. As part of their approach to creating APIs for their React, Vue or Angular front-end. Which trickles down to mobile app development as well. So with GitHub playing a role in transiting their API documentation to OpenAPI. 

Which is considered as part of one of the few industry-standard like Stripe, Twilio, SalesForce. Even before their move towards OpenAPI. I believe that there will be more and more developers. Who will be talking about it and using the OpenAPi Standard. As part of their goto API design & documentation inspiration. When they are looking at building an API instead of just doing it in their own way.

If you like this article do **sign up** for my [Adventurer's Newsletter](https://maxongzb.activehosted.com/f/1). Which contains interesting content I stumble across over the week in the area of **Python**, **Web Development**, **Startup** and articles that I wrote.

You can also **follow** me to get the **latest** update of my article on **Dev**.

Lastly, are you looking to specialise yourself as a developer? If it's a Yes. I'm giving away my free ebook called ["Picking Your Specialisation as a Developer"](https://maxongzb.activehosted.com/f/5) for anyone interested to command a higher salary or do the work that you like.

# Reference
* [API Evangelist][2]
* [OpenAPI][4]
* [Github OpenAPI Description][15]
* [Swagger][5]
* [What Is OpenAPI?][23]
* [Smartbear][6]
* [OpenAPI Initiative][7]
* [API first][9]
* [Travis CI][10]
* [CodeSandBox][11]
* [Zapier][12]
* [Introducing Github OpenAPI Description][13]
* [OpenAPI Description Repository][15]
* [Actions][16]
* [Activities][17]
* [Issues][18]
* [Projects][19] 
* [Project and Repository][20]
* [Repository][21]
* [Best Practices in API Governace][24]
* [API Lifecycle and Governance in the Enterprise: Plan Stage (Part 1 of 3)][25]
* [GitHub REST API Documentation][26]
* [UnDraw][27]


[1]: //images.ctfassets.net/ly2f59p4unnn/7tpzUocJM8UFhaVyGDTAI4/87a90947dfa92301fbcfe94c1994f0f0/undraw_launch_day_4e04.png
[2]: https://apievangelist.com/
[3]: //images.ctfassets.net/ly2f59p4unnn/7N1yMdlNa9IX9aWbiKYN7d/13065cbda296529f35ab8338143ed2fe/undraw_status_update_jjgk.png
[4]: http://spec.openapis.org/oas/v3.0.3
[5]: https://swagger.io/
[6]: https://smartbear.com/
[7]: https://www.openapis.org/
[8]: //images.ctfassets.net/ly2f59p4unnn/18xv0P6Vpl69LCxXSKm3E6/6b52a21714ee359a9af8f27b771fb010/undraw_files1_9ool.png
[9]: https://swagger.io/resources/articles/adopting-an-api-first-approach/#:~:text=An%20API%2Dfirst%20approach%20means,be%20consumed%20by%20client%20applications.
[10]: https://travis-ci.org/
[11]: https://codesandbox.io/
[12]: https://zapier.com/
[13]: https://github.blog/2020-07-27-introducing-githubs-openapi-description/
[14]: //images.ctfassets.net/ly2f59p4unnn/3m9OJOkkn9gNJu97BF5Yb/ca22b5fab109c9e6a4d5b111185a2bba/undraw_developer_activity_bv83.png
[15]: https://github.com/github/rest-api-description
[16]: https://github.com/features/actions
[17]: https://docs.github.com/en/rest/reference/activity
[18]: https://docs.github.com/en/rest/reference/issues
[19]: https://docs.github.com/en/rest/reference/projects
[20]: https://stackoverflow.com/questions/40509838/project-vs-repository-in-github
[21]: https://docs.github.com/en/rest/reference/repos
[22]: //images.ctfassets.net/ly2f59p4unnn/4tgWFh2xXrk6uEHDAYvD0c/2e0c5df07736756c46693cd852184ce9/undraw_work_in_progress_uhmv.png
[23]: https://swagger.io/docs/specification/about/
[24]: https://swagger.io/resources/articles/best-practices-in-api-governance/
[25]: https://medium.com/ibm-garage/api-lifecycle-and-governance-in-the-enterprise-plan-stage-part-1-of-3-d350b65080a2
[26]: https://docs.github.com/en/rest
[27]: https://undraw.co/illustrations