ontodev / sprocket

BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Allow Swagger endpoint as input #19

Closed beckyjackson closed 2 years ago

beckyjackson commented 2 years ago

Resolves #11

I also updated the base route / to be a list of available tables if no default table is provided.

From the docs:


Alternatively, you can provide the URL to a PostGRES Swagger endpoint, such as https://www.cmi-pb.org/api/v2. This will load all tables within the endpoint to browse. If you want to save the SQLite database file that is created, you can do so with -s/--save-database (this will fail if a file already exists at the given path). Otherwise, the database will be created at .temp.db and will be deleted on exit.

sprocket https://www.cmi-pb.org/api/v2 -s database.db
jamesaoverton commented 2 years ago

I'm getting an error: jinja2.exceptions.TemplateNotFound: index.html

beckyjackson commented 2 years ago

Sorry, fixed.

jamesaoverton commented 2 years ago

Sorry, this is not what I meant in #11. I don't want to download everything from the endpoint. I want to forward each request to the endpoint, receive the JSON response, then display that as HTML. I'll update #11 to clarify.