Sindre Røkenes Myren

Results 196 comments of Sindre Røkenes Myren

Writing on my phone so wikl correct the grammar later...

Some code links. ### Allow hidden fields to be included (could be first PR) Probably around here... https://github.com/rs/rest-layer/blob/3ffe90e45fe2868e3db8dd03c92d0729e9ddeea0/schema/query/projection_evaluator.go#L62 To allow the original use-case of `Hidden`, we can add a new...

Some minor points. > This will be inconvenient because in order to get a hidden field, one needs to enumerate all non-hidden fields needed. That is why I wanted this ...

Maybe a better name then `Secret` is `WriteOnly`? It becomes a bit funny (although perfectly valid) if you set both ReadOnly _and_ WriteOnly, but exept for that it might be...

Another option could be to replace the ReadOnly field with an enum: ```go type FieldMode const ( ModeReadWrite = iota ModeReadOnly ModeWriteOnly ModeNoAcces )

> By default fields can have `ModeRead | ModeWrite` Yeah, I thought about that. However, since it's Go, one extra consideration to have in mind is that all types have...

Otherwise it was a good proposal @Dragomir-Ivanov.

@Dragomir-Ivanov, FYI. What do you think?

Good ponits @Dragomir-Ivanov. If files are _omitted_ on `PUT` (a.k.a update), then yes, reset to default values. If they are explicitly set to `nil` on `PUT`, then _clear_ them. This...

PS! we might need to make sure that PATCH results _always_ serialize (the original) resource before calculating changes / base.