When converting from V2 to V3 the host url gets changed to sth invalid.
Example 1
OpenAPI V2:
host: "your-bot-domain.de"
After conversion to V3:
servers:
- url: https://://your-bot-domain.de/
Example 2
OpenAPI V2:
host: "https://your-bot-domain.de"
After conversion to V3:
servers:
- url: https://://https:%2F%2Fyour-bot-domain.de/
Code
Code to reproduce:
var doc openapi2.T
input, err := ioutil.ReadFile(convertFile)
if err != nil {
panic(err)
}
err = yaml.Unmarshal(input, &doc)
if err != nil {
os.Exit(1)
}
newDoc, err := openapi2conv.ToV3(&doc)
if err != nil {
os.Exit(1)
}
log.Info("Writting file " + outputFile)
yaml, err := yaml.Marshal(newDoc)
if err != nil {
}
os.WriteFile(outputFile, yaml, 0666)
When converting from V2 to V3 the host url gets changed to sth invalid.
Example 1
OpenAPI V2:
After conversion to V3:
Example 2
OpenAPI V2:
After conversion to V3:
Code
Code to reproduce: