DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. Databases
  4. API Blueprint Evolving Where OpenAPI Spec Falls Short

API Blueprint Evolving Where OpenAPI Spec Falls Short

API Blueprint is an API definition format, and it's shifting, causing an evolution in API design. Learn about body payload, and multiple media type support.

Kin Lane user avatar by
Kin Lane
·
Jan. 29, 16 · Analysis
Like (2)
Save
Tweet
Share
5.31K Views

Join the DZone community and get the full member experience.

Join For Free

Z (@zdne) over at Apiary published a pretty interesting blog post before Christmas which highlights two important elements of profiling APIs using popular API definition formats. Z is key to the vision behind API Blueprint, one of the top 3 API definition formats, that are fueling API design in 2016. 

Giving the Body Some Love

One common complaint I've seen on forums, issue threads, and other places API developers hang out, is that OpenAPI Spec does not allow for properly describing the request body payload. I definitely agree with this but is something that doesn't often impact me, as the type of APIs I am currently deploying, rarely employ a very complex body payload. However, I do know some APIs that I've documented, where if you can't properly define the body, the API appears to have no value whatsoever, when described using an OpenAPI Spec.

It was good to hear Z state:

"In 2015, we have spent most of the year building only one feature--the description of body parameters. This feature is also know as the MSON syntax." - Z (@zdne)

Acknowledging Media Types

The next significant area Apiary is addressing with API Blueprint and MSON is when it comes to supporting multiple media types, and making sure they are properly described in the API definition--MSON, 

Z talks about how "MSON isn't another syntax for JSON. MSON is agnostic to serialization media types. With MSON, I can describe the data and defer the decision whether they will be sent as JSON, XML, or HAL over the wire."

I will be learning more MSON in January, and reacquainting myself with API Blueprint, as I document my APIs stack(s), but also specifically two of my APIs that provide JSON, HTML, and Siren media types. Hopefully, this will allow me to also document the growing number of hypermedia APIs available across the space.

Media types and body are two areas that OpenAPI Spec (aka Swagger) is deficient. Something that gives Apiary a pretty interesting head start when it comes to two pretty fundamental building blocks of the web, and, therefore, APIs. I was going to start using vendor extensions, to begin playing around with content-type negotiation in my OpenAPI Spec files, but I might just invest my energy into sharpening my API Blueprint skills, and definition repository instead.

API

Published at DZone with permission of Kin Lane, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • AWS CodeCommit and GitKraken Basics: Essential Skills for Every Developer
  • How To Set Up and Run Cypress Test Cases in CI/CD TeamCity
  • How We Solved an OOM Issue in TiDB with GOMEMLIMIT
  • How To Best Use Java Records as DTOs in Spring Boot 3

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: