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

Generate client modules from spec? #5

Open
michallepicki opened this issue Jul 27, 2021 · 3 comments
Open

Generate client modules from spec? #5

michallepicki opened this issue Jul 27, 2021 · 3 comments

Comments

@michallepicki
Copy link

Hi!

I saw that other similar projects (playwright-sharp and others) generate the client modules from playwright API specification JSON file.

Is there plan to do the same here? There are multiple ways to do that in Elixir I think, one could be an approach similar to what chrome_remote_interface Elixir package does.

@coreyti
Copy link
Member

coreyti commented Jul 27, 2021

Hi @michallepicki,

Thanks for reaching out... great question/suggestion. We'd been holding off on code generation while learning how to go about this, but do like the idea and it feels like it's now probably about time to implement.

We'll take a look at that example and see what we can do to get started. Also, happy to take PRs :)

@hubertlepicki
Copy link

I was looking at this task and, not wanting to discourage you, gave up when I was doing my internal experiment with playwright and elixir. The major problem for me was that the API Playwright exposes is really Object Oriented in nature, making the translation not as natural as it is in Ruby, JavaScript or C#. Really curious what you come up here :)

@coreyti
Copy link
Member

coreyti commented Aug 4, 2021

That's a good point, @hubertlepicki, and something I've struggled with from time to time: when to make things look more like Playwright vs. when to make them more like Elixir.

So, I think that, for now, we'll probably continue with manual additions/fixes until getting close to feature parity. Then we can use the insights gained to see what sorts of automated generation would make best sense.

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

No branches or pull requests

3 participants