https://cerbos.dev logo
#help
Title
# help
b

Bradey Wood

11/20/2023, 4:22 PM
Question: can you set a version in a schema?
c

Charith (Cerbos)

11/20/2023, 6:25 PM
No. You could emulate it by naming the schema
schema_v1.json
,
schema_v2.json
etc. and changing the schema references in the policy to the correct one.
b

Bradey Wood

11/21/2023, 11:05 AM
i am doing that right now, but it's a PITA to manage. Any plans to support this in the future?
c

Charith (Cerbos)

11/21/2023, 11:17 AM
You could also use subdirectories like
v1/schema.json
to organize them -- if that makes things easier. We haven't really considered explicit versioning for schemas because they usually tend to get shared a lot more and the changes are mostly additive in nature.