Open PinkyRabbit opened 4 years ago
I may be wrong, but I think in your swagger.yaml
file you'll want to have the value of the $ref
property under /auth/login
be './test.yaml#/test'
instead of 'test.yaml#/test'
.
So the code would look like this:
swagger: '2.0'
info:
version: 1.0.0
title: My title
description: My description
schemes:
- http
- https
host: localhost:3000
basePath: /api/v1
# format of the responses to the client (Accepts)
consumes:
- application/json
produces:
- application/json
paths:
/auth/login:
$ref: './test.yaml#/test'
and test.yaml
would remain the same. Your only issue is how you're defining the file path. I'm also assuming that test.yaml
and swagger.yaml
are located in the same directory.
Let me know if this helps!
swagger.yaml
test.yaml
response:
Where I do wrong?