node-mock-server icon indicating copy to clipboard operation
node-mock-server copied to clipboard

Import Swagger doesn't parse $ref

Open fr-irene opened this issue 5 years ago • 1 comments

If the request and response is specified using $ref, the request_schema.json and response.schema.json file is not getting the detail schema inside $ref

fr-irene avatar Dec 15 '19 14:12 fr-irene

Hi @fr-irene,

I cannot reproduce the described issue.

In the demo data is this schema defined: https://github.com/smollweide/node-mock-server/blob/master/demo/rest/products/%23%7BproductCode%7D/GET/response_schema.json#L10

which refers to https://github.com/smollweide/node-mock-server/blob/master/demo/rest/_DTO/CardDTO.json

if you change for example the name from string to number and validate the deep-validation.json you can see the $ref works fine.

2019-12-22_2115

Did I got something wrong? Can you add some more details please?

Best, Simon

smollweide avatar Dec 22 '19 20:12 smollweide