Postgrest: Swagger/OpenAPI JSON only contains RPC endpoints

Created on 13 Sep 2017  路  3Comments  路  Source: PostgREST/postgrest

Hi,

I'm trying to figure out how to access the full OpenAPI docs for the database that I've built. When I access http://localhost:3000/ or http://localhost:8080/rest/ all I get back are the custom RPC calls that I've created.

I've set my Accept header to application/openapi+json when making these requests.

Is there a way to get the full database spec for use in Swagger-UI?

Thanks

Most helpful comment

@kishyr and @ruslantalpa !

Do you have any tips/suggestions about how I can configure swagger-ui so that a user could provide a JWT token to the Swagger interface and have it re-fetch the spec from PostgREST (so that they can see all the endpoints they are allowed to interact with)?

All 3 comments

@kishyr the opneapi output depends on the privileges of the user making the request, you need to send also a jwt token

the fact that you see the RPCs is a bug that is being fixed in #970

Thanks, it works! This is just what I needed

@kishyr and @ruslantalpa !

Do you have any tips/suggestions about how I can configure swagger-ui so that a user could provide a JWT token to the Swagger interface and have it re-fetch the spec from PostgREST (so that they can see all the endpoints they are allowed to interact with)?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

opensrcery picture opensrcery  路  39Comments

gmiddleton picture gmiddleton  路  23Comments

posix4e picture posix4e  路  34Comments

dudleycarr picture dudleycarr  路  25Comments

eric-brechemier picture eric-brechemier  路  27Comments