Skip to content

Commit 150dee3

Browse files
committed
fix: x-if as preprocessor instead of decorator
1 parent 637e544 commit 150dee3

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

redocly.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extends:
55
plugins:
66
- ./redocly/plugin.ts
77

8-
decorators:
8+
preprocessors:
99
vrchat/x-if: on
1010

1111
apis:
@@ -20,22 +20,23 @@ apis:
2020
output: dist/openapi.json
2121
decorators:
2222
remove-x-internal: on
23+
preprocessors:
2324
vrchat/x-if:
2425
defines:
2526
- jsonschema
2627

2728
legacy-internal:
2829
root: openapi/openapi.yaml
2930
output: dist/openapi-internal+legacy.json
30-
decorators:
31+
preprocessors:
3132
vrchat/x-if:
3233
defines:
3334
- internal
3435

3536
modern-internal:
3637
root: openapi/openapi.yaml
3738
output: dist/openapi-internal.json
38-
decorators:
39+
preprocessors:
3940
vrchat/x-if:
4041
defines:
4142
- jsonschema
@@ -52,22 +53,23 @@ apis:
5253
output: dist/openapi.yaml
5354
decorators:
5455
remove-x-internal: on
56+
preprocessors:
5557
vrchat/x-if:
5658
defines:
5759
- jsonschema
5860

5961
legacy-internal-yaml:
6062
root: openapi/openapi.yaml
6163
output: dist/openapi-internal+legacy.yaml
62-
decorators:
64+
preprocessors:
6365
vrchat/x-if:
6466
defines:
6567
- internal
6668

6769
modern-internal-yaml:
6870
root: openapi/openapi.yaml
6971
output: dist/openapi-internal.yaml
70-
decorators:
72+
preprocessors:
7173
vrchat/x-if:
7274
defines:
7375
- jsonschema

redocly/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Plugin } from "@redocly/openapi-core";
33
export default function myLocalPlugin(): Plugin {
44
return {
55
id: "vrchat",
6-
decorators: {
6+
preprocessors: {
77
oas3: {
88
"x-if": ({ defines = [] }: { defines?: Array<string> }) => {
99
return {

0 commit comments

Comments
 (0)