Closed ravenhall closed 5 years ago
Where does it say that you can use a string instead of a Mojo::URL object as "base_url"?
Also, what are you trying to accomplish with this issue? Do you want OpenAPI::Client to coerce a plain string into Mojo::URL? Or do you want some validation of base_url to be added? Or something else?
The subject is a bit confusing as well. Do you mean "Cannot set Mojo::URL host or scheme after construction with a plain scalar/string base_url"?
I'm closing this since the issue is inactive. Let me know if I've misunderstood something.
When constructing an OpenAPI::Client with a bare URL as the value of the base_url param, the host and scheme cannot be changed after construction.
However, if you instead construct a Mojo::URL object and pass that as a base_url, the methods can be accessed.
I'm including a test case that I wrote that demonstrates the issue below:
The test swagger spec: