Search code examples
swaggerautorest

Generating domain model classes from swagger with Autorest


I'm trying to use Autorests own example to generate a client.

https://github.com/Azure/autorest/blob/main/docs/generate/readme.md

And when I run

autorest --input-file=pets.json --csharp

I get a Client class and an Options class. But it does not generate the Dog or Kitten classes for me, eventhough I can see the they are defined the pets.json file.

What am I missing here?


Solution

  • autorest --input-file=pets.json --csharp --generation1-convenience-client

    seemed to be the answer :)