Closed thilak009 closed 1 year ago
Name | Link |
---|---|
Latest commit | f2899a176f2d51709041239799663d1e8706fde6 |
Latest deploy log | https://app.netlify.com/sites/opal-docs/deploys/64ac4e7f065fff000844b2e3 |
One more thing is, OPA does not support
move
operation as a JSON patch operation, refer discussion and hence OPAL would also not support it what would be a good place in the docs to mentions this as a NOTE ?
I think this can go together with the full docs for this feature as a section in the data-updates tutorial and perhaps a quick reference in the data-sources article
I liked your solution to OpaClient's data cache. Unfortunately we don't have unit tests for it - have you tried (manually) testing the backup feature? (OFFLINE_MODE).
yep, i checked the updates in the JSON file manually when OFFLINE_MODE
is enabled
also as Or Weis mentioned, adding this comment I am authorizing this contribution to open source
Changes proposed
Add support for
PATCH
as asave_method
, currently onlyPUT
is supported as asave_method
JSONPatchAction
to validate and read JSON patch operationspatch_policy_data
to opal_client which does a PATCH API call to OPAset_policy_data
orpatch_policy_data
respectivelycustom_encoder
for using it as the default encoder for doingjson.dumps
on the Union typeJsonableValue
to ignore default fields values and dump based on alias nameCheck List (Check all the applicable boxes)
Note to reviewers
Need thoughts/help on if there is a better way to do
custom_encoder
implementation, haven't used pydantic beforethe reason i used it was because FastAPI does by default print response using JSON alias names but we are not returning response from FastAPI server but rather feeding the model directly to OPA in which case the field name would be used when doing a
json.dumps
instead of alias nameand also to remove default
None
value populated fields from the dumped JSON for any request that matches theJSONPatchAction
typeOne more thing is, OPA does not support
move
operation as a JSON patch operation, refer discussion and hence OPAL would also not support it what would be a good place in the docs to mentions this as a NOTE ?