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

Make use of Angular Schema Form to edit the request body #18

Open
guillemcanal opened this issue Oct 31, 2016 · 3 comments
Open

Make use of Angular Schema Form to edit the request body #18

guillemcanal opened this issue Oct 31, 2016 · 3 comments

Comments

@guillemcanal
Copy link

Basically, Angular Schema Form turn JSON Schemas into forms.

Since Swagger use a subset of JSON Schema to describe request and response bodies, it can be trivial to implement.

The tricky part is to handle content negociation properly on the request side of things. In fact, a Swagger definition may be converted into JSON, XML or into form "urlencoded" data depending on the consumes property.

BTW, nice work ;)

@darosh
Copy link
Owner

darosh commented Nov 16, 2016

@guillemcanal OK, schema related idea sounds reasonable, but "Angular Schema Form", at first sight seems to be defined as "Schema Form is a set of AngularJS directives (and a couple of services) to generate Bootstrap 3 ready forms from a JSON Schema." and we do not use Bootstrap 3 here so it is probably unrelated, am I right?

BTW, thanks!

@guillemcanal
Copy link
Author

I have to confess that I'm not very fluent in Angular but SchemaForm seems to be very close to the json-editor library, which is the one used by the original swagger-ui.

Regarding Bootstrap 3, It seems that the library support Material UI: https://github.com/json-schema-form/angular-schema-form-material

@darosh
Copy link
Owner

darosh commented Nov 16, 2016

@guillemcanal thanks for explanation, there is similar way the form is generated, by template https://github.com/darosh/angular-swagger-ui-material/blob/master/src/modules/detail/request/parameter.html , but you probably had some missing feature in mind when you wrote this, had you? what was it?

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

2 participants