Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit 418234e

Browse files
committed
fix(oas3): show correct source maps for schema invalid type warning
1 parent 95df0a9 commit 418234e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/fury-adapter-oas3-parser/lib/parser/oas/parseSchemaObject.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,13 @@ function validateValuesMatchSchema(context, schema) {
131131
function parseSchema(context) {
132132
const { namespace } = context;
133133

134-
const ensureValidType = R.unless(isValidType, createWarning(namespace,
135-
`'Schema Object' 'type' must be either ${types.join(', ')}`));
134+
const ensureValidType = R.unless(
135+
isValidType,
136+
R.compose(
137+
createWarning(namespace, `'Schema Object' 'type' must be either ${types.join(', ')}`),
138+
getValue
139+
)
140+
);
136141

137142
const parseType = pipeParseResult(namespace,
138143
parseString(context, name, false),

0 commit comments

Comments
 (0)