{"action":"created","issue":{"url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/841","repository_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore","labels_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/841/labels{/name}","comments_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/841/comments","events_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/841/events","html_url":"https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/841","id":347554104,"node_id":"MDU6SXNzdWUzNDc1NTQxMDQ=","number":841,"title":"Extensions for parameter's items?","user":{"login":"coiscir","id":15981,"node_id":"MDQ6VXNlcjE1OTgx","avatar_url":"https://avatars3.githubusercontent.com/u/15981?v=4","gravatar_id":"","url":"https://api.github.com/users/coiscir","html_url":"https://github.com/coiscir","followers_url":"https://api.github.com/users/coiscir/followers","following_url":"https://api.github.com/users/coiscir/following{/other_user}","gists_url":"https://api.github.com/users/coiscir/gists{/gist_id}","starred_url":"https://api.github.com/users/coiscir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coiscir/subscriptions","organizations_url":"https://api.github.com/users/coiscir/orgs","repos_url":"https://api.github.com/users/coiscir/repos","events_url":"https://api.github.com/users/coiscir/events{/privacy}","received_events_url":"https://api.github.com/users/coiscir/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-03T22:32:58Z","updated_at":"2018-08-26T03:52:38Z","closed_at":"2018-08-26T03:52:38Z","author_association":"NONE","body":"AFAICT, SwaggerGen doesn't currently allow adding extensions to a parameter's items.\r\n\r\n```csharp\r\npublic void Apply(IParameter parameter, ParameterFilterContext context)\r\n{\r\n    if (parameter is PartialSchema parameterSchema)\r\n    {\r\n        parameterSchema.Items.Extensions /* nope */ .Add(...);\r\n    }\r\n}\r\n```\r\n\r\nHave I overlooked an option that permits this in v3.0.0 or is it a reasonable request to add in a future version?\r\n\r\nOne API includes a query-string parameter that's an enum array. I'd like to include [autorest's `x-ms-enum` extension](https://github.com/Azure/autorest/blob/master/docs/extensions/readme.md#x-ms-enum) so it remains `enum[]` rather than becoming `string[]` in the client. And, autorest only accepts the extension on the same schema object as `\"enum\": []`, including items.\r\n\r\n```json\r\n\"parameters\": [\r\n  {\r\n    \"name\": \"foos\",\r\n    \"...\": \"...\",\r\n    \"type\": \"array\",\r\n    \"items\": {\r\n      \"type\": \"string\",\r\n      \"enum\": [ \"Bar\", \"Baz\" ],\r\n      \"x-ms-enum\": { \"name\": \"Foo\" }\r\n    }\r\n  }\r\n]\r\n```\r\n\r\n```csharp\r\npublic enum Foo { Bar, Baz }\r\npublic IActionResult Get([FromQuery] Foo[] foos)\r\n```"},"comment":{"url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/comments/416011964","html_url":"https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/841#issuecomment-416011964","issue_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/841","id":416011964,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjAxMTk2NA==","user":{"login":"domaindrivendev","id":1434343,"node_id":"MDQ6VXNlcjE0MzQzNDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1434343?v=4","gravatar_id":"","url":"https://api.github.com/users/domaindrivendev","html_url":"https://github.com/domaindrivendev","followers_url":"https://api.github.com/users/domaindrivendev/followers","following_url":"https://api.github.com/users/domaindrivendev/following{/other_user}","gists_url":"https://api.github.com/users/domaindrivendev/gists{/gist_id}","starred_url":"https://api.github.com/users/domaindrivendev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domaindrivendev/subscriptions","organizations_url":"https://api.github.com/users/domaindrivendev/orgs","repos_url":"https://api.github.com/users/domaindrivendev/repos","events_url":"https://api.github.com/users/domaindrivendev/events{/privacy}","received_events_url":"https://api.github.com/users/domaindrivendev/received_events","type":"User","site_admin":false},"created_at":"2018-08-26T03:52:38Z","updated_at":"2018-08-26T03:52:38Z","author_association":"OWNER","body":"See 76f7b3e14e53c19cfc2ff4021cc7f169916199b2. Will be generally available with the upcoming 4.0.0 release (still some other issues to fix that will be part of that). In the meantime you can download the preview version from myget.org:\r\n\r\nhttps://www.myget.org/feed/domaindrivendev/package/nuget/Swashbuckle.AspNetCore"}}
{"actor":{"display_login":"domaindrivendev"}}