-
Notifications
You must be signed in to change notification settings - Fork 35
Cannot find module '../dotjs/ref' #11
Comments
@bjfletcher Have you tried it since? The latest release, |
@blakeembrey This particular issue looks like to have been fixed. A very quick turnaround by @epoberezkin there, thanks. :) I have a new issue:
which is probably some unrelated issue so I'll just close this AJV issue. Thanks @blakeembrey :) |
@bjfletcher Right now Osprey isn't resolving external schemas. Did this work with older versions of Osprey or the mocking service? Edit: It shouldn't have worked with older versions, there was never any external resolve logic there. However, it's possible to add this as a feature in the future. It'll just change the API quite a bit to support resolving async dependencies. |
@blakeembrey Great, thanks for this clarity. It's very much appreciated. Is there an issue raised for external schemas support? I'd like to follow it. |
There is not right now, but you're welcome to create one (or I can) here https://github.com/mulesoft-labs/osprey-method-handler/issues |
ajv allows adding "external" referenced schemas, but they have to be added before compilation. I was thinking about the use case when the schema comes from some external (hopefully trusted) source so that it is not known which schemas are referenced from it. Although I don't want to implement any asynchronous loading in ajv, I was thinking that the exception that ajv throws when the schema is missing can contain the missing schema URI so that the user can load it, add it to ajv instance and call compile again (this process can be repeated multiple times until all references are resolved). What do you think? |
@epoberezkin Sounds like a good idea. I wouldn't want to do asynchronous loading from the library either, which is why I was still on the fence about the appropriate API in Osprey for this (failures need to occur/register well before the route is being loaded). @bjfletcher I think a good solution for Osprey in the meantime is to expose the |
…nd missingSchema, related to #43, mulesoft-labs/osprey-mock-service#11
…sing supplied function, #43, mulesoft-labs/osprey-mock-service#11
…sing supplied function, #43, mulesoft-labs/osprey-mock-service#11
As of yesterday, in trying to run the mock service, immediately I get the following error:
This is regression as it was working fine before yesterday. It seems that there's been a release with the AJV module that's causing problems here. I've asked on the AJV project about this: ajv-validator/ajv#38
It may be that we'll need to lock AJV version to 1.0.x in
osprey-method-handler
.The text was updated successfully, but these errors were encountered: