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.

Custom List Models

See original GitHub issue

Hi, I have a question on how to customise response types in AutoRest.

Our API returns a type PagedResponse<T> for rest methods. It’s a custom list that includes the total items and pages etc. When a method in our RestAPI returns this, AutoRest is creating a new implementation for each return type.

E.g. PagedResponse<SomeItem> gets a return type called PagedResponseSomeItem PagedResponse<AnotherItem> gets a return type called PagedResponseAnotherItem

Is there anyway to get AutoRest to use a generic implementation?

We’re using the CSharp code generator.

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
skrustycommented, Sep 26, 2017

Fantastic! That seems to have worked. Quick look at the models and they’ve generated correctly, will update once I’ve actually tested the client deserialise.

Thank you once again (both of you).

0reactions
dekacommented, Jun 7, 2018

Hi, do you plane something other than this workaround ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

List Custom Models - Form Recognizer - Microsoft Learn
Basic custom model information. Models. Response to the list custom models operation. ModelStatus. Status of the model. Summary.
Read more >
11.3. Example: A Simple Custom List Model - scentric
Our list model is represented by a simple list of records, where each row corresponds to a CustomRecord structure which keeps track of...
Read more >
how to create a Custom list model in Java - Stack Overflow
My first attempt was to add a Panel object that contained the info i wanted in the list, then add it to an...
Read more >
Lists: Custom Sets - Pyramid Help
The List Designer is for building custom lists or "sets" . A list is a user-defined group of elements, from a single hierarchy...
Read more >
Custom Models | Firebase ML - Google
If you use custom TensorFlow Lite models, Firebase ML can help you ensure your users are always using the best-available version of your...
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