-
Notifications
You must be signed in to change notification settings - Fork 383
Open
Description
I'm using a yaml reference in oas which is failing to create mock with below reference.
Error:
$ref: 'https://opensource.zalando.com/restful-api-guidelines/models/problem-1.0.1.yaml#Problem'
Is prism rely on json reference only and not yaml reference?
Current Behavior
Failing with below error:
{
stack: 'ResolverError: Error downloading https://opensource.zalando.com/restful-api-guidelines/models/problem-1.0.1.yaml \n' +
'RequestInit: Expected signal ("AbortSignal {\n' +
' eventEmitter: EventEmitter {\n' +
' _events: [Object: null prototype] {},\n' +
' _eventsCount: 0,\n' +
' _maxListeners: undefined,\n' +
' Symbol(shapeMode): false,\n' +
' Symbol(kCapture): false\n' +
' },\n' +
' onabort: null,\n' +
' aborted: false,\n' +
' reason: undefined\n' +
'}") to be an instance of AbortSignal.\n' +
' at download ({PATH}\\node_modules\\@stoplight\\prism-cli\\node_modules\\@stoplight\\json-schema-ref-parser\\lib\\resolvers\\http.js:175:11)',
code: 'ERESOLVER',
message: 'Error downloading https://opensource.zalando.com/restful-api-guidelines/models/problem-1.0.1.yaml \n' +
'RequestInit: Expected signal ("AbortSignal {\n' +
' eventEmitter: EventEmitter {\n' +
' _events: [Object: null prototype] {},\n' +
' _eventsCount: 0,\n' +
' _maxListeners: undefined,\n' +
' Symbol(shapeMode): false,\n' +
' eventEmitter: EventEmitter {\n' +
' _events: [Object: null prototype] {},\n' +
' _eventsCount: 0,\n' +
' _maxListeners: undefined,\n' +
' Symbol(shapeMode): false,\n' +
' _eventsCount: 0,\n' +
' _maxListeners: undefined,\n' +
' Symbol(shapeMode): false,\n' +
' Symbol(shapeMode): false,\n' +
' Symbol(kCapture): false\n' +
' },\n' +
' onabort: null,\n' +
' aborted: false,\n' +
' reason: undefined\n' +
'}") to be an instance of AbortSignal.',
source: 'https://opensource.zalando.com/restful-api-guidelines/models/problem-1.0.1.yaml',
path: null,
toJSON: [Function: toJSON],
name: 'ResolverError',
toString: [Function: toString]
}
Expected Behavior
Accepts the yaml file
Steps to Reproduce
- Add zalando external reference for testing to any yaml oas and run prism mock command.
- Version used: prism : 5.14.2, node: v24.4.1
- Environment name and version:
- Operating System and version (desktop or mobile): Windows
Metadata
Metadata
Assignees
Labels
No labels