question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Arrays in Input to dynamic API

See original GitHub issue

Hi there, I Have this setup:

Dynamic API/Service:

GetEventsForOwnerCalendarOutput GetEventsFor(GetEventsForInput input)

Input Dto


public class GetEventsForInput
    {
        public List<ExternalCalendarInput> Calendars { get; set; }
        public DateTime Start { get; internal set; }
    }

But swagger displays it like this:

image

Which causes NSwag to generate a function which does not use the ExternalCalendarInput for the array type.

image

Is this a bug or limitation?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
worthy7commented, Jul 5, 2018

Ah, it seems all Get requests don’t use the DTO. So that is why it is not wrapped into a DTO. image

I think that get requests cannot have deep objects in an array… a limitation of WEBAPI perhaps…

0reactions
hikalkancommented, Oct 5, 2018

if you know nswaggers config quite well

I am not swagger expert 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamically using array values as API POST parameters in ...
Dynamically using array values as API POST parameters in Powershell. I've redacted the URL endpoint, and the right tenant name, as this is...
Read more >
Fill inn dynamically from array to body api - Questions
In my first project with N8N I am at the final step. I have a json response from a licensedistributor. The json response...
Read more >
Posting an array to Post/Put API with FromForm parameter
Hello, Currently I'm building a Form input which the values will be sent to a Post and Put API. Now, the problem is,...
Read more >
Input Rule for a Dynamic Array
An input rule for a dynamic array determines the data type of the array elements. You can select one or more data types....
Read more >
Dynamic Array as an input field to a service - Adabas-Natural
I successfully developed a subprogram with dynamic array as one of the input fields, tested in DDL Tester. Can't get syntax to pass...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found