Skip to content

Commit

Permalink
fix: store file schema (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhamzeh authored Nov 3, 2023
1 parent 507f88c commit 2789085
Showing 1 changed file with 31 additions and 17 deletions.
48 changes: 31 additions & 17 deletions server/src/openfga-yaml-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,39 @@ export const OPENFGA_YAML_SCHEMA = {
properties: {
name: {
type: "string",
description: "The store name",
description: "the store name",
},
model_file: {
type: "string",
description: "The Authorization Model",
description: "the authorization model file path",
},
model: {
type: "string",
description: "The Authorization Model",
description: "the authorization model (takes precedence over model_file)",
},
tuples_file: {
type: "string",
description: "the tuples file path",
},
tuples: {
type: "array",
description: "the tuples (takes precedence over tuples_file)",
items: {
type: "object",
additionalProperties: false,
required: ["user", "relation", "object"],
properties: {
user: {
type: "string",
description: "The user",
description: "the user",
},
relation: {
type: "string",
description: "The relation",
description: "the relation",
},
object: {
type: "string",
description: "The object",
description: "the object",
},
condition: {
type: "object",
Expand All @@ -61,36 +63,48 @@ export const OPENFGA_YAML_SCHEMA = {
properties: {
name: {
type: "string",
description: "The test name",
description: "the test name",
},
description: {
type: "string",
description: "The test description",
description: "the test description",
},
tuples_file: {
type: "string",
description: "the tuples file with additional tuples for this test",
},
tuples: {
type: "array",
description: "the additional tuples for this test (takes precedence over tuples_file)",
items: {
type: "object",
additionalProperties: false,
required: ["user", "relation", "object"],
properties: {
user: {
type: "string",
description: "The user",
description: "the user",
},
relation: {
type: "string",
description: "The relation",
description: "the relation",
},
object: {
type: "string",
description: "The object",
description: "the object",
},
context: {
condition: {
type: "object",
additionalProperties: false,
required: ["name"],
properties: {
name: {
type: "string",
},
context: {
type: "object",
},
},
},
},
},
Expand All @@ -104,11 +118,11 @@ export const OPENFGA_YAML_SCHEMA = {
properties: {
user: {
type: "string",
description: "The user",
description: "the user",
},
object: {
type: "string",
description: "The object",
description: "the object",
},
assertions: {
type: "object",
Expand All @@ -133,15 +147,15 @@ export const OPENFGA_YAML_SCHEMA = {
properties: {
user: {
type: "string",
description: "The user",
description: "the user",
},
relation: {
type: "string",
description: "The relation",
description: "the relation",
},
type: {
type: "string",
description: "The object type",
description: "the object type",
},
assertions: {
type: "object",
Expand Down

0 comments on commit 2789085

Please sign in to comment.