-
Notifications
You must be signed in to change notification settings - Fork 65
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
Lack of example field in Swagger Property
s?
#181
Comments
No particular reason it was omitted. Your commit adds support in the swagger representation, but to be useful it would also need to be settable in the route construction API. If this is a feature you're interested in working on, I'm certainly not opposed to another great PR or two. 😄 |
Hmmm... I'd love to take a whack at it, but I'm probably going to need some guidance from you or other more experienced Rho people about the best way to integrate this into the existing Rho code. From what I understand of the route construction API and Swagger (which again is very little), it seems like this isn't something that would be directly addressed in the route construction, but rather is something that needs to happen at the model level, i.e. with some sort of custom On the upside I think #183 lays some of the foundation for this, but it doesn't seem quite enough. It seems like to do this well, you'd want some nice way of constructing and composing custom I'm also wary of hitching this on such an ambitious change when I both don't understand the Rho codebase (or even its public API) all that well and when I suspect you might be able to get examples working without needing to embark on a long journey with a high risk of noncompletion... Thoughts? Go for a general approach or is there some sort of specific thing I could do here that would could get this done quite simply? Or maybe the general approach is already there and I could just piggy-back off that (or maybe the general approach isn't even that difficult to begin with)? |
Oh never mind, I missed the fact that we want this at the type level, not the value level. In which case it might already be enough to just expose |
It would definitely be a challenge, but if you want, a first step would be to surface the swagger Java API in our own. Worst case: it goes unused. |
Did you mean surfacing it in some other way than just in |
Rho's Swagger
Property
doesn't have anexample
field whereas theProperty
interface in theswagger-models
does have agetExample
andsetExample
. I think this shows up for example in how Swagger-UI is able to construct an example for a piece of JSON by concatenating together the examples for each of its constituent parts.Is there any reason that was omitted? If not is adding it any more complicated than this commit?
Rho and Swagger noob here so trying to make sure I'm not overlooking something.
The text was updated successfully, but these errors were encountered: