We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a continuation of #934, nested $ref $ref definition does not work in structures nested to more then one level.
Sample showing the issue:
{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Test sample showing swagger error", "description": "Show that $ref to the same definition only works to a certain level", "contact": { "name": "Troels Liebe Bentsen", "email": "[email protected]" } }, "host": "localhost", "basePath": "/", "schemes": [ "http" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/test": { "post": { "summary": "Test", "description": "Test stuff", "operationId": "doTest", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "$ref": "#/definitions/test" } } ], "responses": { "200": { "description": "Test stuff response", "schema": { "$ref": "#/definitions/test" } }, "405": { "description": "Invalid input" } }, "tags": ["test"] } } }, "definitions": { "test": { "required": [ "test1" ], "properties": { "test1": { "$ref": "#/definitions/badgerfishstring" }, "test2": { "$ref": "#/definitions/badgerfishstring" }, "test3": { "$ref": "#/definitions/testNested" } } }, "testNested": { "required": [ "test4" ], "properties": { "test4": { "$ref": "#/definitions/badgerfishstring" }, "test5": { "$ref": "#/definitions/badgerfishstring" }, "test3": { "$ref": "#/definitions/testMoreNested" } } }, "testMoreNested": { "required": [ "test6" ], "properties": { "test6": { "$ref": "#/definitions/badgerfishstring" }, "test7": { "$ref": "#/definitions/badgerfishstring" } } }, "badgerfishstring": { "required": [ "$" ], "properties": { "$": { "type": "string" } } } } }
The text was updated successfully, but these errors were encountered:
This may also be a duplicate of #975. I'm sure this issue and the other two mentioned are all related...
Sorry, something went wrong.
This is still an issue in develop_2.0
@whitlockjc please take a look at how we resolve refs in swagger-js
Here is a better example to reproduce this issue:
--- swagger: '2.0' info: version: 0.0.0 title: Simple API paths: /: get: responses: 200: description: OK schema: $ref: '#/definitions/GrandParent' definitions: GrandParent: type: object properties: Parent: $ref: '#/definitions/Parent' Parent: type: object properties: Child: $ref: '#/definitions/Child' Child: type: object properties: name: type: string
Please follow this issue here: swagger-api/swagger-js#270
No branches or pull requests
This is a continuation of #934, nested $ref $ref definition does not work in structures nested to more then one level.
Sample showing the issue:
The text was updated successfully, but these errors were encountered: