-
Notifications
You must be signed in to change notification settings - Fork 692
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
Add models
support to Swagger output
#4
Comments
Yes, I knew this request was coming soon or later. At the time of writing, this part was not trivial to do. I will have a look at it again. |
Still not trivial, I think. Implementing json-schema standard doesn't sound hard, but maybe quite a bit of tedious work. My company may be willing to hire a contractor to build this support - no guarantees tho. |
just begun working on a straightforward implementation using Go reflect package. See how far I can get without the full blown json schema. |
there is an implementation of json schema pretty far along. |
I am thinking about providing a way to attach externally stored models (like User.model.js) to the generated API swagger json. Then at least, there is no package dependency with gojsonschema and such a model.js can be created in any way the developer sees fit. |
Currently the
models
field of an API declaration is not generated. Vestigial support is included in theRouteBuilder
andswagger.Api
types. Themodels
field could be populated insidegetDeclarations()
.The hard part is generating the json-schema description of the models. Probably best to implement that as a separate library. It can work kinda similarly to
json.Marshal()
.The text was updated successfully, but these errors were encountered: