Contributions
Re: What is the correct way to define a result type of array of objects
Thanks, Yea being new to the system I wanted to create an api without adding the issues of a reference. After I get it working I will change to a reference as you suggested. I will give it a try and let you know how I make out. thanks again. Rich2.4KViews0likes0CommentsRe: What is the correct way to define a result type of array of objects
thanks for the reply in this case I am requesting a Language list that is supported in the system. I pass the list name (Language) and some parms and get this list back So I am confused if I have created the swagger definition correctly. Thanks [ { "ListID": 258806, "ListName": "Language", "ListItem": "Albanian", "Abbreviation": null }, { "ListID": 101, "ListName": "Language", "ListItem": "Arabic", "Abbreviation": "ar" }, { "ListID": 201, "ListName": "Language", "ListItem": "Bahasa Indonesia", "Abbreviation": null }, { "ListID": 258706, "ListName": "Language", "ListItem": "Bengali", "Abbreviation": null }, { "ListID": 301, "ListName": "Language", "ListItem": "Cantonese", "Abbreviation": null }, { "ListID": 401, "ListName": "Language", "ListItem": "Croatian", "Abbreviation": "hr" }, { "ListID": 501, "ListName": "Language", "ListItem": "Danish", "Abbreviation": "da" }, { "ListID": 601, "ListName": "Language", "ListItem": "Dutch", "Abbreviation": "nl" }, { "ListID": 701, "ListName": "Language", "ListItem": "English", "Abbreviation": "en" }, { "ListID": 801, "ListName": "Language", "ListItem": "Filipino", "Abbreviation": null }, { "ListID": 901, "ListName": "Language", "ListItem": "Finnish", "Abbreviation": "fi" }, { "ListID": 1001, "ListName": "Language", "ListItem": "French", "Abbreviation": "fr" }, { "ListID": 1101, "ListName": "Language", "ListItem": "German", "Abbreviation": "de" }, { "ListID": 1201, "ListName": "Language", "ListItem": "Greek", "Abbreviation": "el" }, { "ListID": 1301, "ListName": "Language", "ListItem": "Hebrew", "Abbreviation": "he" }, { "ListID": 1401, "ListName": "Language", "ListItem": "Hindi", "Abbreviation": "hi" }, { "ListID": 1501, "ListName": "Language", "ListItem": "Hungarian", "Abbreviation": "hu" }, { "ListID": 1601, "ListName": "Language", "ListItem": "Irish", "Abbreviation": "ga" }, { "ListID": 1701, "ListName": "Language", "ListItem": "Italian", "Abbreviation": "it" }, { "ListID": 1801, "ListName": "Language", "ListItem": "Japanese", "Abbreviation": "ja" }, { "ListID": 1901, "ListName": "Language", "ListItem": "Korean", "Abbreviation": "ko" }, { "ListID": 2001, "ListName": "Language", "ListItem": "Mandarin", "Abbreviation": null }, { "ListID": 2101, "ListName": "Language", "ListItem": "Norwegian", "Abbreviation": "no" }, { "ListID": 2201, "ListName": "Language", "ListItem": "Persian", "Abbreviation": "fa" }, { "ListID": 2301, "ListName": "Language", "ListItem": "Polish", "Abbreviation": "pl" }, { "ListID": 2401, "ListName": "Language", "ListItem": "Portuguese", "Abbreviation": "pt" }, { "ListID": 2501, "ListName": "Language", "ListItem": "Romanian", "Abbreviation": "ro" }, { "ListID": 2601, "ListName": "Language", "ListItem": "Russian", "Abbreviation": "ru" }, { "ListID": 2701, "ListName": "Language", "ListItem": "Spanish", "Abbreviation": "es" }, { "ListID": 258906, "ListName": "Language", "ListItem": "Swahili", "Abbreviation": null }, { "ListID": 2801, "ListName": "Language", "ListItem": "Swedish", "Abbreviation": "sv" }, { "ListID": 2901, "ListName": "Language", "ListItem": "Turkish", "Abbreviation": "tr" }, { "ListID": 3001, "ListName": "Language", "ListItem": "Ukranian", "Abbreviation": null }, { "ListID": 3101, "ListName": "Language", "ListItem": "Urdu", "Abbreviation": "ur" } ]2.4KViews0likes1CommentWhat is the correct way to define a result type of array of objects
1. is this definition correct to return a variable size array of list items? responses: 200: description: List Returned schema: type: object format: array properties: ListID: type: integer format: int64 description: ID of the list ListName: type: string description: List name ListItem: type: string description: List Item Text Abbreviation: type: string description: Abbreviation text if applicable 2.when I generate the client code in c# do I need to do something to process the array. right now I am getting a json deserialization returns null. It seems to me that if I define the results as an array of items it should give me a list ofInlineResponsexxx's thanks for you helpSolved2.4KViews0likes5Comments