oav fails to find REST API definition from readme.md
- Dominant language
- TypeScript
- Stars
- 104
- Forks
- 62
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 5
Description
I'm attempting to generate an API scenario test using oav following the directions here:
https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/api-scenario/how-to/generateABasicApiScenario.md
But oav fails because it cannot find the REST API definition file referenced in the readme.
```
[mikekistler@Mikes-MacBook-Pro] ~/Projects/Azure/azure-rest-api-specs (main)>oav generate-api-scenario static --readme specification/appconfiguration/resource-manager/readme.md
input swagger files: Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json
input-file:
[
'Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json'
]
{
message: `fatal error: ENOENT: no such file or directory, open 'Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json', {"errno":-2,"code":"ENOENT","syscall":"open","path":"Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json"}`,
level: '\x1B[31merror\x1B[39m'
}
fatal error: ENOENT: no such file or directory, open 'Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json', {"errno":-2,"code":"ENOENT","syscall":"open","path":"Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json"}
[mikekistler@Mikes-MacBook-Pro] ~/Projects/Azure/azure-rest-api-specs (main)>
```
The file _does_ exist.
```
[mikekistler@Mikes-MacBook-Pro] ~/Projects/Azure/azure-rest-api-specs (main)>ls specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json
specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json
[mikekistler@Mikes-MacBook-Pro] ~/Projects/Azure/azure-rest-api-specs (main)>
```
It seems that oav is failing to include the directory part of the path to the readme when referencing the REST API file.
Contributor guide
Assessment
This issue has not been assessed yet.