I couldn't find any resources on the use case differences between JSON:API & OpenAPI
From my understanding, JSON:API is more focused on the business data while OpenAPI is more about REST itself?
Any pointers would be great, thanks!
REST APIs vs. The most common open API architectures fall into two categories: REST APIs and SOAP APIs. SOAP and REST offer different methods to invoke a web service. SOAP-based APIs typically use XML as a data exchange format, while RESTful APIs typically use JSON back and forth.
OpenAPI Schema is a Vocabulary of JSON Schema 2020-12 The OpenAPI Schema Object is a JSON Schema vocabulary which extends JSON Schema Core and Validation vocabularies. As such any keyword available for those vocabularies is by definition available in OpenAPI, and will work the exact same way. Booyeah.
OpenAPI and Swagger used to refer to the same thing. While there are differences today (OpenAPI refers to RESTful API design and Swagger refers to a set of SmartBear tools), this blog will use the terms interchangeably. If you develop software today, chances are you are developing web APIs as well.
Swagger supports only subset of JSON Schema Draft 4 Specification of Swagger 1.2 and 2.0 states, it supports only subset of JSON Schema Draft 4 (s. here). This means, that: one cannot rely, that each valid JSON Schema can be completely supported by Swagger.
You can use OpenAPI to describe API's, and JSON:API is a standard to structure your apis. If you use JSON:API, you can still use OpenAPI to describe it.
So OpenAPI's goal is really to provide a full description on how your API can be called, and what operations are available. JSON:API gives you a strong opinion on how to structure it.
Think about it as OpenAPI
is a “Data Format” and JSON API
is a “Data Contract”.
More on this here: https://apisyouwonthate.com/blog/json-api-openapi-and-json-schema-working-in-harmony
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With