-
Notifications
You must be signed in to change notification settings - Fork 8
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 documentation for Farms #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done, mate! (Approved. Please consider my comments and note that you commited .idea
files, those can be ignored)
docs/field_boundaries_endpoints.md
Outdated
"id": "long", | ||
"name": "str", | ||
"providerName": "str", | ||
"providerFarmId": "UUID", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this from the response? It's unnecessary, from my perspective....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am referring to "providerFarmId", this is the id of the farm on the provider right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is. Why unnecessary? datasync can create farms, so they will have this attribute set
docs/field_boundaries_endpoints.md
Outdated
{ | ||
"id": "long", | ||
"name": "str", | ||
"providerName": "str", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to define if the convention will be "providerName" or "provider"... we have both now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. I vote for provider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good job! I added a few comments/questions I would like to know before approving 😄
docs/field_boundaries_endpoints.md
Outdated
</Tabs> | ||
|
||
|
||
### `DELETE users/{leafUserId}/farms/{id}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this delete only at Leaf or at the provider as well? I suppose only at Leaf, but then we pull it again in 30 minutes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Only at leaft" for the 1st question. "Maybe" for the 2nd. If that farm was created from pooling then yes, we do will create it again. We know 0 real use case for datasync, so I think documenting this kind of endpoint are 100% a product decision. The fact is that all endpoint that allows writting are conflicting with datasync. Currently we're simply ignoring this fact.
docs/field_boundaries_endpoints.md
Outdated
</Tabs> | ||
|
||
|
||
### `POST users/{leafUserId}/farms` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add fields to farms on farm creation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, although we can add a farm to a field on field creation. Does this functionality you're asking about make sense?
docs/field_boundaries_endpoints.md
Outdated
</Tabs> | ||
|
||
|
||
### `PUT users/{leafUserId}/farms` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add fields to farms on farm update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope
Add two /growers endpoints
This PR is to add documentation for Farms. While we were working on it, we noticed that we still need to implement multi-tenancy on Farm and Growers before it's safe to make the documentation available. Here's the work on the documentation so far, it'll be improved once multi-tenancy is implemented.