Azure / Azure/oav

oav fails when attempting to generate api-scenario

Open
#816 0 comments 0 reactions 1 assignee Claimed by @jordan13game View on GitHub
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

To avoid the failure documented in #815, I am running oav from the directory that contains the readme.md file.

But oav fails -- issues a "fatal error" message -- because it appears to be attempting to create a directory called 'readme.md' in the current directory which obviously fails because there is already a readme.md file there.
```
[mikekistler@Mikes-MacBook-Pro] ~/Projects/Azure/azure-rest-api-specs/specification/appconfiguration/resource-manager (main)>oav generate-api-scenario static --readme readme.md
input swagger files: Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json
input-file:
[
'Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json'
]
write generated file /Users/mikekistler/Projects/Azure/azure-rest-api-specs/specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2022-05-01/test-scenarios/configurationStores.yaml
write generated file /Users/mikekistler/Projects/Azure/azure-rest-api-specs/specification/appconfiguration/resource-manager/readme.md/readme.test.md
{
message: `fatal error: EEXIST: file already exists, mkdir '/Users/mikekistler/Projects/Azure/azure-rest-api-specs/specification/appconfiguration/resource-manager/readme.md', {"errno":-17,"code":"EEXIST","syscall":"mkdir","path":"/Users/mikekistler/Projects/Azure/azure-rest-api-specs/specification/appconfiguration/resource-manager/readme.md"}`,
level: '\x1B[31merror\x1B[39m'
}
fatal error: EEXIST: file already exists, mkdir '/Users/mikekistler/Projects/Azure/azure-rest-api-specs/specification/appconfiguration/resource-manager/readme.md', {"errno":-17,"code":"EEXIST","syscall":"mkdir","path":"/Users/mikekistler/Projects/Azure/azure-rest-api-specs/specification/appconfiguration/resource-manager/readme.md"}
[mikekistler@Mikes-MacBook-Pro] ~/Projects/Azure/azure-rest-api-specs/specification/appconfiguration/resource-manager (main)>
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.