Replies: 1 comment 3 replies
-
Very interesting indeed! Worked for me to get a client generated and, you're right, it gives a pretty impressive set of generated classes. I wonder if it could be used just to generate models. That's one of the main drawbacks on getting people onboarded to postgrest-csharp I think - there is too much time spent manually parsing through models and defining key/value relationships. To me, it seems like this would be most useful as a separate cli app that would leverage the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As an experiment, I decided to try using the OpenAPI csharp generator with PostgREST. Here's the PostgREST info on OpenAPI support.
I was pretty impressed with my initial experiment. I was able to fetch the OpenAPI configuration details from my project with the following:
I saved that JSON file to a directory as api.json.
I installed the OpenAPI generator tool via brew.
I then used this config file as config.yaml:
Running
openapi-generator batch config.yaml
then produced quite a few files that matched up to the APIs I've been generating, including everything from the client code, models, and what looks like test cases.It looks like the generator is using Mustache for templating, and it's using RestSharp to build the client.
Any thoughts on using any of this stuff with Supabase? Either generating/customizing the generated output, and/or using it in addition to or instead of the supabase-postgrest client...?
Beta Was this translation helpful? Give feedback.
All reactions