Skip to content

Commit 5f67f54

Browse files
committed
update types
1 parent a840db5 commit 5f67f54

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

packages/core/src/rules/common/no-enum-type-mismatch.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import { matchesJsonSchemaType, oasTypeOf } from '../utils.js';
22

3-
import type { Oas3Rule, Oas2Rule, Async3Rule, Async2Rule } from '../../visitors.js';
3+
import type { Oas3Rule, Oas2Rule, Async3Rule, Async2Rule, Arazzo1Rule } from '../../visitors.js';
44
import type { Oas2Schema } from '../../typings/swagger.js';
55
import type { Oas3Schema } from '../../typings/openapi.js';
66
import type { UserContext } from '../../walk.js';
77

8-
export const NoEnumTypeMismatch: Oas3Rule | Oas2Rule | Async3Rule | Async2Rule = () => {
8+
export const NoEnumTypeMismatch:
9+
| Oas3Rule
10+
| Oas2Rule
11+
| Async3Rule
12+
| Async2Rule
13+
| Arazzo1Rule = () => {
914
return {
1015
Schema(schema: Oas2Schema | Oas3Schema, { report, location }: UserContext) {
1116
if (schema.enum && !Array.isArray(schema.enum)) return;

packages/core/src/rules/common/no-schema-type-mismatch.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import type { Oas3Schema } from '../../typings/openapi.js';
22
import type { Oas2Schema } from '../../typings/swagger.js';
3-
import type { Async2Rule, Async3Rule, Oas2Rule, Oas3Rule } from '../../visitors.js';
3+
import type { Arazzo1Rule, Async2Rule, Async3Rule, Oas2Rule, Oas3Rule } from '../../visitors.js';
44
import type { UserContext } from '../../walk.js';
55

6-
export const NoSchemaTypeMismatch: Oas3Rule | Oas2Rule | Async3Rule | Async2Rule = () => {
6+
export const NoSchemaTypeMismatch:
7+
| Oas3Rule
8+
| Oas2Rule
9+
| Async3Rule
10+
| Async2Rule
11+
| Arazzo1Rule = () => {
712
return {
813
Schema(schema: Oas2Schema | Oas3Schema, { report, location }: UserContext) {
914
if (schema.type === 'object' && schema.items) {

0 commit comments

Comments
 (0)