From 90061756e2c5162b37a3ac94880ea1e4d29b9861 Mon Sep 17 00:00:00 2001 From: Lubos Date: Tue, 16 Apr 2024 06:12:13 +0100 Subject: [PATCH] docs: add integrations --- .changeset/giant-mice-hug.md | 5 + docs/.vitepress/config/en.ts | 3 +- docs/.vitepress/config/index.ts | 17 +- docs/.vitepress/theme/custom.css | 11 + docs/about.md | 12 +- docs/index.md | 25 +- docs/openapi-ts/integrations.md | 22 + docs/openapi-ts/migrating.md | 17 +- docs/package.json | 4 +- docs/public/github-mark-white.svg | 1 + docs/public/github-mark.svg | 1 + docs/public/json-schema-white.svg | 35 + docs/public/openapi.svg | 1 + docs/public/ts-logo-128.svg | 1 + .../test/generated/v3/models.gen.ts.snap | 5 + .../test/generated/v3/schemas.gen.ts.snap | 10 + .../generated/v3_angular/models.gen.ts.snap | 5 + .../generated/v3_angular/schemas.gen.ts.snap | 10 + .../generated/v3_client/models.gen.ts.snap | 5 + .../generated/v3_date/schemas.gen.ts.snap | 10 + .../v3_enums_typescript/models.gen.ts.snap | 5 + .../v3_enums_typescript/schemas.gen.ts.snap | 10 + .../generated/v3_models/models.gen.ts.snap | 5 + packages/openapi-ts/test/spec/v3.json | 9 + pnpm-lock.yaml | 800 +----------------- 25 files changed, 225 insertions(+), 804 deletions(-) create mode 100644 .changeset/giant-mice-hug.md create mode 100644 docs/openapi-ts/integrations.md create mode 100644 docs/public/github-mark-white.svg create mode 100644 docs/public/github-mark.svg create mode 100644 docs/public/json-schema-white.svg create mode 100644 docs/public/openapi.svg create mode 100644 docs/public/ts-logo-128.svg diff --git a/.changeset/giant-mice-hug.md b/.changeset/giant-mice-hug.md new file mode 100644 index 000000000..2881d2c24 --- /dev/null +++ b/.changeset/giant-mice-hug.md @@ -0,0 +1,5 @@ +--- +"openapi-ts-docs": minor +--- + +docs: add integrations diff --git a/docs/.vitepress/config/en.ts b/docs/.vitepress/config/en.ts index c0dc1a7a2..fce203163 100644 --- a/docs/.vitepress/config/en.ts +++ b/docs/.vitepress/config/en.ts @@ -11,13 +11,14 @@ export default defineConfig({ { text: 'Get Started', link: '/openapi-ts/get-started' }, { text: 'Configuration', link: '/openapi-ts/configuration' }, { text: 'Interceptors', link: '/openapi-ts/interceptors' }, + { text: 'Integrations soon', link: '/openapi-ts/integrations' }, { text: 'Migrating', link: '/openapi-ts/migrating' }, ], }, { text: '@hey-api', items: [ - { text: 'About', link: '/about' }, + { text: 'Philosophy', link: '/about' }, { text: 'Contributing', link: '/contributing' }, ], }, diff --git a/docs/.vitepress/config/index.ts b/docs/.vitepress/config/index.ts index bebef79f5..1529e4e3c 100644 --- a/docs/.vitepress/config/index.ts +++ b/docs/.vitepress/config/index.ts @@ -1,22 +1,11 @@ +import { defineConfig } from 'vitepress'; + import en from './en'; import shared from './shared'; -import { withMermaid } from 'vitepress-plugin-mermaid'; - -export default withMermaid({ +export default defineConfig({ ...shared, locales: { root: { label: 'English', ...en }, }, - /** - * mermaid fix - * {@link https://github.com/mermaid-js/mermaid/issues/4320} - */ - vite: { - optimizeDeps: { - include: [ - 'mermaid' - ] - } - } }); diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css index 4d342c566..aa07aee5e 100644 --- a/docs/.vitepress/theme/custom.css +++ b/docs/.vitepress/theme/custom.css @@ -14,3 +14,14 @@ html.dark { --vp-c-brand-2: #b3cde4; --vp-c-brand-3: #537692; } + +.soon { + background-color: var(--vp-button-brand-bg); + border-radius: 1em; + color: var(--vp-button-brand-text); + font-size: .6em; + padding: .2em .4em; + position: relative; + text-transform: lowercase; + top: -1em; +} diff --git a/docs/about.md b/docs/about.md index ae047014a..b7b7e45e6 100644 --- a/docs/about.md +++ b/docs/about.md @@ -1,5 +1,5 @@ --- -title: About +title: Philosophy description: Hello from Hey API. --- @@ -13,18 +13,8 @@ Typically, developers of such applications want to: - send and fetch this data from server in a typesafe way - build further abstractions on top of this data -```mermaid -flowchart LR - id1(Application) --> id2(API types) --> id3(API request wrapper) --> id4(REST endpoint) -``` - Doing any of these steps manually quickly becomes a huge time sink as your project grows and APIs evolve. Ideally, you want to spend most time on your application. Hey API allows you to do just that. -```mermaid -flowchart LR - id1(Application) --> id2(Hey API) --> id3(REST endpoint) -``` - We're constantly learning about the ways in which you use our tools. If you have any feedback, please [email us](mailto:lmenus@lmen.us), [open an issue](https://github.com/hey-api/openapi-ts/issues), or [join a discussion](https://github.com/hey-api/openapi-ts/discussions). ## Team diff --git a/docs/index.md b/docs/index.md index 5b1b6fd91..ff6e93690 100644 --- a/docs/index.md +++ b/docs/index.md @@ -16,16 +16,19 @@ hero: alt: logo features: - - icon: ✍️ + - icon: + title: GitHub Integration Soon + details: Automatically update your code when the APIs it depends on change. Works with any codegen. + - icon: title: OpenAPI Schema - details: You provide OpenAPI specification. We take care of the rest. OpenAPI v2.0, v3.0, and v3.1 supported. - - icon: 🤖 + details: You provide OpenAPI schema. We take care of the rest. OpenAPI v2.0, v3.0, and v3.1 supported. + - icon: title: TypeScript Interfaces details: Ensure code correctness without runtime overhead. No manual maintenance required. - icon: 🦴 title: Data Fetching details: Typesafe data with our REST clients. Fetch, axios, angular, node, and xhr are available. - - icon: "{✓}" + - icon: title: JSON Schemas details: Export OpenAPI schemas as JavaScript objects. JSON Schema 2020-12 supported. --- @@ -40,15 +43,29 @@ Interested in partnership or sponsoring Hey API? [Send us an email](mailto:lmenu