Skip to content

Commit f2de0f3

Browse files
committed
feat: add redoc to documentation
1 parent 6dd5d40 commit f2de0f3

File tree

8 files changed

+695
-15
lines changed

8 files changed

+695
-15
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "external-content/community"]
55
path = external-content/community
66
url = https://github.com/open-feature/community
7+
[submodule "external-content/protocol"]
8+
path = external-content/protocol
9+
url = https://github.com/open-feature/protocol
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"collapsible": true,
3+
"collapsed": false
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
sidebar_position: 3
3+
id: ofrep
4+
title: OpenFeature Remote Evaluation Protocol
5+
---
6+
7+
# Server
8+
9+
import ApiDocMdx from '@theme/ApiDocMdx';
10+
11+
<ApiDocMdx />

docusaurus.config.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Options as PresetClassicOptions } from '@docusaurus/preset-classic';
22
import type { UserThemeConfig as ThemeCommonConfig } from '@docusaurus/theme-common';
33
import type { UserThemeConfig as AlgoliaThemeConfig } from '@docusaurus/theme-search-algolia';
4+
import type * as Redocusaurus from 'redocusaurus';
45
import type { Config } from '@docusaurus/types';
56
import autoprefixer from 'autoprefixer';
67
import { themes } from 'prism-react-renderer';
@@ -172,7 +173,7 @@ const themeConfig: ThemeCommonConfig & AlgoliaThemeConfig = {
172173
},
173174
prism: {
174175
theme: themes.oceanicNext,
175-
additionalLanguages: ['java', 'csharp', 'powershell', 'php', 'kotlin', 'ruby'],
176+
additionalLanguages: ['java', 'csharp', 'powershell', 'php', 'kotlin', 'ruby', 'scala'],
176177
magicComments: [
177178
{
178179
className: 'theme-code-block-highlighted-line',
@@ -284,7 +285,23 @@ const config: Config = {
284285
},
285286
},
286287
],
287-
presets: [['classic', presetClassicOptions]],
288+
presets: [
289+
['classic', presetClassicOptions],
290+
[
291+
'redocusaurus',
292+
{
293+
specs: [
294+
{
295+
id: 'ofrep',
296+
spec: './external-content/protocol/service/openapi.yaml',
297+
},
298+
],
299+
theme: {
300+
primaryColor: '#5D5DFF',
301+
},
302+
},
303+
] satisfies Redocusaurus.PresetEntry,
304+
],
288305
plugins: [
289306
async function tailwind() {
290307
return {

external-content/protocol

Submodule protocol added at 696f8bd

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"react-instantsearch": "^7.15.3",
5858
"react-lite-youtube-embed": "^2.4.0",
5959
"react-transition-group": "^4.4.5",
60+
"redocusaurus": "^2.2.1",
6061
"rehype-github-alerts": "^3.0.0",
6162
"remark-gfm": "^4.0.1",
6263
"remarkable": "2.0.1",

redocly.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
extends:
2+
- recommended
3+
4+
theme:
5+
# See https://redocly.com/docs/redoc/config/
6+
openapi:
7+
disableSearch: true
8+
hideDownloadButton: true
9+
# See https://redocly.com/docs/api-reference-docs/configuration/theming/
10+
theme:
11+
colors:
12+
primary:
13+
main: '#32329f'

0 commit comments

Comments
 (0)