-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
While resolving remote or relative references, json-refs does not do a complete resolve. #102
Comments
As for Sway does handle all kinds of references. |
One thing that I miss in Sway after using swagger-tools, is an api to validate a model definition against a given example or sample data.
After looking at the sway api documented over here, I cannot find something like that. I do see Is it possible to expose an api similar to |
Well, you can do that with Sway but it's built into it's object model. So if the
The only reason Also, as for the request/response validation requiring objects/wrappers, it's a very simple wrapper. If you must use something similar to |
Also, I'm just telling you how/why things are now. I'm all ears if there is a better way. As for the API, I wanted it to be intuitive and to match Swagger objects. I didn't want to create an object for every type because it just didn't make sense. From a model perspective, models are used as responses and inputs via parameter bodies. That's why there are validations for those as they are. Feel free to make requests in Sway if you need something. Other than that, I'm closing this because the issue you originally filed is a duplicate of #30. |
For example: I have two swagger specs A and B residing at the same location.
In the following situation, it will correctly resolve a1 with the B1 from the definitions section of B.json. However, it will not resolve B2 (basically it will not traverse further to ensure that all the other locally referenced properties of that model are also fully resolved).
Please execute the following example to get an idea.
The output swagger will have "$ref": "#/definitions/NetworkInterfacePropertiesFormat" as a reference but there is no definitions section in the output swagger.
Couple of questions:
Btw, I need to do this because swagger-tools does not accept a swagger spec that contains a relative or remote file reference. Hence, I need to resolve them first and then validate the spec.
Is it possible for swagger-tools to handle file references (relative or remote) then it will help us tremendously.
Does sway handle remote or relative file references in a swagger spec?
Once again, thank you for all the quick responses and genuinely all the tools that you are developing in the swagger space are very very useful 👍
The text was updated successfully, but these errors were encountered: