Skip to content

Commit 2770a0b

Browse files
authored
Update domain (#1703)
1 parent 68198cf commit 2770a0b

File tree

11 files changed

+21
-14
lines changed

11 files changed

+21
-14
lines changed

docs/.vitepress/shared.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig } from "vitepress";
22
import { zhSearch } from "./zh";
33

4-
const HOSTNAME = "https://openapi-ts.pages.dev";
4+
const HOSTNAME = "https://openapi-ts.dev";
55

66
export const shared = defineConfig({
77
title: "OpenAPI TypeScript",
@@ -36,4 +36,11 @@ export const shared = defineConfig({
3636
},
3737
socialLinks: [{ icon: "github", link: "https://github.com/drwpow/openapi-typescript" }],
3838
},
39+
transformPageData({ relativePath, frontmatter }) {
40+
frontmatter.head ??= [];
41+
frontmatter.head.push([
42+
"link",
43+
{ rel: "canonical", href: `${HOSTNAME}/${relativePath.replace(/(index\.md|\.md)$/, "")}` },
44+
]);
45+
},
3946
});

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Docs site powered by [Vitepress](https://vitepress.dev/), an ergonomic docs site template powered by Vite.
44

5-
Lives at [https://openapi-ts.pages.dev](https://openapi-ts.pages.dev).
5+
Lives at [https://openapi-ts.dev](https://openapi-ts.dev).
66

77
## Setup
88

packages/openapi-fetch/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Pull requests are **welcome** for this repo!
7878

7979
Bugfixes will always be accepted, though in some cases some small changes may be requested.
8080

81-
However, if adding a feature or breaking change, please **open an issue first to discuss.** This ensures no time or work is wasted writing code that won’t be accepted to the project (see [Project Goals](https://openapi-ts.pages.dev/openapi-fetch/about/#project-goals)). Undiscussed feature work may be rejected at the discretion of the maintainers.
81+
However, if adding a feature or breaking change, please **open an issue first to discuss.** This ensures no time or work is wasted writing code that won’t be accepted to the project (see [Project Goals](https://openapi-ts.dev/openapi-fetch/about/#project-goals)). Undiscussed feature work may be rejected at the discretion of the maintainers.
8282

8383
### Writing the commit
8484

packages/openapi-fetch/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ await client.PUT("/blogposts", {
3838

3939
`data` and `error` are typechecked and expose their shapes to Intellisense in VS Code (and any other IDE with TypeScript support). Likewise, the request `body` will also typecheck its fields, erring if any required params are missing, or if there’s a type mismatch.
4040

41-
`GET`, `PUT`, `POST`, etc. are only thin wrappers around the native [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) (which you can [swap for any call](https://openapi-ts.pages.dev/openapi-fetch/api/#create-client)).
41+
`GET`, `PUT`, `POST`, etc. are only thin wrappers around the native [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) (which you can [swap for any call](https://openapi-ts.dev/openapi-fetch/api/#create-client)).
4242

4343
Notice there are no generics, and no manual typing. Your endpoint’s request and response were inferred automatically. This is a huge improvement in the type safety of your endpoints because **every manual assertion could lead to a bug**! This eliminates all of the following:
4444

@@ -116,4 +116,4 @@ const { data, error } = await client.PUT("/blogposts", {
116116

117117
## 📓 Docs
118118

119-
[View Docs](https://openapi-ts.pages.dev/openapi-fetch/)
119+
[View Docs](https://openapi-ts.dev/openapi-fetch/)

packages/openapi-fetch/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"./*": "./*"
2626
},
27-
"homepage": "https://openapi-ts.pages.dev",
27+
"homepage": "https://openapi-ts.dev",
2828
"repository": {
2929
"type": "git",
3030
"url": "https://github.com/drwpow/openapi-typescript",

packages/openapi-typescript-helpers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"./*": "./*"
2525
},
26-
"homepage": "https://openapi-ts.pages.dev",
26+
"homepage": "https://openapi-ts.dev",
2727
"repository": {
2828
"type": "git",
2929
"url": "https://github.com/drwpow/openapi-typescript",

packages/openapi-typescript/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
- `--immutable-types` has been renamed to `--immutable`
3939
- `--support-array-length` has been renamed to `--array-length`
4040

41-
- [`fbaf96d`](https://github.com/drwpow/openapi-typescript/commit/fbaf96d33181a2fabd3d4748e54c0f111ed6756e) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking**: Remove globbing schemas in favor of `redocly.yaml` config. Specify multiple schemas with outputs in there instead. See [Multiple schemas](https://openapi-ts.pages.dev/docs/cli/#multiple-schemas) for more info.
41+
- [`fbaf96d`](https://github.com/drwpow/openapi-typescript/commit/fbaf96d33181a2fabd3d4748e54c0f111ed6756e) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking**: Remove globbing schemas in favor of `redocly.yaml` config. Specify multiple schemas with outputs in there instead. See [Multiple schemas](https://openapi-ts.dev/docs/cli/#multiple-schemas) for more info.
4242

4343
- [`6d1eb32`](https://github.com/drwpow/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking**: Most optional objects are now always present in types, just typed as `:never`. This includes keys of the Components Object as well as HTTP methods.
4444

@@ -55,7 +55,7 @@
5555
- By default, it will only throw on actual schema errors (uses Redocly’s default settings)
5656
- For stricter linting or custom rules, you can create a [redocly.yaml config](https://redocly.com/docs/cli/configuration/)
5757

58-
- [`312b7ba`](https://github.com/drwpow/openapi-typescript/commit/312b7ba03fc0334153d4eeb51d6159f3fc63934e) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature:** allow configuration of schemas via `apis` key in redocly.config.yaml. [See docs](https://openapi-ts.pages.dev/cli/) for more info.
58+
- [`312b7ba`](https://github.com/drwpow/openapi-typescript/commit/312b7ba03fc0334153d4eeb51d6159f3fc63934e) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature:** allow configuration of schemas via `apis` key in redocly.config.yaml. [See docs](https://openapi-ts.dev/cli/) for more info.
5959

6060
- Any options passed into your [redocly.yaml config](https://redocly.com/docs/cli/configuration/) are respected
6161

packages/openapi-typescript/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pull requests are **welcome** for this repo!
1616

1717
Bugfixes will always be accepted, though in some cases some small changes may be requested.
1818

19-
However, if adding a feature or breaking change, please **open an issue first to discuss.** This ensures no time or work is wasted writing code that won’t be accepted to the project (see [Project Goals](https://openapi-ts.pages.dev/about/#project-goals)). Undiscussed feature work may be rejected at the discretion of the maintainers.
19+
However, if adding a feature or breaking change, please **open an issue first to discuss.** This ensures no time or work is wasted writing code that won’t be accepted to the project (see [Project Goals](https://openapi-ts.dev/about/#project-goals)). Undiscussed feature work may be rejected at the discretion of the maintainers.
2020

2121
### Setup
2222

packages/openapi-typescript/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ _Thanks, [@psmyrdek](https://github.com/psmyrdek)!_
8787

8888
## 📓 Docs
8989

90-
[View Docs](https://openapi-ts.pages.dev/introduction/)
90+
[View Docs](https://openapi-ts.dev/)

packages/openapi-typescript/bin/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async function main() {
157157
}
158158
if (!api[REDOC_CONFIG_KEY]?.output) {
159159
errorAndExit(
160-
`API ${name} is missing an \`${REDOC_CONFIG_KEY}.output\` key. See https://openapi-ts.pages.dev/cli/#multiple-schemas.`,
160+
`API ${name} is missing an \`${REDOC_CONFIG_KEY}.output\` key. See https://openapi-ts.dev/cli/#multiple-schemas.`,
161161
);
162162
}
163163
const result = await generateSchema(new URL(api.root, configRoot), { redocly });
@@ -191,7 +191,7 @@ async function main() {
191191
// throw error on glob
192192
if (input.includes("*")) {
193193
errorAndExit(
194-
"Globbing has been deprecated in favor of redocly.yaml’s `apis` keys. See https://openapi-ts.pages.dev/cli/#multiple-schemas",
194+
"Globbing has been deprecated in favor of redocly.yaml’s `apis` keys. See https://openapi-ts.dev/cli/#multiple-schemas",
195195
);
196196
}
197197
const result = await generateSchema(new URL(input, CWD), {

0 commit comments

Comments
 (0)