may the host and schemes be optional?
See original GitHub issueI upgraded recently from guardrail 0.43.0 to 0.45.2, and in doing so the cli crashed:
Exception in thread "main" java.net.URISyntaxException: Expected scheme-specific part at index 5: http:
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.failExpecting(URI.java:2854)
at java.net.URI$Parser.parse(URI.java:3057)
at java.net.URI.<init>(URI.java:673)
at com.twilio.guardrail.Common$.$anonfun$prepareDefinitions$8(Common.scala:55)
at cats.data.NonEmptyList.map(NonEmptyList.scala:76)
at com.twilio.guardrail.Common$.$anonfun$prepareDefinitions$7(Common.scala:53)
at scala.Option.map(Option.scala:146)
at com.twilio.guardrail.Common$.$anonfun$prepareDefinitions$1(Common.scala:53)
Looks like guardrail now expects host
and schemes
to be defined:
https://github.com/twilio/guardrail/blob/320afebc2c26f800de7699bd009b314d4ed4c6be/modules/codegen/src/main/scala/com/twilio/guardrail/Common.scala#L55
Are these required in swagger or can they be optional?
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
API Host and Base Path - Swagger
host and schemes can be omitted for a more dynamic association. In this case, the host and scheme used to serve the API...
Read more >Parsing URL with port and without scheme - Stack Overflow
I am trying to parse a URL in Go and get host and scheme from the URL. But while parsing the ...
Read more >OpenAPI Specification v3.1.0 | Introduction, Definitions, & More
description, string, An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text ...
Read more >URL blocklist filter format - Chrome Enterprise and Education ...
This field is optional, and must be followed by ://. For details, see Schemes you can use. Not case sensitive. host (required). A...
Read more >domaindrivendev/Swashbuckle.WebApi - GitHub
This provides a convenient way for users to browse documentation for different API versions. Describing Security/Authorization Schemes. You can use BasicAuth, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dsilvasc Excellent! Thanks for confirming!
Resolved in 0.45.3, which has now been released. Feel free to reopen if necessary, as I deviated slightly from the version you tested, in order to maintain the default scheme (http) in the case of having the domain segment of the
host
specified.