Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My version #20

Open
wayland opened this issue Oct 22, 2023 · 3 comments
Open

My version #20

wayland opened this issue Oct 22, 2023 · 3 comments

Comments

@wayland
Copy link
Contributor

wayland commented Oct 22, 2023

Hi all!

As per the discussion at PostgREST/postgrest#1698 (comment) , I'd started working on something similar before I knew this repo existed.

I was going a slightly different direction, in that I was using PL/pgsql (happy with the direction this project's going though).

Unfortunately, I seem to have implemented just about the exact same features, with a few differences

  • I added a table for defining servers, so that if people want to define extra servers as per https://spec.openapis.org/oas/v3.1.0#server-object-example (the multi-server example), they can. However, this assumes that we want config in the database.
  • I assumed that the API version was not the version of PostgREST, but the version of the API itself -- every time the JSON text for the API changed, the version number should change. I hadn't really implemented that side, but I had implemented an "x-software" block that contained the version of PostgREST.

If you're interested in having either of those pieces in this, let me know and I'll see what I can do.

Thanks!

@laurenceisla
Copy link
Member

laurenceisla commented Oct 23, 2023

Hi there! Glad to have you collaborating to the project!

I was going a slightly different direction, in that I was using PL/pgsql

I think we'll need to use the PL/pgsql language for more complex queries than the ones we have now (e.g. to get the embedded resources info), so it's OK to use it.

I added a table for defining servers, so that if people want to define extra servers [...] However, this assumes that we want config in the database.

I was thinking about moving the configuration variables related to OpenAPI from PostgREST to table/function in this extension, it may be defined as JSON values and the servers could go here. I'm not sure if this is the way to go, though, but you can implement it with the table as you mentioned and we can adapt it later if we need to.

I assumed that the API version was not the version of PostgREST, but the version of the API itself -- every time the JSON text for the API changed, the version number should change.

Ah, you're right, it distinguishes the API implementation from the document version (emphasis mine):

The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).

So, yeah, x-software would be better here. Go for it!

@wayland
Copy link
Contributor Author

wayland commented Nov 4, 2023

While I'm at it, where do the PostgREST dev people hang out? I've gone to #postgrest on FreeNode (still there), and it didn't exist. Is there somewhere else where people hang out?

I'll usually only be active on Saturdays in Australia.

For the record, the Servers stuff is coming along nicely.

HTH,

@steve-chavez
Copy link
Member

While I'm at it, where do the PostgREST dev people hang out? I've gone to #postgrest on FreeNode (still there), and it didn't exist. Is there somewhere else where people hang out?

We have https://app.gitter.im/#/room/#begriffs_postgrest:gitter.im, which uses Matrix. I've seen some IRC/Matrix bridges too.

For the record, the Servers stuff is coming along nicely.

Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants