{"action":"created","issue":{"url":"https://api.github.com/repos/dhlab-basel/Knora/issues/554","repository_url":"https://api.github.com/repos/dhlab-basel/Knora","labels_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/554/labels{/name}","comments_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/554/comments","events_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/554/events","html_url":"https://github.com/dhlab-basel/Knora/pull/554","id":239144328,"number":554,"title":"fix (invalid mapping Iri):","user":{"login":"tobiasschweizer","id":6000023,"avatar_url":"https://avatars0.githubusercontent.com/u/6000023?v=3","gravatar_id":"","url":"https://api.github.com/users/tobiasschweizer","html_url":"https://github.com/tobiasschweizer","followers_url":"https://api.github.com/users/tobiasschweizer/followers","following_url":"https://api.github.com/users/tobiasschweizer/following{/other_user}","gists_url":"https://api.github.com/users/tobiasschweizer/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasschweizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasschweizer/subscriptions","organizations_url":"https://api.github.com/users/tobiasschweizer/orgs","repos_url":"https://api.github.com/users/tobiasschweizer/repos","events_url":"https://api.github.com/users/tobiasschweizer/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasschweizer/received_events","type":"User","site_admin":false},"labels":[{"id":294389787,"url":"https://api.github.com/repos/dhlab-basel/Knora/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"tobiasschweizer","id":6000023,"avatar_url":"https://avatars0.githubusercontent.com/u/6000023?v=3","gravatar_id":"","url":"https://api.github.com/users/tobiasschweizer","html_url":"https://github.com/tobiasschweizer","followers_url":"https://api.github.com/users/tobiasschweizer/followers","following_url":"https://api.github.com/users/tobiasschweizer/following{/other_user}","gists_url":"https://api.github.com/users/tobiasschweizer/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasschweizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasschweizer/subscriptions","organizations_url":"https://api.github.com/users/tobiasschweizer/orgs","repos_url":"https://api.github.com/users/tobiasschweizer/repos","events_url":"https://api.github.com/users/tobiasschweizer/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasschweizer/received_events","type":"User","site_admin":false},"assignees":[{"login":"tobiasschweizer","id":6000023,"avatar_url":"https://avatars0.githubusercontent.com/u/6000023?v=3","gravatar_id":"","url":"https://api.github.com/users/tobiasschweizer","html_url":"https://github.com/tobiasschweizer","followers_url":"https://api.github.com/users/tobiasschweizer/followers","following_url":"https://api.github.com/users/tobiasschweizer/following{/other_user}","gists_url":"https://api.github.com/users/tobiasschweizer/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasschweizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasschweizer/subscriptions","organizations_url":"https://api.github.com/users/tobiasschweizer/orgs","repos_url":"https://api.github.com/users/tobiasschweizer/repos","events_url":"https://api.github.com/users/tobiasschweizer/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasschweizer/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-06-28T12:14:18Z","updated_at":"2017-06-28T13:03:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dhlab-basel/Knora/pulls/554","html_url":"https://github.com/dhlab-basel/Knora/pull/554","diff_url":"https://github.com/dhlab-basel/Knora/pull/554.diff","patch_url":"https://github.com/dhlab-basel/Knora/pull/554.patch"},"body":"throw an error when the user provides an invalid mapping Iri\r\n\r\n@loicjaouen Could you please try to do the thing you did on this branch and see if you get an apt error message?"},"comment":{"url":"https://api.github.com/repos/dhlab-basel/Knora/issues/comments/311653253","html_url":"https://github.com/dhlab-basel/Knora/pull/554#issuecomment-311653253","issue_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/554","id":311653253,"user":{"login":"loicjaouen","id":3933654,"avatar_url":"https://avatars0.githubusercontent.com/u/3933654?v=3","gravatar_id":"","url":"https://api.github.com/users/loicjaouen","html_url":"https://github.com/loicjaouen","followers_url":"https://api.github.com/users/loicjaouen/followers","following_url":"https://api.github.com/users/loicjaouen/following{/other_user}","gists_url":"https://api.github.com/users/loicjaouen/gists{/gist_id}","starred_url":"https://api.github.com/users/loicjaouen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loicjaouen/subscriptions","organizations_url":"https://api.github.com/users/loicjaouen/orgs","repos_url":"https://api.github.com/users/loicjaouen/repos","events_url":"https://api.github.com/users/loicjaouen/events{/privacy}","received_events_url":"https://api.github.com/users/loicjaouen/received_events","type":"User","site_admin":false},"created_at":"2017-06-28T13:03:06Z","updated_at":"2017-06-28T13:03:06Z","body":"# test\r\n\r\n```sh\r\n$ curl -X POST http://localhost:3333/v1/mapping \\\r\n    -u 'anything.user02@example.org:test' \\\r\n    -H 'content-type: multipart/form-data' \\\r\n    -F xml=@/Users/ljaouen/Soft/Code/github/KnoraBasle/webapi/_test_data/test_route/texts/mappingForHTML.xml \\\r\n   -F 'json={\r\n    \"project_id\": \"http://data.knora.org/projects/anything\",\r\n    \"label\": \"mapping for HTML\",\r\n    \"mappingName\": \"HTMLMapping\"\r\n}'\r\n```\r\nresult:\r\n```json\r\n{\"mappingIri\":\"http://data.knora.org/projects/anything/mappings/HTMLMapping\",\"status\":0}\r\n```\r\n\r\ncreation of a resource with a wrong mapping:\r\n```sh\r\n$ curl -X POST \\\r\n   'http://localhost:3333/v1/resources' \\\r\n   -u 'anything.user02@example.org:test' \\\r\n   -H 'Content-Type: application/json' \\\r\n   --data '{\r\n     \"restype_id\": \"http://www.knora.org/ontology/anything#Thing\",\r\n     \"properties\": {\r\n         \"http://www.knora.org/ontology/anything#hasText\": [{\r\n             \"richtext_value\": {\"utf8str\": \"test mapping\"}\r\n         }],\r\n         \"http://www.knora.org/ontology/anything#hasRichtext\": [{\r\n                 \"richtext_value\": {\r\n                     \"xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<text><p>test mapping</p></text>\",\r\n                     \"mapping_id\": \"http://data.knora.org/projects/standoff/mappings/HTMLMapping\"\r\n                 }\r\n         }]\r\n     },\r\n     \"project_id\": \"http://data.knora.org/projects/anything\",\r\n     \"label\": \"test mapping\"\r\n }'\r\n```\r\n\r\nresponse:\r\n```sh\r\n{\"status\":11,\"error\":\"org.knora.webapi.BadRequestException: mapping http://data.knora.org/projects/standoff/mappings/HTMLMapping does not exist\"}\r\n```\r\n\r\n# conclusion\r\n\r\nthis is much better :)"}}
{"actor":{"display_login":"loicjaouen"}}