{"action":"closed","issue":{"url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/510","labels_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/510/labels{/name}","comments_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/510/comments","events_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle/issues/510/events","html_url":"https://github.com/domaindrivendev/Swashbuckle/issues/510","id":108155826,"number":510,"title":"How can I validate a Swagger Document","user":{"login":"DotNetRockStar","id":9408944,"avatar_url":"https://avatars.githubusercontent.com/u/9408944?v=3","gravatar_id":"","url":"https://api.github.com/users/DotNetRockStar","html_url":"https://github.com/DotNetRockStar","followers_url":"https://api.github.com/users/DotNetRockStar/followers","following_url":"https://api.github.com/users/DotNetRockStar/following{/other_user}","gists_url":"https://api.github.com/users/DotNetRockStar/gists{/gist_id}","starred_url":"https://api.github.com/users/DotNetRockStar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DotNetRockStar/subscriptions","organizations_url":"https://api.github.com/users/DotNetRockStar/orgs","repos_url":"https://api.github.com/users/DotNetRockStar/repos","events_url":"https://api.github.com/users/DotNetRockStar/events{/privacy}","received_events_url":"https://api.github.com/users/DotNetRockStar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-24T15:34:12Z","updated_at":"2015-10-13T15:13:42Z","closed_at":"2015-10-13T15:13:42Z","body":"I was wondering if there is some utility class that can validate a swagger document?  I have gone through some of the code but have not found anything such as this.\r\n\r\nFor Example:\r\n```\r\nstring mySwaggerText = GetSomeAwesomeSwaggerText();\r\nvar swaggerValidator = new SwaggerValidator();\r\nvar validationResult = swaggerValidator.Validate(mySwaggerText);\r\nif (!validationResult.IsValid)\r\n{\r\n    // Do stuffz\r\n    foreach (var item in validationResult.Items)\r\n    {\r\n         // Cool.  This shows me what is wrong.\r\n    }\r\n}\r\n```\r\n\r\nIf not that's cool, but exposing some of these tools that are likely being used internally would be awesome for some things I am working on.\r\n\r\nThanks!"}}