Contributions
Re: StopLight "auto"-modifies files
I am not quite sure I understand why I should mark it as solved? In my PoV the problem is still there - if SmartBear decides to fix it - then I would be happy to mark it as resolved :-)2 months agoPlace Stoplight QuestionsStoplight Questions10Views0likes0CommentsRe: StopLight "auto"-modifies files
Hi again Humashankar I don't think the issue you are linking to is related to what I write above. The issue you are linking to is about code blocks. Also the issue you link to is resolved - my problem still exists :-(2 months agoPlace Stoplight QuestionsStoplight Questions3Views0likes0CommentsRe: StopLight "auto"-modifies files
Hi Humashankar No worries - I have already done so. The response from Support is "that is just the way it is" - I was sort of hoping other people also find this annoying and SmartBear could prioritize to fix this... In my PoV it should be an option to turn on/off - whoever wants this can turn it on - and I could turn it off :-)2 months agoPlace Stoplight QuestionsStoplight Questions7Views1like0CommentsRe: StopLight "auto"-modifies files
Here is an example of StopLight removing newlines and re-indents comments to (in my point of view) a wrong indention: This is how it originally looked (before the push): As you can see the comment has been indented extra to align with line 2086 - but the comment is for the "ErrorResponse" so it makes more sense it is aligned with this... Also annoying that newlines are removed as it makes it easier to read...2 months agoPlace Stoplight QuestionsStoplight Questions5Views1like0CommentsRe: StopLight "auto"-modifies files
Hi Humashankar Yes - that is one of the things (sometimes it is only replaced with ">"). When I insert newlines (to separate objects definitions) - the newlines are removed again by StopLight. Inserted comments get re-indented and makes it look weird2 months agoPlace Stoplight QuestionsStoplight Questions24Views1like0CommentsStopLight "auto"-modifies files
Is it just me or does anyone else find it super annoying that StopLight modifies files when pushing to GitHub. If I have a spec that looks like this: StopLight "automodifies" it to: It also removes newlines that I have deliberately added and changes indention for comments Anybody knows where this can be disabled?2 months agoPlace Stoplight QuestionsStoplight Questions57Views2likes10Comments- 2 months agoPlace Stoplight QuestionsStoplight Questions13Views0likes0Comments
Re: The use of oneOf or anyOf in arrays
chichepono worries - I understood the example 😉 With the autogenerated examples I would assume that: anyOf would generate: "animals": [ { "name": "string", "legs": 0 }, { "name": "string", "owner": "string" } ] and oneOf would generate: "animals": [ { "name": "string", "legs": 0 }, { "name": "string", "legs": 0 } ] (Here the first item in the oneOf would just be repeated twice...) Where in the specifications does it specify that the oneOf or anyOf applies to the entire list and not to each item in the list? My assumption was that below the keyword "items" - the structure for each item in the list is specified. This could be a type:string - in which case all items in the list would have to be of type string. In case it is a oneOf - then each item in the list would be a oneOf... Again - this is just my (maybe wrongly) assumption - it would be great to read an official specification for the use of oneOf and/or anyOf in combination with an array (items field) 🙂8 months agoPlace SwaggerHub QuestionsSwaggerHub Questions529Views0likes1CommentRe: The use of oneOf or anyOf in arrays
According to this article:https://www.baeldung.com/openapi-array-of-varying-types When using oneOf - each item in the list must be either of type DogOR type Cat (https://www.baeldung.com/openapi-array-of-varying-types#1-oneof-keyword) When using anyOf - then the items in the list can be a merge of DogAND Cat (https://www.baeldung.com/openapi-array-of-varying-types#2-anyof-keyword) If this article is correct - then the autogenerated examples on SwaggerHub are wrong.8 months agoPlace SwaggerHub QuestionsSwaggerHub Questions637Views0likes1CommentRe: The use of oneOf or anyOf in arrays
Hichichepo Thanks for your comments. Yes I am using 3.0.x Can you please explain a little more what you mean by: In conclusion, the difference in the way both items are validated. I can see the example code generated by Swagger for both lists are the same? If the difference is in the validation - which of the two lists is correct? The one using oneOfor the one using anyOf? Regarding your example above I assume you meant type: array and not type:string for "Animals" 😉 When I read the documentation for oneOf vs anyOf (you made a screenshot above) - then it makes me think that for arrays: When anyOf is used in an array - then each item in the array can be: a Dog followed by a Cat a Cat followed by a Dob just a Dog just a Cat When oneOf is used in an array - then each item in the list can be exactly a Dog or a Cat. In my opinion oneOf is the correct use for the above example-lists...?8 months agoPlace SwaggerHub QuestionsSwaggerHub Questions612Views0likes0Comments