viraptor
14 days ago
While is a cool idea on its own, I don't get why they try to reinvent it as a new system. We've got swagger, openapi, graphql and many other systems that already describe the APIs. They mostly include documentation too. Why not just expose those for the same effect? (If I was cynical, I'd guess Vercel wanting a proprietary thing of their own just for less portability)
grrowl
13 days ago
It's the vercel way. There have been plenty of experiments leading up to this (even by vercel employees before they joined) but re-packaging it as "the" solution, rather than just a tool renderer from props (tool schema)
crubier
13 days ago
OpenAPI, JsonSchema, GraphQL all describe *Data*.
This describes *User Interfaces*. The closest alternative would be to just return React JS code directly.
But this adds a layer of constraint and control, preventing LLMs to generate e.g. malicious React JS code.
viraptor
12 days ago
Yeah, that's kind of what I mean. This way will always be restrictive and not flexible enough. We could get some style guidelines injected instead without other restrictions. Let people use all the API access possible instead.
altern8
14 days ago
OpenAPI is great, there are a lot of tools to go from OpenAPI to UI, but you don't have a lot of control over the presentation.
For instance, you can specify that "first_name","last_name" and "email" are strings, but not that first/last name should be next to each other and email in its own row.
There are supersets of OpenAPI that can control the look and feel more. JSON Forms, for instance.
This is cool, too, though.
css_apologist
14 days ago
those describe server APIs
how would it relate to ui?
altern8
14 days ago
OpenAPI is a superset of JSON Schema. You can look at properties in JSON Schema and turn that into UIs.
For instance, strings would get a text box, enums would get a dropdown, etc., with validation and everything.
Check this out as an example: https://prismatic.io/docs/jsonforms/playground/