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: add redoc to documentation #1003

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "external-content/community"]
path = external-content/community
url = https://github.com/open-feature/community
[submodule "external-content/protocol"]
path = external-content/protocol
url = https://github.com/open-feature/protocol
4 changes: 4 additions & 0 deletions docs/reference/technologies/ofrep/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"collapsible": true,
"collapsed": false
}
11 changes: 11 additions & 0 deletions docs/reference/technologies/ofrep/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
sidebar_position: 3
id: ofrep
title: OpenFeature Remote Evaluation Protocol
---

# Server

import ApiDocMdx from '@theme/ApiDocMdx';

<ApiDocMdx />
21 changes: 19 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Options as PresetClassicOptions } from '@docusaurus/preset-classic';
import type { UserThemeConfig as ThemeCommonConfig } from '@docusaurus/theme-common';
import type { UserThemeConfig as AlgoliaThemeConfig } from '@docusaurus/theme-search-algolia';
import type * as Redocusaurus from 'redocusaurus';
import type { Config } from '@docusaurus/types';
import autoprefixer from 'autoprefixer';
import { themes } from 'prism-react-renderer';
Expand Down Expand Up @@ -172,7 +173,7 @@ const themeConfig: ThemeCommonConfig & AlgoliaThemeConfig = {
},
prism: {
theme: themes.oceanicNext,
additionalLanguages: ['java', 'csharp', 'powershell', 'php', 'kotlin', 'ruby'],
additionalLanguages: ['java', 'csharp', 'powershell', 'php', 'kotlin', 'ruby', 'scala'],
magicComments: [
{
className: 'theme-code-block-highlighted-line',
Expand Down Expand Up @@ -284,7 +285,23 @@ const config: Config = {
},
},
],
presets: [['classic', presetClassicOptions]],
presets: [
['classic', presetClassicOptions],
[
'redocusaurus',
{
specs: [
{
id: 'ofrep',
spec: './external-content/protocol/service/openapi.yaml',
},
],
theme: {
primaryColor: '#5D5DFF',
},
},
] satisfies Redocusaurus.PresetEntry,
],
plugins: [
async function tailwind() {
return {
Expand Down
1 change: 1 addition & 0 deletions external-content/protocol
Submodule protocol added at 696f8b
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"react-instantsearch": "^7.15.3",
"react-lite-youtube-embed": "^2.4.0",
"react-transition-group": "^4.4.5",
"redocusaurus": "^2.2.1",
"rehype-github-alerts": "^3.0.0",
"remark-gfm": "^4.0.1",
"remarkable": "2.0.1",
Expand Down
13 changes: 13 additions & 0 deletions redocly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extends:
- recommended

theme:
# See https://redocly.com/docs/redoc/config/
openapi:
disableSearch: true
hideDownloadButton: true
# See https://redocly.com/docs/api-reference-docs/configuration/theming/
theme:
colors:
primary:
main: '#32329f'
Loading