{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/1711","repository_url":"https://api.github.com/repos/swagger-api/swagger-editor","labels_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/1711/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/1711/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/1711/events","html_url":"https://github.com/swagger-api/swagger-editor/issues/1711","id":308231644,"node_id":"MDU6SXNzdWUzMDgyMzE2NDQ=","number":1711,"title":"Swagger 2.0 's security scheme validated against OAS 3.0 instead of swagger 2.0","user":{"login":"shockey","id":680248,"node_id":"MDQ6VXNlcjY4MDI0OA==","avatar_url":"https://avatars2.githubusercontent.com/u/680248?v=4","gravatar_id":"","url":"https://api.github.com/users/shockey","html_url":"https://github.com/shockey","followers_url":"https://api.github.com/users/shockey/followers","following_url":"https://api.github.com/users/shockey/following{/other_user}","gists_url":"https://api.github.com/users/shockey/gists{/gist_id}","starred_url":"https://api.github.com/users/shockey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shockey/subscriptions","organizations_url":"https://api.github.com/users/shockey/orgs","repos_url":"https://api.github.com/users/shockey/repos","events_url":"https://api.github.com/users/shockey/events{/privacy}","received_events_url":"https://api.github.com/users/shockey/received_events","type":"User","site_admin":false},"labels":[{"id":591729079,"node_id":"MDU6TGFiZWw1OTE3MjkwNzk=","url":"https://api.github.com/repos/swagger-api/swagger-editor/labels/cat:%20validation","name":"cat: validation","color":"c5def5","default":false},{"id":96783394,"node_id":"MDU6TGFiZWw5Njc4MzM5NA==","url":"https://api.github.com/repos/swagger-api/swagger-editor/labels/type:%20bug","name":"type: bug","color":"f9d0c4","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-24T05:42:40Z","updated_at":"2018-10-08T14:39:33Z","closed_at":null,"author_association":"MEMBER","body":"_From @pbarbier on March 23, 2018 18:15_\r\n\r\nWhen editing a swagger 2.0 yaml content featuring oauth2 security schemes like below:\r\n\r\n```\r\nsecurityDefinitions:\r\n  oauth2_Password:\r\n    type: oauth2\r\n    tokenUrl: /authorizationserver/oauth/token\r\n    flow: password\r\n    scopes:\r\n      basic: ''\r\n  oauth2_client_credentials:\r\n    type: oauth2\r\n    tokenUrl: /authorizationserver/oauth/token\r\n    flow: application\r\n    scopes:\r\n      extended: ''\r\n```\r\nValidation error is reported:\r\n```\r\nSchema error at securityDefinitions['oauth2_Password']\r\nshould NOT have additional properties\r\nadditionalProperty: tokenUrl, flow, scopes\r\nJump to line 5243\r\nSchema error at securityDefinitions['oauth2_Password'].type\r\nshould be equal to one of the allowed values\r\nallowedValues: basic, apiKey\r\nJump to line 5244\r\nSchema error at securityDefinitions['oauth2_Password'].tokenUrl\r\nshould match format \"uri\"\r\nformat: uri\r\nJump to line 5245\r\nSchema error at securityDefinitions['oauth2_Password'].flow\r\nshould be equal to one of the allowed values\r\nallowedValues: implicit, application, accessCode\r\nJump to line 5246\r\n```\r\nBasically the validator acts as if the input content was OAS 3.0 while it is swagger 2.0 content\r\n\r\n| Q                               | A\r\n| ------------------------------- | -------\r\n| Bug or feature request?         |  Bug\r\n| Which Swagger/OpenAPI version?  |  Swagger 2.0\r\n| Which Swagger-UI version?       |  3.13.0\r\n| How did you install Swagger-UI? |  Use through editor.swagger.io\r\n| Which browser & version?        | Chrome latest\r\n| Which operating system?         | WIN10\r\n\r\n\r\n### Demonstration API definition\r\nSee above\r\n\r\n### Configuration (browser query string, constructor, config.yaml)\r\nregular use of editor.swagger.io\r\n\r\n### Expected Behavior\r\nNo error should be shown for this part of the yaml\r\n\r\n### Current Behavior\r\nSee above\r\n\r\n### Possible Solution\r\n\r\n### Context\r\nThe error messages are misleading. They claim the content is not valid when it is.\r\n\r\n\r\n_Copied from original issue: swagger-api/swagger-ui#4364_"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/comments/427860978","html_url":"https://github.com/swagger-api/swagger-editor/issues/1711#issuecomment-427860978","issue_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/1711","id":427860978,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzg2MDk3OA==","user":{"login":"vspiliopoulos","id":38494470,"node_id":"MDQ6VXNlcjM4NDk0NDcw","avatar_url":"https://avatars1.githubusercontent.com/u/38494470?v=4","gravatar_id":"","url":"https://api.github.com/users/vspiliopoulos","html_url":"https://github.com/vspiliopoulos","followers_url":"https://api.github.com/users/vspiliopoulos/followers","following_url":"https://api.github.com/users/vspiliopoulos/following{/other_user}","gists_url":"https://api.github.com/users/vspiliopoulos/gists{/gist_id}","starred_url":"https://api.github.com/users/vspiliopoulos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vspiliopoulos/subscriptions","organizations_url":"https://api.github.com/users/vspiliopoulos/orgs","repos_url":"https://api.github.com/users/vspiliopoulos/repos","events_url":"https://api.github.com/users/vspiliopoulos/events{/privacy}","received_events_url":"https://api.github.com/users/vspiliopoulos/received_events","type":"User","site_admin":false},"created_at":"2018-10-08T14:39:33Z","updated_at":"2018-10-08T14:39:33Z","author_association":"NONE","body":"@pbarbier Any plans for fixing this? I am facing the same issue as well"}}
{"actor":{"display_login":"vspiliopoulos"}}