invalid duplicate references created w/ external file reference
See original GitHub issueI’m noticing a regression between 1.0.32 and 1.0.33 where a swagger spec defined below will create two XYZResponse objects instead of just one as in the 1.0.32 release - I believe this is a result of this change: https://github.com/swagger-api/swagger-parser/commit/a5813748238448b14a61baf8ca732cee08561c88 @joeljons could you validate this issue - is there a different way I should be defining XYZResponse? seems like this should be working ok:
main swagger file:
{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Sample Issue", "description": "API", "termsOfService": "TBD", "contact": { "name": "API Team" }, "license": { "name": "MIT" } }, "host": "xyz.com", "basePath": "", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/xyz": { "$ref": "./xyz.json#/do_xyz" } }, "definitions": { "XYZResponse": { "$ref": "./xyz.json#/definitions/XYZResponse" } } }
xyz.json:
{ "do_xyz": { "get": { "description": "do xyz stuff", "operationId": "doXyz", "produces": [ "application/json" ], "parameters": [ ], "responses": { "200": { }, "default": { } } } }, "definitions": { "XYZResponse": { "properties": { "foo": { "type": "string" } } } } }
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
That is exactly how I see this.
yup that’s right @gracekarina