Using SwaggerHub to Drive Your API Strategy
Closing the Gap Between API Design and Software Development
Collaborate | Posted August 05, 2020

Using SwaggerHub to Drive Your API Strategy

The API definition has become one of the most important tools for building modern software. Machine-readable formats like OpenAPI allow teams to use their API design as the source of truth throughout their entire software development process, whether for automated API tests, API mocking, or API standardizations. These teams can validate their product ideas sooner, reduce the risk of delivering the wrong thing, and work in parallel with other teams around the world, all to build quality software faster. This is a practice that helps companies cultivate a competitive advantage.

As an example, say a mobile application team at a retail bank needs to add a new feature to their application. Once they’ve collaborated to define the necessary API changes, they can generate mock servers and start working immediately without waiting for the API developers to build the API. They can even put a fully functioning application in front of users and gather feedback before the API exists. Creating short feedback loops like this is key to building great applications across distributed teams.

But to do all of this kind of work well, companies need a strong API strategy combined with the best API design and collaboration tools and services. And to do this well at scale, companies need these tools and services to be tailored for automation.

Implementing a Good API Strategy at Scale

It’s a collaborative effort to design, build, and operate APIs across an organization. This effort requires an API strategy with well-defined software development processes that help teams build APIs quickly, safely, consistently, and confidently. There is a lot of work to gather the right people, define a good strategy, get consensus across the organization on the chosen approach, and garner buy-in from product and development teams.

For an API strategy to succeed, companies need experienced API practitioners that can define and drive adoption for their API strategy. The right API strategy gives guidance to teams without compromising their agility and provides paths toward quality without compromising speed. The best long-term API strategies align with the overall business strategy of the company to drive customer value. Implementing an API strategy is not a one-off project. Rather it’s a complete change in the way a company builds software.

Automation is required to implement a good API strategy at scale. For instance, companies can use API standardization to help their teams build consistent and quality APIs. But without a way to automate the process of validating API definitions against company standards, it’s near impossible to help globally distributed teams building countless APIs to conform to the standards. Automation allows companies to manage by exception rather than requiring the centralized API team to review every tiny detail of an API design. This is where SwaggerHub and the new SwaggerHub CLI tool can help.

Automating an API Strategy with the SwaggerHub CLI

The SwaggerHub platform provides these much-needed tools, processes, and best practices that help companies define and drive a strong API strategy. With the new SwaggerHub CLI, teams can now interact with SwaggerHub during their automated workflows, whether in a build pipeline or other automation services. This is how companies do API strategies at scale.

With the entire suite of SwaggerHub tools, teams can design and collaborate on an API design using SwaggerHub’s editor, push that API definition into their development processes through SwaggerHub’s integrations with popular source control management services, and use the API definition to work in parallel to get quick feedback. They can now automate standardization and workflows throughout their entire process with the SwaggerHub CLI.

What are some specific scenarios where the CLI helps?

  • When a team is bootstrapping a new API project, they can use the CLI to automatically create new APIs in SwaggerHub along with the needed integrations. This can reduce the friction of starting new API projects and ensure teams use processes similar to other teams.
  • When a Code First team generates their OpenAPI file in a CI/CD pipeline, they can create a new version within SwaggerHub using the SwaggerHub CLI in their build pipeline. This can keep their API and documentation in sync with what’s deployed into production.
  • When developers collaborate in a code review, they can do a final standardization check before deploying to production. This prevents invalid designs and implementations from getting to production.
  • When a team deploys a new version of an API, they can use the SwaggerHub CLI to mark the deployed version as published. This ensures the documentation and API are aligned, helping create a better developer experience.
  • When a company has a developer portal, teams can build automation that uses the SwaggerHub CLI to pull down an API definition and deploy it to the developer portal. This ensures the most current version is available in the portal.

SwaggerHub and API definitions format like OpenAPI help close the gap between API design and the software development lifecycle. Teams can push API definitions into their development process and interact with SwaggerHub at different points in their workflows. This helps them automate the standards and processes for building high quality APIs.

Getting Going with Automation and the SwaggerHub CLI

Download the new SwaggerHub CLI and start building workflows with it in minutes. The SwaggerHub development team has been hard at work adding new features and will be adding more functionality in the coming months that helps the automation process. Please have a look and share your feedback in the GitHub repository.

In addition to the CLI, SwaggerHub provides integrations to many popular Git services like GitHub, Bitbucket, GitLab, and Azure DevOps that bridge the API design and development processes. SwaggerHub integrates with API gateways like Apigee, AWS API Gateway, and Azure API Management to aide in continuous deployments. And SwaggerHub provides integrations for generating client SDKs and server stubs that it can push into a Git repository on demand, speeding up the entire development process.  If you have questions about SwaggerHub integrations for Git or other source control management tools, check out the SwaggerHub Integrations page.

If you’re interested in how SwaggerHub can help you drive your API strategy at scale, take advantage of our free trial