1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

95 Commits

Author SHA1 Message Date
Thomas Heartman
0a99dfd6e3
#1391: add generated doc cleaning script (#2077)
* #1391: add generated doc cleaning script

## What

The cleaning script replaces all references to the Unleash ushosted instance in the
generated OpenAPI docs. It removes extra path segments (such as leading
`/ushosted` instances) and replaces the ushosted base url with something
user-agnostic.

## Why

When we host the OpenAPI docs in our official documentation, the generated
docs shouldn't necessarily point at _one specific instance_, and especially
not one that the reader is unlikely to ever use. Instead, we can remove all
the bits that are specific to the generation source we use, and make the docs
easier to use. In particular, removing the leading `/ushosted` is likely to
save us loooots of questions.

* #1391: change env var used for generating openapi from localhost

Using NODE_ENV=development doesn't necessarily make sense, so adding
an extra variable sounds reasonable to me.

* #1391: ensure that all generation commands also clean docs

* #1391: change <your-unleash-instance-url> to <your-unleash-url>

* #1391: fix ushosted replacement: not all paths start with /api

* #1391: chore: remove potential `ushosted` ending of api url

In the event that we change the base URL of OpenAPI, so that paths
don't start with `/ushosted/`, the script should still work, changing
those paths into <your-unleash-url> too.

Additionally, remove all instances of `/ushosted` that we find. In the
event that some things switch around or whatever.
2022-09-20 12:43:39 +02:00
Thomas Heartman
1b1dcea769 Docs(fix): update docusaurus deploy command to generate openapi docs
Without this, the build fails 🙈
2022-09-19 14:53:34 +02:00
Thomas Heartman
2d04bd9ea2
Add OpenAPI docs (#1391) (#2066)
## What

This PR (finally 🎉) adds generated OpenAPI docs to the official Unleash documentation. In addition to generating docs when things get merged to main, it also pushes new doc updates every day at 12:00 AM (cron `@daily`).

## Why

Now that we have OpenAPI'd all the things, we can finally start using it. This will allow us to remove hand-written api docs from the documentation and should make sure everything is always kept up to date.

### Generating from us-hosted (Unleash enterprise)

Unleash has several different versions (open source, pro, enterprise). The versions do not necessarily have the exact same api surface. In fact, the enterprise version has a few endpoints that open source does not.

Because we want to have _all_ endpoints listed in the documentation we need to generated the docs from an enterprise spec. Which brings us into the next point:

### The need for scheduled jobs

Regarding the daily scheduled tasks to update the documentation: why do we need that?

The docs are generated from the tip of the main branch. For most of the docs, this is good and something that we want. However, because the OpenAPI docs are generated from the enterprise edition, it _will not be in sync_ with the open source main branch.

Also, we probably do not want the docs to list the current bleeding edge api changes. Instead, we should prefer to use the latest enterprise release (roughly). However, because we don't get notified when this version is released and deployed, we'll instead run the API generation on a daily cadence.

This isn't the perfect solution, but it's simple and gets us 80% of the way there. More intricate solutions can be set up later.

## How

-   By adding a scheduled workflow to the generate docs config.
-   By adding .gitignore entries for the generated files

There's also some minor changes in styling etc.

## Dependencies

This is dependent on the changes introduced in #2062 having propagated to the enterprise release, which will probably not be for another week or so.

## Discussion

What should the API reference docs url be? I've set it to be `/reference/api/unleash/*` for now, but I'm on the fence about whether it should be `apis` or `api` in there. I also want to get the proxy and other APIs in there as we grow.

-------

## Commits

* docs: style openapi operation buttons

* docs: minor operation badge adjustments

* docs: use permalink to css snippet i copied

* docs: ignore files related to openapi generation

* docs: re-enable openapi docs

* Docs(#1391): prep for integration

* docs(#1391): run docs generation daily

* docs(#1391): add generation step to doc prs too

* docs(#1391): use the US hosted instance to generate docs

* docs(#1391): move doc generation into build command

* docs(#1391): use `/reference/api/*` instead of `/reference/apis/*`
2022-09-19 14:50:24 +02:00
renovate[bot]
9f92d5045e
fix(deps): update dependency docusaurus-theme-openapi-docs to v1.1.9 (#2032)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-31 22:55:20 +00:00
renovate[bot]
5c003e3b2e
fix(deps): update dependency docusaurus-plugin-openapi-docs to v1.1.9 (#2011)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-31 03:26:19 +00:00
Ivar Conradi Østhus
23e43b9114
fix(docs): pin got dependency to v11.8.5 2022-08-30 09:52:54 +02:00
renovate[bot]
6b30967ae0
chore(deps): update dependency trim-newlines to v4 (#1969)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-26 12:21:47 +02:00
Ivar Conradi Østhus
9e23c4e969
fix: website dependencies 2022-08-26 10:27:30 +02:00
renovate[bot]
b3949dc9f5
chore(deps): update dependency typescript to v4.8.2 (#1967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-26 03:45:26 +00:00
renovate[bot]
976226d27e
chore(deps): update dependency @babel/core to v7.18.13 (#1954)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-23 01:56:01 +00:00
renovate[bot]
b7c59e1733
fix(deps): update dependency docusaurus-theme-openapi-docs to v1.1.8 (#1938)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-19 17:35:51 +00:00
renovate[bot]
a6c524c251
fix(deps): update dependency docusaurus-plugin-openapi-docs to v1.1.8 (#1937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-19 14:14:52 +00:00
renovate[bot]
c8f0283049
fix(deps): update dependency docusaurus-theme-openapi-docs to v1.1.7 (#1925)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-16 02:30:05 +00:00
renovate[bot]
c6fc4a1b9b
fix(deps): update dependency docusaurus-plugin-openapi-docs to v1.1.7 (#1924)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-16 00:07:05 +00:00
renovate[bot]
32a5e3c4f5
fix(deps): update dependency docusaurus-theme-openapi-docs to v1.1.6 (#1919)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-13 04:21:33 +00:00
renovate[bot]
53853203bc
fix(deps): update dependency docusaurus-plugin-openapi-docs to v1.1.6 (#1918)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-13 01:18:21 +00:00
Thomas Heartman
9448461aaa
docs: prep to add OpenAPI spec to Unleash docs (#1907)
* Docs: start experimenting with OpenAPI and docusaurus

* Docs: add docusaurus-theme-openapi-docs pkg

* Wip: current status

* Docs: Add 'docusaurus-plugin-api-docs'

* Move openapi into own sidebar; generate from localhost

* Chore: Update docusaurus plugin for OpenAPI

* Add website/yarn.lock to git

* Fix: fix CSS warning by using flex-end instead of end

* docs: make openapi generated code work again

* docs: make tags work properly with openapi sidebar

* Docs/chore: update OpenAPI tag scheme.

Add a whole bunch of new tags to make it easier to understand
available tags in OpenAPI.

* docs: point to new openapi docs from old api docs

* docs: typo

* Docs:  link restructure

* docs: add operation indicators to openapi docs

* docs: change badge color for operations

* docs: update openapi-docs package

It now sorts tags the same as the schema

* docs: pluralize APIs in slug

* docs: update links to generated api docs

* docs: update openapi snapshot tests with new tags

* docs: conditionally load spec from localhost or from file

* docs: Remove changes relating to immediate switchover

* refactor: rename types; extract into separate file

* docs: fix api doc links
2022-08-12 11:37:57 +02:00
renovate[bot]
82c83b5611
fix(deps): update dependency unleash-proxy-client to v2.1.0 (#1908)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-10 15:36:33 +00:00
renovate[bot]
cd5e1a37d5
chore(deps): update storybook monorepo to v6.5.10 (#1885)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 04:58:18 +00:00
renovate[bot]
d922ea1225
chore(deps): update dependency @babel/core to v7.18.10 (#1872)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-02 00:25:58 +00:00
renovate[bot]
e43be56f13
fix(deps): update docusaurus monorepo to v2.0.1 (#1871)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-01 19:41:04 +00:00
renovate[bot]
f6192b50b0
fix(deps): update dependency unleash-proxy-client to v2.0.3 (#1841)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-27 13:44:00 +00:00
renovate[bot]
cc341e7913
fix(deps): update dependency @svgr/webpack to v6.3.1 (#1851)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-22 17:50:19 +00:00
Thomas Heartman
4332072db4
docs: Update docusaurus to 2.0.0-rc.1 (#1831)
* Chore: update docusaurus packages

* Docs: add algolia doc search app id

* Chore: update/specify node engine version: 16.14
2022-07-19 07:57:03 +02:00
renovate[bot]
29b8223718
fix(deps): update dependency @svgr/webpack to v6.3.0 (#1833)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-19 01:09:47 +00:00
renovate[bot]
87cf6e58a2
chore(deps): update dependency @babel/core to v7.18.9 (#1830)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-18 12:11:16 +00:00
renovate[bot]
2a58b88ba3 fix(deps): update dependency clsx to v1.2.1 2022-07-12 00:17:56 +00:00
renovate[bot]
855e33990e chore(deps): update dependency enhanced-resolve to v5.10.0 2022-06-28 23:12:53 +00:00
renovate[bot]
e0557a6e5d chore(deps): update dependency @babel/core to v7.18.6 2022-06-28 00:40:16 +00:00
renovate[bot]
5c9f30ceef chore(deps): update dependency typescript to v4.7.4 2022-06-18 01:54:21 +00:00
Renovate Bot
7ce95cafc8 fix(deps): update react monorepo to v18.2.0 2022-06-15 00:42:43 +00:00
Renovate Bot
c810959e26 chore(deps): update storybook monorepo to v6.5.9 2022-06-14 05:28:52 +00:00
Renovate Bot
0f35bd3172 chore(deps): update dependency @babel/core to v7.18.5 2022-06-14 01:52:04 +00:00
Renovate Bot
0b6f5448f0 chore(deps): update dependency @storybook/testing-library to v0.0.13 2022-06-13 21:10:33 +00:00
Renovate Bot
7843c2bbc8 chore(deps): update dependency @tsconfig/docusaurus to v1.0.6 2022-06-11 12:25:35 +00:00
Renovate Bot
4b466063df chore(deps): update dependency @storybook/testing-library to v0.0.12 2022-06-10 17:23:41 +00:00
Renovate Bot
5208cfc708 chore(deps): update storybook monorepo to v6.5.8 2022-06-08 23:31:10 +00:00
Renovate Bot
e5fe268844 chore(deps): update storybook monorepo to v6.5.7 2022-06-07 01:33:38 +00:00
Renovate Bot
78b3b78ced chore(deps): update dependency typescript to v4.7.3 2022-06-04 05:56:08 +00:00
Renovate Bot
f122e884c7 chore(deps): update storybook monorepo to v6.5.6 2022-05-30 04:37:07 +00:00
Renovate Bot
b3161bc2e8 chore(deps): update dependency @babel/core to v7.18.2 2022-05-25 13:24:12 +00:00
Renovate Bot
0d623e184c chore(deps): update dependency typescript to v4.7.2 2022-05-24 23:53:46 +00:00
Renovate Bot
b39c03e561 chore(deps): update storybook monorepo to v6.5.5 2022-05-24 20:19:06 +00:00
Renovate Bot
eca933eb65 chore(deps): update storybook monorepo to v6.5.4 2022-05-23 13:37:39 +00:00
Renovate Bot
16a2e74041 chore(deps): update storybook monorepo to v6.5.3 2022-05-20 23:39:01 +00:00
renovate[bot]
f954de0ecf
chore(deps): update dependency @babel/core to v7.18.0 (#1612)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-20 12:20:44 +02:00
Renovate Bot
d68b304607 chore(deps): update dependency @babel/core to v7.17.12 2022-05-17 00:57:22 +00:00
Renovate Bot
042d0137f3 chore(deps): update dependency @babel/core to v7.17.10 2022-04-29 20:24:13 +00:00
Renovate Bot
ec878110d9 chore(deps): update dependency typescript to v4.6.4 2022-04-29 00:28:58 +00:00
Renovate Bot
2e551c9f4e fix(deps): update dependency unleash-proxy-client to v2.0.1 2022-04-27 13:38:16 +00:00