{"action":"opened","issue":{"url":"https://api.github.com/repos/edgexfoundry/edgex-go/issues/231","repository_url":"https://api.github.com/repos/edgexfoundry/edgex-go","labels_url":"https://api.github.com/repos/edgexfoundry/edgex-go/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/edgexfoundry/edgex-go/issues/231/comments","events_url":"https://api.github.com/repos/edgexfoundry/edgex-go/issues/231/events","html_url":"https://github.com/edgexfoundry/edgex-go/issues/231","id":323811939,"number":231,"title":"AdminState and OperatingState reported as incorrect if not in all caps","user":{"login":"tsconn23","id":1342980,"avatar_url":"https://avatars3.githubusercontent.com/u/1342980?v=4","gravatar_id":"","url":"https://api.github.com/users/tsconn23","html_url":"https://github.com/tsconn23","followers_url":"https://api.github.com/users/tsconn23/followers","following_url":"https://api.github.com/users/tsconn23/following{/other_user}","gists_url":"https://api.github.com/users/tsconn23/gists{/gist_id}","starred_url":"https://api.github.com/users/tsconn23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsconn23/subscriptions","organizations_url":"https://api.github.com/users/tsconn23/orgs","repos_url":"https://api.github.com/users/tsconn23/repos","events_url":"https://api.github.com/users/tsconn23/events{/privacy}","received_events_url":"https://api.github.com/users/tsconn23/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-16T22:36:59Z","updated_at":"2018-05-16T22:36:59Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Checks like these:\r\n\r\nhttps://github.com/edgexfoundry/edgex-go/blob/master/core/domain/models/adminstate.go#L46\r\nhttps://github.com/edgexfoundry/edgex-go/blob/master/core/domain/models/operatingstate.go#L46\r\n\r\nfail when the string being matched to the enum value are not in all caps. For example, in the blackbox testing JSON, the values of these properties are defined like so:\r\n\r\n\"adminState\": \"unlocked\",\r\n\"operatingState\": \"enabled\"\r\n\r\nThese cause the API to return an \"invalid AdminState\" or \"invalid OperatingState\" message because a case-sensitive match is comparing the above strings to \"UNLOCKED\" and \"ENABLED\" respectively. \r\n\r\nCall strings.ToUpper() where appropriate to fix this."}}
{"actor":{"display_login":"tsconn23"}}