Coder Social home page Coder Social logo

Comments (6)

tomkralidis avatar tomkralidis commented on August 17, 2024

Thanks @alexandreleroux. API HTML output is probably best realized by a Swagger UI. The problem is how to integrate this in the install. Any ideas @pvgenuchten / @justb4?

Another option is to have a configuration to point to an external Swagger UI like:

server:
    swagger-ui: http://petstore.swagger.io/?url=

Which an API HTML handler would 301 to https://petstore.swagger.io/?url=https://geo.weather.gc.ca/geomet/features/api

from pygeoapi.

justb4 avatar justb4 commented on August 17, 2024

Isn't this functionality what is also provided by Flasgger and https://github.com/gangverk/flask-swagger ?

from pygeoapi.

tomkralidis avatar tomkralidis commented on August 17, 2024

@justb4 I think flasgger and Flask-swagger are bound to classes in Python? pygeoapi is not setup that way. We have an offline workflow which generates the OpenAPI Description. The value here is that we are able to scan each dataset configured in pygeoapi and report attributes as OpenAPI parameters.

from pygeoapi.

justb4 avatar justb4 commented on August 17, 2024

ok, I see, also came bit later into the API/Swagger//PyGeoAPI game. From what I learned an external Swagger UI is "the thing"? That was probably a reason that Flask-Swagger forked from Flassger, so different approach.

But ok, so we need an external Swagger-UI? Maybe a Swagger-UI instance on a PyGeoAPI server/domain as discussed? Or we could dynamically generate annotated Flask .py Views from the configured datasets but that may be far-fetched...

from pygeoapi.

pvgenuchten avatar pvgenuchten commented on August 17, 2024

There is no python library (or webservice) which generates an api-documentation-page from an openapi-specification-document? For me it makes most sense to have the interactive-api-documentation at api?f=html and not on some external location. But as a start a forward rule to https://petstore.swagger.io/?url=https://geo.weather.gc.ca/geomet/features/api would give a same experience.

from pygeoapi.

tomkralidis avatar tomkralidis commented on August 17, 2024

Implemented in #101.

from pygeoapi.

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.