Xero-OpenAPI icon indicating copy to clipboard operation
Xero-OpenAPI copied to clipboard

Can't run Accounting openapi in Prism

Open overgapo opened this issue 3 years ago • 0 comments

For API mocking purposes and to avoid creating demo or trial company i tried to run Accounting openapi in Prism but with no luck.

Expected Behavior

Command prism mock Xero-OpenAPI/xero_accounting.yaml runs a mock server

Current Behavior

Got fatal Cannot set property $ref of #<Object> which has only a getter error

Possible Solution

So i tried to open openapi file in stsoplight.io to see possible errors in specification and found a lot of errors and warnings: image

Typical errors are:

image Removing quotes around object in example section fixes this error

image A lot of similar errors that appear after fixing examples blocks

So mostly i found out - that problem is with quotes, but after fixing it - new errors happen.

I suppose after fixing all errors - it should run correctly with Prism.

overgapo avatar Jul 07 '22 11:07 overgapo