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 form with openapi schema #87

Closed
Garito opened this issue May 18, 2020 · 4 comments
Closed

Generate form with openapi schema #87

Garito opened this issue May 18, 2020 · 4 comments
Labels
feature request New feature or request

Comments

@Garito
Copy link

Garito commented May 18, 2020

Describe the new feature you'd like
Be able to generate the form with an openapi v3+ schema

What percentage of vue-formulate users would benefit?
Everyone that uses OpenAPI

@Garito Garito added the feature request New feature or request label May 18, 2020
@andrew-boyd
Copy link
Member

@Garito I'm not particularly familiar with openapi or how it would assist with generation. Would you mind clarifying what use case you're solving for?

@Garito
Copy link
Author

Garito commented May 20, 2020

The point is not to invent the wheel everytime
Since openapi is the standard for api description and it includes schema description, seems logical to me not to invent a format and use the standard instead
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#schemaObject
It has everything you need to automatically build your gui's forms or it has a mechanism to pass the data anyway

@justin-schroeder
Copy link
Member

Thanks for the suggestion @Garito. I think I agree this would be a great value-add for the community. I think I see this happening in 2 steps. First, we need a more robust form generator solution — per #89. This expected JSON data will probably take the shape of the <FormulateInput> to:

  1. Reduce size
  2. Be really easy to hand-write JSON for.
  3. Be really easy to understand

Once that feature is implemented, then I could see an plugin for OpenAPI that effectively just transforms the data conforming to OpenAPI spec into "Vue Formulate" spec. That makes it a relatively small plugin, and keeps the spirit of Vue Formulate.

Great suggestion, thanks!

@justin-schroeder
Copy link
Member

justin-schroeder commented Jun 18, 2020

Would love to see someone write a plugin for this. The documentation for the now-supported schema is available here: https://vueformulate.com/guide/forms/generating-forms

In the meantime i'm closing this issue since openapi is not something we'll be directly implementing, again — would be awesome to see community contribution around it.

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

No branches or pull requests

3 participants