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.

"No Input Files Provided" after update of Autorest to 2.0.4210

See original GitHub issue

We have a configuration file called “sdk.md” which we call with autorest. It seems since updating to autorest 2.0.4210 that we get the following error when trying to run the command

autorest sdk.md

[Exception] No input files provided

This is happening on multiple computers that we develop on. The configuration file has not changed as part of this. It seems like its not reading any of the Configuration file settings at all. Has something changed that could cause this?


input-file: http://localhost:49304/swagger/v1/swagger.json

csharp:
  namespace: SubscriptionsSdk
  output-folder: Client
  add-credentials: true
  client-side-validation: false
  enable-xml: true                # enable experimental XML serialization support
  # azure-arm: true               # uncomment this line to enable code generation in the Azure flavor

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
RikkiGibsoncommented, Dec 19, 2017

Please make AutoRest crash with an actionable error message if a README.md is provided without the magic string.

1reaction
fearthecowboycommented, Dec 1, 2017

Ok, figured it out.

There is something clearly wrong with the init cmd or something; I found some (unicode?) crap in the file.

I reloaded the file you gave with DOS (cp437) encoding via vscode, and it shows what’s really inside:

´╗┐# StorageManager
> see https://aka.ms/autorest

This is the AutoRest configuration file for the API-NAME.

---
## Getting Started 
To build the SDK for API-NAME, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest`

To see additional help and options, run:

> `autorest --help`
---

## Configuration for generating APIs

...insert-some-meanigful-notes-here...

---
#### Basic Information 
These are the global settings for the API.

``` yaml
# list all the input OpenAPI files (may be YAML, JSON, or Literate- OpenAPI markdown)
input-file:
  - swagger.json

override-client-name: 'StorageManagerClient'
```

---
#### Language-specific settings: CSharp

These settings apply only when `--csharp` is specified on the command line.

``` yaml $(csharp) 
csharp:
  namespace: 'IN.ServiceLayer.StorageManager.Client'
  output-folder: '.'
  azure-arm: true
```

To fix this, load the file up in vscode, and click on the UTF-8 at the bottom and do ‘save with encoding’ and select DOS (cp437)

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Autorest Failed resolving swagger.json against file when ...
I unchecked ssl and ran the following successfully. autorest --v3 --input-file=http://localhost:60705/swagger/v1/swagger.json --csharp --output- ...
Read more >
Autorest is failing in generating sdk with "[Exception] No input files ...
Trying to generate sdk through autorest but getting error "[Exception] No input files provided." Even input file is configured in config file.
Read more >
Installation - npm
If you have a markdown config file then there is no need to use --input-file , simply provide the path to the markdown...
Read more >
AutoRest Command Line Interface Documentation
AutoRest will use a configuration file to control the code generation process. By default, AutoRest will look for a file called readme.md or...
Read more >
AutoRest and OpenAPI: The backbone of Azure SDK
AutoRest is a tool that provides a code generation framework for converting OpenAPI 2.0 and 3.0 specifications into client libraries for the ...
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