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.

Discussion: Should SpectaQL break away from Swagger / OpenAPI?

See original GitHub issue

SpectaQL’s roots come from Dociql, which comes from Spectacle.

Spectaqle’s docs state:

Spectacle generates beautiful static HTML5 documentation from OpenAPI/Swagger 2.0 API specifications.

Because of this, there is a LOT of Swagger/OpenAPI specific stuff going on under the hood in SpectaQL:

  • The GraphQL schema is converted in to a JSON Schema…
  • There are many terms and handlebars templates that follow a JSON/Swagger naming and structuring convention…
  • etc…

I’ve been developing SpectaQL for a while now, where I’m pretty confident that I want to throw away all of the legacy JSON/Swagger/OpenAPI internals as much as possible.

It’s just a headache to squeeze things into the JSON Schema, and there are loopholes and caveats and workarounds starting to pop up more and more, and really there’s not much more that I need other than an Introspection Query object and a GraphQL schema (one can be generated from the other, and vice versa).

There’s also really not much that’s exposed to the user anymore that is Swagger-esque. Only a few of the silly parts of the config.yml (servers and info) still resemble or come from the Swagger/OpenAPI…but they’re very generic things that are stored in there.

Sure, there are some internals that still boil things down to Swagger, but they’re private and not supposed to be touched by userland.

Shall I rip it all out and revamp things when I’ve got the time?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:34
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
AubSscommented, Nov 6, 2021

Definitely, Swagger/OpenAPI don’t seem to be useful for graphql.

By the way, you’ve created a great product!

1reaction
newhousecommented, Apr 4, 2022

Our fork is for some custom internal integrations to add some extra links into the docs for finding source resolver info that’s specific to a custom GQL server implementation we use. Nothing particularly useful for the community as a whole on its own. However, a pluggable/extensible architecture could go a long ways in making it easier to extend v. fork in the future (if it doesn’t exist yet?). Looking forward to checking out your work in 1.0!

@mcwoodle you might be able to accomplish what you want with:

  • Intro Items
  • Or, by creating a lightweight “theme” of your own where you edit/add the appropriate Handlebars template file.

Good luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing SpectaQL 1.0 - an even better way to ... - Anvil
And (finally) Spectacle was designed to work with Swagger/OpenAPI. ... up rolling out major breaking changes too frequently, you should also ...
Read more >
OpenAPI Specification - Version 3.0.3 - Swagger
The OpenAPI Specification defines a standard interface to RESTful APIs which allows both humans and computers to understand service capabilities without ...
Read more >
Creating Static Documentation For GraphQL APIs Using ...
Documentation for any GraphQL API starts with an introspection query, a simple but powerful way to explore any GraphQL API. The introspection ...
Read more >
Using OpenAPI and Swagger UI - Quarkus
This guide explains how your Quarkus application can expose its API description through an OpenAPI specification and how you can test it via...
Read more >
ReadMe: OpenAPI and Swagger for API Documentation
A Swagger or OpenAPI document describes your APIs so you can keep them ... These are two separate, but very much related, specifications...
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