How do I add an Arazzo specification to my Open API spec?

How do I add an Arazzo specification to my Open API spec?

The Arazzo Specification is an add-on to the OpenAPI Specification. If you have no idea what Arazzo is, start with this article first: What is the Arazzo Specification?

Introduction

An Arazzo Specification can refer to multiple OpenAPI Specs as well as other Arazzo Specs. Using these references it can do the following:

  • Reference endpoints within external OpenAPI Specs
  • Reference workflows within itself or external Arazzo Specs

How to reference external specs from within Arazzo?

The Arazzo Specification schema defines a field called sourceDescriptions that can contain multiple Source Description Objects with the following keys: name, url and type.

Here is an illustration of an Arazzo Spec with a Source Description:

Key Description
name* This is a unique identifier for a source description.
url* A url to a referred OpenAPI/Arazzo spec. It is allowed to be either relative or absolute.
type “openapi” or “arazzo” (Note: This field is not marked required within the Arazzo Definition which leads me to conclude that if this field is not set, it should be inferred based on the referenced spec in the url)



Example: Reference OpenAPI Spec from within Arazzo

Assume there exists a service called Weatherly whose APIs you can use to fetch global weather data. The following two YAML files are associated with this service and live within different folders:

  • OpenAPI Spec: src/specs/main/weatherly.openapi.yaml
  • Arazzo Spec: src/specs/add-ons/weatherly.arazzo.yaml

This diagram illustrates how the OpenAPI Spec can be referenced within the Arazzo Spec:

How does Arazzo reference endpoints within the OpenAPI Spec?

An Arazzo Spec can reference OpenAPI Spec endpoints in Step Objects within the steps field using operationId or operationPath. operationId and operationPath are mutually exclusive i.e. only one if these is needed to reference an endpoint. In case both are added, operationId takes precedence. The following diagram illustrates the use of operationPath:

Let’s break down the operationPath value:

  • $sourceDescriptions: A reference to the sourceDescriptions object that contains references to external specs
  • $sourceDescriptions.weatherly-apis.url: This resolves to the url of a sourceDescription with name weatherly-apis that points to an external OpenAPI spec.
  • $sourceDescriptions.weatherly-apis.url}#/paths/~1getCityTemperature/get: Points to the GET operation of /getCityTemperature endpoint within the external OpenAPI Spec. Please note that in JSON Pointer syntax, ~1 is used to represent a forward slash (/) within a key.

For more information, check out the detailed Arazzo Specification here

Written by Ronil Mehta

Written by Ronil Mehta

Jun Sat 2024

More Blogs like this

An Arazzo Specification can refer to multiple OpenAPI Specs as well as other Arazzo Specs.

The existing Open API Specification deals with description of rest endpoints, while the Arazzo Specification deals with describing a sequence of calls to these endpoints to reach certain outcomes.

Number of products

(In Standard plan, Portle provides its users an option to create API documentations for up to 2 products, making it easier for you to manage your product’s documentations with just one account.)

Fully Customisable Branding feature

Portle’s users have the option to customise:

  • logo
  • Navbar,
  • dynamic link manager (customisable entirely)
  • version management border
  • Favicon
    All these can be customised with different colours & combinations.

Number of products

(In Standard plan, Portle provides its users an option to create API documentations for up to 2 products, making it easier for you to manage your product’s documentations with just one account.)

Provides API References

If you upload an OpenAPI spec based file, Portle will create the API reference doc for you! You can even directly create a spec based doc in minutes using Portle’s Lite-UI.

Published versions

Portle has no limitations for its users to publish versions of their documentations

Number of products

In free plan, Portle provides its users an option to create API documentations for one product

Support

(Portle provides its customers with premium plan a dedicated support representative, providing resolutions to your queries in no time.)

Support

Portle provides its customers with free plan access to priority slack channels - Customer care priority, feature request priority along with traditional mode of support.

Fully Customisable Branding feature

Our custom branding feature helps you create user-facing documentation that looks like an extension to your brand’s identity.

WYSIWYG Workspace

What you see is what your customers are going to see. Your Portle workspace and final output look the same, reducing back and forth between editing and previewing your docs.

Includes free Premium trial

Portle Provides free 14 days premium trial, no credit cards required

Manually edit API References

Portle allows the user to manually edit their API references , you can also use our “lite view” feature to easily add/edit your API references

Release notes

Portle's release notes feature provides a detailed log of updates and changes to your software, keeping your users informed.

Provides API References

If you upload an OpenAPI spec based file, Portle will create the API reference doc for you! You can even directly create a spec based doc in minutes using Portle’s Lite-UI.

Number of products

In premium plan, Portle provides its users an option to create API documentations for up to 4 products, making it easier for you to manage multiple product documentations with just one account.

Amazing Support

Portle provides its customers with premium plan a dedicated support representative, providing resolutions to your queries in no time.

Fully Customisable Branding feature

Our custom branding feature helps you create user-facing documentation that looks like an extension to your brand’s identity.

Includes free Premium trial

Portle Provides free 14 days premium trial for its first time users, no credit cards required.

WYSIWYG Workspace

What you see is what your customers are going to see. Your Portle workspace and final output looks the same, reducing back and forth between editing and previewing your docs.

Mobile supported versions for end user documentation

Portle provides mobile support for its end user documentation with a good looking & easy to navigate through user interface.

Allow both Open API Spec & Custom Spec

Portle provides support for both Open API Spec & Custom Spec.

Release notes

Portle provides its users with “Release notes” feature that helps in keeping logs & communicate about the technical changes to their products.

Validate API Documentations

With Portle, users can easily validate their API documentations directly through

Custom Domain Feature

Portle provides you with the option to add your own custom domain to your documentation making it an extension to your product.

Provides API References

If you upload an OpenAPI spec based file, Portle will create the API reference doc for you! You can even directly create a spec based doc in minutes using Portle’s lite-UI.

We use Cookies for essential website functions and to better understand how you use our site, so we can create the best possible experience for you.