Coder Social home page Coder Social logo

Comments (6)

jbandhauer avatar jbandhauer commented on July 26, 2024

The doc you found is a snapshot that is only intended for the minimal sanity-check testing in those test. (Note that the 'real' tests of the underlying sdk semantics live in the extensive Looker tests that are not publicly available - this SDK is intended to be generic and work with almost any valid swagger compliant server - which might have completely different semantics compared to the Looker server.)

It is assumed that people who want a real swagger.json for any specific version of Looker will fetch that doc from a live server (and perhaps then save it locally for future use or whatever). This is trivially easy from a browser or curl or whatever for any server that exposes the swagger.json publicly from
https://yourcompany.looker.com:19999/api/3.0/swagger.json. For a server that requires an api login to see the api docs, one can capture the doc using the chrome inspector after logging in to the api docs page. The api docs page will fetch the doc fresh every time one hits the 'Load' button and the text will then show up in the chrome inspector and can be copied and pasted.

Importantly, the swagger doc is also available from any logged-in sdk as 'sdk.swagger' in ruby hash form. So, from the sdk shell you can save the doc to file as json by simply doing:

File.write("swagger.json", sdk.swagger.to_json)

from looker-sdk-ruby.

githoov avatar githoov commented on July 26, 2024

Wow—this is killer!

from looker-sdk-ruby.

indranisenacn avatar indranisenacn commented on July 26, 2024

Even in the live Looker instance, unable to find Query API in swagger. Is this due to permission issue? Thanks!

from looker-sdk-ruby.

githoov avatar githoov commented on July 26, 2024

@indranisenacn did you try https://yourcompany.looker.com:19999/api/3.0/swagger.json ? If that doesn't work, you may try making the docs, at least temporarily, not require api credentials to view:

image

from looker-sdk-ruby.

indranisenacn avatar indranisenacn commented on July 26, 2024

Hello @githoov, it does work now. The issue was version of the Looker instance that we were using, we have now upgraded to 3.28 and I am able to see Query API. Cheers!

from looker-sdk-ruby.

githoov avatar githoov commented on July 26, 2024

Nice!

from looker-sdk-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.