Commit 8e11db4
authored
chore(docs): add
This PR is a recreation of #109 .
## Description
The goal of this PR is to enrich our docusaurus site, by adding
[`docusaurus-openapi-docs`](https://github.com/PaloAltoNetworks/docusaurus-openapi-docs)
and using it to embed OpenAPI/Swagger generated content.
In this PR, we are vendoring the OpenAPI (YAML) files, which are found
in OpenTDF (
[here](https://github.com/opentdf/platform/tree/main/docs/openapi) ).
## Reviewing this PR
To generate the site for a typical deployment, build and start the site
as follows:
```
# Set env var, or simply skip it
export BUILD_OPENAPI_SAMPLES=0
rm -rf docs/SDK-OpenAPI/ docs/SDK-Samples/ specs-processed/
npm run gen-api-docs-clean && npm run gen-api-docs-all
npm run start
```
To generate the site including "art of the possible" (petstore &
bookstore examples), build and start the site as follows:
```
export BUILD_OPENAPI_SAMPLES=1
rm -rf docs/SDK-OpenAPI/ docs/SDK-Samples/ specs-processed/
npm run gen-api-docs-clean && npm run gen-api-docs-all
npm run start
```
### Video 2 (loom)
https://www.loom.com/share/522b0eb6b2d34793ba555b1ca3a31722
### Video 1
<details><summary>Click to show</summary>
<p>
https://github.com/user-attachments/assets/25f22aed-5ba5-4a4f-bd76-17acc5daf2df
</p>
</details>
### To-do
- [ ] Determine if we need to run `npm run gen-api-docs-all`
(explicitly) for CI and/or production builds. In other words, does this
happen automatically?
### Defer / New Jira tickets
- [x] Revert [Disable false-positive
machine](d228655)
/ figure out the right way to tune Vale ➡️ recommend a new Jira ticket /
PR
- [ ] Use remote OpenAPI definition files? ➡️ recommend a new Jira
ticket / PR
### Vale
If I were king for a day, I'd just remove this tool.
<details><summary>It's pretty unclear (to me) how to improve the
configuration quality</summary>
<p>
<img width="1495" alt="image"
src="https://github.com/user-attachments/assets/6e22dcc3-7b2e-4c47-bed7-040ee58137d9"
/>
</p>
</details>
<details><summary>It's complaining about files that are untouched /
unmodified in this PR</summary>
<p>
<img width="1495" alt="image"
src="https://github.com/user-attachments/assets/c2908677-e306-4d74-8511-ac1bf1652715"
/>
</p>
</details>
<details><summary>And some part of it's machinery / reviewdog thinks we
have too much content to process... which seems tricky, because clearly
we will have large diffs if we intend to version generated
content.</summary>
<p>
<img width="1495" alt="image"
src="https://github.com/user-attachments/assets/2ee4786d-24af-45ba-bbaa-2acecfafd97f"
/>
</p>
</details>docusaurus-plugin-openapi-docs (#110)1 parent 8c681e0 commit 8e11db4
File tree
28 files changed
+23577
-175
lines changed- .github/workflows
- specs
- authorization
- v2
- common
- entityresolution
- v2
- entity
- kas
- policy
- actions
- attributes
- kasregistry
- keymanagement
- namespaces
- registeredresources
- resourcemapping
- subjectmapping
- unsafe
- wellknownconfiguration
28 files changed
+23577
-175
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | | - | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
| 199 | + | |
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
| |||
735 | 740 | | |
736 | 741 | | |
737 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
738 | 751 | | |
739 | 752 | | |
740 | 753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
0 commit comments