{"action":"opened","issue":{"url":"https://api.github.com/repos/strongloop/loopback/issues/3869","repository_url":"https://api.github.com/repos/strongloop/loopback","labels_url":"https://api.github.com/repos/strongloop/loopback/issues/3869/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback/issues/3869/comments","events_url":"https://api.github.com/repos/strongloop/loopback/issues/3869/events","html_url":"https://github.com/strongloop/loopback/issues/3869","id":318809756,"number":3869,"title":"Default Property does not work for request argument of remote method in OpenAPI explorer","user":{"login":"tgijasonyip","id":38749833,"avatar_url":"https://avatars2.githubusercontent.com/u/38749833?v=4","gravatar_id":"","url":"https://api.github.com/users/tgijasonyip","html_url":"https://github.com/tgijasonyip","followers_url":"https://api.github.com/users/tgijasonyip/followers","following_url":"https://api.github.com/users/tgijasonyip/following{/other_user}","gists_url":"https://api.github.com/users/tgijasonyip/gists{/gist_id}","starred_url":"https://api.github.com/users/tgijasonyip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgijasonyip/subscriptions","organizations_url":"https://api.github.com/users/tgijasonyip/orgs","repos_url":"https://api.github.com/users/tgijasonyip/repos","events_url":"https://api.github.com/users/tgijasonyip/events{/privacy}","received_events_url":"https://api.github.com/users/tgijasonyip/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-30T07:50:24Z","updated_at":"2018-04-30T07:50:24Z","closed_at":null,"author_association":"NONE","body":"In the OpenAPI explorer page, I want to show custom default value for an argument of the request of an API. Unfortunately, the default value never display.\r\n\r\n# Steps to reproduce\r\n\r\n1. Set the default value in common/models/test-user.json\r\n![image](https://user-images.githubusercontent.com/38749833/39418642-10157938-4c8e-11e8-83df-130c3ea150ce.png)\r\n\r\n2. Run the application\r\n3. Visit the OpenAPI Explorer page\r\n4. Check the example value of the request argument displayed on the page\r\n\r\n# Link to reproduction sandbox\r\nhttps://github.com/tgijasonyip/loopback-sandbox\r\n\r\n# Expected result\r\nThe example value for the \"data\" parameter in /TestUser/test API should be\r\n```\r\n{\r\n  \"username\": \"string\",\r\n  \"password\": \"string\"\r\n}\r\n```\r\nOr the above value may be displayed in the value textarea of the parameter.\r\n\r\n# Actual result\r\nThe example value displayed is\r\n```\r\n{\r\n  \"id\": 0,\r\n  \"username\": \"string\",\r\n  \"email\": \"string\",\r\n  \"firstName\": \"string\",\r\n  \"lastName\": \"string\"\r\n}\r\n```\r\nwhich is the schema of the model associated to this API\r\n\r\n![image](https://user-images.githubusercontent.com/38749833/39418586-d30c4616-4c8d-11e8-8ac2-cbe207f25884.png)\r\n\r\n\r\n# Additional information\r\nThe default value works for non-body and non-source argument.\r\nThe issue was reported in https://github.com/strongloop/loopback/issues/2730\r\n"}}
{"actor":{"display_login":"tgijasonyip"}}