question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How does swagger-spec relate to hyper-media schema?

See original GitHub issue

It seems to me that several swagger properties are actually implemented into the hyper-media schema but with different conventions (e.g. links [0]) . I’m wondering what are the reasons to use proprietary specifications (i.e. what swagger does and hyper-media can’t ).

[0] http://json-schema.org/latest/json-schema-hypermedia.html#anchor35

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
handrewscommented, Oct 27, 2017

@ePaul @themihai if you are still interested in this, I am on the verge of publishing draft-07 of Hyper-Schema

This includes several new features including for working with request and response headers and content negotiation. It also has a top-to-bottom rewrite to explain its purpose more clearly, and generally read better. You might find the new introduction and overview to be relevant.

Hyper-Schema and OpenAPI are definitely looking at slightly different problems. If Hyper-Schema draft-07 is well-received, it may be worth looking at whether and how they might fit together. But it’s probably best for Hyper-Schema needs to prove itself useful (or not) on its own first.

0reactions
silkentrancecommented, Aug 3, 2018

I think that this is basically a data modelling issue. Whether or not your data supports the hyper-schema is up to the developer of the api. Of course, it would be nice to have a common set of mixins that one could use to model one’s data types, e.g.

components:
  Foo:
   allOf:
     - type: hyper-schema-object
     - type: object
        ...

The hyper-schema-object then could be a built-in of and also a hint to the code generators when generating required code.

I just found out that over at Swagger they already have something like that https://swagger.io/docs/specification/links/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Links - Swagger
This way, links provide a known relationship and traversal mechanism between the operations. The concept of links is somewhat similar to hypermedia, but...
Read more >
Thoughts on REST APIs: Open API v. Hypermedia | Dan Klco
With the dependencies included, you can add the Swagger annotations to auto-generate a Swagger spec for the service by decorating the parameters ......
Read more >
Designing REST API with Open API Specification (OAS) v2.0 ...
Swagger is a tools ecosystem built around OpenAPI specification. ... The schema folder under openapi-3.0 contains the specification file ...
Read more >
A Visual Guide to What's New in Swagger 3.0
Swagger now supports more of JSON Schema (oneOf, anyOf, not, nullable, deprecated, writeOnly), and clarifies JSON References a bit. URL ...
Read more >
Exercise 3: API Documentation and Hypermedia - Lovelace
(that is, in our case - OpenAPI can be written in JSON too.) OpenAPI does adjust the definitions of some properites of JSON...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found