-
Notifications
You must be signed in to change notification settings - Fork 153
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
No documentation for creating associated record from grape entity documentation #169
Comments
I think @brahamshakti brings up a really valid point. Where are the documentation options documented? In the README, neither required or example ever show up. The options for Type never appear either. I'm happy to send a PR to update the documentation but where can I learn this in the code? |
Thanks for that @marshall-lee. |
Hey @marshall-lee thanks for the link but I think you may have misunderstood me. That's explains the documentation for the routes but not entities. My complaint was that the examples in grape-entity, it shows documentation for type and desc. Like so: expose :text, documentation: { type: "String", desc: "Status update text." } However, neither required or example show up in the README and the values for type don't appear (String, Integer, not sure what else). I don't think there are more options then required or example but I'm not 100% sure. I have no idea how type works. If you can point me to some code, I'm happy to try to improve the README myself. Also, follow up question based on your link: Grape README:
grape-swagger README: desc 'Get all kittens!', {
:hidden => true,
:is_array => true,
:nickname => 'getKittens',
:entity => Entities::Kitten, # use entity instead of success
:http_codes => [[401, 'KittenBitesError', Entities::BadKitten]] # use http_codes instead of failure
} Why does grape-swagger require entity/http-codes instead of success/failure? |
The meaning to this hash give the projects that use it. grape-swagger, for instance. BTW I don't know how Grape itself parses entity documentation too. I know how grape-swagger handles it, but don't know about grape. So if you want to contribute you should search for answers in grape and grape-swagger. |
Hi I don't know whether you understand my question or not. Two months ago I asked you a question like how do i send parameters for associations. If I write this
Then Please try to complete the syntax so that association fields are visible
|
8 Years later I was hoping to do exactly this.
Is this supported? I'm not sure using entities buys me anything if it doesn't handle request serialization as well as responses. |
it depends on other gems you want to use with |
Hi I don't know how to create an associated record from grape entity for. eg. I have two model
Event
andSetting
and their relation is like eventhas_one: :setting
and settingbelongs_to: :event
. Now while creating event usingMy entity class is
and
event_setting_entity
isI am able to create event using documentation but for setting how do I show field for setting. There is no documentation provide for this. Help me please. Thanks
The text was updated successfully, but these errors were encountered: