Skip to content
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

feat: validate OpenFGA YAML #95

Merged
merged 1 commit into from
Nov 1, 2023
Merged

feat: validate OpenFGA YAML #95

merged 1 commit into from
Nov 1, 2023

Conversation

d-jeffery
Copy link
Collaborator

@d-jeffery d-jeffery commented Oct 30, 2023

Description

  • YAML syntax validation with yaml
  • YAML schema based validation with ajv
  • Imported YAML for openfga injection

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@d-jeffery d-jeffery force-pushed the feat/yaml-validation branch 2 times, most recently from 9696eec to 0061cff Compare October 30, 2023 21:35
@d-jeffery d-jeffery requested a review from rhamzeh October 30, 2023 21:39
@d-jeffery d-jeffery marked this pull request as ready for review October 30, 2023 21:39
@d-jeffery d-jeffery requested a review from a team as a code owner October 30, 2023 21:39
@d-jeffery d-jeffery force-pushed the feat/yaml-validation branch 2 times, most recently from bd78564 to 3c224b9 Compare October 30, 2023 23:35
server/src/server.common.ts Outdated Show resolved Hide resolved
server/src/server.common.ts Outdated Show resolved Hide resolved
server/src/server.common.ts Outdated Show resolved Hide resolved
server/src/server.common.ts Outdated Show resolved Hide resolved
server/src/yaml-utils.ts Outdated Show resolved Hide resolved
@d-jeffery d-jeffery force-pushed the feat/yaml-validation branch 2 times, most recently from 93f3177 to 6712fe9 Compare October 31, 2023 22:02
@d-jeffery d-jeffery requested a review from rhamzeh October 31, 2023 22:22
@d-jeffery d-jeffery force-pushed the feat/yaml-validation branch from 6712fe9 to 997d3f3 Compare October 31, 2023 22:27
@rhamzeh rhamzeh changed the title feat: YAML type validation feat: validate OpenFGA YAML Oct 31, 2023
rhamzeh
rhamzeh previously approved these changes Oct 31, 2023
Copy link
Member

@rhamzeh rhamzeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODOs:

  • Register a new language, e.g. yaml.store.openfga instead of validating all yaml files (and tie that to *.fga.yaml)
  • Add required fields in the *.fga.yaml

@rhamzeh rhamzeh added this pull request to the merge queue Nov 1, 2023
Merged via the queue into main with commit 59ea49f Nov 1, 2023
@rhamzeh rhamzeh deleted the feat/yaml-validation branch November 1, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants