Skip to content

feat: add script to autogenerate configuration page#958

Merged
rhamzeh merged 2 commits intofeat/add-auto-generated-config-pagefrom
feat/add-config-autogen-script
Feb 21, 2025
Merged

feat: add script to autogenerate configuration page#958
rhamzeh merged 2 commits intofeat/add-auto-generated-config-pagefrom
feat/add-config-autogen-script

Conversation

@rhamzeh
Copy link
Copy Markdown
Member

@rhamzeh rhamzeh commented Feb 13, 2025

Description

This is the script that generates the page in #938

It can be run using: npm run update:config-page

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

@rhamzeh rhamzeh requested review from a team as code owners February 13, 2025 02:31
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 13, 2025

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2025-02-21 11:41 UTC

});
}

jsonToMdx('https://raw.githubusercontent.com/openfga/openfga/refs/heads/main/.config-schema.json', 'docs/content/getting-started/setup-openfga/configuration.mdx'); No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It might make it a little more complex to run, but if we fetched the latest release and fetched from that ref could we maybe integrate this into the build step? Something like

  1. Call api.github.com/repos/openfga/openfga/releases/latest and retrieve tag_name (currently v1.8.5)
  2. Fetch https://raw.githubusercontent.com/openfga/openfga/${tag_name}/.config-schema.json (currently https://raw.githubusercontent.com/openfga/openfga/v1.8.5/.config-schema.json)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated

@rhamzeh rhamzeh force-pushed the feat/add-config-autogen-script branch from c9ef801 to 0a23972 Compare February 20, 2025 15:54
@rhamzeh rhamzeh requested a review from ewanharris February 20, 2025 15:56
`;
let mdxContent = mdxContentHeader + `## List of options

The following table lists the configuration options for the OpenFGA server, based on the [config-schema.json](https://github.com/openfga/openfga/blob/main/.config-schema.json).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What do you think to having this point to the tag we generated from if we passed in the release value we get?

@rhamzeh rhamzeh requested a review from a team as a code owner February 20, 2025 21:14
@rhamzeh rhamzeh merged commit 8b26941 into feat/add-auto-generated-config-page Feb 21, 2025
6 checks passed
@rhamzeh rhamzeh deleted the feat/add-config-autogen-script branch February 21, 2025 11:39
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