{"action":"opened","issue":{"url":"https://api.github.com/repos/tomakehurst/wiremock/issues/1006","repository_url":"https://api.github.com/repos/tomakehurst/wiremock","labels_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/1006/labels{/name}","comments_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/1006/comments","events_url":"https://api.github.com/repos/tomakehurst/wiremock/issues/1006/events","html_url":"https://github.com/tomakehurst/wiremock/issues/1006","id":366917272,"node_id":"MDU6SXNzdWUzNjY5MTcyNzI=","number":1006,"title":"\"$schema\" refused in stubs definition","user":{"login":"lmazuel","id":1050156,"node_id":"MDQ6VXNlcjEwNTAxNTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1050156?v=4","gravatar_id":"","url":"https://api.github.com/users/lmazuel","html_url":"https://github.com/lmazuel","followers_url":"https://api.github.com/users/lmazuel/followers","following_url":"https://api.github.com/users/lmazuel/following{/other_user}","gists_url":"https://api.github.com/users/lmazuel/gists{/gist_id}","starred_url":"https://api.github.com/users/lmazuel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmazuel/subscriptions","organizations_url":"https://api.github.com/users/lmazuel/orgs","repos_url":"https://api.github.com/users/lmazuel/repos","events_url":"https://api.github.com/users/lmazuel/events{/privacy}","received_events_url":"https://api.github.com/users/lmazuel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-04T18:35:02Z","updated_at":"2018-10-04T18:35:02Z","closed_at":null,"author_association":"NONE","body":"To improve auto-completion in IDE, I added a \"$schema\" to my stub definition:\r\n\r\n```json\r\n{\r\n    \"$schema\": \"https://raw.githubusercontent.com/tomakehurst/wiremock/master/src/main/resources/raml/schemas/stub-mapping.schema.json\",\r\n    \"scenarioName\": \"To do list\",\r\n    \"requiredScenarioState\": \"Started\",\r\n    \"request\": {\r\n        \"method\": \"GET\",\r\n        \"url\": \"/todo/items\"\r\n    },\r\n    \"response\": {\r\n        \"status\": 200,\r\n        \"body\" : \"<items><item>Buy milk</item></items>\"\r\n    }\r\n}\r\n```\r\n\r\nIt works like a charm and help a lot to write stub files. However, wiremock won't load the stub with that node (standalone jar)\r\n```shell\r\nException in thread \"main\" com.github.tomakehurst.wiremock.standalone.MappingFileException: Error loading file C:\\Users\\lmazuel\\Wiremock\\.\\mappings\\scenario1.json:\r\nUnrecognized field \"$schema\" (class com.github.tomakehurst.wiremock.stubbing.StubMapping), not marked as ignorable\r\n        at com.github.tomakehurst.wiremock.standalone.JsonFileMappingsSource.loadMappingsInto(JsonFileMappingsSource.java:89)\r\n        at com.github.tomakehurst.wiremock.core.WireMockApp.loadMappingsUsing(WireMockApp.java:159)\r\n        at com.github.tomakehurst.wiremock.core.WireMockApp.loadDefaultMappings(WireMockApp.java:155)\r\n        at com.github.tomakehurst.wiremock.core.WireMockApp.<init>(WireMockApp.java:89)\r\n        at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:71)\r\n        at com.github.tomakehurst.wiremock.standalone.WireMockServerRunner.run(WireMockServerRunner.java:65)\r\n        at com.github.tomakehurst.wiremock.standalone.WireMockServerRunner.main(WireMockServerRunner.java:125)\r\n```\r\n\r\nAm I missing something? I'm a bit new in JSON schema definition, but it seems to me \"$schema\" is a common practice.\r\n\r\nThank you!\r\n\r\n"}}
{"actor":{"display_login":"lmazuel"}}