diff --git a/.changeset/shaggy-impalas-develop.md b/.changeset/shaggy-impalas-develop.md new file mode 100644 index 000000000..21e238f23 --- /dev/null +++ b/.changeset/shaggy-impalas-develop.md @@ -0,0 +1,5 @@ +--- +"openapi-typescript": major +--- + +Export enumValues as const arrays. Derive schema types from literal values. diff --git a/.github/ISSUE_TEMPLATE/01_openapi-typescript-bug.yml b/.github/ISSUE_TEMPLATE/01_openapi-typescript-bug.yml index 3dfa26f92..620772127 100644 --- a/.github/ISSUE_TEMPLATE/01_openapi-typescript-bug.yml +++ b/.github/ISSUE_TEMPLATE/01_openapi-typescript-bug.yml @@ -6,18 +6,21 @@ labels: - triage body: - type: input + id: version attributes: label: openapi-typescript version placeholder: x.x.x validations: required: true - type: input + id: node attributes: label: Node.js version placeholder: 20.x.x validations: required: true - type: input + id: os attributes: label: OS + version placeholder: macOS 15.1.1 @@ -45,14 +48,14 @@ body: required: true - type: checkboxes id: required - label: Required attributes: + label: Required options: - label: My OpenAPI schema is valid and passes the [Redocly validator](https://redocly.com/docs/cli/commands/lint/) (`npx @redocly/cli@latest lint`) required: true - type: checkboxes id: extra - label: Extra attributes: + label: Extra options: - label: I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/CONTRIBUTING.md)) diff --git a/.github/ISSUE_TEMPLATE/01_openapi-typescript-feat.yml b/.github/ISSUE_TEMPLATE/01_openapi-typescript-feat.yml index 28fdf9344..0461ea317 100644 --- a/.github/ISSUE_TEMPLATE/01_openapi-typescript-feat.yml +++ b/.github/ISSUE_TEMPLATE/01_openapi-typescript-feat.yml @@ -1,9 +1,10 @@ name: "openapi-typescript: Feature request" description: Propose new functionality or a breaking change -title: "" labels: - openapi-ts - enhancement +projects: + - openapi-ts/2 body: - type: textarea id: description @@ -21,7 +22,7 @@ body: required: true - type: checkboxes id: extra - label: Extra attributes: + label: Extra options: - label: I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/CONTRIBUTING.md)) diff --git a/.github/ISSUE_TEMPLATE/02_openapi-fetch-bug.yml b/.github/ISSUE_TEMPLATE/02_openapi-fetch-bug.yml index f53726675..0cf42230b 100644 --- a/.github/ISSUE_TEMPLATE/02_openapi-fetch-bug.yml +++ b/.github/ISSUE_TEMPLATE/02_openapi-fetch-bug.yml @@ -6,8 +6,9 @@ labels: - triage body: - type: input + id: version attributes: - label: Version + label: openapi-fetch version placeholder: x.x.x validations: required: true @@ -33,7 +34,7 @@ body: required: true - type: checkboxes id: extra - label: Extra attributes: + label: Extra options: - label: I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-fetch/CONTRIBUTING.md)) diff --git a/.github/ISSUE_TEMPLATE/02_openapi-fetch-feat.yml b/.github/ISSUE_TEMPLATE/02_openapi-fetch-feat.yml index 241269a0b..829e340bc 100644 --- a/.github/ISSUE_TEMPLATE/02_openapi-fetch-feat.yml +++ b/.github/ISSUE_TEMPLATE/02_openapi-fetch-feat.yml @@ -1,9 +1,10 @@ name: "openapi-fetch: Feature request" description: Propose new functionality or a breaking change -title: "" labels: - openapi-fetch - enhancement +projects: + - openapi-ts/3 body: - type: textarea id: description @@ -21,7 +22,7 @@ body: required: true - type: checkboxes id: extra - label: Extra attributes: + label: Extra options: - label: I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-fetch/CONTRIBUTING.md)) diff --git a/.github/ISSUE_TEMPLATE/03_openapi-react-query-bug.yml b/.github/ISSUE_TEMPLATE/03_openapi-react-query-bug.yml index 563c33b2e..378293bf8 100644 --- a/.github/ISSUE_TEMPLATE/03_openapi-react-query-bug.yml +++ b/.github/ISSUE_TEMPLATE/03_openapi-react-query-bug.yml @@ -6,8 +6,9 @@ labels: - triage body: - type: input + id: version attributes: - label: Version + label: openapi-react-query version placeholder: x.x.x validations: required: true @@ -26,6 +27,7 @@ body: validations: required: true - type: textarea + id: expected attributes: label: Expected result description: (In case it’s not obvious) @@ -33,7 +35,7 @@ body: required: true - type: checkboxes id: extra - label: Extra attributes: + label: Extra options: - label: I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-react-query/CONTRIBUTING.md)) diff --git a/.github/ISSUE_TEMPLATE/03_openapi-react-query-feat.yml b/.github/ISSUE_TEMPLATE/03_openapi-react-query-feat.yml index c20560c1e..f2b8d4f1d 100644 --- a/.github/ISSUE_TEMPLATE/03_openapi-react-query-feat.yml +++ b/.github/ISSUE_TEMPLATE/03_openapi-react-query-feat.yml @@ -1,6 +1,5 @@ name: "openapi-react-query: Feature request" description: Propose new functionality or a breaking change -title: "" labels: - openapi-react-query - enhancement @@ -21,7 +20,7 @@ body: required: true - type: checkboxes id: extra - label: Extra attributes: + label: Extra options: - label: I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-react-query/CONTRIBUTING.md)) diff --git a/.github/ISSUE_TEMPLATE/04_swr-openapi-bug.yml b/.github/ISSUE_TEMPLATE/04_swr-openapi-bug.yml index 63cb36f05..6feba784f 100644 --- a/.github/ISSUE_TEMPLATE/04_swr-openapi-bug.yml +++ b/.github/ISSUE_TEMPLATE/04_swr-openapi-bug.yml @@ -5,8 +5,9 @@ labels: - bug body: - type: input + id: version attributes: - label: Version + label: swr-openapi version placeholder: x.x.x validations: required: true @@ -25,6 +26,7 @@ body: validations: required: true - type: textarea + id: expected attributes: label: Expected result description: (In case it’s not obvious) @@ -32,7 +34,7 @@ body: required: true - type: checkboxes id: extra - label: Extra attributes: + label: Extra options: - label: I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/swr-openapi/CONTRIBUTING.md)) diff --git a/.github/ISSUE_TEMPLATE/04_swr-openapi-feat.yml b/.github/ISSUE_TEMPLATE/04_swr-openapi-feat.yml index 56da4825b..bc9c564b3 100644 --- a/.github/ISSUE_TEMPLATE/04_swr-openapi-feat.yml +++ b/.github/ISSUE_TEMPLATE/04_swr-openapi-feat.yml @@ -1,6 +1,5 @@ name: "swr-openapi: Feature request" description: Propose new functionality or a breaking change -title: "" labels: - swr-openapi - enhancement @@ -21,7 +20,7 @@ body: required: true - type: checkboxes id: extra - label: Extra attributes: + label: Extra options: - label: I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/swr-openapi/CONTRIBUTING.md)) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 8556147d0..55da861e9 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -4,7 +4,7 @@ import zh from "./zh"; import ja from "./ja"; import shared from "./shared"; import { transformerTwoslash } from "@shikijs/vitepress-twoslash"; -import { ModuleKind, ModuleResolutionKind } from "typescript"; +import { ModuleResolutionKind } from "typescript"; // https://vitepress.dev/reference/site-config export default defineConfig({ diff --git a/docs/.vitepress/en.ts b/docs/.vitepress/en.ts index e7471111b..a15fe27cb 100644 --- a/docs/.vitepress/en.ts +++ b/docs/.vitepress/en.ts @@ -139,7 +139,7 @@ export default defineConfig({ ], footer: { message: - 'Released under the MIT License.', + 'Released under the MIT License. Powered by Netlify.', }, }, }); diff --git a/docs/.vitepress/shared.ts b/docs/.vitepress/shared.ts index d531543f4..7b575d66e 100644 --- a/docs/.vitepress/shared.ts +++ b/docs/.vitepress/shared.ts @@ -26,7 +26,7 @@ const shared: UserConfig = { themeConfig: { siteTitle: false, logo: "/assets/openapi-ts.svg", - outline: 'deep', + outline: "deep", search: { provider: "algolia", options: { diff --git a/docs/.vitepress/theme/CustomLayout.vue b/docs/.vitepress/theme/CustomLayout.vue index 0a71a2955..6fd09798d 100644 --- a/docs/.vitepress/theme/CustomLayout.vue +++ b/docs/.vitepress/theme/CustomLayout.vue @@ -39,7 +39,7 @@ const { Layout } = DefaultTheme; - + @@ -147,6 +150,25 @@ const { Layout } = DefaultTheme; height: 3rem; width: auto; } + +.sidebar-hosting { + color: var(--vp-c-text-3); + font-size: 0.75rem; + font-weight: 500; + letter-spacing: 0.0625em; + margin-block-start: 2rem; + text-transform: uppercase; + + a { + color: var(--vp-c-brand-1); + text-decoration: underline; + + &:hover, + &:focus-visible { + color: var(--vp-c-brand-2); + } + } +}